Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask user to grant INTERNET permission + grant all-files access #160

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

elviscapiaq
Copy link
Collaborator

@elviscapiaq elviscapiaq commented Jan 10, 2025

This PR is an starting point of the implementation.
Currently, there's no way to determine if the target Android app has the android.permission.INTERNET granted.
Since android.permission.INTERNET is a normal permission, it must be declared at install time (https://developer.android.com/training/permissions/declaring). Therefore, we cannot modify it at runtime.

The current solution checks if android.permission.INTERNET is granted. If not, it returns an error message asking the user to add this permission in the AndroidManifest.xml file.

Remember we need android.permission.INTERNET granted to use the gRPC service. On the other hand, since Android 11 we don't need to grant the android.permission.WRITE_EXTERNAL_STORAGE, It is depreciated. For future needs we can use `MANAGE_EXTERNAL_STORAGE. to access specific files.

@elviscapiaq elviscapiaq force-pushed the permission branch 2 times, most recently from b5c307e to 12991fe Compare January 10, 2025 23:34
@elviscapiaq elviscapiaq marked this pull request as draft January 10, 2025 23:35
@RenfengLiu
Copy link
Collaborator

For permission, please check
https://github.com/LunarG/gfxreconstruct/blob/dev/USAGE_android.md#android-11-and-newer

And referrence from Renderdoc:

adb shell appops set --uid org.renderdoc.renderdoccmd.arm64 MANAGE_EXTERNAL_STORAGE allow

@elviscapiaq
Copy link
Collaborator Author

I updated this PR including the granting process for MANAGE_EXTERNAL_STORAGE.

@elviscapiaq elviscapiaq changed the title Ask user to grant INTERNET permission to app if needed Ask user to grant INTERNET permission + grant all-files access Jan 15, 2025
@elviscapiaq elviscapiaq marked this pull request as ready for review January 16, 2025 22:22
@elviscapiaq elviscapiaq merged commit f0a8f27 into google:main Jan 16, 2025
7 checks passed
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.

3 participants