Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create Apps in android which can't be uninstalled? Can we make System apps?

We are providing one default app for our customers with android phone. Which user can not be uninstall. I have used Device Admin feature from this example But user can delete app by deactivate from settings.

Another possible way I have found to install app in System/apps folder like all google apps (I am not sure).

For that I need to root access, so I am planning to do following, But not sure how to implement it.

  1. Programatically Root device
  2. Install app in System/apps folder
  3. Unroot device again

Like many System apps, How they are doing for such kind of feature ?

Please help.

like image 454
Hardik Joshi Avatar asked Aug 22 '14 11:08

Hardik Joshi


People also ask

How do you make an app that Cannot be uninstalled?

If you want to block users from uninstalling specific apps, scroll down to General. Then, simply lock the respective app(s). Once the app locked, users won't be able to launch it or uninstall it.

Is it possible to uninstall system apps on Android?

You can't delete some system apps that came pre-installed on your Android phone. But on some phones, you can turn them off so that they won't show on the list of apps on your phone. To learn how to disable apps, contact your device manufacturer.


1 Answers

I made custom Launcher, which can't be uninstalled.

  1. Important: root the phone
  2. install application as system application (install into /system/app) from recovery mode.
  3. Optional: subscribe for package removal, check if user tries to delete your app - and don't allow him to do this action (close package removal activity)

I made archive, which can be installed from recovery mode. Also my Launcher requires custom Superuser application (I don't want see notifications from Superuser app, when my Launcher runs root commands - silently give root access to my Launcher).

What I have in result: Launcher application, installed as system app (can't be removed). Also I blocked other launchers installation, added white list of allowed applications (don't install applications, which can manage file system and modify something important).

This solution full of tricks, but it's easier to implement than custom ROM.

If you customize the ROM, and install it to device somehow (contact device manufacturer from China for ex., request target device drivers and build the ROM on device), you can sign your application with system key, place it with other system apps, and then it can't be removed. In this case root not needed, but it requires much more time and power to implement.

If you will root device programmatically, than you should have exploit, which makes rooting. And different devices are rooted differently.

like image 170
Veaceslav Gaidarji Avatar answered Oct 17 '22 18:10

Veaceslav Gaidarji