How To Install Any App As A System App On Android

While installing an app on your Android device is as simple as searching for it in the Google Play Store and hitting install, or sideloading its APK on your phone, that always installs them as user apps (also referred to as data apps). At times certain apps need to be installed as system apps rather than user apps in order to utilize their full potential, and that’s where things get a little complicated. In this guide, we will show you how you can install any Android app as a system app on your Android device.

Install-Any-Android-App-As-System-App

The apps installed on your Android devices can be broadly categorized as system apps or user apps, based on their installation location. The user apps are just all your normal app installations through the Google Play Store, Amazon Appstore or sideloading. These go into the /data partition of your Android phone, which is the part of the internal memory made available for user data and apps.

System apps are basically the apps that come pre-installed with your ROM. In a standard Android user environment, the user doesn’t have write access to the /system partition and thus, installing or uninstalling system apps directly isn’t possible. The process isn’t as hard as it may sound. However, there is a catch.

In order to install an app as a system app on your Android device, your device must either be rooted, or have a custom recovery installed (or both). Usually pretty much everyone who has a custom recovery installed uses a rooted ROM, so we’ll just be using the method for rooted phones.

Root Access File Manager Method

Requirements

  • Your Android device must be rooted. If it isn’t already, check out Guide on rooting Android.
  • A root access file manager of your choice. We will be using ES File Explorer for the purpose.
  • The APK file for the app you want to install as system app. If you have the app installed as a normal user app, don’t worry; we’ll show you how to grab its APK.

Procedure

  1. Configuring ES File Explorer for root read/write access (required only once):
    1. Launch ES File Explorer, press Menu and tap ‘Settings’.
    2. In the settings, enable the ‘Up to root’ check box.
    3. Further down in the settings, enable ‘Root Explorer’ check box. You will get a warning that you should confirm.
    4. You will then get the Superuser permissions request that you must allow.
    5. Finally, enable the ‘Mount File System’ check box, and press the back key to get back to the explorer interface. ES File Explorer is now configured to work as a root explorer. You do not need to do this again on the same device now, unless you uninstall ES File Explorer, perform a factory reset or install another ROM.
  2. Finding the APK of an already-installed normal app (skip to step 3 if you already have the APK):
    1. First of all, install the app from Play Store, if you haven’t already done that.
    2. Launch ES File Explorer and go to /data/app. (You may have to press the back button to get to / first).
    3. If you know the icon of the app, you can easily find it here. If you are having trouble finding the app here due to the confusing names or because of having a lot of apps installed, just search for the app in Google Play Store in a web browser and look at its Play Store link for the name. The file name will basically be the part after ?id= in its market link (and before any other question mark that may or may not appear in the link). For example, the market link for ES File Explorer is https://play.google.com/store/apps/details?id=com.estrongs.android.pop and its APK file in /data/app is com.estrongs.android.pop-1.apk.
  3. If you already have the APK of the file that you want to install as a system app, make sure you have transferred it to your device’s SD card if you haven’t done that already. Also make sure you know the path where you have copied it on the SD card.
  4. Once you have located the required APK on the SD card from ES File Explorer, tap-and-hold on its icon till you get a menu, and tap ‘Cut’. You should see a little blue arrow on the bottom of the screen now. (You may select ‘Copy’ instead of ‘Cut’ if you are copying a file over from the SD card and want to keep a copy there. In case of copying an APK from /data/app, always use ‘Cut’.)ES File Explorer Copying
  5. Now press the back button till you reach / and then browse to /system/app/
  6. Tap the little arrow that you see on the bottom of the screen. It will bring up a pane with the icon of the copied file.
  7. Tap on the file’s icon, and it will be transferred to /system/app/.
  8. Now find the app’s icon in the list of files there and tap-and-hold on it till you get the menu.
  9. Scroll down in the menu till you see ‘Properties’ and tap on it. You will now see the properties dialog.
  10. Tap the ‘Change’ button in front of the Permissions to bring up the permissions dialog.
  11. Make sure everything under ‘Read’ is checked, only ‘User’ is checked under ‘Write’ and nothing is checked under ‘Execute’ Your screen should look like the following:ES File Explorer Permissions
  12. Tap OK on this screen and then on the Properties screen. Your app’s permissions are now set correctly.
  13. Reboot your device. Your app is now ready to be used as a system app.

ADB Method

Requirements

  • Your Android device must be rooted. If it isn’t already, check out our guide on rooting Android.
  • ADB installed and configured on your computer. See our guide for the complete method.
  • The APK file for the app you want to install as system app. If you have the app installed as a normal user app, don’t worry; we’ll show you how to grab its APK.

Procedure

