I have an application that I need to make a system application to give it some extra permissions. I want to do that by moving it to /system/app
. I have used ES File Explorer
to do that. According to what I've understood, the app must be installed on SD Card
, but even when it's so, it doesn't become a system app. Here are my attempts (Any step related to moving or modifying files is done using ES File Explorer
):
- Without using SD Card:
I run the application using Android Studio to install the apk on the device.
I open /data/app and copy the apk file.
I open /system/app, I paste the apk.
I reboot the device.
I find the app icon on the screen, I click it, but it is not granted system permissions. Note, if I use cut instead of copy in step 2, when I reboot the device I don't find the app icon, although it's apk is there in
/system/app
.
- When using SD Card:
I run the application using Android Studio to install the apk on the device.
I open /data/app and cut the apk file.
I open /extSdcard and paste the apk file.
I copy the apk from /extSdCard , then paste it in /system/app.
I reboot the device.In this case I find the app icon, but when I open it I get this NullPointerException Error.
EDIT: To solve the NullPointerException error, I long click the app icon in /system/app, select properties, click on change beside permissions, check everything under read, check only owner checkbox under write, and uncheck everything under execute, then I click OK. The problem now is after rebooting the device, I don't find the app icon, although it's apk is in /system/app and /extSdCard/android/data with size around 47 MB, but when I open the app manager from settings, I find it with sd card icon (not android app icon) and with size 0.0 B, why is this happening?
How can I properly make the app as a system app?