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
Related
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
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.
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.
Hi guys,
Small problem here...
I wanted to be able to "Greenify" the stock camera app so I tried to convert it to user app with Rom Toolbox. Thing is now I can't find the camera app anywhere, even the APK has disappered... I downloaded the APK from the "Apps & Themes" section of this forum but it's not working!
First, I tried installing the APK like a regular app, didn't work. Then I tried mounting the /system folder with R/W rights and copying the .apk and .odex file in the /system/app folder, set permissions of both files to rw-r-r and reboot, no luck either...
I'm not sure what else to do... Any ideas ?
Thanks in advance!
(System version 91.2.29001.XT890.Retail.en.GB, Stock, Rooted with TwerkMyMoto [locked bootloader])
Search the app on System/data/app if is there copy again to system/apps
Dont havw a copy from titanium backup?
Also the greenify app has a module of xposed that let hibernate system apps with xposed framework
Enviado desde mi XT890 mediante Tapatalk
/system/data/app = Does not exist...
/data/app = No camera apk there.
I did not backup with TiBU (or any other app) because I did not want to delete the stock camera app, just wanted to convert it to user app... I just lost it in the process! I guess I should have been more careful and backup the apk before trying anything!
I do have copies of MotCamera.apk and MotCamera.odex as it's been extracted by other users and posted on this forum a few times, I just can't figure how to make them work again!
I know about the xposed framework for Greenify but I thought it would be easier to convert the system app to user app than installing the xposed framework... I guess I was wrong!
I noticed something new today, there is a file named "com.motorola.camera.apk" in the /system/app that has the same date as the date I've put back the copies of MotCamera.apk and MotCamera.odex files in that folder... I didn't put that there, I think it was created by the new apk somehow! Does that changes anything ?
I know the stock camera app is far from "vital" to the system but I would really appreciate a little help to get it back!
Thanks!
I'm having a problem getting to move any user app to the system partition on my Nexus 6. I'm using the Pure Nexus ROM, now rooted with Magisk, Android 7.1.2. The thing is, I have tried to do so when I was on Stock ROM, also tried it with SuperSU root instead of Magisk with no difference whatsoever. Link2SD doesn't work but neither worked system/app mover by j4velin.
What should I do to get that to work? Thanks in advance...
You're using Magisk... There are modules for that.
Two actually. And they can be installed from the Manager:
https://forum.xda-developers.com/apps/magisk/module-terminal-app-systemizer-ui-t3585851
https://forum.xda-developers.com/showthread.php?t=3477512
Take your pick.
Didgeridoohan said:
You're using Magisk... There are modules for that.
Two actually. And they can be installed from the Manager:
https://forum.xda-developers.com/apps/magisk/module-terminal-app-systemizer-ui-t3585851
https://forum.xda-developers.com/showthread.php?t=3477512
Take your pick.
Click to expand...
Click to collapse
Well right now for some reason Magisk isn't installing anything on my device, however I was wondering, if there is a method which installs the app as system and that the app continues to be there even if I unroot my device?
Dorlan2001 said:
Well right now for some reason Magisk isn't installing anything on my device, however I was wondering, if there is a method which installs the app as system and that the app continues to be there even if I unroot my device?
Click to expand...
Click to collapse
The whole design concept of Magisk is to protect the system partition from being modified. It does that by sym-linking directories. Using Magisk, as designed, the apps will go into the Magisk.img, not system. When booted, it'll look like the apps are in system but if you unroot they'll be gone.
If you don't care about modifying the system partition, you can move an app manually. User apps are in /sdcard/data/app and system apps are in /system/app. Once moved, you'll have to edit the permissions for the folder to rwxr-xr-x (755) and the apk inside the folder to rw-r--r-- (644).
ktmom said:
The whole design concept of Magisk is to protect the system partition from being modified. It does that by sym-linking directories. Using Magisk, as designed, the apps will go into the Magisk.img, not system. When booted, it'll look like the apps are in system but if you unroot they'll be gone.
If you don't care about modifying the system partition, you can move an app manually. User apps are in /sdcard/data/app and system apps are in /system/app. Once moved, you'll have to edit the permissions for the folder to rwxr-xr-x (755) and the apk inside the folder to rw-r--r-- (644).
Click to expand...
Click to collapse
Thanks for the info mate! It was really helpful to me to get to understand how Magisk works, and to be able to make the changes I wanted to my system using Root Explorer. Is so weird though, that those apps who claim to automate things, don't work on my device...
Thanks again!!!! :good: