Question

I would like some general info on system apps. I am working with a manufacturer who is willing to give me the info required to make my app a system app. However, I do not know exactly what this information should be and how to change with my app to make it a system app with the given information. I believe I need the something in my manifest like this

android:sharedUserId="android.uid.system"

and then I need to sign my app with the manufactures key? I am not sure could someone explain to me exactly what the process would be please?

Also the reason my app needs to be a system app is so the user cannot uninstall it, but my app still needs to update. Is it possible to update my app when it is a system app? I would be updating if from google play like normal.

Thanks for any help I simply could not find very much information on this subject and would appreciate the help.

Was it helpful?

Solution

This link here would give you a bit of information.

A System application is NOT an application which is signed by the OS’s platform signatures. This is a common mistake believed by many and we shall come to this later on. A System application is merely an application which is placed under /system/app folder in an Android device. An application can only be installed in that folder if we have access to the OS’s ROM (system.img). The application is placed under /app folder after the ROM has been extracted. A device which loads the custom ROM will have the new System application added. The benefit of a System application is that the application cannot be removed from the device (cannot be uninstalled by the user). This is only because /system/app is a read-only folder.

http://ricston.com/blog/explaining-behavior-android-application-system-apps-nonsystem-apps/

As for updating your app through the play store, I am assuming you should be able to do that without any problems, if the app is on the play store, and you use the same signature every time. It need not be the manufacturer's certificate, but it's better to use that certificate to sign your app.

So, the only thing that you need to ensure is that, while building the ROM, the manufacturer puts your apk into the system folder, and it should work.

OTHER TIPS

  1. Use mkkey.sh http://www.kandroid.org/online-pdk/guide/release_keys.html script to create new certificates, including x509 certificates. you wont need these steps as manufacturer is giving you the keys.
  2. In AndroidManifest.xml of your application : under the element add the attribute android:sharedUserId=”android.uid.system”
  3. Export an unsigned version of your Android application using eclipse. Project >> Android Tools >> Export Unsigned Application Package
  4. Use /out/host//framework/signapk.jar to sign your app using platform.x509.pem and platform.pk8 in /build/target/product/security/ generated earlier

java –jar signapk.jar platform.x509.pem platform.pk8 your_app_unsigned.apk your_app_signed.apk

Answer to some of your other questions are already given by Kumar Bibek. These are the steps I followed when I had to do the same. This was in done in Android ICS. The steps might have changed but still worth a try.

Since Android O (Oreo), you need to sign the system apps with dev keys, unlike in the past versions you can just copy them to a system folder which has varied in the past.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top