Is there any permission or method to prevent an app from being uninstalled even after factory reset like system app that does not get uninstalled?
2 Answers
You will have to root your device and move the app using any application to the system folder. This will enable your app to be on device even after you have formatted your device.
Here is the link of application which provides this administrative feature:
This app moves apps from and to the /system/app
folder, making them a system app or a user app. System apps can get more priviledges, so some apps get more functionality when installed as a system app.
On the other hand, system apps can not be uninstalled. So this app can also be used to convert system apps to normal user apps by moving them from the /system/app
directory to /data/app
directory.
WARNING: Uninstalling important system apps might result in a unusable device! Use this function at your own risk and only if you know what you're doing! Make a NANDroid backup first! I won't give any kind of support if something goes wrong - don't install this app if you're not okay with that.
-
Thanks that really worked. But What If user factory reset it? will that moved app get uninstalled? Commented Jun 14, 2015 at 11:13
-
Another method is to make a file from the app immutable via elevated (SU) shell command
chattr -i
This prevents the file from being moved or deleted, thus, preventing the uninstallation of the APK.
This method is more useful to prevent the app from being updated.