-
Notifications
You must be signed in to change notification settings - Fork 346
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
Remove android.permission.READ_EXTERNAL_STORAGE permission requirement #2312
Comments
I'm going to attach a patch for this, because this is issue is a hard blocker to using $ web-ext run -t firefox-android --android-device=ANDROIDDEVICESERIALHERE --firefox-apk org.mozilla.reference.browser
Applying config file: ~/.web-ext-config.js
Running web extension from /tmp/ext-source-dir
Selected ADB device: ANDROIDDEVICESERIALHERE
UsageError: Required android.permission.READ_EXTERNAL_STORAGE has not be granted for org.mozilla.reference.browser. Please grant them using the Android Settings or using the following adb command:
adb shell pm grant org.mozilla.reference.browser android.permission.READ_EXTERNAL_STORAGE $ adb shell pm grant org.mozilla.reference.browser android.permission.READ_EXTERNAL_STORAGE
Exception occurred while executing 'grant':
java.lang.SecurityException: Package org.mozilla.reference.browser has not requested permission android.permission.READ_EXTERNAL_STORAGE
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1423)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1337)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:551)
at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:609)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2672)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:291)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6400)
at android.os.Binder.shellCommand(Binder.java:1071)
at android.os.Binder.onTransact(Binder.java:888)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4403)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6384)
at android.os.Binder.execTransactInternal(Binder.java:1337)
at android.os.Binder.execTransact(Binder.java:1278) |
@willdurand thanks for the steps for testing this. I didn't make an update to the latest web-ext so after the command I had the error displayed Updated to the latest commit - 1d35140 and first revoked the granted permission then I ran the command again , the error is no longer displayed and I could make a temporary upload with success using the emulator. Command is |
Follow-up to https://github.com/mozilla/web-ext/pull/2306/files#r698444621
web-ext doesn't need to ask for the READ_EXTERNAL_STORAGE permission on Android, because the profile/add-on is now stored in
/data/local/tmp
instead of/sdcard
: https://github.com/mozilla/web-ext/blame/c884696fd3ea496c67959337f98d4e39bdb08871/src/util/adb.js#L14 (#2200).Let's remove the code that does it to simplify the implementation.
The text was updated successfully, but these errors were encountered: