Android 17 CtrlProxy targetSdk 37 audit¶
- Kind: concept
- Date: 2026-10-14
- Source: moved from
how-it-works/plat/android/android-17-target-sdk-audit.md; #12274, #12270, #12276, #12273, #12271, #12528, #13018, #12264, #12379 - Shaped: Android 17 behaviour changes for targetSdk 37 (CtrlProxy audit)
Scope and method¶
12274 (part of #12270, blocks #12276) audited android/control-proxy against the Android 17¶
behaviour changes that apply at targetSdk 37. Method: static search of
android/control-proxy/src/main (manifest, Kotlin, resources). Nothing was device-verified; items
marked “device check” are owed to the API 37 emulator lane (#12273).
Results¶
| Change | Result | Evidence |
|---|---|---|
Background activity launches through IntentSender |
Not affected | No PendingIntent, IntentSender or MODE_BACKGROUND_ACTIVITY_START_* in android/control-proxy/src/main. The only startActivity calls are MainActivity.kt:164 (ACTION_ACCESSIBILITY_SETTINGS, from the foreground activity) and PermissionManager.kt:76 (ACTION_MANAGE_OVERLAY_PERMISSION, FLAG_ACTIVITY_NEW_TASK). Neither passes an IntentSender. |
Reflective static final writes, MessageQueue reflection |
Not affected | No setAccessible, MessageQueue or Unsafe in android/control-proxy/src/main. Reflection in main is read-only lookup: DeviceStateTransitions.kt:48-50 and CtrlProxy.kt:6952-6953 (both owned by #12271), and PrototypeIcons.kt:56 (Class.forName of a bundled Compose icon class). Robolectric tests use ReflectionHelpers.setField/getField on instance fields and Java getDeclaredMethod, never static finals (CtrlProxyGestureServiceFixture.kt:44-71, SdkAnrBroadcastHandlerTest.kt:276-294, CtrlProxyOnDestroyTest.kt:80-209). |
Local network permission (ACCESS_LOCAL_NETWORK) |
Likely not affected; device check | The only listener binds loopback: WebSocketServer.kt:612 (embeddedServer(CIO, host = "127.0.0.1", ...)) and the port probe at WebSocketServer.kt:47. Since #12528 the prototype device client makes outbound LAN calls (e.g. 10.0.2.2); CtrlProxy now declares ACCESS_LOCAL_NETWORK (#13018). The host reaches the port through adb forward. Owed: confirm on the API 37 lane that observe over the forwarded port works with no ACCESS_LOCAL_NETWORK grant. |
| Cross-profile loopback block | Not affected | Work-profile reads do not use loopback. SdkCapabilitiesDiscovery.kt:25-26,75-78 addresses another user’s provider through content://<userId>@<authority> (binder, gated on INTERACT_ACROSS_USERS, declared at AndroidManifest.xml:21). No socket crosses profiles. |
| Certificate Transparency, ECH | Not affected | CtrlProxy makes no TLS connections of its own: no HttpURLConnection, HttpClient, SSLContext, TrustManager or DownloadManager in android/control-proxy/src/main, and the Ktor client is testImplementation only (build.gradle.kts:148-151). MANAGE_CA_CERTIFICATES (AndroidManifest.xml) serves the target apps’ interception, not CtrlProxy traffic. |
| Large screens (orientation/resizability locks ignored) | Not affected | The manifest has no screenOrientation, resizeableActivity, minAspectRatio or maxAspectRatio, and MainActivity never sets requestedOrientation. SavedPrototypeActivity (#12264) exists on this base; its manifest entry has no orientation, resizability or aspect-ratio locks. Its configChanges handles orientation/screen-size changes without locking them. |
IME TextAttribute.Builder.setTextSuggestionSelected() |
Follow-up, not required | CtrlProxyIme.kt commits text with commitText and uses no TextAttribute. An optional accessibility improvement, API 37 only, so it must be SDK_INT-guarded. |
Memory limits (MemoryLimiter:AnonSwap exits) |
Device check | No ApplicationExitInfo use in android/control-proxy/src/main. Owed: read ActivityManager.getHistoricalProcessExitReasons for CtrlProxy after a long soak on the API 37 lane (#12273). |
Owed to the API 37 lane (#12273)¶
observeover theadb forwardWebSocket works with noACCESS_LOCAL_NETWORKgrant.- After a long soak,
ApplicationExitInfoshows noMemoryLimiter:AnonSwapexits. MainActivityand the IME keyboard in multi-window and large-screen configurations.
Reflective call sites owned by #12271 were not touched. A non-test re-grep of android/control-proxy/src/main and android/playground at bump time (2026-10-15) found no IntentSender, MODE_BACKGROUND_ACTIVITY_START, setAccessible, MessageQueue, System.load, ContactsContract or TrustManager. The SavedPrototypeActivity manifest entry has no orientation, resizability or aspect-ratio locks.