Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,802,957 Members 38,921 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] Disabling stock apps on the G2 (and other NAND locked devices)

Tip us?
 
paulobrien
Old
#1  
paulobrien's Avatar
Senior Member - OP
Thanks Meter 5,683
Posts: 4,437
Join Date: Nov 2003
Location: Norwich
Default [GUIDE] Disabling stock apps on the G2 (and other NAND locked devices)

As promised on Twitter (@paulobrien), here's a guide on how to disable your chosen stock junk-ware on your G2.

Normally, you would remove stock apps by deleting the APKs from /system/app, however on the G2 this is not possible due to it's NAND protection. On reboot the apps will just re-appear, so that's no good. You could delete them on every boot via a script, but that's a bit kludgey... there has to be a better way right? RIGHT! :P

Internally, Android manages installed apps via something called 'Package Manager'. Package Manager (PM) references installed apps not by their filename or displayed name but by their internal package name (e.g. com.google.android.apps.maps). Handily, from a command line you can actually call Package Manager with the command 'pm', which gives you access to do some pretty cool stuff - especially if you have root - including disabling packages.

What does disabling a package do? It leaves the file on the system, but prevents the app from running or appearing in the launcher. This is actually quite cool because it means although the app isn't displaying or using any resources, if an update to the app is released, you'll still be notified by the Market. Should you choose to install the update, the package will be re-enabled, after which you can then disable it again if you choose. Neat eh?

So, let me give you a few examples of how you'd disable packages. Firstly you need to have temproot on your device (use VISIONary for this), and open a command shell. You can do this either via 'adb shell' on your PC, or using 'Connectbot' or 'Terminal Emulator' on your device (if you're feeling particularly sadistic). The shell needs to be elevated to root in order to use disable functionality, so type 'su'. You know if you are elevated because the prompt is a '#' instead of a '$'.

In order to disable a package, you first need to know the name of the package. pm has a function to list installed packages... simply type 'pm list packages' (obvious huh!). The output will look something like this:

Code:
# pm list packages
package:com.google.android.location
package:com.tmobile.selfhelp
package:com.android.voicedialer
package:com.android.defcontainer
package:com.android.launcher
package:com.google.android.maps.mytracks
package:com.android.debugtool
package:com.android.contacts
package:com.android.phone
package:com.tmobile.userkeystool
package:com.android.calculator2
package:com.android.htmlviewer
package:com.android.providers.calendar
package:com.android.bluetooth
package:com.android.calendar
package:com.android.browser
package:com.android.music
package:com.google.tts
package:com.android.email.policy
package:com.android.qxdmlog
package:com.android.mms
package:com.android.provision
package:com.htc.copyright
package:com.android.providers.media
package:com.android.certinstaller
package:com.google.android.deskclock
package:com.android.updater
package:com.android.settings
package:com.google.android.carhome
package:com.google.android.street
package:com.google.android.apps.genie.geniewidget
package:com.facebook.katana
package:com.google.android.googlequicksearchbox
package:com.android.providers.drm
package:com.adobe.flashplayer
package:com.android.musicvis
package:com.google.android.apps.unveil
package:com.google.android.apps.listen
package:com.android.wallpaper.livepicker
package:com.htc.web2goshortcut
package:com.android.packageinstaller
package:com.htc.fieldtest
package:com.android.providers.telephony
package:com.android.providers.subscribedfeeds
package:com.svox.pico
package:com.android.email
package:com.google.android.apps.maps
package:com.google.android.latinimetutorial
package:com.android.providers.settings
package:com.android.magicsmoke
package:com.android.providers.downloads
package:com.amazon.mp3
package:com.android.server.vpn
package:com.google.android.apps.googlevoice
package:com.photobucket.android
package:com.android.soundrecorder
package:com.htc.android.htcsetupwizard
package:com.android.vending.updater
package:com.android.inputmethod.latin
package:com.google.android.partnersetup
package:com.android.cardock
package:com.qo.android.oeme
package:com.google.android.voicesearch
package:com.google.android.apps.finance
package:com.google.android.feedback
package:com.google.android.apps.shopper
package:com.google.android.talk
package:com.htc.htcMessageUploader
package:com.cooliris.media
package:com.android.stk
package:com.android.providers.userdictionary
package:com.android.setupwizard
package:android.tts
package:com.google.android.stardroid
package:com.twitter.android
package:com.google.android.syncadapters.calendar
package:android
package:com.android.providers.contacts
package:com.android.protips
package:com.google.android.apps.uploader
package:com.google.android.apps.translate
package:com.android.providers.applications
package:com.android.vending
package:com.google.android.gm
package:com.swype.android.inputmethod
package:com.android.providers.htcCheckin
package:com.android.wallpaper
package:com.android.camera
package:com.google.android.youtube
package:com.google.earth
package:com.google.android.gsf
package:com.google.android.syncadapters.contacts
package:com.google.android.backup
#
Most of the names are pretty self explanatory... you can work out what you want to get rid of.

To disable an app, you use the 'pm disable' command with the package name. I wanted to disable the T-Mo App, MyTracks, Goggles, Listen, Web2Go, Amazon MP3, Google Voice, Photobucket, the Setup icon, Finance, Twitter and Translate, so I did this...

Code:
pm disable com.tmobile.selfhelp
pm disable com.google.android.maps.mytracks
pm disable com.google.android.apps.unveil
pm disable com.google.android.apps.listen
pm disable com.htc.web2goshortcut
pm disable com.amazon.mp3
pm disable com.google.android.apps.googlevoice
pm disable com.photobucket.android
pm disable com.htc.android.htcsetupwizard
pm disable com.google.android.apps.finance
pm disable com.twitter.android
pm disable com.google.android.apps.translate
#
...which returned...

