What exactly is "com.google.android.packageinstaller"
Asked Answered
I

1

5

I've an android app published on google play.
I've had some problems with hackers and piracy in the past [people who decompile modify and recompile the app then publish it somewhere]

In order to reduce the problem, one of the measures I took was to ABORT the app case I detect it was installed from somewhere other than google play. The code is very simple

context.getPackageManager().getInstallerPackageName(context.getPackageName());

case it was installed from google play it returns com.android.vending

case something is returned i log the exception and abort the execution asking user to reinstall from google play

It works very fine, but recently some users were caught with com.google.android.packageinstaller

I've tried to search around but couldn't find a good explanation for WHAT IS THIS PACKAGE, is it a real google product? is there any official documentation showing it?

Indeciduous answered 7/5, 2021 at 23:44 Comment(0)
P
8

com.android.vending is the package name of Google Play Store. However, in Android, the apps installed outside from Google Play (from apk file) are installed through another system app embedded in every android phone. It is called Package Installer. com.google.android.packageinstaller represents the Package Installer system app, so you can completely say that users caught with com.google.android.packageinstaller are those who installed the app from an apk file, downloaded from anywhere else.

Pacer answered 8/5, 2021 at 4:23 Comment(2)
do you have the source of this info?Indeciduous
I could not find any clear documentation about it too, but this information is based on my own experience and test results. if you use adb and try to log every installed app's package name from an android phone, you always get an app "com.google.android.packageinstaller". Suppose you have another app on your android that can handle or install apk files. if you click on an apk, Android will show you a dialog whether if you want to open that apk through Package Installer or that other app.If you choose Package Installer , then android will show the install prompt.Pacer

© 2022 - 2024 — McMap. All rights reserved.