If you have the app installed on your phone as a normal user app:

  1. Search for the app in Google Play Store on your computer in a web browser, and open its Play Store page.
  2. Look at the Play Store link of the app for a string that starts with ?id= and ends before any further question mark in the link. That will be part of the APK’s name on your phone. For example, the market link for ES File Explorer is https://play.google.com/store/apps/details?id=com.estrongs.android.pop and its APK file in /data/app is com.estrongs.android.pop-1.apk. If you see another question mark after such a name in the link, ignore everything after that.
  3. Launch a command prompt window and enter the following commands one by one:
    adb remount
    adb shell
    su
    cd /data/app/
  4. Now enter this command, making sure you replace ‘file_name_part_comes_here’ with the partial file name for your app that you found out from the link in step B. Don’t forget the asterisk ( * ) in the end.
    ls file_name_part_comes_here*

    In case of our example from step B, the command would be

    ls com.estrongs.android.pop*
  5. As a result of the command in step D, you will see the complete file name of the app. In case of our example, the result would be com.estrongs.android.pop-1.apk. It is usually the same partial app name that we got from the link in step B, followed by a hyphen ( – ), a number (usually but not always 1), and the .apk extension. Viola, we have located the file name of the required APK.
  6. Now enter this command, replacing full_file_name_comes_here with the full file name including the extension:
    mv full_file_name_comes_here /system/app/full_file_name_comes_here
    exit
    exit
    adb reboot

    In case of our example, the command would be

    mv com.estrongs.android.pop-1.apk /system/app/com.estrongs.android.pop-1.apk

    And you’re done.

  7. Your app has been moved to the system partition, making it a system app from a user app. You may now close the command prompt window. The phone will now reboot for the changes to take effect.

If you have the APK of the file available on your computer:

  1. Open a command prompt window and navigate to the location of the APK file on your computer.
  2. Enter these commands, replacing file_name_comes_here with the full name of the APK file including the extension:
    adb remount
    adb push file_name_comes_here /system/app/
    adb shell chmod 644 /system/app/file_name_comes_here
    adb reboot

    For example if the file name is FileManager.apk, the commands would be like:

    adb push FileManager.apk /system/app
    adb shell chmod 644 /system/app/FileManager.apk

    And you’re done!

Your phone will reboot and your app will be ready to be used as a system app.

What is SuperUser??

Superuser is the app that manages what apps on your rooted device have access to su. Apps that are granted su have elevated permissions and can modify just about any part of the system. The app was originally written by zinx, and I took it and made it much more useable. The app consists of two parts, Superuser.apk and the su binary.

Superuser.apk runs as any other app and gives you, the user, a place to see what apps you have allowed or denied, as well as view a log of what apps have used su when.

The su binary is what other apps call when they need superuser rights. The binary checks the database maintained by Superuser.apk to determine if you have already granted rights to the requesting app, and if not tells Superuser.apk to display a prompt asking you for permission.

Superuser comes pre-installed on any rooted ROM. In fact, without it, you don’t have a rooted device at all. You cannot uninstall it, it lives on the system partition with other apps that came pre-installed on your device. It can be updated from the Market if the developer of your particular ROM has used a version that is signed with the proper keys, which are publicly available on my github.

su

Installing Superuser isn’t somethng you would need to do under normal circumstances, but just in case here are the files needed:

https://market.android.com/details?id=com.noshufou.android.su

 

Donut (1.6)

md5: 9d203f6b7ee6ca7c33a03beedd04a02f
Superuser-3.0.7-d-signed.zip | mirror | RM Web Connect
binary only
md5: 10af16ae444c942720f178fb47c52dc8
su-bin-3.0.3.2-d-signed.zip | mirror | RM Web Connect

Eclair/Froyo/Gingerbread/Honeycomb/IceCreamSandwich (2.1 – 4.0.3)
md5: fc462fa0630379edbe10006b1d19d9b1
Superuser-3.0.7-efghi-signed.zip | mirror | RM Web Connect
binary only
md5: 26d08a253f1883c13561d173094d70b9
su-bin-3.0.3.2-efghi-signed.zip | mirror | RM Web Connect

Older versions

Root Your Emulator

First Way:

Okay, so after doing  a lot of searching on the topic, I noticed that a lot of information on rooting an Android SDK emulator for testing, are either inaccurate or out-dated. Mostly just seeing questions on places like Stack Overflow. Not acceptable peoples!!

So I played around with it and made this nice little tutorial. The issue that most people have is either one of two diffrent errors.

  • “failed to copy ‘su’ to ‘/system/xbin/su’: Read-only file system” or
  • “failed to copy ‘su’ to ‘/system/xbin/su’: Out of memory”

