• 11

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Create System Application

What I should to do to create a system app (to obtain rights to use android:sharedUserId="android.uid.system"in manifest file without receiving an error from package manager about certification problem?

I use rooted phone with stock firmware.

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...

  • 27
Reply Report

What I should to do to create a system app

There are two types of system apps:

  • Apps installed on the system partition, which can be accomplished by users with root privileges

  • Apps signed by the same signing key that signed the firmware

to obtain rights to use android:sharedUserId="android.uid.system"

That definitely would require your app to be signed by the same signing key that signed the firmware. That's true for any android:sharedUserId.

But some guys edit stock apps, prepare zip file which user can update system apps by recovery.

You are welcome to provide any evidence that what they do somehow involves android:sharedUserId="android.uid.system".

  • 22
Reply Report
    • Can somebody tell me the difference between app installed on system app vs an actual system app? As far as access privileges are concerned? If my apk has same signature as the system ROM then can i install it as a normal app or in system partition?
    • @Micha?Rowicki: "here you have example of modificated stock caller application which uses android:sharedUserId="android.uid.phone"" -- that means that the app needs to be signed by the same signing key that signed all other apps using android.uid.phone. I have no idea what apps all use that.
      • 1
    • this sharedUserID use for example com.android.providers.telephony package so this package should be sign with the same keys as created by this developer, I doubt that Samsung released your certs to open community because it would be harmful for ordinary peoples using their phones.

A system app must be signed with the platform key. This is done by developers deploying an android platform on their own device, or mobile carriers.

If that is your case, the easiest way is to add this to your Android.mk:


If you add those lines without adding android:sharedUserId="android.uid.system" to your manifest, you will be a platform_app. A system app is more privileged than a platform app. That uses the platform key and runs as the system user.

If you are not the platform vendor, the platform vendor would need to sign your application using their platform key. Some vendors, including my company, will do this for 3rd parties demonstrating a valid reason for doing so.

Without the signature, your application can only be used on rooted devices.

  • 2
Reply Report
      • 2
    • Thanks for your most recent answer on this. Can you please provide some examples of vendors. If I need to publish a system app for all Samsung mobiles, is it possible to take a single signature and do it ? And should I request it from Samsung?
    • @KeshanFernando I cannot speak to other vendors. You would need to ask Samsung through their technical support. This technique is often used by Mobile Device Manager (MDM) applications and virus scanners. Most vendors will use a different signature for each handset. If Samsung does this, you would need to create and release a different version of your app for each handset.

I did not need to sign my app with the firmware signature! I have a rooted device. Therefore I can grant myself rights to write to certain directories using adb.

I moved my app to /system/priv-app instead of /system/app using those steps: Push my apk to /system/app

Now, I can access system permissions like android.permission.SHUTDOWN

  • 0
Reply Report
      • 2
    • So you just installed your app in /system/priv-app and the system automatically granted you the SHUTDOWN permission? Or you had to do something else? Because it doesn't work with me. It's installed there (I've root permissions too), I asked for it on the manifest and it still says I don't have it. If if helps, I installed it after that as an "update" for it to install files on the SD card to use. Is this the problem? Because it needs to get files from the SD card. If it's not this, no idea what could be. Would you know a possible problem here?