4

I am continually getting prompts for installing apps, such as Clean Master and or 9 apps on my Android phone. I turned off the option "Install apps from unknown sources" in security settings but then a message would popup saying "Install blocked" every time, as shown in the screenshot below.

So, how to stop these annoying prompts?

(Click image to enlarge)

message showing install blocked

  • 3
    Looks like you've caught some malware that tries to install all kind of stuff (follow the link for details). A factory-reset will certainly clear that, but that would mean losing all your data along the way. You might wish to check our most frequented malware questions for alternatives. – Izzy Dec 30 '15 at 9:18
  • create download_1 folder where download folder exists . actually malware / ad it tries to create folder download_1 ..if exists it stops ..worked for me ..also scan using malware bytes ..or disable (Force Stop and then disable )PackageInstaller in system apps – Amruth A Aug 23 '17 at 10:56
3

You're better off with Izzy's advise and find and weed out the app trying to install that Clean Master app. Anyhow, there you go with an another solution.

When you attempt to sideload an apk using UI or any app that attempts to install an apk and isn't granted the permission android.permission.INSTALL_PACKAGES, Package Installer app comes into action and its activity PackageInstallerActivity is launched. The setting for unknown sources (install_non_market_apps) under Settings Storage's database is checked and based on that, you're either shown that prompt (dialog) or the permissions and the install button.

Even if you manage to find a hack that disables that prompt from being shown, Package Installer would still be launched and the UI would look awkward since only app's label and white space would be visible to you, which would do naught but create confusion.

For rooted Android

The solution I ended up with is to get rid of the activity PackageInstallerActivity. You can use Elixir 2 to disable that activity.

Launch it → Application → tap IMG: → System applications → Package Installer → find and disable the said activity

You can also use in this case

adb shell su -c pm disable com.android.packageinstaller/.PackageInstallerActivity # Disables the activity
adb shell su -c pm enable com.android.packageinstaller/.PackageInstallerActivity # Use it to enable the activity

Now whenever you or an app attempt to sideload an apk which requires launching the Package Installer app, you may either get a toast like in the following image or an app registered to open/explore an apk would be launched or be suggested by system.

(Click image to enlarge)

IMG:

If the toast becomes noisy, hide it using EnhancedToast1 or UnToaster2. Since they are Xposed modules, you would need Xposed Framework appropriate3 for your Android version.

Note that disabling that activity wouldn't affect the ability of Play Store to install an app, neither would it affect adb install because the underlying package manager is intact.

You can use here too. Example, whenever your preferred file manager is active on screen, enable that activity so that you can continue to sideload an apk, should you decide to, and keep it disabled for any other on-screen active app.

For non-rooted Android

You (KitKat or Lollipop users) can hide/block the whole Package Installer app. You definitely need for that.

adb shell pm block com.android.packageinstaller # for KitKat 
adb shell pm hide com.android.packageinstaller  # for Lollipop

The biggest inconvenience here is that you won't be able to uninstall an app using Settings app because it uses Package Installer's activity named UninstallerActivity and UninstallAppProgress. Attempt to removal of an app using Settings app would cause the latter to crash.

Every time you intend to remove an app using Settings app or sideload an apk using UI, you must unhide/unblock Package Installer app.

To unblock/unhide, do

adb shell pm unblock com.android.packageinstaller # for KitKat 
adb shell pm unhide com.android.packageinstaller  # for Lollipop

Note that hiding/blocking that app wouldn't affect the ability of Play Store to install an app, neither would it affect adb install because the underlying package manager is intact.


1: XDA: EnhancedToast
2: XDA: UnToaster
3. Xposed Framework: Android 4.x, Android 5.x and 6.x

0

I have a Chinese pad/phone that has built in system Trojans. The pad/phone was unusable with constant pop ups. I rooted it and it's was a bit better. Malwarebytes was the only scanner that found 3 trojans. All 3 were system trojans. I tried lots of ways to fix the problem nothing worked. The main culprit was system the pad/phone has two system icons. One is the normal Cog. The other is a green droid. By disabling the green droid system almost every problem gone. Thanks to this post i installed Elixir 2. I disabled every thing in system that i don't use and it's now 99% better.

protected by Community Mar 28 '17 at 12:57

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.