So, there were some updates to system apps on my G4 (H815T-HKG), and I decided to integrate them into the system ROM.
One of them was Android System Webview, which a bunch of other programs depend on. But then I later discovered that the version I had integrated was causing a bunch of apps to crash (including text apps).
So then I uninstalled it and installed a version that works from here. However, it only works as a user app.
If I try to move the folder from /data/app/ to /system/app/ and change the permissions to 755 and reboot, it doesn't appear in the list of installed programs, and programs that rely on it crash.
I tried converting it to a system app with Titanium Backup too, but it just seems to get stuck and I have to manually stop Titanium Backup, then reinstall Android System Webview again.
Well, I decided to mount the rooted system image on a linux machine and copy the original WebViewGoogle folder from it to the /system/app folder on my G4, and it works - although it's not an up-to-date version (43.0.2357.121), it at least means there's A version which will be there if I need to delete the user data.
Related
Ok, these are specifically for MIUI, but they can easily be adapted to any other rom by editing the shell scripts. I'll explain how they work and it should be fairly apparent how one would need to modify for their particular rom/needs. Don't know if anyone will actually use these, but I thought I'd share. I also think it's a really good example of how CWM can be used for more than just flashing stuff.
So I've been running MIUI for a while now and I'm really happy. One little issue that popped up was every Friday when the rom was updated, the OTA update app icon gained a little "1" badge, indicating an update was available. While it's nice to be notified of the update, I occasionally didn't have the time or interest in updating so the little badge remained. I put that app in a folder, but then the folder had the little 1 badge. After a while, I started deleting the update app after install since I could always download and install updates through ROM Manager just as easily. Then I started deleting the update app from the downloaded ROM zip, along with several other apps I didn't want (Facebook, Twitter, the MIUI FileExplorer, etc) before flashing it. But this entailed downloading the Friday update on my phone, transferring it to my desktop, opening the zip in 7 Zip, deleting the unwanted files, uploading it back to my phone and then flashing. Quite a PITA.
Another issue I ran into was that the built-in MIUI backup app failed to backup my SMS/MMS messages. Actually, I don't know if it was failing to back them up, or failing to properly restore them, but at the end of the day, it wouldn't keep my text messages. I know I could avoid this by just installing each update over the current ROM, but I've always believed cleanly installing an OS helps avoid issues. I prefer to wipe everything, install clean and then restore my data.
So, the solution(s) I came up with was to mod the downloaded ROM zip file right on the phone, and manually backup and restore my data. While it took a little while to get set up, I find it actually works considerably faster and smoother than using MIUI's backup/restore app. I now have 3 simple shell scripts that are run through Clockwork Recovery just like installing any zip - one to mod the ROM after downloading, and two to backup and restore my data. Here they are:
MIUI-Mod.zip
This contains a shell script and a zip binary to handle the adding and deleting of files to/from the downloaded rom zip. When run through CWM, it copies zip and the script to /tmp and runs the script. Because the ROM zip is named differently every Friday, I figured the easiest solution was just to rename it manually. So, this script assumes the ROM zip is named "miui.zip" and is located in the root of the SD card. It's a simply matter to download the ROM on Friday, move it to /sdcard and rename it miui.zip. Here's what the script does in 2 commands:
/tmp/zip -d /sdcard/miui.zip /data/app/Twitter.apk /data/app/Facebook.apk /system/app/Email.apk /system/app/FileExplorer.apk /system/app/Gmail.apk /system/app/MIUI.us_Forums_1.1.2_AdSupported.apk /system/app/Superuser.apk /system/app/Updater.apk /system/app/MIUIStats.apk /system/media/lockscreen/* /system/media/wallpaper/*
/tmp/zip /sdcard/miui.zip /system/app/Gmail.apk
Click to expand...
Click to collapse
The first line simply opens the zip and deletes the listed files: Twitter, Facebook, Email, etc. It also removes all the wallpapers for the lock and main screens (I don't use them, so I didn't want them, but it's a good example of the use of wildcards like *).
The second line adds in the Gmail.apk from my current ROM. The latest versions of the Gmail app included in MIUI lock the mail database, which conflicts with a widget I use, so I just replace it with an older version. Every time I run the script, it removes the included Gmail app and adds in my current one. If you didn't want to add anything to the ROM, you could just delete this line entirely.
Data-Backup.zip
This just runs a shell script that creates a tar file in the root of your sdcard containing the listed files and directories. Tar files retain file permissions and owner information, so everything can be restored seamlessly. Here's how it works, it's pretty simple:
tar -c -f sdcard/backup.tar data/app/com.adobe.flashplayer-1.apk data/data/com.adobe.flashplayer data/app/com.speedsoftware.rootexplorer-1.apk data/data/com.speedsoftware.rootexplorer data/app/com.touchtype.swiftkey-1.apk data/data/com.touchtype.swiftkey data/data/com.android.browser data/data/com.android.deskclock data/data/com.android.launcher data/data/com.android.mms data/data/com.android.phone data/data/com.android.providers.contacts data/data/com.android.providers.settings data/data/com.android.providers.telephony data/data/com.android.providers.userdictionary data/data/com.android.thememanager data/data/com.android.vending data/data/com.google.android.gsf data/data/com.miui.camera data/data/com.miui.notes data/data/com.noshufou.android.su data/system data/misc/wifi
Click to expand...
Click to collapse
This creates the tar file and includes Adobe's Flash player and it's data, Root Explorer and it's data, and SwiftKey and it's data (I paired it down to just these three for this example). After that, it backs up a bunch of other data directories which include the current Browser settings, alarms, launcher settings and home screen layouts including widgets, phone logs, the current theme settings, any MIUI notes, current Wifi connections and, yes, SMS and MMS messages.
Obviously, you'd want to add in your specific apps and data directories. Sure, it takes a little work to set this up, but as I said, backing up is very quick and easy afterwards.
Data-Restore.zip
This just runs a shell script that restores all the files from the backup.tar on your SD card:
tar -xf /sdcard/backup.tar
Click to expand...
Click to collapse
Doesn't need much explanation.
So, the process is:
1-Download the Friday update through ROM Manager, move it to the root of my SD card and rename it to miui.zip
2-Reboot into CWM and run Backup-Data.zip to back up my apps and data
3-Run MIUI-Mod.zip to modify the downloaded MIUI rom
4-Wipe everything (cache/data/system)
5-Install the modded MIUI rom
6-Run Data-Restore to restore apps/data
7-Reboot
It's literally about 5 minutes after downloading the ROM and I'm updated and rebooted with a CLEAN os install and all my apps, data and settings intact, my home screen layouts, keyboard, wallpapers, wifi settings and everything retained.
Some notes:
1-Before running these in CWM, you have to make sure you have system, data and sdcard mounted since the scripts will be reading and/or writing to all of these. When you first reboot to CWM, just go to mounts and manually mount each one. The scripts could certainly be set up to mount them automatically, but mount points vary from phone to phone, and it's not difficult to mount through CWM. Also, after flashing a ROM, the ROM install script may unmount some of these, so before you restore your data, you might have to manually remount.
2-If you're adding anything from your current ROM to the zip (like how I add in my current Gmail.apk), make sure you wipe everything *after* running the mod script, otherwise you're deleting everything and then trying to copy file(s) that were just deleted.
3-I would highly recommend using Notepad++ to edit scripts, since it properly saves Unix line breaks.
4-as always, use at your own risk and a full CWM backup is highly recommended before messing with these.
That's pretty much it. Again, it does take a little while to get set up, but once it is, it's really simple. If you install a new app between updates, you just have to edit the backup script, or you can just keep the scripts maintaining a base setup and reinstall various apps through the market each time. This specific process is probably most useful for ROMs that are updated regularly - nightly or weekly, although I'm sure people can find other uses for running scripts through CWM.
Hope someone might find these useful.
This is really cool. I run Miui and would really like to be able to do a fresh install each week, but hate the hassle of resetting up my phone, even using Titanium backup, it's still a time consuming process. So needless to say, I flash the new rom over top of the old version without wiping just to save time.
So, basically I can open up the data restore zip in 7 zip, add in a few of my apps/data such as Tasker and so forth, close it and flash? If so, that will be great.
Thanks for sharing this!!!
You don't need to touch the Data-Restore.zip, all that does is extract the backup.tar file created with the backup script. What you'd do is open the Data-Backup.zip and edit the backup file (it's just a text file). Add in any of your apps and their corresponding data directories and when you flash the Data-Backup.zip in CWM, it'll back up those files/folders.
To find the files you want to backup, use something like Root Explorer and look in /data/app. There you'll find all the 3rd party apps you've installed. Add each one to the tar command in the backup file just like the ones I included. Then go into /data/data and find each app you want to back up's corresponding data folder. Add them to the tar command too.
Save the file, re-zip it and when you flash it through CWM, it'll back up the new files.
Just what i wanted
I also always install everything from clean system so setting up everything is a pain.
Would this work for Internal storage? I have a Motorola RAZR XT910 and running JBX roms.
Google does install all the apps when i sign in into the new rom but then i always had to move each folder to the correct destination manually using some file explorer. was thinking of making something like this but didnt know how to start. Thanks, I will now try and mod these to suit my phone :good:
How would I do this?
Is it possible to clear data and copy paste my apk over the other one?
Have root.
Thanks
If you have root just use titanium backup to uninstall it. Go into tibu preferences and clear dalvik. Then install the new apk. If it's not an installable apk then before you uninstall the old one find out where the app is in a file browser. Then uninstall it and place the new apk where the old one was, fix permissions, and reboot.
Unfortunately that doesn't work. It even deletes it from system\app but it still appears in my app drawer and I cannot install the older version.
any ideas?
Are you restarting your phone after? Try going into recovery and clearing cache and dalvik.
Spookymyo said:
Are you restarting your phone after? Try going into recovery and clearing cache and dalvik.
Click to expand...
Click to collapse
It's somehow built into the rom. But if anyone has a verizon g4 and wants to see if they can completely remove slacker, let me know.
On Android, you don't need to install apk's as they will install on bootup if you place it in the correct location.
For slacker on the G4, not sure if this is a lollipop thing or a LG thing, you cannot replace the one in /system but rather, what you want to do is out the new version in /data/app since if you mess with the /system version, it will show up as uninstalled on the device.
In /system/priv-app/SlackerRadio directory, you will see:
SlackerRadio.apk,
lib which consists of:
arm folder which has the file librsjni.so
Don't touch any of those and make sure it is stock.
You want to install the new Slacker apk in /data/app/com.slacker.radio-1 folder as base.apk, it will install when you reboot so don't worry about installing it
delete the folder /data/data/com.slacker.radio
delete all the things in /data/dalvik-cache/arm and /data/dalvik-cache/arm64 and reboot.
If you wanted to completely remove Slacker, then all you would do is delete /system/priv-app/SlackerRadio and delete /data/app/com.slacker.radio* with * being anything that can be after it.
I'm not sure why titanium backup isn't working for you. I had slacker and tibu worked perfectly, I'm also on the Verizon g4. It doesn't matter if it's built into the rom. With tibu you can delete any app. But if that doesn't work the steps Almighty1 listed is the long way around but works.
And I see that you're on the Verizon g4, that means you don't have a custom recovery.
Found a question that's interesting for me as well, but no answer...
Is there any way to remove those apps being stock without root? (If not, how to remove them with root?)
Also unneeded apps:
*Google
[Slides]
[Sheets]
[Docs]
[Exchange Services]
[Play Movies]
[Play Music]
[Hangouts]
[Keep]
*Social
[Facebook]
[Messenger]
[Instagram]
[News Republic]
*HTC
[Connect]
[Help]
[...]
P.S. I can understand the preinstallation of GApps, but why the heck would i like to have Facebook, Messenger and Instagram preinstalled on my system, that cannot even be uninstalled?
KotTHECat said:
?
Click to expand...
Click to collapse
you have to have root. to remove them you install a file explorer with root access, like Root Explorer is my favorite.
You browse to the system folder of the phone and youll see an apps folder and a priv-app folder. the stuff your looking for will be in there and you delete the entire folder of the apps you don't want. reboot when finished and they should be uninstalled.
it will be best to start with backing up your untouched system incase removing some app gives you problems, which it can when messing with system apps.
there is also play store apps the will uninstall for you, other apps can also "freeze" bloat without actually removing so you can see side effects of removing them
You can remove them all easily without root but you'll need a custom recovery like TWRP.
I do this before first boot to clean up apps and add HTC file explorer etc.
You can flash TWRP, remove apps then restore the factory recovery.
Sent from my HTC 10 using Tapatalk
I just disabled them on mine, not like you would free up considerable space and if they are disabled, you don't get the updates eating in to your storage as the original just sits in the system partition.
afuller42 said:
you have to have root. to remove them you install a file explorer with root access, like Root Explorer is my favorite.
You browse to the system folder of the phone and youll see an apps folder and a priv-app folder. the stuff your looking for will be in there and you delete the entire folder of the apps you don't want. reboot when finished and they should be uninstalled.
it will be best to start with backing up your untouched system incase removing some app gives you problems, which it can when messing with system apps.
there is also play store apps the will uninstall for you, other apps can also "freeze" bloat without actually removing so you can see side effects of removing them
Click to expand...
Click to collapse
Any way to remove Facebook completely without any problems after? Was thinking to maybe just buy the Chinese Version from China since China does not allow Facebook in the first place.
low internal storage on my HTC m8. i want to remove unwanted system applications. is this possible on rooted (TWRP) HTC m8? please help.
Try TitaniumBackup
This is Not working. It uninstall application I selected. But it's exist. And I restarted phone. Still it's exist.please help
Make sure you are using superSu with the last binaries
Super su v2.76. Is there any newer version
Get Titanium Backup Pro. It can do this and so much more. Totally worth it
It's titanium pro
On this device, the system partition is write protected, even with root. You need to install wp_mod to delete system apps.
I've seen folks accomplish it other ways (I think changing permissions in ES File Explorer or similar "root" explorer) in addition to Titanium mentioned above (which I can't personally say works or not). But wp_mod is the most common way I've seen discussed to delete system apps.
Its all a bit irrelevant. The system (OS) partition is not normally user accessible; nor will deleting system apps change the size of the system partition. Nor will deleting "bloatware" system apps does not increase your user data storage. The only exception to these points, is if you intend to install user apps as system apps (which again, will require wp_mod or similar). But that's getting pretty fancy and I don't think that is what you are talking about.
Hello guys, I'm thinking of switching from MIUI to LOS or Syberia. To do that I need to format the /data partition. I really don't want to re-install all my apps again, so is there a way to restore the data partition not as an image, but as file structure? I have TWRP backups but they're images of the partition. Do I need to install Titanium Backup or similar?
What would be the best course of action here?
Thanks in advance!
Try migrate on play store
raspizdiaika said:
Try migrate on play store
Click to expand...
Click to collapse
Play Store indeed has a list of all the apps I have installed. However all the data that's in the app's settings will be gone.
Here's an example - I use a Launcher app. If I re-install it from Play Store, all icon arrangements, wallpaper settings, all other settings within the Launcher will be gone.
What I'm trying to achieve is once the /data partition is formatted, ideally I'll just need to copy paste the data (files and folders) back in again. Partition restore won't work as it will mess up the LOS (or any other non-MIUI OS) installation.
The TWRP backup gives me an image file, which can be extracted to apps and folders, but I'm not sure I can just copy paste that over to the /data folder(partition). Main concern is permissions. Would they be automatically set on OS boot?
unicastbg said:
Play Store indeed has a list of all the apps I have installed. However all the data that's in the app's settings will be gone.
Here's an example - I use a Launcher app. If I re-install it from Play Store, all icon arrangements, wallpaper settings, all other settings within the Launcher will be gone.
What I'm trying to achieve is once the /data partition is formatted, ideally I'll just need to copy paste the data (files and folders) back in again. Partition restore won't work as it will mess up the LOS (or any other non-MIUI OS) installation.
The TWRP backup gives me an image file, which can be extracted to apps and folders, but I'm not sure I can just copy paste that over to the /data folder(partition). Main concern is permissions. Would they be automatically set on OS boot?
Click to expand...
Click to collapse
Titanium backup is hard to beat. You can copy your back up folder onto your pc and copy it back over after the wipe to restore your app data.
unicastbg said:
Play Store indeed has a list of all the apps I have installed. However all the data that's in the app's settings will be gone.
Here's an example - I use a Launcher app. If I re-install it from Play Store, all icon arrangements, wallpaper settings, all other settings within the Launcher will be gone.
What I'm trying to achieve is once the /data partition is formatted, ideally I'll just need to copy paste the data (files and folders) back in again. Partition restore won't work as it will mess up the LOS (or any other non-MIUI OS) installation.
The TWRP backup gives me an image file, which can be extracted to apps and folders, but I'm not sure I can just copy paste that over to the /data folder(partition). Main concern is permissions. Would they be automatically set on OS boot?
Click to expand...
Click to collapse
He actually means Migrate as it's an app on Play Store. The app is sort of like Titanium Backup but free.
Sent from my MI 5s using Tapatalk
Thanks, I misunderstood the reply. Migrate indeed looks like the app that will do the job. I'll give it a shot.
Thanks again!
Quick update - I am now on LOS 16 and used Migrate. A few apps gave errors (Telegram is one of them) so I uninstalled and installed them back from Play Store. But that's nothing really. I loaded the launcher amd saw all my icons back where I left them... Amazing!