[REF] Samsung broke app uninstaller with 2.2.1 update - Galaxy S I9000 Q&A, Help & Troubleshooting

So what's the purpose of this thread?
On 2.2 and 2.1 Android versions after installing of any app there were created:
- /data/app/<package_name>.apk - main file
- /data/data/<package_name>/ - folder with app data, libs, settings etc.
- /data/dalvik-cache/[email protected]@<package_name>.dex - dalvik-cache file
After deinstalation with bulit-in uninstaller all files and folders where removed so phone was clean after deinstallation huge number of apps.
Now, on 2.2.1 after installing any app there are created:
- /data/app/<package_name>.apk - main file
- /data/data/<package_name>/ - folder with app data, libs, etc.
- /data/dalvik-cache/[email protected]@<package_name>.dex - dalvik-cache file
- /dbdata/databases/<package_name>/ - folder with app settings, AFAIK it's created on first app usage.
Samsung changed this to remove lag (dbdata is faster than data). After deinstallation last folder isn't removed! Samsung developers forgot to change uninstaller, in result we have a lot of unneeded folders in /dbdata/databases/ after deinstallation of apps.
Ane ideas how to fix it?

i noticed this too. sadly i dont know how to fix it, other than manually delete the leftovers

yep confirmed.. just went in with root explorer and deleted a couple of things i have deleted from the phone.

Well one simple solution is to create a simple listview uninstaller that calls pm uninstall on the package plus delete's the package name from the /dbdata partition
Or better yet, find an open source uninstaller and modify that

Related

[Q] Integrating updates of system apps (and/or downloaded apps) into ROM

Okay. I don't have a lot of knowledge on developing/tinkering on Android, but I think I've figured out how to integrate apps into the ROM (updates of system apps and/or downloaded apps). I used:
A stock cricKet 2.2.1 ROM, rooted (of course) w/Universal Androot
Root Explorer, and
ROM Manager (more on this later)
First thing is first, I did a TI backup; don't want to lose anything
I then opened Root Explorer
Mounted R/W, and
did a search for .apk.
Notice that the only directories the actual .apk files for INSTALLED apps should appear in (outside the SD card) are:
/cache
/data/app
/data/app-private (possibly)
/data/FLEX/app
/system/app
Ignore the following:
/cache
/data/FLEX/app
Now, you may already know this, but the system apps you're looking for are located in the /system/app directory, and downloaded apps (for the updated system apps) are located the /data/app directories that aren't being currently ignored (if you're following my instructions). Based on icon, filename, and common sense, I found which .apk files were the updates of already existing system apps (IE Market, Google Maps, Voice Search, etc.) in the /data/app directory, and the corresponding system app they updated in the /system/app directory. I then:
Copied the filename of the system app I was going to replace (rename copy all)
Moved over to the /data/app directory
Located the corresponding updated app
Renamed it what its corresponding system app was renamed (rename, delete existing name, paste)
Hit the 'move' option
Navigated to the /system/app directory
Deleted original system app (you may want to backup this file beforehand)
Pasted the updated system app
Within 30 seconds or so, you should get a (blah.blah.blah has unexpectedly shut down force close/report) popup. Just hit force close and you should be fine (Google Maps seemed to be a recurring FC). If you try to open the app before rebooting, it will force close on you. When you're finished, open ROM Manager. I know you're thinking 'This app is no good on the ZIO'; so stop. Hit 'Fix Permissions'. The reason for this is that it fixes a few rare force close issues. I don't know the mechanics of it, but it works, so I don't question it. Listen to the notification you'll see and reboot your phone after it finishes fixing the permissions. Now go into settings and manage applications, and you'll see that you can no longer uninstall whatever apps you moved to the /system/app directory.
FYI Renaming .apk files doesn't seem to make a bit of difference either way.
(Forgive my horrible perspective descriptions: I/you)
I haven't tested it yet, but I believe unrooting the device should make any apps moved to the /system/app directory that require root access would become non-functional (right?). The reason this thread is a question is that I'm wondering if i did this correctly, and if so, I want to find out if unrooting and factory resetting my phone would somehow delete the apps in the /system/app directory that weren't included in the stock ROM. (I'm not really willing to do that yet; I still have to download the SDK to my new computer so I can do a NANDROID backup.) Any help answering these from a more experienced developer would be great.
If you want to incorporate apps into a rom, the apps have to be free or you must get consent from the developer to include in your rom
Sent from my Zio using XDA Premium App
Only if it is a Public rom. Even free app developers should be credited in a public rom
Mattix724 said:
If you want to incorporate apps into a rom, the apps have to be free or you must get consent from the developer to include in your rom
Sent from my Zio using XDA Premium App
Click to expand...
Click to collapse
I'm operating under the assumption that you're using Google developed updates of system apps. I suppose I should have said something to that extent up top.
[UPDATE]
Okay, so I did a NAND and then factory reset my phone. Killed everything not in the /system/app directory. I'm sure you knew that would happen, but I guess I'm posting for the noobs. Easier to find, I guess.
Hi,
I've tried to integrate some apps using Titanium Backup but it stuch at 0% for more than 5mins so I cancelled the process. Is it normal that it was that slow? Does Titanium generate odex files too?
I've tried integrating updates for GoogleMaps, StreetView and Youtube using a recovery mode and ADB on my linux machine.
After the backup system data I've deleted original apk and odex files from /system/app/ and moved newer versions from /data/app/ to /system/app/.
I renamed the files from com.google.android.blah.blah.apk to old names (ie. Maps.apk, etc). I haven't generated the odex files.
Rebooted the phone (HTC Desire, 2.2, Orange UK) and these apps were not available. I couldn't run either GoogleMaps or Youtube. They weren't on the "All apps" list, but still were in the system app manager/uninstaller, but couldn't uninstall them as they were in system obviously.
Tried to clear Dalvik cache but no difference.
Then I've copied them with my user backed apk files (it went to /data/app and installed the newest versions) and all is fine - could launch them as usual.
Now using "adb push" method I copied my old system versions of these apps in the /system/app/ and all if fine. I could updated them to newer versions, but this obviously went to /data/app/, so didn't free the phone memory.
Any idea why integrated apps were not visible in the system?
Perhaps I shall just delete the old system apps and copy the ones from /data/app/ without renaming...
Much appreciate it.
Greg
edit:
All went fine now. Just deleted old files in the /system/app and moved newer version without renaming to from /data/app
use titanium backup and choose integrate updates into rom for the app
I don't want to pay for TB premium. I'm poor.
Sent from my Zio using XDA App
TB integrating not working on some phone (including mine) anyway.

