1. Are you ready for the Galaxy S20? Here is everything we know so far!

Disable app installation

Discussion in 'Android Apps & Games' started by Year1917, Feb 3, 2020.

  1. Year1917

    Year1917 Newbie
    Thread Starter

    Hi

    Is there a way to disable installing apps (that if you try to install an APK it won't work)?

    Thanks
     


  2. Hadron

    Hadron Smoke me a kipper...
    VIP Member

    Depends on the scenario. I'm assuming that this is an ordinary, unrooted device.

    You can disable apk installation by either turning off the option to install from unknown sources in settings (older versions of Android) or not granting any app the permission to do this (newer versions of Android). But then if the user tries they will be told how to enable it. So that will protect against say a malicious ad tricking your browser into installing something (I personally think that granting a web browser the permission to install apps is an act of naivete bordering on idiocy), but won't stop the phone's user downloading an apk and then installing it.

    If you want to stop the user from doing this, you need to also lock the Settings so that they can't grant this access (there are apps that can require a password to enter the Settings, though I've never used one). That obviously stops them from doing other things as well.
     
    Vancolenya, MrJavi and svim like this.
  3. Year1917

    Year1917 Newbie
    Thread Starter

    It is for a rooted device, so is there better ways?

    Thanks
     
    MrJavi likes this.
  4. svim

    svim Extreme Android User

    As @Hadron stated, just leave that option disabled in your Settings menu. It's disabled by default so it is definitely an 'opt-in' setting that you have to intentionally enable. Instead of killing options in your Settings, you might be better off focusing on implementing a good lock screen so others cannot access your phone without your permission.
    Or if you're in a situation where you do let others use your device, implement 'Guest Mode' (some phones refer to it a 'Privacy Mode'), which creates a temporary account that's isolated from your data and phone configuration:
    https://lifehacker.com/how-to-set-up-guest-mode-on-your-android-1835913254
     
    MrJavi likes this.
  5. Year1917

    Year1917 Newbie
    Thread Starter

    Will deleting package installer help me?
     
  6. Year1917

    Year1917 Newbie
    Thread Starter

    Just found this on a other fourm can someone explain this to me

    "Yes, remove the permission to install package to the target user by making the account a managed account, or hook system to intercept installation window and ask for a password or outright kill it. (What you are looking to intercept is probably com.android.packageinstaller.PackageInstallerActivity). Going to intercept route means you may need to block app stores the same way as they can bypass this if installed on system partition. It will still be possible to install over ADB or recovery if left unprotected."

    Thanks
     
    MrJavi likes this.
  7. MrJavi

    MrJavi Android Expert

  8. Year1917

    Year1917 Newbie
    Thread Starter

    MrJavi likes this.
  9. MrJavi

    MrJavi Android Expert

    Im not sure how you go about deleting systems apps/priv-apps but I recommend using root file manger

    1 create a folder on you external sd or OTG flashdrive and two sub folders "system_app" and "system_priv-app.".

    Screenshot_2020-02-04-03-02-16.jpg

    2 Copy the system folders you plan on deleting to the appropriate folders or your external sd/flashdrive.

    3. Go to phone settings and force stop, disable, clear cache and data. (Honestly, I get lazy about it and skip this step).

    4. Go back to your root file manager/explorer to whatever system app/priv_app and delete the contents but leave the system folder. (Within reason, tread with caution).

    Screenshot_2020-02-04-03-09-11.jpg

    5. Go to system folder properties. They should look like the image below (original).

    Screenshot_2020-02-04-03-12-22.png


    6. change the system folders permissions en change the folders (modified)


    Screenshot_2020-02-04-03-14-19.png

    Screenshot_2020-02-04-03-14-40.jpg

    7. In custom recovery, wipe dalvik/cache and reboot. This is suggested anytime changes are made to the system partition. (I often skip this step :)).


    You'll need to know folder, file, dex, libs .... permissions in order to port them back.

    Heres a guide

    https://forum.xda-developers.com/showpost.php?p=60831252&postcount=3443
     
    #9 MrJavi, Feb 4, 2020
    Last edited: Feb 4, 2020
  10. MrJavi

    MrJavi Android Expert

    Now don't expect to unistall the system.ui and expect this method to make your phone work. As the other members stated, alot of the system apps are intertwined with one another as a whole.

    Good luck
     
  11. MrJavi

    MrJavi Android Expert

    Correct
     
  12. MrJavi

    MrJavi Android Expert

     
  13. Year1917

    Year1917 Newbie
    Thread Starter

    For what method is this?
     
  14. MrJavi

    MrJavi Android Expert

    This method is for deleting system apps. You mentioned it in one of your posts. I wouldn't recommend deleting your package installer.
    If you look at the screen shots, I deleted Facebook installer.
     
  15. Year1917

    Year1917 Newbie
    Thread Starter

    Thanks I wouldn't delete a system app just uninstall it with root, no?
    And when I mean deleting package installer I mean the app "package installer" the app that has the ability to install or uninstall any APK.
     
    MrJavi likes this.
  16. MrJavi

    MrJavi Android Expert

    You welcome,

    Yes , that is correct, it will prevent normal installations if deleted. Although , suppose, you could still install apps in a and flash them via custom recovery but I can't be certain.
     
  17. Year1917

    Year1917 Newbie
    Thread Starter

    So basically you recommend deleting it manually not via System app remover.

    Also will it affect of updating installed apps?
     
    MrJavi likes this.
  18. Year1917

    Year1917 Newbie
    Thread Starter

    Anyone knows how to do this?
     
  19. MrJavi

    MrJavi Android Expert

    Im not recommending deleting you system package installer. I know I wouldn't . I recommend making a copy and pasting it to external sd if you do decide to delete systems apps/pri-apps. I am not advising you to delete you system installer.
     
  20. Year1917

    Year1917 Newbie
    Thread Starter

    What about updating the apps will deleting the package installer affect updating?
     
  21. MrJavi

    MrJavi Android Expert

    Yes, when you update an app it involves installation.
     
  22. Year1917

    Year1917 Newbie
    Thread Starter

    Anyone?
     
  23. MrJavi

    MrJavi Android Expert

    #23 MrJavi, Feb 4, 2020
    Last edited: Feb 4, 2020
  24. MrJavi

    MrJavi Android Expert

  25. Year1917

    Year1917 Newbie
    Thread Starter

    What are you trying to say?
     

Apps

Apps Forum

co.go.apps

READ MORE
Last Updated
0
Rating
Installs
Loading...

Share This Page

Loading...