Repository navigation
Conversation
AskPermissionActivity and AskPackageOverrideActivity are returned to the caller through AccountManager's KEY_INTENT from getAuthToken(). When the caller uses an interactive getAuthToken() overload, AccountManager starts that intent from the *caller's* process, so the target activity must be launchable by another app (i.e. exported). Both were android:exported= "false", so the launch fails with: Permission Denial: starting Intent ... not exported from uid <gms> and the auth request hangs or crashes. LoginActivity, returned the same way from addAccount(), is already android:exported="true"; this applies the same fix to the two consent activities. Fixes Aurora Store personal sign-in (overridePackage=com.android.vending) on Android 12+, where the package-override consent could never be shown. Signed-off-by: highda <github@highda.space>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AskPermissionActivityandAskPackageOverrideActivityare returned to thecaller through
AccountManager'sKEY_INTENTfromgetAuthToken(). With theinteractive
getAuthToken(account, type, options, activity, callback, handler)overload,
AccountManagerstarts that intent from the caller's process, so theactivity has to be launchable by another app. Both are
exported="false", so onAndroid 12+ the launch is denied:
and the token request hangs with no consent UI.
LoginActivityis returned the same way fromaddAccount()and is alreadyexported="true"(adding accounts works). This makes the two consentactivities consistent with it.
Most visible with Aurora Store personal sign-in: it requests a token with
overridePackage=com.android.vendingand never gets the override consent, sologin spins forever.
AskPermissionActivityhits the same wall when per-appaccount-permission consent is needed (AuroraOSS/AuroraStore#1470).
Security: same exposure
LoginActivityalready has. The activities resolvetheir result through the
AccountAuthenticatorResponsethe framework embeds inthe intent, and
AskPackageOverrideActivityonly writes the grant after theuser taps Allow on a dialog that names the requesting app and account, keyed to
that app's package and signature. Can gate on a non-null response or a
signature permission instead if preferred.
Repro on Pixel 10 / Android 16 / microG 0.3.17: Aurora personal sign-in hangs,
logcat shows the
not exported from uiddenial. Pre-seeding the override grantthat the activity would write makes
getAuthToken()skip it and sign-incompletes, which isolates the failure to the activity launch.