How to prevent deletion of data/data while Uninstalling apps - Android Q&A, Help & Troubleshooting

I am working on an Android project (for Rooted Phones). When I push a command "adb uninstall com.package" the data/data is deleted for that project.
But when I renamed it using mv /data/data/com.package /data/data/com.package1 then also adb uninstall command deletes this folder.
I don't want the renamed folder (data/data/com.package1) to be deleted when I trigger uninstall command.
I don't want to copy the folder to a new location because that is quite costly.
I also tried using "adb uninstall -k com.package" but the problem with that is that I am unable to install the new package with a different signature ( I need this further) as Android shows Signature conflicts of that of previous original app
Can anyone tell me how to achieve rename folder delete prevention?

Related

[Q] Need help to re-install the android browser

Hi,
I was trying to get cyongen browser into my [Build]Android 2.2 Build FRG33 [ mccm v1.5a andriod built. To get that I copied the browser.apk from the cyongen to my this builts browser.apk in the system/app folder. I was able to over-write the file, but now browser icon disappered.
Following I have tried:
- Install the cyanogen browser using astro --> it installs but when i launch i get process com.android.browser error.
- I copied the original file before over-writing but when I try to install it using astro it gives me error.
Can some help me with this issue. I do not want to reinstall everything. Thank you
tinkoo81 said:
Hi,
I was trying to get cyongen browser into my [Build]Android 2.2 Build FRG33 [ mccm v1.5a andriod built. To get that I copied the browser.apk from the cyongen to my this builts browser.apk in the system/app folder. I was able to over-write the file, but now browser icon disappered.
Following I have tried:
- Install the cyanogen browser using astro --> it installs but when i launch i get process com.android.browser error.
- I copied the original file before over-writing but when I try to install it using astro it gives me error.
Can some help me with this issue. I do not want to reinstall everything. Thank you
Click to expand...
Click to collapse
this isnt really development related and should be posted in the android general section.
Do you have ABD setup? Or droid explorer?
If you have ADB setup, drop the browser.apk into your working tools folder then shift+right click on the tools folder, select open command prompt here and type the following (assuming your on windblows)
adb shell mount -o remount rw /system
adb push exactname.apk /system/app
adb shell reboot
Sorry for posting it to wrong section. I do not have ADB. I tried droid explorer but it did not work for my HD2.
what do you mean by it didnt work for you? Did it give an error?
I have windows 7 and I cannot install it. There seems to be some issue with droid explorer.
alright, I dont use droid explorer myself so not real sure..but all it does is gives you an interface for adb. Are you on windows 32 or 64 bit?
I am on Windows 64 bit. I got the old version working but When i connect my HD2 (in android), it does not recognize any devices. Thanks for helping.
Assuming your on windows 32 bit
go to this location
C:\Program Files\Droid Explorer\SDK
you should have a tools folder in the SDK folder?
If so, drop your apk into it and go back to the SDK directory. Then hold ****, and right click on the tools folder, open command prompt window here When it opens type in
adb devices
If that lists a number your good to go
type in
adb shell mount -o remount rw /system
adb push exactname.apk /system/app
adb shell reboot
EDIT : you posted as I was lol, Droid Explorer installs the same so the above commands should work.

[Q] Google Voice uninstall

so i just flashed KaosFroyo v37 on my Eris, i'm not new to swapping ROMs and have been playing with KaosFroyo from the beginning. but for some reason now the uninstall button on the market app is greyed out, and in the application browser it fails to uninstall (astro).
i need to install the 0.3 version. how do i get rid of the newer version? thanks in advance.
You can't install any pre-installed apps using the market, astro, or anything else really.
Do you have adb setup? You'll want to do:
Code:
adb shell
mount -o rw,remount dev/block/mtdblock3 /system
cd /system/app
Hit enter
Then...
Code:
ls <-- lists all installed applications in the /system/app folder
Find google voice's apk (probably named something like Voice.apk, or GoogleVoice.apk, then type
Code:
rm GoogleVoice.apk (or whatever the name of the apk is)
Also, I think the app root explorer on the market (~$3.00) can do it for you as well, without all the hassle.
If you want to install your version of it using adb, then get the apk on your computer (somewhere easily accessible like the root of your hard drive) and do this.
Code:
adb install c:/(apkname).apk
Titanium Backup will also uninstall just about anything.
Thanks for the tips... i forgot about titanium backup, if that doesn't work then i'll try adb... I have to get the sdk and drivers installed after a wipe anyways.
Sent from my FroyoEris using Tapatalk

[Q] .Bat file for Removing Apk's 4 Evo 3D

what is the command line in adb for removing apks i have the evo 3d with temp root and tired of uninstall app by app i would like to create a bat fill to remove all the apks that i wont off ? I have one to disable i was wondering if i knew the command line to erase i could just replace the disable with a command to remove it instead? the bat file is to disable thats why i asked "what is the command line in adb for removing apks"
I am aware that after reboot apks will be back. i have a bat file to reroot device and i would like one to remove all the apks that i currently remove through root explorer just in a bat file. Whoever can give me the command line to replace the disable would be a great big help thanks in advanced
It would be the same as if you type it in. A bat file simply are your commands line after line with the extension of .bat
Im Sorry maybe u misunderstood ques?
what is the command to delete not disable apks?
the bat file is to disable thats why i asked "what is the command line in adb for removing apks"
I am aware that after reboot apks will be back. i have a bat file to reroot device and i would like one to remove all the apks that i currently remove through root explorer just in a bat file. Whoever can give me the command line to replace the disable would be a great big help thanks in advanced
rm apkname.apk
but /system has to be mouted -rw
You can use pm uninstall to do it. But they will come back so there is no point really. I would recommend just using my script, since it won't run when disabled and they will stay disabled after a reboot.
This is what i used to disable Bloat on mine - I dont remember what thread i got it from I didnt make it. but it worked nicely. Just edit it with what you want to remove.
Code:
cd /d %~dp0
adb wait-for-device
adb pm disable com.htc.appsharing
adb pm disable com.blockbuster.app.htc
adb pm disable com.htc.ereader
adb pm disable com.htc.loggers
adb pm disable com.handson.h2o.nascar09
adb pm disable com.htc.reportagent
adb pm disable com.gameloft.microwidget
adb pm disable com.qikffc.android
adb pm disable com.SIE.HTCMobileGuide
adb pm disable com.gameloft.android.SPRINT.GloftSMHP.ML
adb pm disable com.mobitv.client.sprinttvng
adb pm disable com.sprint.dsa
adb pm disable com.telenav.app.android.sprint
adb pm disable com.infraware.docmaster
adb pm disable com.mspot.android.music.mspotradiosprint
pause
tHANKS i JUST WANT TO REMOVE INSTEAD OF DISABLE BECAUSE ITS STILL THERE IF I RUN A BAT FILE AFTER I REBOOT THEN IT WILL REMOVE ALL THE APKS I DONT WONT INSTEAD OF ME USEING ROOT EXPLORER TO REMOVE THESE FILES ONE BY ONE I DO UNDERSTAND THAT AFTER REBOOT THEY WILL BE BACK BUT THE SPACE WILL BE FREE AFTER I RUN THE BAT FILE RIGHT.
Dhouser1 said:
tHANKS i JUST WANT TO REMOVE INSTEAD OF DISABLE BECAUSE ITS STILL THERE IF I RUN A BAT FILE AFTER I REBOOT THEN IT WILL REMOVE ALL THE APKS I DONT WONT INSTEAD OF ME USEING ROOT EXPLORER TO REMOVE THESE FILES ONE BY ONE I DO UNDERSTAND THAT AFTER REBOOT THEY WILL BE BACK BUT THE SPACE WILL BE FREE AFTER I RUN THE BAT FILE RIGHT.
Click to expand...
Click to collapse
NO NEED TO YELL!
I doubt you actually need the space on /system. Why wouldn't you want to disable instead of uninstall? What if you loose root or have a random reboot or your battery dies? If you uninstalled, they will come back til you reroot. If you disable, you don't have to worry about it.
I totally agree with viper. You wont need the extra space. I've used viper's mod and it works great. All apps I've disabled have stayed disabled. Also you can do a custom disable to disable only the apps you want. Basically once you disable them you don't have to worry about them again. Also if you want a particular app to function again that you have disabled just enable it threw the mod. Its one of coolest mods I've had for the evo3d. Easy and effective.
Locked & Loaded

[Q] problem when rooting nook tablet

my NT is not working, if you can please click here to help me
anyway, before that - when it was working, i tried to root it by using this method:
http://forum.xda-developers.com/showthread.php?t=1354487
at debloat menu, i chose "extreme" because i want to delete all of B&N content. i just want a normal android tablet, i know i can still read books by using the NOOK app for android.
so i chose extreme mode. and the command prompt window closed right after that.
so my NT was rooted, but not successfully, it was even worse than it was before i rooted.
i open the batch file (NookandZergy.bat) to see what the command lines are to find the reason why it didn't work. and i saw this:
adb shell rm -r /system/app/Accessories.apk
Click to expand...
Click to collapse
i opened command prompt, and typed this. and i got something like "failed because the file is not exist." -> i knew the batch script was wrong in some ways. i was going to unroot and root again with the option "full debloat" (not extreme), but before i do that, i was trying to remove netflix, i wanted to type this to the command line to see what will happen.
adb shell rm -r /system/app/netflix.apk
Click to expand...
Click to collapse
but i accidentally type adb shell rm -r /system/app/, and then it removed everything in /system/app/
i got the error in the nook tablet's screen, i don't remember what the error is, but when i pressed "force close", it kept showing me that error, i tried about 20 times but still not work.
i turned off my NT, and when i boot it, it stuck at "read forever",
that's why i created this thread.
my question is: how do i do "extreme debloat"? i want to remove everything from B&N. can you please give me the correct "command lines" to do this? and how to use that "command lines"?
prepare a sdcard to boot into ClockworkMod (CWM) which is a custom recovery (replaces stock recovery). And from there flash this ROM, for extreme-debloat is easy you can modify the script just to debloat or i can make it for you. First focus in restore your system.
As i said in my last post in your other thread read my FAQ and you will find your what you need there, if you have any question me or any other user will try to help.
PS: here is post i made for a user about how to re-bloat but the thing is that i post the list of all the B&N apps for reference to you so it might be helpfull.
~ Veronica
i have a little knowledge about batch file, so i think i can edit the script
(just edit the wrong file name -> make it become correct file name)
but i don't know what files are inside the folder /system/app/
for example: the file Accessories.apk is not exist, so how should i edit the script
nooktablet said:
i have a little knowledge about batch file, so i think i can edit the script
(just edit the wrong file name -> make it become correct file name)
but i don't know what files are inside the folder /system/app/
for example: the file Accessories.apk is not exist, so how should i edit the script
Click to expand...
Click to collapse
Well you got the error probably 'cause when you ran the script it removed that file so when you typed the same command again it won't remove it because is already gone.
In the link i provided is the list of all the B&N applications that are removed in the extreme debloat option. So you basically have keep that part of the code plus the intro to get in adb shell.
In that post you will also find a link to the complete system/app folder just in case you by "playing around" with adb remove any important system app, so you can push it back.
~ Veronica
lavero.burgos said:
Well you got the error probably 'cause when you ran the script it removed that file so when you typed the same command again it won't remove it because is already gone.
In the link i provided is the list of all the B&N applications that are removed in the extreme debloat option. So you basically have keep that part of the code plus the intro to get in adb shell.
In that post you will also find a link to the complete system/app folder just in case you by "playing around" with adb remove any important system app, so you can push it back.
Click to expand...
Click to collapse
no, when i chose extreme debloat, it closed the command prompt window, before it closed, i saw something "failed...". when i typed the command again it showed "failed...", i'm sure it's exactly what it said before,
and i know after debloat, it should go back and do other command like "thank you for using" (i read the batch file). i also saw B&N apps were still on my NT, debloat didn't work because of the missing file -> the script stopped.
btw, you said i can use adb to push the apps back. so that means i can also use adb to remove apps? can i not debloat when rooting, and after root, i use adb to remove apps later? will adb work at that time?
and can i use adb to explore what files are in the /system/app/ folder? or any other program?
nooktablet said:
no, when i chose extreme debloat, it closed the command prompt window, before it closed, i saw something "failed...". when i typed the command again it showed "failed...", i'm sure it's exactly what it said before,
and i know after debloat, it should go back and do other command like "thank you for using" (i read the batch file). i also saw B&N apps were still on my NT, debloat didn't work because of the missing file -> the script stopped.
btw, you said i can use adb to push the apps back. so that means i can also use adb to remove apps? can i not debloat when rooting, and after root, i use adb to remove apps later? will adb work at that time?
and can i use adb to explore what files are in the /system/app/ folder? or any other program?
Click to expand...
Click to collapse
Yes adb works at anytime even in dockworkers (CWM) .
To know how to use adb go to my FAQ (link below in my signature) and look in the how-to's made by me section for the how to use and install adb.
"adb shell rm -r" is one of the adb commands and is used for remove files.
adb shell = is to get superuser permissions (root/su)to run advanced commands.
rm = remove
-r = recursive
~ Veronica
Sent from my Nook Tablet using xda premium

[Q] re-installing google play store?

I was uninstalling bloatware from my samsung galaxy victory after rooting, and in the process, accidentally deleted the play store. I re-downloaded the latest .apk for the play store, installed it, and when I open it, it crashes and says "unfortunately, google play store has stopped". I looked up tp see if there were any solutions, and many sources said to gp to settings>app. management>google play>force stop, clear data, clear cache. that didnt work. I tried installing older play store apk's, all giving the same error. any other possible solutions?
I think perhaps you deleted the odex as well..
Press Thanks if you like my Work/Advice
did you install the apk to /system or to /data?
the playstore apk belongs into /system/app not /data/app
whats the odex? and hiw do I change the installation directory?
-new to android & rooting so I still havent looked up all the terminology so sorry-
I dont think it has to do with odex files.
change the installation directory als follows:
first uninstall the market app and copy the market apk to your sdcard.
I'll use the filename "market.apk" to refer to it in this description
Then use "adb shell" or some on device console emulator and issue the following commands:
1. "su" become root
2. "mount -o remount,rw /system" to remount /system read-write
3. "cp /mnt/sdcard/market.apk /system/app" to copy the market apk into the right system folder if it fails try "/sdcard/market.apk" instead of "/mnt/sdcard/market.apk"
4. "reboot"
After your reboot you should see an android message stating to update some system files or so.
If your device is fully booted, try to use your market app. It should work now.
Hope this helps...

Categories

Resources