Is deleting only APK file is enough to remove it completely from the system? - OnePlus 3T Questions & Answers

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.

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.

Initial list of removable apps using root access (debloat)

A special thanks to thecubed for providing us with root access! See his thread here:
http://forum.xda-developers.com/g4/orig-development/root-tmo-vzw-intl-variants-soon-root-lg-t3164765
Following is a list of system apps I have removed without affecting apparent stability or performance. Disclaimer: I am not responsible for any damage you inflict upon your device, proceed at your own risk. I backed up complete copies of my system app folders, and rebooted after each uninstall in case I ran into trouble. I used the uninstall function of Rom Toolbox, and have heard of similar results using Titanuim Backup (including the inability to completely remove the Facebook entries without further intervention.)
Facebook
Instagram
Pages Manager
Lookout
Messenger (Facebook)
Snap Page
com.facebook.system
com.facebook.appmanager
The "com.facebook" entries were a little trickier. When attempting removal they would just downgrade to the factory-installed version, then after a reboot they immediately update themselves silently in the background. I had to remove the folders that held the original versions the apps were reverting to, then remove them again. I have never seen what should be an optional social media app so stubbornly intalled as a system app! Here are the directories I found the originals in:
/system/app/com.facebook.appmanager
/system/priv-app/com.facebook.system
/system/priv-app/lookout
After deleting these folders using a root file explorer (ES File Explorer) I was able to run root uninstalls with Rom Toolbox. I didn't remove anything connected to LG's services, Google's services, or the stock launcher. Only the apps that should have been optional to install in the first place. I hope this helps get some other users started making use of our new root access!
reserved for future add-ons
Thanks for this guide
I deleted a lot more than both you guys but I'm going to leave it as it is because without TWRP it's really playing with fire.
SantinoInc said:
I deleted a lot more than both you guys but I'm going to leave it as it is because without TWRP it's really playing with fire.
Click to expand...
Click to collapse
I'm really interested in that list.... My phone didn't have, half the apps they mentioned. Sprint Ls991. A screen shot...if possible... so you don't have to type all the apps.
I didn't document which apps I deleted. If you send me a list of apps you are wondering if they are safe to remove I will let you know if I deleted it.

How-to permanently remove CM bloatware?

Hello,
CMS includes 4 apps that can be easily uninstalled: Calendar, EMail, Browser and Truecaller.
Where are these apps stored to permanently remove?
If I uninstall and I perform a wipe the apps are magically restored
I have located by my self....
There are at: /system/vendor/bundled-app
bartito said:
I have located by my self....
There are at: /system/vendor/bundled-app
Click to expand...
Click to collapse
You can use system app remover also. Does the same purpose!
If you are rooted you can also use TiBu to remove system apps.

Cannot Remove bloatware on Metro 626s after MM update

I have my desire systemless rooted w/ twrp installed. I have tried several different ways of removing system apps but Everytime I restart EVERY Single app is back like they are an aggressive cancer that will not subdue to chemo. Is Anyone else experiencing this and if not please advise me on your method of removal. Thanks.
Also, Tidbit more info, when I attempt to flash ANY thing in TWRP, the phone stops the flash and IMMEDIATELY restarts into ROM.
i2andog said:
I have my desire systemless rooted w/ twrp installed. I have tried several different ways of removing system apps but Everytime I restart EVERY Single app is back like they are an aggressive cancer that will not subdue to chemo. Is Anyone else experiencing this and if not please advise me on your method of removal. Thanks.
Also, Tidbit more info, when I attempt to flash ANY thing in TWRP, the phone stops the flash and IMMEDIATELY restarts into ROM.
Click to expand...
Click to collapse
Have you tried re flashing twrp ? You can use flashify or rashr from play store to flash the .IMG file
As far as system apps and bloat, I've also had issues removing them. When I use ROM toolbox pro's app manager, a lot of times the app will still be on the list of apps installed even after I've clicked uninstall. But usually the apps are gone once I reboot
I use /system/ app mover *root* from the play store. I covert the system apps to user apps and then uninstall them.
It also shows that in the latest update it might recognize sytemless root.
IsaacGuti said:
I use /system/ app mover *root* from the play store. I covert the system apps to user apps and then uninstall them.
It also shows that in the latest update it might recognize sytemless root.
Click to expand...
Click to collapse
Why do you convert to user apps first? Could that be the reason why they aren't being removed? Due to some type of broken operation of an app that was meant to be system only?
talksickisil said:
Why do you convert to user apps first? Could that be the reason why they aren't being removed? Due to some type of broken operation of an app that was meant to be system only?
Click to expand...
Click to collapse
I do that because I keep some of the apps and also because I haven't had any problems uninstalling apps that way. converting them to user apps also gives me the option to move them to the SD card.
I remember when I used "system app remover(root),"it would still show the app in the app drawer(even after reboot) and when I pressed on them they would say "unfortunately ...has stopped"
I used titanium backup to get rid of all the apps i didnt want,afterwords i went into TWRP and wiped the dalvik cache/ART cache and it rebuild upon first reboot,and all the apps i uninstalled were gone.try this method and let us know.

Question safe to uninstall this?

Hi.
I was wondering if it's safe to uninstall this app / service shown in the screenshot below, through an ADB command. I don't use live wallpapers anyway so I wanted to get rid of it.
Yeah, that should be fine. just as a precaution, set your wallpaper to something that's on the device before freezing/removing.
As a word of warning, uninstalling system apps has the potential to break the system, so only uninstall the apps that you are sure of. Apps like Gmail, Google Play Music, Google Play Movies, etc., are safe to uninstall but never remove Google Play Store or any of the files associated with it
myaccountaccess
Romaguera said:
As a word of warning, uninstalling system apps has the potential to break the system, so only uninstall the apps that you are sure of. Apps like Gmail, Google Play Music, Google Play Movies, etc., are safe to uninstall but never remove Google Play Store or any of the files associated with it
myaccountaccess
Click to expand...
Click to collapse
+1!
When I debloat my devices I always have a factory image unzipped ready on my PC. I always make a copy of each APK and screenshot where it's located before I kill it. A few devices I've owned in the past people have removed apps and then made a xda thread once done showing what they did, deleted... It sure helped speed up the process for me and I'm sure others who got the devices months after release. The developer who's develops xXx No Limit magisk rom for OnePlus devices is probably the best at the debloat I've ever seen. He has a script in his magisk xXx no Limit rom zip that you can edit before flashing in magisk and either delete the app, replace the app with another or leave it alone. He has detailed info on every app in the stock rom. Delete whatever you want just backit up first and know how to flash factory image and or manually boot recovery and restore a backup or whatever to get your device back working again if you end up in a boot loop.

Categories

Resources