banner



How To Make An App A System App In Android Programmatically

Part of the benefits of having an Android device is being able to install an app on it. Installing is as simple as one, two, three; just search for your desired app on the Google Play Store and hit the Install button. Though installing apps is easy, they can be installed as either user apps or system apps.

User apps are installed in the typical way via the Google Play Store, Amazon Appstore, third-party markets, or sideloading. In contrast, system apps are apps pre-installed in the phone's system partition with your ROM and typically, Android device users don't have the access to the system partition. This means that, ordinarily, users cannot directly install apps to or uninstall from the system partition.

You can install user apps as system apps by using such apps as Titanium Backup, but you have to go for the paid version of the app to be able to enjoy such feature. However, there are other methods to install user apps as system apps without paying fees.  Check out this guide for methods of installing ordinary user apps as system apps.

Warning

  • The information in this guide is provided for instructional and educational purposes only. There is no guarantee that these instructions will work under your specific and unique circumstances.
  • Use these instructions at your own risk. We shall not hold any responsibility or liability for whatever happens to you or your device arising from your use of the info in this guide.
  • Read and understand the whole guide first before actually performing the instructions.

Requirements

  • A rooted Android device. If you haven't rooted your Android device yet, you can check out our list of the rooting methods we've covered.
  • Enable USB debugging on your Android device. On most Android devices, you can find USB Debugging in Settings > Applications > Development.
  • Backup all personal data on your phone to make sure you have a copy of your personal data (e.g., contacts, SMS, MMS, Internet settings, Wi-Fi passwords, and the like) in case the procedure in this guide erases such data.
    • For backup tips, check our guides on how to sync your data to the cloud and how to create local backups of your mobile data.
  • Maintain a battery charge of 70% or more to make sure that you have sufficient power for the entire procedure.

Installing a System App with ES File Explorer

For this method, you will need root access and the ES File Explorer app. You can download this app free from the Google Play Store.

  1. Configure ES File Explorer by doing the following steps:
    1. Launch ES File Explorer.
    2. Select Menu and choose Settings.
    3. Under Settings, enable the options for Up to root and Root Explorer. A message will appear, requiring you to confirm your action. You will also need to confirm Superuser access.
    4. Enable Mount File System.
    5. Go back to the app's main menu.
  2. Get a copy of the APK (Android Package) of the app that you want to save as a system file by doing the following steps (skip to step 3 if you already have the app's APK file):
    1. Install an app from the Google Play Store. For this guide, we will be using the app BioRhythms as an example.
    2. Launch ES File Explorer and navigate to /data/app.
    3. Locate the APK file that you want to install as a system app. If you don't know the APK's filename, simply go to the Google Play Store link of your chosen app. View the link and take note of the words after "?id=". This will be your APK's filename. For instance, the BioRhythms app link is https://play.google.com/store/apps/details?id=app.biorhythms. The BioRhythms' APK is app.biorhythms-1.apk.
  3. Create a backup of the chosen APK by copying it to the phone's SD Card.
  4. After creating a backup, long tap on the APK file and a menu will appear. Choose Cut. A blue arrow will appear at the bottom of the screen.
  5. Go back to the main menu and navigate to /system/app/.
  6. Drag the little arrow at the bottom of the screen. It will bring up the icon of the APK file.
  7. Tap the APK file and it will be transferred to /system/app/.
  8. Find the APK file in /system/app/. Press and hold it and a menu will appear.
  9. Select Properties on the menu. The dialog properties will show up.
  10. Tap Change and it will show the permissions dialog box.
  11. Check the boxes for the following permissions in the dialog box:
    • User: Read and Write
    • Group: Read
    • Other: Read
  12. Select OK once the required settings have been made.
  13. Reboot your device.

You app is now saved as a system app.

Installing a System App via ADB

For this method, make sure that you have installed ADB (Android Debug Bridge) on your computer. You can get ADB by setting up the Android Software Development Kit (SDK) on your computer.

For more info, check out our guides on how to install Android SDK on your computer and how to use ADB. Also make sure to install the appropriate USB drivers for your device on your computer.

For Apps Installed on the Device

  1. Assuming you have installed the app on your device, go to the app's Google Play Store link and take note of the words after "?id=" and ignore the rest. For the BioRhythms app, the link is https://play.google.com/store/apps/details?id=app.biorhythms. Take note of app.biorhythms.
  2. Connect your device to the computer via USB cable.
  3. Open the command prompt on your computer and type the following commands:
    • adb remount
    • adb shell
    • su
    • cd /data/app/
  4. Type the command ls appfilename* (where "appfilename" is the app's ID on Google Play Store; make sure you include the asterisk at the end).  Based on our sample above, the command will be ls app.biorhythms*. This command will display the app's complete APK filename. In the case of our sample app, app.biorhythms-1.apk will appear on the screen.  This is the app's complete APK filename.  Take note of this complete filename.
  5. Enter the following command:
    • mv apk_full_filename_here /system/app/ apk_full_filename_here
    • exit
    • exit
    • adb reboot

    In the case of our sample app, the command above will look like this:

    • mv app.biorhythms-1.apk /system/app/app.biorhythms-1.apk
    • exit
    • exit
    • adb reboot
  6. The device will now reboot. Your app is now saved as a system app.

For Apps Whose APKs Are on the PC Hard Drive

If your copy of the app's APK file is on your computer, you can do the following steps:

  1. Open a command prompt on your computer and navigate to where the APK file is located.
  2. Enable USB debugging on your device and connect your device to the computer via USB cable.
  3. Enter the following commands:
    • adb remount
    • adb push apk-filename-here /system/app/
    • adb shell chmod 644 /system/app/ apk-filename-here
    • adb reboot

    In the case of our sample app, the command will look like this:

    • adb remount
    • adb push app.biorhythms-1.apk /system/app/
    • adb shell chmod 644 /system/app/ app.biorhythms-1.apk
    • adb reboot
  4. Your phone will automatically reboot. Your app will now be saved as a system app.

Congratulations! Your normal, ordinary user app is now installed as a system app on your Android device.

How To Make An App A System App In Android Programmatically

Source: https://www.androidauthority.com/install-user-app-as-system-app-how-to-93522/

Posted by: tayloragpich.blogspot.com

0 Response to "How To Make An App A System App In Android Programmatically"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel