How to install the application silently on Android devices?

So, I found this answer here from #CommonsWare that the application allows you to quietly install applications on your phone, for example, on Google Play. It mentions that the application must either be signed with a firmware signing certificate or so, or add the application to the system folder. What do I need to know if I add the application to the system \ app \ or system \ priv-app \, can I install the application silently on my Android device? Or do I need to use the INSTALL_PACKAGES permission? If so, how?

I ask this question because I have only 10 reputations, so I cannot comment there.

I found the answer from #inazaruk here , but it got complicated and the links provided were dead.

+4
source share
1 answer

This application performs installation, which must be signed by the system or in the system / application / private application, for those you need to have the correct permission to install the application (even if you are a system), the difference is what you can get necessary permission for this. The fact that you are using permission does not coincide with the fact that the user receives a pop-up window asking if it is normal.

, (ApplicationPackageManager.installPackage): http://androidxref.com/7.1.1_r6/xref/frameworks/base/core/java/android/app/ApplicationPackageManager.java#1561

public void installPackage(Uri packageURI, PackageInstallObserver observer,
        int flags, String installerPackageName) {

ApplicationPackageManager @hide, - . ApplicationPackageManager, "Context.getPackageManager".

+1

Source: https://habr.com/ru/post/1669569/


All Articles