Jump to content

Removal of apps via ADB


Guest CitizenLee

Recommended Posts

Guest CitizenLee

Just wondering if anyone would be prepared to do a guide with instructions on how to remove all the various pre-installed / default apps via ADB, which could then be pinned?

I know this info is scattered throughout the posts already but I think it would be handy for people to have a quick reference to easily check rather than have to search through countless posts to find out what they need to know.

Cheers,

Lee

Link to comment
Share on other sites

adb remount

adb shell rm /system/app/$APPNAME

adb shell rm /data/app/$APPNAME

where $APPNAME is the filename of the apk. wildcards are possible, remember case-sensitive!

example: remove stock app and widget:

adb shell /system/app/*Stock*

remove twitter app and widget:

adb shell rm /system/app/*Twit*

remove quickoffice:

adb shell rm /data/app/*Quick*

so all you need to know is whether the app is stored in /system/app or /data/app. easiest way to find out both is do:

adb shell ls -1 /system/app/

and

adb shell ls -1 /data/app/

which will list the contents of the respective folders.

now that you know it, feel free to write a comprehensive howto :D

Edited by kendon
Link to comment
Share on other sites

Nice. Pop a few of these into a script and automate the whole process.

yeah great idea. and then make one script for twitter, one for stock, one for twitter and stock, one for twitter and stock and footprints, one for...

you see where i am going?

better yet: make one rom without footprints, make one rom without stock, one without footprints and without stock, one without...

you see where i am going?

or: have the users learn a tiny little bit about their phone (in the end it is them who want to have it customized) and let them do it themselves. this way you need no scripts and only one rom...

imho there is not much to automate if everybody wants to have other apps removed. and again imho it is not that hard to execute one (!) little command for each app you want to remove... hell if you're smart enough you create your own script so you can execute it after each rom update, but i don't see the point in doing that for others... i personally modify the update.zip before i flash it, so i don't have to remove any apps after flashing, but that involves resigning, and might a bit overblown just to get rid of a few apps...

Link to comment
Share on other sites

Guest CitizenLee
adb remount

adb shell rm /system/app/$APPNAME

adb shell rm /data/app/$APPNAME

where $APPNAME is the filename of the apk. wildcards are possible, remember case-sensitive!

example: remove stock app and widget:

adb shell /system/app/*Stock*

remove twitter app and widget:

adb shell rm /system/app/*Twit*

remove quickoffice:

adb shell rm /data/app/*Quick*

so all you need to know is whether the app is stored in /system/app or /data/app. easiest way to find out both is do:

adb shell ls -1 /system/app/

and

adb shell ls -1 /data/app/

which will list the contents of the respective folders.

now that you know it, feel free to write a comprehensive howto :D

Cheers Kendon, that's super useful!

As for me writing a guide... I'm more "monkey see monkey do". It needs the experts touch :(

Link to comment
Share on other sites

sorry, it just didn't seem like you actually put a lot of thought in it, don't go cry.

better tell me what you expect from this script and how it should work, i just don't see it working for more than five people at once. also people will stupidly execute it and then start crying "where is my twitter gone" and stuff like that. but again, i am open for suggestions how such a script should work. if you really thought about it please tell me.

Link to comment
Share on other sites

Guest stevenz
sorry, it just didn't seem like you actually put a lot of thought in it, don't go cry.

better tell me what you expect from this script and how it should work, i just don't see it working for more than five people at once. also people will stupidly execute it and then start crying "where is my twitter gone" and stuff like that. but again, i am open for suggestions how such a script should work. if you really thought about it please tell me.

It would be easy enough to right a basic DOS shell script (or even busybox I suppose) to do it, but it'd have virtually no error checking. The option of people learning how to do it is the better one. Automating shell actions on devices that you're not _really_ supposed to be messing around with isn't really ideal.

If I get really bored at work, I might see if I can hack something together in AutoIt with a pretty GUI that just makes calls to ADB, but I wouldn't hold your breath ;)

Some apps (Stocks is a good example) have 4 or 5 files laying around which need to be removed for it to be stripped out completely. I'd need to do a restore on my phone as I've removed a _lot_ of stuff from it, would need to refresh what all the filenames & locations are.

Link to comment
Share on other sites

Guest venturerider

Hi, folks. Newbie here. Did the GoldCard, downgrade, flashrec and MoDaCo 3.0 install on my Telus Hero over the last few days. Except for repeatedly selecting logical disk instead of physical disk in HxD (D'Oh!) everything went smoothly. I have learned so much in the last few days. Anyway, love the new ROM, love this forum, and I think I'll be sticking around here for a while. Looking forward to a 2.1 ROM soon!

A couple of comments on this topic:

Removing the .apk is one thing. But the applications also leave files in the /data/data and /data/dalvik-cache directories. I removed those along with the apps with no ill effect so far.

Another thing, and I think kendon has already touched on this, next time around, I will be deleting the unwanted apk's from the zip file prior to applying any updates. That will save me a lot of steps afterwards.

Cheers!

Edited by venturerider
Link to comment
Share on other sites

Removing the .apk is one thing. But the applications also leave files in the /data/data and /data/dalvik-cache directories. I removed those along with the apps with no ill effect so far.

Another thing, and I think kendon has already touched on this, next time around, I will be deleting the unwanted apk's from the zip file prior to applying any updates. That will save me a lot of steps afterwards.

well, you can do that, but actually i think there is no harm done leaving it there. idk how it really works, but i would think that the information is loaded only on request, so as long as there is no app requesting it it won't be touched.

second point: i've been doing this since mcr2.3 now, makes updating much easier ;) just remember you need to sign the update.zip afterwards. but once you figured that out it is just one more command and one minute wait. i wrote a shellscript which compresses and signs the rom in one step.

Link to comment
Share on other sites

Just wondering if anyone would be prepared to do a guide with instructions on how to remove all the various pre-installed / default apps via ADB, which could then be pinned?

I know this info is scattered throughout the posts already but I think it would be handy for people to have a quick reference to easily check rather than have to search through countless posts to find out what they need to know.

Cheers,

Lee

It's already in MCR thread : http://android.modaco.com/index.php?s=&amp...t&p=1059607

Link to comment
Share on other sites

Guest venturerider
just remember you need to sign the update.zip afterwards.

If I delete the files directly from within the zip (which is just a compressed folder to Windows), do I still need to "sign" it?

Link to comment
Share on other sites

If I delete the files directly from within the zip (which is just a compressed folder to Windows), do I still need to "sign" it?

yes. if my understanding of the hacked spl for the hero which was released by paul few weeks ago is correct then there is no need for resigning it, IF you are using that spl. never tried it though, as i said i made it one step to compress and sign the zip.

Link to comment
Share on other sites

Guest venturerider

I'm definitely going to try this with my next update. However, I am curious to know how you "sign" the zip. Could you elaborate or provide me with a URL?

Thanks!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.