Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developing a "system app" using Android Studio/AVD emulator

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.

like image 999
clemej Avatar asked Mar 09 '14 02:03

clemej


People also ask

How do I make an Android app a system app?

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.


1 Answers

Use Genymotion as your emulator. It provides root by default.

like image 54
free3dom Avatar answered Sep 28 '22 03:09

free3dom