How to create System Apps in android
Asked Answered
H

1

25

I want to create an system application(while installing it will ask user permission to make it as system app) for UN-rooted application. As I am not familiar in android, please tell me how to create it.

Thanks in advance.

Homophile answered 2/5, 2013 at 8:54 Comment(3)
I'm not sure you can do that. First, you need to sign your application with Android keys, and since your phone is un-rooted, I don't know if your able to do thatMarathon
Look at this article (androidauthority.com/…). Maybe it will help you.Metropolitan
Your question seems to be contradictory. Since you're telling us you're not familiar with Android, you'll have to specify exactly what mean when you use the term "system app". An iOS developer on Android for instance would certainly have a completely different definition of what a "system app" was supposed to be like on Android.Bedazzle
S
38

True system apps are baked into the ROM image, and signed with the same key the ROM was signed with, giving them extra access to the system.

You cannot add a new system app on the same level without updating the ROM image of the device, and even then you'll need the OEM key to sign your app and you will have to request them to include it in their ROM.

Having a rooted device allows standard apps to gain extra access without being system apps.

Smallwood answered 14/7, 2013 at 15:11 Comment(8)
Not exactly correct. System Apps do not need to be in the firmware/ROM - they can be installed just like ordinary (non-system) Apps. The critical point, as you indicate, is that the App must be signed with the same key used to sign the firmware Apps.Diverse
@Diverse But if they're installed like ordinary apps, they can also be uninstalled the same way iirc.Smallwood
They can be uninstalled, that's not necessarily a problem, though. (If they're baked into the ROM properly, only updates can be uninstalled)Simulator
@Diverse : (1) Are you saying that if an app is signed with same key as the OS then even if they reside in data/app they have all privileges like a system app? (2) Say, once we sign an app with the system key,is there any way we can confirm that the app really has become a system app?Buine
Hello, I am thinking to do this like : 1) Root phone programatically 2) Install apk in System/apps folder 3) UnRoot device. Is it feasible way to do? I need to make one default app which will never be uninstall from device. Please share any possible ways to achieve this. ThanksFlagler
@Buine (1) Yes. (2). To actually make an app run as the system user, you need to specify android:sharedUserId="android.uid.system" in the Apps' manifest (and of course, sign it with the firmware key). The easiest way to determine if an app is actually running as system is to look at its' uid in logcat messages - the system user always has a uid of 1000.Diverse
@Prince - is it feasible? Yes - it is common for people with rooted devices to remount /system as read-write and install apps into the system/app folder. The apps don't need to be system-level apps and installing it into the (normally read-only) system partition will prevent the user from uninstalling it - unless of course, the user can root the device and delete the APK themselves.Diverse
This comment is't true. System apps can be installed like regular apps.Lapel

© 2022 - 2024 — McMap. All rights reserved.