Skip to content

Add INTERACT_ACROSS_USERS permission for cross-profile sharing (#4246)#62

Open
word5355 wants to merge 1 commit into
SagerNet:devfrom
word5355:fix-cross-profile-permission
Open

Add INTERACT_ACROSS_USERS permission for cross-profile sharing (#4246)#62
word5355 wants to merge 1 commit into
SagerNet:devfrom
word5355:fix-cross-profile-permission

Conversation

@word5355

Copy link
Copy Markdown

This PR adds the android.permission.INTERACT_ACROSS_USERS permission to the base AndroidManifest.xml to fix the cross-profile proxy routing issue on Android 17.

Starting with Android 17, cross-profile loopback communication (such as sharing a proxy via 127.0.0.1 to a Work Profile) is blocked by the OS by default.
By declaring this permission in the manifest, users can manually grant it via ADB to bypass the restriction and restore the cross-profile routing functionality.

  • Added android.permission.INTERACT_ACROSS_USERS to the base manifest.
  • Included tools:ignore="ProtectedPermissions" to gracefully suppress the expected Lint warnings, since this is a system-level permission.

(Note: I am not very experienced with Android development, so please let me know if there is a better approach or if any further adjustments are needed!)

Resolves SagerNet/sing-box#4246

Workaround Usage (For Android 17 Users)

After updating to a build containing this PR, users can run the following ADB command to grant the permission:

adb shell pm grant io.nekohasekai.sfa android.permission.INTERACT_ACROSS_USERS

Reference:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Please add INTERACT_ACROSS_USERS permission for Android 17 cross-profile routing

1 participant