Repository navigation
fix(android): let permission all change nothing on an app that declares no permissions - #4796
Conversation
…es no permissions Android prints no requested permissions section for a package with no <uses-permission>, so permission all refused it as an unreadable dump and an app launch with all failed. A dump that reaches the user's empty runtime block with no install section now reads as declaring nothing. A package with a shared user id gets no per-user runtime block, so one that declares nothing still refuses, as before.
|
This PR is ready at 6c1e320: Not blocking, and you can take or leave these: in |
|
Edit: #4796 merged at 6c1e320 before this push, so ce216dc isn't in main. I can send it as a small follow-up PR if you want these test changes. Thanks. I took all of them in ce216dc (tests and one doc comment, no runtime change).
|
* origin/main: (70 commits) refactor(apple-runner): one RUNNER_ERROR_CODES row per runner error code with parity/docs gates (callstack#4774) fix(android): require acknowledgements for test IME typing (callstack#4722) feat(scroll): add scroll refresh for pull-to-refresh (callstack#4770) refactor(host-kit): add request Scope and use it for the wait capture deadline (callstack#4794) fix(android): let permission all change nothing on an app that declares no permissions (callstack#4796) fix(cli): replace the CLI session and generated remote config instead of rewriting them in place (callstack#4797) fix(host-kit): accept a group-writable script directory the user owns (callstack#4799) fix(cli): escape control characters at the CLI's stdout and stderr writes (callstack#4778) fix(audit): do not report rows under a persistent bar that scrolling reveals (callstack#4775) fix(daemon): refuse an unsafe state directory before first use (callstack#4783) refactor: settle remaining single-deadline races through settleWithin (callstack#4788) refactor(host-kit): settle deadline races via settleWithin with R87 race ratchet (callstack#4766) fix(android): authenticate and bound persistent snapshot helper sessions (callstack#4729) fix(daemon): bound upload ingress and finalization (callstack#4721) chore(gates): ratchet wire-published reason literals by value (R89) (callstack#4779) feat(audit): evaluate role-less clickable views on Android (callstack#4780) fix(mutation): keep umask-setting tests out of Stryker's thread pool (callstack#4785) feat(audit): report controls that share one accessible name (callstack#4771) fix(contracts): pair open runtime hints with their apply operation (callstack#4754) refactor(daemon): report startup progress over the launch channel instead of marker files (callstack#4777) ...
* origin/main: feat(gesture): hold before the move with gesture pan --hold-ms (#4767) docs: clarify device verification and security proposals (#4805) fix(daemon-client): say that a hung daemon is stopped before ensureDaemon starts a new one (#4803) test: remove five timing races from CI (#4800) refactor(remote): save a remote script from memory with the local publisher (#4802) refactor(apple-runner): one RUNNER_ERROR_CODES row per runner error code with parity/docs gates (#4774) fix(android): require acknowledgements for test IME typing (#4722) feat(scroll): add scroll refresh for pull-to-refresh (#4770) refactor(host-kit): add request Scope and use it for the wait capture deadline (#4794) fix(android): let permission all change nothing on an app that declares no permissions (#4796) fix(cli): replace the CLI session and generated remote config instead of rewriting them in place (#4797) fix(host-kit): accept a group-writable script directory the user owns (#4799)
…sions fails with 'all' agent-device 0.21.42, which main now pins, leaves such an app unchanged under permission all (callstack/agent-device#4796), so the launch goes ahead.
…c#1918) * feat(app): grant every permission with app.permissions: 'all' A mobile() target sends one agent-device 'permission all grant' before each fresh launch, and device.openApp takes 'all' for one launch. A web() target grants every permission its browser grants. A map of names is unchanged. * fix(mobile): grant each permission for 'all' on iOS, and test it on the benchmark app The iOS simulator ignores the all service simctl privacy grant all records, so the microphone still prompted. 'all' now grants every DevicePermission but notifications, which the simulator refuses to set, one by one; Android keeps agent-device's single all grant. A benchmark test asks for the microphone after permissions: 'all' and fails on a system dialog. * docs(app): name the iOS notifications gap and the Android-only Appium capability * fix(mobile): skip an iOS service the runtime refuses under permissions 'all', and show 'all' in the reference types List the iOS services 'all' grants explicitly, so a future Android-only permission name never reaches simctl. Mirror the 'all' type in the config, engine and mobile references (en, ja, zh), and keep the changeset and reference to what users see. * docs(app): describe permissions 'all' in the ja and zh config reference, and name the iOS runtime skip Mirror the OpenAppOptions.permissions JSDoc in the mobile reference, and say in the changeset and LaunchPermissions that iOS skips a permission its runtime does not support. * fix(app): require core and e2e 0.24.1 in web and mobile for permissions 'all' core 0.24.0 refuses permissions: 'all' at config load, so a web or mobile release that documents it needs the core release that accepts it. * refactor(mobile): grant permissions 'all' on iOS in one agent-device all agent-device 0.21.40 expands an iOS all grant to each privacy service itself and skips one the runtime refuses, notifications included, so the engine sends one all on both platforms. iOS now grants location always. * docs(mobile): say Android 'all' grants runtime permissions, and fails for an app that declares none * docs(mobile): name the Android no-permissions caveat in the Maestro row, and point presetPermissions at LaunchPermissions * docs(mobile): put the Android no-permissions caveat next to the Android clause in the Maestro row * fix(app): require core and e2e 0.25.0 in web and mobile, the release that ships permissions all The pending release versions core and e2e to 0.25.0, so 0.24.1 is never published. * fix(app): engines opt in to permissions 'all' with grantsAllPermissions, and web skips names an older browser does not know - EngineAppInfo.permissions stays a map of names; 'all' reaches an engine that declares grantsAllPermissions as allPermissions. Config load refuses 'all' for any other engine, so one released before 'all' never reads the string as a map. - For 'all', web leaves out a permission type the browser refuses as unknown (Chrome 134 over CDP refuses localNetworkAccess) and grants the rest; a named grant still fails. * docs(changeset): engines receive allPermissions: true, not the string 'all' * docs(web): say which refused permission types 'all' can skip * docs(mobile): drop the caveat that an Android app declaring no permissions fails with 'all' agent-device 0.21.42, which main now pins, leaves such an app unchanged under permission all (callstack/agent-device#4796), so the launch goes ahead. * fix(app): stop the 'all' config error at what the engine does not take desktop() refuses a named permissions map too, so telling its target to name each permission sent the user to a second error. * docs(web): name the three permissions an older Chrome may skip under 'all' * test(web): start an attempt under 'all' on a browser that refuses one name * test(mobile): check the app as config load hands it under 'all' * test(protocol): carry allPermissions into prepare, and compare grantsAllPermissions in the manifest * docs(core): say launch() takes permissions 'all', linking the config reference * docs(mobile): drop SYSTEM_ALERT_WINDOW from permissions 'all' docs agent-device 0.21.42 sends declared permissions other than notifications and photos through pm grant, which skips SYSTEM_ALERT_WINDOW as not changeable. --------- Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>
Summary
On Android,
settings permission <grant|deny|reset> all --app <pkg>failed withCOMMAND_FAILED: Could not read declared permissionsfor an app that declares no permissions. Android prints norequested permissions:section for such a package, so a client that setsallbefore each launch could not launch it.Now a dump counts as declaring nothing only when it reaches the acting user's empty
runtime permissions:block and has noinstall permissions:section.allthen changes nothing and warns. Unreadable dumps still refuse before anypmcall, as do named targets. A shared-user-id package has no per-user runtime block, so it still refuses, as before.4 files. No linked issue.
Validation
ce216dc47(device run on6c1e3207d), base854bba6c5.check:affected --run --head ce216dc47(exactCommit: true): format, lint, typecheck, layering, fallow, build and vitest-related pass.unit: 21198 pass, 1 fails:upload-http-deadline.test.ts("did not complete in 3s"). It fails the same way on a clean854bba6c5checkout on this macOS host.test:integration:provider(308),check:command-docs,check:doc-links,check:doc-prose.6c1e3207d,node bin/agent-device.mjs settings permission <action> <target> --app <pkg> --platform android --serial emulator-5554. Oncom.callstack.agentdevice.imehelper, which declares no permissions:COMMAND_FAILED.allreturnpermissions: []and a warning.grant camerafails beforepm.reset allthengrant allworks as before.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.