I'm developing an app that requires the android.permission.DUMP permission. This is only permitted for "system" apps (apps signed by the device vendor), or, I'm assuming, apps with root permissions.
How does one develop (and test) an app like that using the AVD emulators? I declare the permission I need, and then build and run the app in the emulator, but when I get to the portion that runs, I run into the same permission error whether I specify the permission in the manifest or not.
How does one develop these types of apps?
I realize that if this was a real device, I would need to root it and/or install a custom ROM. But surely there's a way to tell the emulator to treat my app as if it already was. I keep looking for an "install app as system app" or "run as root" checkbox in the IDE, and I can't find one.
Jeffrey A.First create a folder for your app ( Let say MyTestApp) inside packages/apps/ of your android AOSP downloaded source code. Then create a Android.mk file inside the folder(MyTestApp). Step 2 open Android.mk file and add folowing code Snippet and save this mk file. PRODUCT_PACKAGES tag at the bottom MyTestApp.
Use Genymotion as your emulator. It provides root by default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With