Signing my android application as system app
Well below is your answer,
You can find platform keys from
HERE. The command to sign apk (for linux) is:java -jar signapk.jar -w platform.x509.pem platform.pk8 APPLICATION.apk APPLICATION_sign.apk
onward Android 10 lib64 library path need to provided which can be found at
android/out/host/linux-x86
after generating a successful build, one can copy folder or simply provide its path to generate sign APKjava -Djava.library.path="<path to lib64>" -jar signapk.jar -w platform.x509.pem platform.pk8
If you sign your apk with platform keys you won't required root access you can simply install it from "adb install" command, and yes in someway it is like root 'cos it can access all internal api but keep in mind if your app is system signed then you can't write external storage.
First of all don't combine both root is user where system app is application type which distinguish from normal application below link might clear your confusion regarding it.
what-is-the-difference-between-android-user-app-with-root-access-and-a-system-ap
Android :Signing in android app with system signature
It was my mistake to not analyze it further, I tried installing it withadb install -r ".apk"
and found the exact error, which is "signatures are not matching". Then I contacted the manufacturer and the problem was solved.
How to sign Android app with system signature?
Finally I managed to discover a way to sign my application with the platform signature. You need to use keys located in <root-of-android-source-tree>/build/target/product/security/
and add android:sharedUserId="android.uid.system"
in your AndroidManifest.xml file.
Details from this google groups thread:
On top of signing Android 1.6 for Dream with certificates generated by
myself, I've also managed to sign my app with the platform certificate
and run it with the system sharedUserId. These are the steps I took:
- Build and flash to your Dream your own Android using https://web.archive.org/web/20081211205758/http://source.android.com:80/documentation/building-for-dream. Use the
mkkey.sh script on
https://web.archive.org/web/20091213215940/http://pdk.android.com/online-pdk/guide/release_keys.html to create
new certificates, including x509 certificates before you do 'make'.- In the
AndroidManifest.xml
of your application: under the<manifest>
element, add the attributeandroid:sharedUserId="android.uid.system"
.- Export an unsigned version of your Android application using Eclipse: right-click on the project >> Android Tools >> Export
Unsigned Application Package.Use
<root-of-android-source-tree>/out/host/<your-host>/framework/signapk.jar
to sign your app usingplatform.x509.pem
andplatform.pk8
in<root-of-android-source-tree>/build/target/product/security
generated earlier:java -jar signapk.jar platform.x509.pem platform.pk8 YourApp-unsigned.apk YourApp-signed.apk.
Install the app to your device:
adb install YourApp-signed.apk
- Run your app
- Use
adb shell ps
to confirm that your app is running as system.
How do I sign an Android application as a system app to use DEVICE_POWER permission
You can only sign your application as a system app if you are building Android from source for your project. If you're interested in a hack that will only work on your phone see:
How to sign Android app with system signature?
Create System Application
Ok, I think that I find sollution from great xda developers: http://forum.xda-developers.com/showthread.php?t=1776095 here is full description how to obtain access to apps signed by platform keys.
Do you apply with this approach?
PS it is interesting that users from stack instead of investigating hard problem immediately say that you can not solve it, then reduce novice user's reputation...
Related Topics
Converting from Glsurfaceview to Textureview (Via Gltextureview)
Firebase Console: How to Specify Click_Action for Notifications
How to Change System Navigation Bar Color
Calling Camera from an Activity, Capturing an Image and Uploading to a Server
Trying to Port Apache Poi to Android
Android How to Wait Until a Service Is Actually Connected
Handle Screen Orientation Changes When There Are Asynctasks Running
Android: Choose Default Launcher Programmatically
Android Detect Webview Url Change
Getting Gradle Error "Could Not Reserve Enough Space for Object Heap" Constantly in Intellij Idea
How to Make Part of The Text Bold in Android at Runtime
How Disable/Remove Android Activity Label and Label Bar
How to Place App Icon on Launcher Home Screen
Detecting Outgoing Call and Call Hangup Event in Android
Android - How to Set Background Color of All Screens
How to Launch Android Calendar Application Using Intent (Froyo)