How can I push my application package to Android emulator "/system/app" folder?
I've already tried to use:
"adb push myApk.apk /system/app"
and it gives me this:
"failed to copy: ... No space left on device"
Although from settings -> sdCard & Phone Storage, I get 37Mb of internal free space.
The whole point of this need is
related to permissions.
I need to have INSTALL_PACKAGES permission
and I know that by puting my application there,
in /system/app, I get that permission.
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.
Inside the “/“ aka the device folder, head to the “data” and then the “app” folder to access the all the installed apps. Here, you will find the data folders of all the third-party apps listed together. Now, long press on the folder of the app that you want to convert as system app and select the “cut” option.
I can install an APK to /system/app
with following steps.
Push APK to SD card.
$ adb push SecureSetting.apk /sdcard/
Enter the console and get the shell
$ adb shell
Switch to superuser. If your device is not rooted, get it rooted first. (If you don't know how to do that, just Google.)
$ su
Remount the system partition with WRITE permission.
$ mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Cat your APK from /sdcard/
to /system/
, some guys get a fail with cp
command due to cp
is not supported. So use cat
instead.
$ cat /sdcard/SecureSetting.apk > /system/app/SecureSetting.apk
Remout /system
partition back to READ-ONLY, and exit
$ mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
$ exit
Then reboot your device, the APK should have been installed on /system/app
.
Normally, the only way to get access to the "/system/" directory is to have a device rooted. I don't exactly know if that is required for the emulator though. That could be your issue.
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