When we use eclipse to develop a three-way apk, we may sometimes encounter such problems, some of which require calling system functions in the platform. However, when running in the platform where the application is exported, there will be an error in the permissions issue, so we need to use the following method to sign the three-party application so that it can invoke the platform's system functions:
1, we need to go to the platform system source code to obtain the following two key files and signature tool jar package
Signature jar Package:Out/host/linux-x86/framework/signapk.jar
Secret key file:Build\target\product\security\platform.x509.pem
build\target\product\security\ Platform.pk8
2, put the above several files and apk into the same folder, and then run the following command:
Java-jar Signapk.jar platform.x509.pemplatform.pk8 input.apk output.apk
3. After the output.apk is created, the APK is signed with the system secret key. Import this apk into the platform and find that the call system function is running without error.
Eclipse Compilation build apk How to invoke system functions in the platform