[TOOL]Semi-auto bloatware remover for Xperia pro et al v0.1

I made a simple script for my own use that does pretty much the same job as Knight47's auto bloatware remover.
The main difference is that mine reads the list of removed apps from a separate text-file that can be adjusted to taste.
Root required!
How to use:
1. Backup your phone with nandroid!
2. Unzip zip-file to some folder
3. Connect USB cable to phone and make sure USB debugging is turned on
4. Run debloat.cmd
5. Reboot
6. Enjoy fat-free phone
It MIGHT be necessary to clean Dalvik-cache afterwards if the phone does not rebuild dalvik cache automagically ("updating android"-message during reboot)
I wrote this for Xperia Pro Mk16i ICS, which had some differences from the main APP-list:
SEMCFacebookProxy.apk --- appears to be more facebook stuff
livewaremanager.apk -- all in lower-case now
letsgolf_i.apk -- filename has changed
Also some files listed in the app collection did not exist here. ALL files from main Xperia arc app list are included anyways.
I'm removing:
Browser.apk
facebook.apk
Gmail.apk
GMS_Maps.apk
Maps.apk
Street.apk
YouTube.apk
These apps take double space after you install updates for them so it makes sense to remove them from system. If you already have updated them, there's no need to do anything, otherwise download them from play store.
With regards to stock browser, if you don't have chrome or similar, just comment it out.
..
Changes in v0.2:
Fixed script syntax
Delete .apk and .odex files
Added some files to kill-list:
weatherwidget
com.google.android.youtube-1
SemcCamera3D
SemcSnpVideoPlayer
Semcsdnla
Wait for keypress after finished + reboot into recovery to clean dalvik.
v0.21
Do not delete google maps and youtube app by default, change advisor text
nothing happened. i have rooted phone and busybox
my bloat.txt is something like this(only apps, no cements)
EventStream.apk
EventStreamPluginCallLog.apk
EventStreamPluginFacebook.apk
EventStreamPluginTelephony.apk
EventStreamPluginTwitter.apk
usb conection mode is mass storagemode
ics 4.0.4
seljachina said:
nothing happened. i have rooted phone and busybox
my bloat.txt is something like this(only apps, no cements)
EventStream.apk
EventStreamPluginCallLog.apk
EventStreamPluginFacebook.apk
EventStreamPluginTelephony.apk
EventStreamPluginTwitter.apk
usb conection mode is mass storagemode
ics 4.0.4
Click to expand...
Click to collapse
Are those files in /system/app ? You have ADB drivers installed?
What exactly happens when "nothing happens"? Can you start the script from cmd and tell me what it says?
yes those are apps from /system/app
here is a screenshot of cmd(cmd window is auto closed 1-2 seconds after i run debload.cmd)
on phone is displayed "shell has been granted superuser permission"
can i edit bload.txt in notepad or another text editor?
seljachina said:
yes those are apps from /system/app
here is a screenshot of cmd(cmd window is auto closed 1-2 seconds after i run debload.cmd)
on phone is displayed "shell has been granted superuser permission"
can i edit bload.txt in notepad or another text editor?
Click to expand...
Click to collapse
That's the whole idea, you can edit it. Did you? It looks like the bloat.txt is not in the right place or perhaps has empty lines or something..
command prompt stays open if you run cmd.exe from start menu. Or ctrl-right click on a folder and "open command window here"
yes i did
i notice the difference.. your adb.exe is about 2mb, my adb.exe is 150kb?! maybe that is problem, some drivers.. who knows. (when i try with my adb.exe, it just say "waiting for device").. i manually remove bloatware
I upgraded into omega rom recently that retains some of the cruft in stock rom. So I updated my debloater. Script has been revised to actually work , I must have attached a wrong version by mistake. It now also wipes out .odex files if present. Because of this, deleted filenames are without extension (.apk) in bloat.txt.
To make this really elegant, files should be actually un-installed as now there may be some libraries and data left behind. I'm not going to trace down package name for each and every sony bloatware today, though.
Finally, dalvik cache needs to be wiped to remove the orphaned odex cache files which take most of the space.
It is actually possible to reclaim a lot of space by using titanium backup to integrate some large apps into ROM. Preferably those which do not allow you to move them into sdcard and/or work badly if linked with link2sd. In my phone I have 130MB of free space in the system partition so Chrome alone gives a big chunk of free space for other apps.
After thinking this through, there is NO benefit into removing system apps if you're going to reinstall them from play store anyways. It's better to use titanium backup to integrate any updates into ROM which actually gives more room for apps. I removed google maps and youtube from being deleted by default. Some people may want to edit bloat.txt for facebook and gmail app as well.
Bash script port for linux users
This might not be useful for many people, but I use Linux and I converted this script to work with bash.
Download and run the script as su or sudo.