Both of these errors have to do with how the file system is mounted. This can easily be resolved by running adb remount after the emulator is run. However you will need to start the emulator with a partition size of 512. Or at least 512 works best for me. Below is a tutorial on how to accomplish this in two different way. Hopefully one will work for you.

You will need to download the su binary and the Superuser.apk.  You can download the su binary and Superuser.apk from this location for now.

http://androidsu.com/superuser/

This may change at some point so if the link above doesn’t work, you can just Google for the two files that you will need:

Superuser.apk and su.

After you extract the .zip file, you will find the necessary files in this location:

systemappSuperuser.apk

and

systembinsu

The easiest thing to do is copy them to your SDK platform tools directory.

cd C:androidandroid-sdk-windowsplatform-tools

Now there are two different way to install the su binary. Keep in mind, this will need to be done everytime you restart the emulator.

Method One:

 This assumes you followed the previous steps.

1. Open Eclipse.

2. Open Command Line (cmd) and go to path there your android SDK located:

cd C:androidandroid-sdk-windowstools

3. Now we will run Emulator with given partition size, enter following command:

emulator -avd EmulatorName -partition-size 512

NOTE: EmulatorName – is the name of your emulator. You can find this in the AVD Manager in Eclipse.

You may also get an error that says:

From my experience, you can ignore this error.

Wait until emulator starts and minimize Command Line and Emulator, but don’t close them.

4. Open a new Command Line (cmd) and go to path:

cd C:androidandroid-sdk-windowsplatform-tools

5. Run the command

adb remount

You should get a succeed message.

6. Then run the following commands:

adb push su /system/xbin/su

If successful you will see the transfer rate message.

7. Next Run the following commands:

adb shell chmod 06755 /system
adb shell chmod 06755 /system/xbin/su
adb install Superuser.apk

If you are following these steps for the second time, you will get this message.

This is okay. The Superuser.apk will not uninstall when you restart the Emulator. If you are doing this to regain su access, you don’t need to re-install Superuser.apk, you can skip the install step.

8. After you run the commands you can verify su access by opening running the Superuser app from the emulator, if all is successful, when you try to update Superuser, you will see this message:

Method Two:
1. Open Eclipse.

2. Open Command Line (cmd) and go to path there your android SDK located:

cd C:androidandroid-sdk-windowstools

3. Now we will run Emulator with given partition size, enter following command:

emulator -avd EmulatorName -partition-size 512

NOTE: EmulatorName – is the name of your emulator. You may also get an error that says:

From my experience, you can ignore this error.

Wait until emulator starts and minimize Command Line and Emulator, but don’t close them.

4. Open a new Command Line (cmd) and go to path:

cd C:androidandroid-sdk-windowsplatform-tools

5. Run the command

adb remount.

You should get a succeed message.

6. Go to Eclipse and open

Window -> Open Perspective -> Other …

Select DDMS in the opened Dialog.

7. Select “File Explorer” tab.

Select directory systemxbin

8. Select “Push a file onto Device”  It’s the picture of the arrow pointing to the phone in the upper right hand corner.

Select “su” , and click okay.

9. Go back to the command prompt. (cmd). Use the one that you ran the adb remount on.

You should still be in the platform tools directory.

10. Now you want to install Superuser.apk

First run:

adb shell chmod 06755 /system

adb shell chmod 06755 /system/xbin/su

11. Next install Superuser.apk

adb install Superuser.apk

You should see the above message.

After this is completed, you can verify the install by accessing the the emulator and running Superuser, and attempting to update. If you have an old version you can update, or it might tell you you already have the updated version.

The Superuser.apk will not uninstall when you restart the Emulator. But you will have to install the su binary each time you shut down the emulator and restart it.

Hopefully this help. It worked for me :-) .

Second Way:
EmuTempRoot – Root tool for Android Virtual Device
This is my tool to apply a temporary root to the (already open) android’s emulator. If you’re a developer or simply want to run apps with root access in the emulator you may find this useful.

The emulator can also be launched from this tool;
this option is recommended since the AVD will be automatically configured in order to ensure a succesful root process.
You can still deploy apps to the emulator from eclipse.

Requirements:
– Windows Vista (it should work on XP and 7, but not tested)
– .NET Compact Framework 3.5 or higher
– Android SDK for 2.1 or higher

Usage:
– Unzip to desktop or any folder where special rights are not required
(e.g. do not unzip to the program files folder)
– Open EmuTempRoot (double-click)
– Open the AVD (better to open AVD from EmuTempRoot)
– Root! it lasts untill the AVD is rebooted

xda

Click the below link to download file

http://www.mediafire.com/?t89uoc8tgf02r2n