I\'m trying to install programmatically an app without user interaction and i\'m getting this error
SecurityException: Neither user 10057 nor current proces
About the error:
SecurityException: Neither user 10057 nor current process has android.permission.INSTALL_PACKAGES
To get INSTALL_PACKAGES permission:
In the manifest.xml file, put this attribute inside the tag manifest:
<manifest android:sharedUserId="android.uid.system" ...
Running these two lines fixes the issue with PackageManager permission error: "Couldn't create temp file for downloaded package file."
adb shell chown system.shell /data/app
adb shell chown system.shell /data/local
Refer to signatureOrSystem permissions on custom ROM
Basically,
<uses-permission>Done (well, at least works for me).
You do not need to add android:protectionLevel="signatureOrSystem" or android:sharedUserId="android.uid.system". You could sign with any certification.
I assume that putting it in the /system/app folder is not equivalent to it being loaded in the firmware.