Jump to content


Photo

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


  • Please log in to reply
9 replies to this topic

#1
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,227 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
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! :)

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:

# 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...

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...

#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

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

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

Posted Image


#2
gregferns

gregferns

    Newbie

  • Members
  • Pip
  • 2 posts
Thanks Paul... tried this on my N1 (rooted, LOCKED bootloader) and it worked properly.

regards

  • 0

#3
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,227 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
After I updated Amazon MP3, I couldn't disable it!

The fix was to do this...

#cat /data/system/packages.xml|grep com.amazon.mp3
...which returned this...

<package name="com.amazon.mp3" codePath="/data/app/com.amazon.mp3-1.apk" flags="1" ts="1287142896000" version="800022" userId="10049" enabled="false" installer="com.google.android.feedback">
<item name="com.amazon.mp3.client.activity.LauncherActivity" />
<item name="com.amazon.mp3.client.receiver.FirstBootReceiver" />
<item name="com.amazon.mp3.service.DownloadService" />
<item name="com.amazon.mp3.client.activity.IntentProxyActivity" />
<item name="com.amazon.mp3.client.receiver.RetryDownloadsReceiver" />
<updated-package name="com.amazon.mp3" codePath="/system/app/amazonmp3.apk" ts="1284540940000" version="800019" userId="10049">
...after which I manually disabled the launcher activity...

#pm disable com.amazon.mp3/com.amazon.mp3.client.activity.LauncherActivity
...and it's all good! :)

In an ideal world you'd probably disable all the activities (or you could be able to use a wildcard).

P

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

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

Posted Image


#4
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,227 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
I think the problem above is related to having an updated version installed...

P

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

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

Posted Image


#5
dansl

dansl

    Newbie

  • Members
  • Pip
  • 6 posts
Freegin sweet! :)

  • 0

#6
geahboi

geahboi

    Newbie

  • Members
  • Pip
  • 4 posts
  • Devices:Nexus One
EDIT EDIT EDIT: answered my own question. apps that are disabled do not require root access to KEEP them disabled. secondly, a reboot does not re-enable apps that have been disabled. just in case any one else was wondering.

unfortunately, uninstalled - after INSTALLING this my phone was lag central. :) market downloads took over 5 minutes to begin downloading and I'm not exaggerating.

Edited by geahboi, 16 October 2010 - 02:34 AM.

  • 0

#7
rymaples

rymaples

    Newbie

  • Members
  • Pip
  • 1 posts
  • Devices:G2
I installed VISIONary and ran it, but when I type "su" in Terminal Emulator I get Permissions Denied. What could I be missing?

  • 0

#8
grumpy_o_g

grumpy_o_g

    Newbie

  • Members
  • Pip
  • 6 posts
  • Devices:Dell Streak

I installed VISIONary and ran it, but when I type "su" in Terminal Emulator I get Permissions Denied. What could I be missing?


You should have a window pop up on your phone which asks you if you want to allow root access. If you don;t answer in about 10 secs it simply comes back as Permission Denied. I would advise making sure you haven't got a box ticked which says remember or, if someone pinches your phone, they're in as root.

  • 0

#9
Cliq2G2_2020

Cliq2G2_2020

    Newbie

  • Members
  • Pip
  • 2 posts
  • Devices:Cliq, G2
Thank you!! this worked like a charm.

  • 0

#10
NuShrike

NuShrike

    Enthusiast

  • MoDaCo Silver
  • PipPipPip
  • 291 posts
  • Gender:Male
  • Devices:T-Mobile HD2/G2, Nexus 7
Let me get this straight, so having any root (perm/temp) doesn't get rid of the default apps, so the only way is to disable them -- beyond flashing a new rom?

And is anyroot needed to use PackageManager?

nevermind, anyroot is required. Disabling apps now. Thanks!

Edited by NuShrike, 22 November 2010 - 11:47 PM.

  • 0
KaiserSimFix: soft-reset-safe sim contacts hiding
CamerAware Buddy | HTCClassAction.org | KaiserGL SDK | LevelSight | FusionGPSFix
Support what I do and buy me a drink.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users