Code:
#Package com.tmobile.selfhelp new state: disabled
# Package com.google.android.maps.mytracks new state: disabled
# Package com.google.android.apps.unveil new state: disabled
# Package com.google.android.apps.listen new state: disabled
# Package com.htc.web2goshortcut new state: disabled
# Package com.amazon.mp3 new state: disabled
# Package com.google.android.apps.googlevoice new state: disabled
# Package com.photobucket.android new state: disabled
# Package com.htc.android.htcsetupwizard new state: disabled
# Package com.google.android.apps.finance new state: disabled
# Package com.twitter.android new state: disabled
...and that's it, job done!

You'll need to restart your Launcher to see the changes (you can do this from Settings -> Applications -> Launcher -> Force Stop) and then you're done!

P
Follow me on Twitter - http://twitter.com/paulobrien

Follow MoDaCo Android on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

The Following 8 Users Say Thank You to paulobrien For This Useful Post: [ Click to Expand ]
 
robertgibson
Old
#2  
robertgibson's Avatar
Member
Thanks Meter 2
Posts: 52
Join Date: Apr 2010
Location: Charleston, SC
Wow this is good stuff.....thanks!
Phone: T-mobile G2
ROM: CM 7.0.2
Recovery: CWM latest
Radio: 26.03.02.26
 
rhodes588
Old
#3  
Senior Member
Thanks Meter 3
Posts: 115
Join Date: Aug 2010
This disables them from starting up and running if phone is rebooted and not running temproot? Or do we have to put these cmd lines in again once rebooted?

Sent from my T-Mobile G2 using XDA App
Verizon Galaxy Nexus - 4.1.1

Nexus 7 - Stock
 
Anomaly
Old
#4  
Member
Thanks Meter 6
Posts: 52
Join Date: Oct 2005
Nice tip, thanks.
 
ryaninc
Old
#5  
ryaninc's Avatar
Senior Member
Thanks Meter 24
Posts: 165
Join Date: Mar 2010
Location: Central Florida
Great tip! Thanks!

But...dude, you disabled some of my most frequently used apps. Google Voice, Twitter, Goggles, Listen...I use all of those apps every day. But Photobucket, MyAccount, Facebook, all killed.
Sony Xperia S, rooted, FreeXperia CM10
HP Touchpad, CM9 Nightlies
T-Mobile MyTouch 4G Slide, S-Off, CM9.1 (sold)
T-Mobile G2, S-Off, Rooted, CM7.1 Nightly (sold)
Black G1, DangerSPL, 2.22.23.02 Radio, Amon_Ra Recovery, BiffMod Froyo 2.1 (sold)

Animated G2 logo boot animation | DIY Android-powered car speedometer
 
paulobrien
Old
#6  
paulobrien's Avatar
Senior Member - OP
Thanks Meter 5,683
Posts: 4,437
Join Date: Nov 2003
Location: Norwich
Quote:
Originally Posted by rhodes588 View Post
This disables them from starting up and running if phone is rebooted and not running temproot? Or do we have to put these cmd lines in again once rebooted?

Sent from my T-Mobile G2 using XDA App
This actually makes changes to the packages file on /data, so the NAND protection doesn't matter.

i.e. - you only have to do it once.

P
Follow me on Twitter - http://twitter.com/paulobrien

Follow MoDaCo Android on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

The Following User Says Thank You to paulobrien For This Useful Post: [ Click to Expand ]
 
paulobrien
Old
#7  
paulobrien's Avatar
Senior Member - OP
Thanks Meter 5,683
Posts: 4,437
Join Date: Nov 2003
Location: Norwich
Quote:
Originally Posted by ryaninc View Post
Great tip! Thanks!

But...dude, you disabled some of my most frequently used apps. Google Voice, Twitter, Goggles, Listen...I use all of those apps every day. But Photobucket, MyAccount, Facebook, all killed.
Voice - doesn't work in UK
Twitter - Seesmic > Official App
Goggles - Meh
Listen - Meh



P
Follow me on Twitter - http://twitter.com/paulobrien

Follow MoDaCo Android on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

The Following User Says Thank You to paulobrien For This Useful Post: [ Click to Expand ]
 
tankmorph
Old
#8  
tankmorph's Avatar
Senior Member
Thanks Meter 344
Posts: 850
Join Date: Jun 2007
Location: St. Petersburg, FL
Nice. Thanks. Worked great.

Sent from my T-Mobile G2 using XDA App
 
xile6
Old
#9  
Senior Member
Thanks Meter 39
Posts: 830
Join Date: Dec 2008
Location: Dallas
How to undo?
pm able?
And is this the code tmobile used long ago to hide/show the myfaves app?
Either way great find

Sent from my T-Mobile G2 using XDA App
if im wrong tell me. I'd ratter be correct then live life being mislead.
Phone:Note 3 NF1 rooted and stock Knox 0x0

Other Phone(s): T-mobile G1 < HTC Vision G2 < LG-P999 G2x < T989 S2 < HTC One m7 < Note 3
 
sk8rbebop
Old
#10  
sk8rbebop's Avatar
Senior Member
Thanks Meter 1
Posts: 147
Join Date: Jun 2010
Location: Tempe
P, you are the man.
(Current Hotness)
T-Mobile G2 (HTC Vision)
ROM: Stock
8GB Class 2 SanDisk MicroSDHC

(Retired)
T-Mobile MyTouch Slide (HTC Espresso)
T-Mobile G1 (HTC Dream)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes