I have been asked to write a small simple app for an Android-based product. The device comes with two Android system images with different features. The app I\'m writing is
Before when my app was installed in /system/app I was getting below error:
07-20 10:52:46.512 933-951/? W/RecoverySystem﹕ !!! REBOOTING TO INSTALL /storage/emulated/legacy/Download/Update.zip !!!
07-20 10:52:46.512 933-951/? W/System.err﹕ java.io.FileNotFoundException: /cache/recovery/command: open failed: EACCES (Permission denied)
07-20 10:52:46.512 933-951/? W/System.err﹕ at libcore.io.IoBridge.open(IoBridge.java:409)
07-20 10:52:46.512 933-951/? W/System.err﹕ at java.io.FileOutputStream.(FileOutputStream.java:88)
07-20 10:52:46.512 933-951/? W/System.err﹕ at java.io.FileOutputStream.(FileOutputStream.java:73)
07-20 10:52:46.512 933-951/? W/System.err﹕ at java.io.FileWriter.(FileWriter.java:42)
07-20 10:52:46.512 933-951/? W/System.err﹕ at android.os.RecoverySystem.bootCommand(RecoverySystem.java:389)
07-20 10:52:46.522 933-951/? W/System.err﹕ at android.os.RecoverySystem.installPackage(RecoverySystem.java:337)
I had tried all permissions that were required but I couldn't proceed.
So then since I was using API above 4.2 I tried to put my app into /system/priv-app and it worked for me.