To run your App with the permissions of the underlying system. You need to sign your App with the firmware certificate of your operating system. This will only be an option for you, if you are targeting a certain device.
Then you can share the uid of the system in your AndroidManifest.xml
file.
android:sharedUserId="android.uid.system"
Since you have the platform key, how are you signing your APK? Here is a .bat file I use to sign my APKs. You can see in the command the files that are necessary (signapk.jar
, platform.x509.pem
, platform.pk8
):
@echo off
echo Signing APK "%1" with platform certificate.
java -Xms256m -Xmx512m -jar %~dp0\sign\signapk.jar -w %~dp0\sign\platform.x509.pem %~dp0\sign\platform.pk8 %1 test.apk
move test.apk %1 >NUL
echo APK is signed.
timeout 2