Integrate Updated System Apps

Hi there i have 4.0.2 rooted working right now but i like to integrate the updates of system apps to have some space. I have been doing it with all my phones and all android versions with rooted and r/w system parts file managers by copy&paste and giving right permissions (644) but i understand that something changed in nougat the way system apps are handled. when i push an apk as a system app and reboot, app disappears even if i gave right permissions. Some apps have libs and odex files also. For example Google Play Store app appears as /system/priv-app/Phonesky/Phonesky.apk but updated version is in data/app/com.android.vending-1 which contains lib and oat folders and base.apk. i used to copy just the apk file in exchange of phonesky.apk and chmod 644 reboot and go! that doesn't work anymore. i tried several apps like link2sd and system file mover, they won't work too. thanks for any help.
I figured how, and want to reply my own question
tried open gapps aroma installer and selected the ones that i want to remain and gapps did the rest. now my device has no updated system google apps. instead all gapps are under system.
AFAIK Titanium Backup has an option to intergrate system apps updates to /system

Is deleting only APK file is enough to remove it completely from the system?

On OxygenOS Stock ROM (4.1.6) there are some apps came pre-installed that I don't use. For example Google Gmail, Hangout also OnePlus's own calculator/clock etc. I want to delete those apps and replace Gmail with Inbox. completely remove Hangout, OPCalculator and OPClock with Google's Calculator and Clock. I have deleted those apps before by manually deleting them from inside /System/App and /System/Priv-app
Now, I'm trying to write my 'own' TWRP flash-able updater script to do such action. But I am kind of confused if only deleting an APK's parent folder is enough to remove the apps completely? For example, if I only delete the folder System/App/(Deskclock) - is that enough or there will be related files remaining somewhere else?
* I know Titanium Backup or other debloat apps can perform similar task, but the main purpose of this question is to know how can this be done manually and properly without leaving un-necessary files in the system.
Thanks.
Deleting the folder of an app in /system/app will remove the app from your phone (as in, not showing up in launchers or the Installed Apps list). However, app data and updates may still be saved in the /data partition. To make sure all of it is removed, first clear data and uninstall all updates to the system apps you with to remove from the Installed Apps list (disable it), then delete the APK either through a root explorer, or a recovery script.
Anova's Origin said:
Deleting the folder of an app in /system/app will remove the app from your phone (as in, not showing up in launchers or the Installed Apps list). However, app data and updates may still be saved in the /data partition. To make sure all of it is removed, first clear data and uninstall all updates to the system apps you with to remove from the Installed Apps list (disable it), then delete the APK either through a root explorer, or a recovery script.
Click to expand...
Click to collapse
Thank you very much! Appreciate your replay.
Suggest to use OOS debloater via twrp
Babloo289 said:
Suggest to use OOS debloater via twrp
Click to expand...
Click to collapse
Are you talking about this one? https://forum.xda-developers.com/oneplus-3/themes/aroma-oos-debloater-t3615828
Hi, Just a quick question.. as you mentioned here
Anova's Origin said:
To make sure all of it is removed, first clear data and uninstall all updates to the system apps you with to remove from the Installed Apps list (disable it),
Click to expand...
Click to collapse
1. I wonder if this is even possible inside TWRP, I mean targeting those unwanted apps, uninstalling updates+ clearing app data/disable them.. Or you are suggesting me to remove them manually from the OOS interface/settings one by one?
2. Also while in TWRP, none of those app (that I will remove) are not functional so what's the points of clearing app data/uninstalling updates? why not simply delete /system/app/(app.apk) and /data/app/(related files.)
Thanks again.
tushxda said:
Hi, Just a quick question.. as you mentioned here
1. I wonder if this is even possible inside TWRP, I mean targeting those unwanted apps, uninstalling updates+ clearing app data/disable them.. Or you are suggesting me to remove them manually from the OOS interface/settings one by one?
2. Also while in TWRP, none of those app (that I will remove) are not functional so what's the points of clearing app data/uninstalling updates? why not simply delete /system/app/(app.apk) and /data/app/(related files.)
Thanks again.
Click to expand...
Click to collapse
1) If you know where the extra data/updates are stored in /data, then you could use a recovery script to delete them. It's kind of one-shot deal though, as unless you open the apps again (after re-flashing a ROM), they won't have any data saved to them the next time you want to delete them.
2) If they aren't functional, they likely won't have much app data to begin with. I would clear the app data from apps like Google Play Music or Movies (if you don't want to use them) before deleting them. Random Engineering Test Tools and unessential services won't have much data stored and can be deleted directly.
i think its just fine bt read other comments too for better understanding.

[Flashable][Script] Open GApps Remover

This small script is now canceled, as I don't own Xperia E1 anymore. I don't know if anybody uses it anyway (as just a few people own Xperia E1 now), but if there is somebody - you can create the same thread with my script and manage it yourself. To download the scripts, head over to this thread - https://forum.xda-developers.com/xperia-e1/themes-apps/tweaks-flashable-zips-scripts-t3813261
Only for Pico package! I don't see a reason to flash Full only to write a script to remove it.
Notice: Google is changing file names regularly, therefore I can't promise that the script will delete every of the Google apps at the time of its writing.
You can also use the script to remove the pre-installed GApps on the stock ROM. Chrome will be removed too (as every app associated with Google).
"Open GApps Remover" is a flashable zip to remove ALL apps and traces of Google. In short - the ROM will look like you've flashed it for first time (custom).
Keep in mind that the zip also wipes your Cache and Dalvik-cache, so if you have any patches or modifications on your system which rely on Dalvik-cache - you will need to apply them again. Wiping Cache and Dalvik-cache also means that you will have to wait from 5 to 10 minutes, all depending on the number of applications you have installed on your phone.
The script will also delete some Google libs and files so that no unwanted files will take space on the ROM.
Tested only on TWRP, PhilZ should work too, I guess.
PM me if something isn't deleted.
Changelog (dd-mm-yyyy):
(13.06.2018):
-Added more file names of the Google Play Services application.
(23.05.2018):
-Fixed a typo.
--------------------
Current version:
Stock - 2.1 [FINAL]
LineageOS 11 - 2.1 [FINAL]
Latest update:
Stock - 13.06.2018 [END]
LineageOS 11 - 13.06.2018 [END]
I don't even ****ing know why I created a damn poll for this thread, lol.

Categories

Resources