How to install my default application on the root device

We have a tablet app that we deploy in retail outlets. It is currently being updated late at night, but after that it is no longer the standard β€œhome” application, and the user is given the opportunity to restart our application or default launcher. We always wanted our application to be a standard home application even after updates. Is there a way to do this on the root device?

This is an ICS-based device, so the addPreferredActivity function does not work, because I cannot get android.permission.SET_PREFERRED_APPLICATIONS permission even if the device is rooted. If there is a way around this, I think I could do it ..

+3
source share
2 answers

Is there a way to do this on the root device?

The simplest solution is the one you rejected from the comment: remove the stock launcher and make your only launcher.

This is an ICS-based device, so addPreferredActivity does not seem to work because I cannot get android.permission.SET_PREFERRED_APPLICATIONS permission even if the device is rooted.

The root itself has nothing to do with permissions. In this case SET_PREFERRED_APPLICATIONS, it is a permission at the signature level, which means that your application must be signed using the same signature key as the firmware, which is impossible if you do not flip your own modded ROM.

Android, addPreferredActivity() /data/system/packages.xml, <preferred-activities>. , , , .

+10

, . ( ). , (, superoneclick), os. , , .

0

All Articles