Disabling downloaded app


Question

In Android, you can disable a built-in app so it won't run and will disappear from the app list. But it will still remain on the phone and
can be easily re-enabled.



However, there's no such option for downloaded applications, you can only uninstall it.



Is there, perhaps, a hidden way to do so?



A use case could be a public transport app for a city that you visited for
a while, and may visit some time again. You don't want to lose bookmarked routes, but you don't want it to update its schedules and waste
internet traffic and other resources, either.


Answer

Requires root (at least on 6.0.1). System permissions (uid<=1000) is required but adb runs as userid 2000.



The Package Manager (pm) will do exactly what you want.



In either adb or Terminal Emulator (both require root), run the pm command and you can see its capabilities.



We look at 2 of them:




  • pm list packages

  • pm disable <package>



pm list packages lists all installed packages, this list is unsorted but if you know some easy bash, you can use grep to search for substrings in the package names:



pm packages list | grep google will list all packages with "google" in their name, effectively returning just Google's apps:



Sample output:



package:com.google.android.apps.unveil
package:com.google.android.gsf.login
package:com.google.android.apps.translate
package:com.google.android.backuptransport
package:com.google.android.apps.books
package:com.google.android.apps.giant
package:com.google.android.ears
package:com.google.android.keep
package:com.google.android.talk
package:com.google.android.apps.ads.publisher
package:com.google.android.apps.youtube.music
package:com.google.android.play.games
package:com.google.android.apps.magazines
package:com.google.android.apps.adm
package:com.google.android.inputmethod.latin


pm disable <package name> disables a single package you specified. Disabling the Google Keyboard would then be pm disable com.google.android.inputmethod.latin.



To find out what package name maps to what app try this url: https://play.google.com/store/apps/details?id=<package name>

Replace <package name> with the package name you want to check.



Instead of using pm, you can use Titanium Backup, given that your device is rooted.



In Titanium Backup you can scroll through all your apps, filter that list and select the app you want to disable or in TB's case freeze.

This, however, requires the paid version of Titanium Backup.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes