Post Reply

[SCRIPT] ROM Cleaner v1.1 | Remove Bloatware | Backup Apps | Add Custom Apps/Mods

OP Patrics83

25th March 2012, 04:57 PM   |  #1  
Patrics83's Avatar
OP Recognized Developer
Flag Gothenburg
Thanks Meter: 8,080
 
5,562 posts
Join Date:Joined: Feb 2010
Donate to Me




  • ROM Cleaner deletes Apps and files from your system based on our default list or users choice
  • Backup Apps with Backup Tool and let ROM Cleaner restore all your apps before first boot
  • Restore your mail settings, accounts, wifi keys and paired Bluetooth devices with Settings Restorer
  • Follow the guide in second post and you will be just fine
ROM Cleaner Featured On XDA!!!

Also read these nice articles!
XDA Front page!
Evil-Dragon's Blog!




  • very nice, simple and fast way to delete stuff from your device
  • takes less then 5 seconds to delete all the listed applications and files in the list
  • no trash left behind as it will be if you delete files manually using RootExplorer
  • more free RAM for apps that you are actually using
  • users have reported better battery life and device speed improvements with ROM Cleaner
If you find this tool good, great, awesome or maybe even the best thing you ever tried, then please send us a beer or hit the "Thanks Button" or leave some feedback

Before and after pictures.
In this example, Desire HD loaded with ARHD 5.2.5 - Sense 2.1.

Before ROM Cleaner | After default ROM Cleaner



Please always respect our work and be friendly and helpful to other members in this thread.

This is an example of how the ROMCleaner text file looks like. Many, Many more Apps in the real list.
Code:

AppLocker.apk                                       Application passwords
AsusReader.apk                                      Epub reader
#AWS.apk                                            Asus Webstorage
#Browser.apk                                        Standard Browser
#Calendar.apk                                       Calendar app
#CalendarProvider.apk                               Calendar app sync
#Calculator.apk                                     Calculator
#ChromeBookmarksSyncAdapter.apk                     Chrome Bookmark Sync
#DataBackup.apk                                     Asus databackup
#FileManager2.apk                                   File Manager
Gallery2.apk                                        Gallery
GlowballDemoInstaller.apk                           Game Demo
Kindle-OEM.apk                                      Amazone Market
MEar.apk                                            Music app (not Google)
#Mycloud.apk                                        Asus Cloud
MyNet.apk                                           Media HomeNetwork Player
Music2.apk                                          Music player

Plus many more... Download the complete list in the download section.
If you get some kind of issues after flashing ROM Cleaner, reflash the ROM and check if the issue still exists.
Important: Don't spam ROM development threads about issues caused by this script. You must always report problems in this thread and we will most likely help you as fast as we can.

Important:If you want to report a problem, give us all log files located in /SDCard/ROMCleaner/Logs and your ROMCleaner_user.txt! Just make a zip of the files and upload it.





Code:

ROM Cleaner v1.1 - 2012-04-15
-Added support for AOKP ROMs
 See ROMCleaner_user.txt for new apps

___________________________________________________________________________________________

Backup Tool / Settings Restorer v1.1 - 2012-03-29
-Fixed Email backup! Thanks to MarckX for testing :D

___________________________________________________________________________________________

Initial release - 2012-03-25
-Backup Tool v1.0
-Folder Creator v1.0
-Mods and App Installer v1.0
-ROM Cleaner v1.0
-Settings Restorer v1.0
-Setup Wizard Remover v1.0




To be flashed before full wipe and ROM flash

Folder Creator v1.0

Backup Tool v1.1


To be flashed after flashing ROM and before first boot

ROM Cleaner v1.1

ROMCleaner_user.txt from ROM Cleaner v1.1
Right-Click and Save as...
>Follow instructions in second post how to edit this to fit your demands...


To be flashed after first boot

Settings Restorer v1.1

Mods and App Installer v1.0

Asus Setup Wizard Remover
Also make sure to use Notepad++ when editing ROMCleaner_user.txt in Windows.
Requirements: Rooted and CWM Recovery installed


Please feel free to use our banner made by craacK






Thanks a lot for all donations

MarckX x2 | Tomi Mykrä x2 | craacK x1 | Anthony Hogan x1 | Pietrorlando Giordano x1 | Mastacheata x1
preacher65 x1 | PaulGiz x1 | avatar_ro x1 | verynuclear x1 | JagSem x1 | Clarifiante x1 | Rosete Ryan Kim x1
Xphoid x1 | rayford85 x1 | Simi007 x2 | z31s1g x1 | malybru x1 | HTC-Gunge x1 | Laurentius26 x1 | tossero x1









Dude360 how made a great work building this tool with me.
craacK for all the help with the development.
Madmaxx82 for his script skills and help making this one fly
Mike1986 & lukogriffioen for inspiration.
The rest of Team Revolution for supporting me.
Special thanks goes to Whiskey103 for hosting my files.
MikeChannon (admin) for all the help.
And ofc to everyone who support us and help us to make it even better.

Thx MarckX for testing and making ROMCleaner.txt for TF201!
Thx malybru for testing!
Last edited by Patrics83; 18th August 2012 at 03:19 PM.
The Following 11 Users Say Thank You to Patrics83 For This Useful Post: [ View ]
25th March 2012, 04:58 PM   |  #2  
Patrics83's Avatar
OP Recognized Developer
Flag Gothenburg
Thanks Meter: 8,080
 
5,562 posts
Join Date:Joined: Feb 2010
Donate to Me
Yes, yes I know your thinking "Hmm this seems a pretty long long post so Im not gonna bother reading it."
It contains information for every aspect of the scripts, you wont need to read it all!
The majority of users will just need to read the Quick Start Section
You dont need to read the entire guide just to use this script!

Please dont quote this entire post!
Contents
  • A Complete N0oBs Guide
  • Quick Start Guide
  • Summary
  • Breakdown Of Zips
  • - Folder Creator
  • - ROMCleaner
  • - Backup Tool
  • - Settings Restorer
  • - Setup Wizard Remover
  • - Mods & App Installer
  • How To Create Your Own List
  • Examples Of Usage
  • - Fresh ROM
  • - ROM Upgrade
  • - Full Backup & Restore
  • ROMCleaner Logs & Support
  • A Little About The Team

Quote:

A Complete N0oBs Guide
I cant make this any simpler for you.
TO HAVE A CLEAN ROM = JUST FLASH THE ZIP
TO USE YOUR OWN LIST PUT ROMCleaner_user.txt ON YOUR SDCARD IN

Code:
/sdcard/ROMCleaner

Quote:

Quick Start Guide
Ok, this is a quick start guide for those user who just want to flash and go.
The cleaner uses one of two text files located in the ROMCleaner folder on your SD card.

  • ROMCleaner.txt - This is the default cleaner list that the script will read from. This list will be placed on your card on the first run of the cleaner. It will be overwritten each time the cleaner is run to ensure the latest updates are applied.
Or
  • ROMCleaner_user.txt - This is your custom cleaner list. You can create this file at any time and the cleaner will automatically read from it.
File Locations:
Code:
/sdcard/ROMCleaner/ROMCleaner.txt   <--- This is the default list and will be created automatically
/sdcard/ROMCleaner/ROMCleaner_user.txt   <--- This is your personal list which you create.

Quote:

Summary
In short, all you have to do is add text to a file and put apks into a folder.
Yes yes that simple.
You can even edit the text files and copy apks using just your device.
While we still recommend you use http://notepad-plus-plus.org/ to edit your list on a PC to maintain the UNIX encoding the cleaner will also double check and convert the file if it finds it has been converted to a windows format.

EVERYTHING BELOW THIS RED LINE YOU DONT NEED TO KNOW.
ITS A COMPLETE REFERENCE GUIDE FOR THE ENTIRE TOOLSET WE DO RECOMMEND YOU HAVE A LOOK AT IT


_______________________________________________
<- The Red Line


Quote:

Simple Breakdown

  • Folder Creator - Creates all nesercery folders automatically for you on SDCard
  • ROMCleaner - Will clean your rom using either default list or user list
  • Backup Tool - Will backup Apps and settings* to SD for you
  • SettingsRestorer - Restores backed up settings* made with backup Tool
  • Setup Wizard Remover - Removes setup wizards
  • Mods & App Installer - Installs using the SecondBoot folders

Quote:

Folder Creator

We have created this small flashable zip to aid you in getting the cleaners directory structure setup.
It should only need to be run once before using but can be run at any time to completely recreate the structure. Any files or folders in place will not be harmed if flashing again.
The script contains a small reboot to workround a very small bug in some recoveries. This bug will not update the sdcards file view to show new folders.
This is to help us avoid the obligatory "I flashed the zip but it didnt create the folders" posts.
Quote:

ROMCleaner

On flashing, the RC zip will do the following things:
  1. Install our script and related files to /tmp
  2. Check if the folder is present on the SD card, if not then it will create it.
  3. Install the default cleaner list (ROMCleaner.txt) overwriting any older versions.
  4. Check to see if a custom list is present (ROMCleaner_user.txt).
  5. If it is then it will check for Windows encoding and convert to UNIX if needed.
  6. If it is not then it will use the default.
  7. Proceed to read the list and delete all the files and folders.
  8. Copy any backuped up apps back to /data/app
  9. Create Logs on the SD Card.
Note that the time it takes for the apps to be copied will vary dependent on the number of apps you have installed/are installing as will the first boot of the rom as most roms these days will automatically zipalign the data partition. On 200+ apps it takes under a minute to install and adds roughly 4-6mins to your boot time.
Due to the naming convention of apks when updated (they are appended with -1, -2 etc) please ensure you check for duplicates to avoid doubling up and wasting space. We will leave the organisation of your apps in this folder to you
Quote:

Backup Tool

Now to save time and bandwidth when installing a rom it is possible to have your apps 'pre-installed' before first boot.
On flashing, the zip will copy all apks located in
Code:
data/app
to
Code:
sdcard/ROMCleaner/FirstBoot/data/app
as well as several system files to your SD card in preperation for your new rom.
When the ROMCleaner is run it will copy these apks back to data/app for you before booting the rom.
We are slowly adding support for apps that are provided by the rom devs to make sure that these apps are not copied across to ensure you will always receive the uptodate version included with your rom.
If you feel support for your rom should be included as default please contact us in the thread.
When flashed this zip will do the following:
  1. Install our script and related files to /tmp
  2. Check if the folder is present on the SD card, if not then it will create it.
  3. Backup Accounts, Bluetooth pairings, Mail accounts (including Inbox) and WiFi APs keys
  4. Copy all Apps (not app data) found in /data/app/
  5. Create Logs on the SD Card.
Accounts, BT, Mail accounts and Wifi can only be restored using the Settings Restorer.
Quote:

Settings Restorer

This script will attempt to restore any files backed up by the backup tool.
These settings are stored by the Android system and are usually lost when flashing a rom. This can be annoying if you have a lot of wifi passwords stored or a few BT pairings which you dont want to lose.
It is important to note that in the majority of cases these settings will be correctly applied but sometimes for an unknown reason they dont and may cause errors. We are still trying to track these down. If you do encounter them PLEASE post in the thread so we can gather some information from you to aid in this process.
This tool also has limitations when it comes to moving rom base. Please do not attempt to restore these settings as it will more than likely cause errors.
Quote:

HTCSetupRemover

The setup remover is a small additional zip that will remove the setup wizards which run at first boot.
Once these wizards have been run they become absolutely useless and as such can be removed safely.
Unfortunately they are tied into several aspects of the system and removing them before the roms first boot can cause some weird errors and FC's


Quote:

Creating Your Own List

While the default list should be enough for most users, we have included the ability to define your own custom list for the cleaner to remove.
Creating your own list is as simple as adding files to a text file! This can be done a variety of ways, from an editor on your PC or via an editor on your Tablet!
The easiest way to start your own list is to use the one attached to the first post.
Run the folder creator or create the following structure on you sdcard
Code:
/sdcard/ROMCleaner/ROMCleaner_user.txt
As long as this file is present, the cleaner will read from it instead of the default ROMCleaner.txt.
To add to it all you have to do is add the apk file or folder you would like removed during cleaning.
Single apk files should just be listed while folders should be encased in quotes (" ")
Any item with a # in front of it will be ignored by the cleaner.
The cleaner will check BOTH the /system and /data partitions for any apk file named in the list and remove it if it finds it
Examples:
To add files:
Code:
UselessApp.apk
Simple as that
To add folders:
Code:
"/system/app/UselessFolder"
Ignored example:
Here, both the empty folder and UselessApp2 will be deleted while UselessApp1 will be ignored.
Code:
"/system/app/EmptyFolder"
#UselessApp1.apk
UselessApp2.apk
We have also included the ability to batch delete a certain filetype by using the following syntax -
Code:
"/path/to/folder/*.fileextension"
Heres an example from the default list to remove all .png images from the resources folder:
Code:
"/system/customize/resource/*.png"
Quote:

Examples Of Usage

Heres a couple of example flashing procedures for the most common ways of flashing a rom and using the ROMCleaner toolset.
Before doing anything you should first flash the folder creator zip to create the folder structure for you.
Flash'n'Go - Full Wipe - Clean System
So this is your typical flashing procedure for a ROM starting with a full wipe, clean system, and no apps or settings backed up.
  1. SuperWipe
  2. Flash ROM
  3. Flash ROM Cleaner
  4. First Boot
  5. Setup Tablet
  6. Flash Setup Wizard Remover
  7. Use Tablet as Normal
ROM Upgrade
Obviously using the 'upgrade' method to install a rom will replace any files you have removed with the cleaner the first time round.
You can use the cleaner again straight after flashing a rom upgrade.
Be warned, using the upgrade method and cleaner will no doubt leave artifacts and residue from the previous install.
This is not our fault. This is the design by Android. Please do not complain to us, we hate it too.

This would be your ideal flashing method when using the cleaner on a rom upgrade.
  1. Flash ROM
  2. Flash ROMCleaner
  3. Boot
  4. Setup Tablet
  5. Flash Setup Wizard Remover
  6. Use Tablet as Normal
Patric, craack and I do not officially endorse the use of rom upgrades and as such will not be hold accountable for any problems that arise from them.
With the use of this cleaner script and the backup/install apps option alongside other data backup tools such as Titanium backup (Data only) should negate the need to use the upgrade method.
Full Backup & Restore
This is the daddy. A full on backup of Apps, Accounts, Bluetooth pairings, Mail accounts (including Inbox) and WiFi APs keys, wipe and reinstall of a cleaned rom.
This is usefull when you have been playing around too much and fooked somethig up but dont have a nandroid or just want the feeling of a freshly installed rom but dont want to lose some settings.
  1. Flash Backup Tool
  2. SuperWipe (Format /system, /data, /cache, /dalvik-cache)
  3. Flash Rom
  4. Flash ROM Cleaner which will also install Apps
  5. First Boot
  6. Setup Tablet (Sign in at Google and sync all your data)
  7. Flash Setup Wizard Remover
  8. Flash Mods & App Installer (If you have added Apps, mods etc to ../SecondBoot folder)
  9. Flash Settings Restorer
  10. Use Tablet
Quote:

ROMCleaner Logs & Support

To make troubleshooting easier for us we have included a logging feature into the toolset to aid in trouble shooting.
Each script will create its own set of logs which will be stored in /sdcard/ROMCleaner/Logs
If you should run into problems, please attach these logs to your post in the thread to aid us in solving your issue.
If you don't help us with the logs we will for sure not be able to help you.


Quote:

Mods & App Installer
!!! WARNING - ADVANCED USERS ONLY !!!

This tool has so far been successful in our tests and has been taken out of the experimental phase. Please note though the majority of mods we have tried have worked perfectly but some have caused bolops and black screens, usually heavy system apks such as framework-res and com.htc.resources.
For that reason it is for those users that know how to handle mod zips and understand the structure within them and can easily revert any changes made.
This script functions in a simialr way to the backup and installation of apps except it is used for mods which need to be flashed after the Tablet has had its first boot.
Such mods ,if flashed before the system has booted, have been know to cause errors such as bolops and black screens.
It was built to try and cut down on the recovery navigation of having to select each zip in turn. With this installer you will only need to flash one zip to have all your mods installed at once. It also allows you have finer control over the mods as you are dealing with normal folders and files rather than zips.
To Use
If you have flashed the folder creator you will find a folder within the sdcard/ROMCleaner folder on your SD called SecondBoot which in itself contains common system folders where mods are flashed to.
Take your mod zip, extract and place the files into these folders according to the structure in the zip.
Upon flashing the installer these files will be placed in the correct places and also have the correct permissions set to them.
Quote:

A Little About The Team

[HUMUR]
Patrics83 spent many months cursing HTCs decision to fill his precious device with crap he didnt want with no way to remove it. After hundreds of letters, emails and even stalking the CEO with no response he finally decided enough is enough and ROMCleaner was born. He spends his time plotting revenge against Sense roms and their bloat in the hope that one day, his message to HTC will get through.
Dude360 one day stumbled across a small post regarding removing crap from his lovely rom. Patric offered him a small taste of how clean a rom could be but it wasnt enough. Dude360 wanted more. He wanted it all, a Sense rom with the size and speed of a AOSP rom. It soon took him over, he began creating monsterous abomaonations which no man should ever flash. Patric decided Dude360 needed a mentor, someone to calm his addiction to cleaning and proceeded to teach him the zen of ROMCleaner.
craack was just a innocent young man when he was abducted by Patric and Dude. They forced days and days of flashing and reflashing roms to get the cleaner working the way they wanted. He tried to resist but the cleaner was too strong and he finally gave in and become one of them. craack now wonders the realm of XDA searching out roms and the unneeded crap they come with to try to fulfill his goal of creating the ULTIMATE CLEANER LIST!
[/HUMUR]
Last edited by Patrics83; 17th May 2012 at 08:50 AM.
The Following 4 Users Say Thank You to Patrics83 For This Useful Post: [ View ]
25th March 2012, 05:03 PM   |  #3  
MarckX's Avatar
Senior Member
Thanks Meter: 1,239
 
809 posts
Join Date:Joined: Feb 2009
Donate to Me
More
Hi there potential Cleaner/backup users,


At first (about 8 months ago) I was a bit sceptical using these scripts. Seemed like a lot of work, but I can ensure you all: if you use this, you will get a clean Rom and a fast recovery of a lot of settings that will really make your flashingtime a lot shorter!!


What is it I want to achieve with these scripts:

- Backup/restore my apps
- Backup/restore my Email/bleutooth/wifi
- Full control in installing Apps provided in Rom.zip

First of all, I give numbers to my zips I'm going to flash, so I won't have to worry about ordering if I'm going to use these again.

00 Folder_Creator.zip;
01 Backup_Tool.zip;
02 Factory reset in CWM;
03 Rom.zip;
04 Rom_Cleaner.zip;
05 AsusSetupWizard_Remover.zip;
06 Settings_Restorer.zip;
07 Mods_and_Apps_installer.

################################################## ##########################

Step by step flashing guide:

* Flash 00 Folder Creator
* Flash 01 Backup Tool

If you want customisation, copy ROMcleaner_user.txt to /sdcard/ROMcleaner_user and edit it with Notepad++ (or a Linux editor)

* Do a factory Reset in CWM
* Flash 02 Rom (Virtuous S-series in my case)

If you want full control with ROMCleaner_user.txt: choose Complete install!!
At last screen of Aroma Installer choose NOT to Reboot!!

* Flash 03 RomCleaner
* Reboot

I answer all questions with skip or else ok. I don't setup wifi or Gmail.

* Flash 04 AsusSetupWizard_Remover
* Flash 05 Settings_Restorer
* Reboot

That it! ... time to enjoy

At the moment I don't use Mods_and_Apps_installer for TF201, but I use it on my DHD for installing my bootanimation, downanimation, ringtones, a theme and my UOT kitchen files.

################################################## ##########################


There's a lot of work been done making these scripts, so if you're using (some of) these scripts, please leave some feedback. The devs will really appreciate this for improvements.

Last step: Enjoy!!!!!!!

PS Don't forget to show some thanx to the devs for this!!!!
Last edited by MarckX; 25th March 2012 at 06:03 PM.
The Following 3 Users Say Thank You to MarckX For This Useful Post: [ View ]
25th March 2012, 05:08 PM   |  #4  
craacK's Avatar
Senior Member
Thanks Meter: 630
 
442 posts
Join Date:Joined: Apr 2011
Thank you MarckX
The Following 3 Users Say Thank You to craacK For This Useful Post: [ View ]
25th March 2012, 05:33 PM   |  #6  
malybru's Avatar
Forum Moderator
London
Thanks Meter: 11,231
 
14,660 posts
Join Date:Joined: Aug 2006
Donate to Me
More
Hi,

Just to report that this is fully working.
I have just flashed [ROM][S Series][06.03.12] Virtuous Prime 9.4.2.15 v2,
and it worked perfectly.

Highly recommended.

The Following 3 Users Say Thank You to malybru For This Useful Post: [ View ]
25th March 2012, 05:47 PM   |  #7  
Patrics83's Avatar
OP Recognized Developer
Flag Gothenburg
Thanks Meter: 8,080
 
5,562 posts
Join Date:Joined: Feb 2010
Donate to Me
Quote:
Originally Posted by malybru

Hi,

Just to report that this is fully working.
I have just flashed [ROM][S Series][06.03.12] Virtuous Prime 9.4.2.15 v2,
and it worked perfectly.

Highly recommended.

Thx for your feedback and testing!

Sent from my Desire HD
The Following 2 Users Say Thank You to Patrics83 For This Useful Post: [ View ]
26th March 2012, 07:32 PM   |  #8  
Patrics83's Avatar
OP Recognized Developer
Flag Gothenburg
Thanks Meter: 8,080
 
5,562 posts
Join Date:Joined: Feb 2010
Donate to Me
Post
I can see we had some downloads already!

All feedback is welcome, bad or positive...

/Patric
The Following User Says Thank You to Patrics83 For This Useful Post: [ View ]
27th March 2012, 09:58 AM   |  #9  
Striatum_bdr's Avatar
Senior Member
Flag Marseille
Thanks Meter: 886
 
3,052 posts
Join Date:Joined: May 2011
More
I tried this yesterday.

As I couldn't save properly the custom text directly from my tablet, I used the scripts without this file.

I followed the right order to flash and first of all, no problem at all with scripts themselves.

In fact it seems that it only handle user apps and not their data. If it would be possible to deal with apps data it would be a terrific tool. It's magic to see when booting a new ROM after total wipe that all your apps are already there, but it can be a mess to reconfigure everything, to loose your game high scores (lol), or your launcher settings.

Email accounts backup didn't work at least for K9 mail.

In fact I had to restore my data with Titanium, and as it can't restore only data, I had to restore a second time all my apps.


I'll try when I'll find time the remove system app feature.

Clearly a promising tool, it would be great if an Aroma Installer Style tool/Gui could help basic user to perform easlily the different steps.

Congrats !
The Following 2 Users Say Thank You to Striatum_bdr For This Useful Post: [ View ]
27th March 2012, 11:10 AM   |  #10  
MarckX's Avatar
Senior Member
Thanks Meter: 1,239
 
809 posts
Join Date:Joined: Feb 2009
Donate to Me
More
Quote:
Originally Posted by Striatum_bdr

I tried this yesterday.

As I couldn't save properly the custom text directly from my tablet, I used the scripts without this file.

I followed the right order to flash and first of all, no problem at all with scripts themselves.

In fact it seems that it only handle user apps and not their data. If it would be possible to deal with apps data it would be a terrific tool. It's magic to see when booting a new ROM after total wipe that all your apps are already there, but it can be a mess to reconfigure everything, to loose your game high scores (lol), or your launcher settings.

Email accounts backup didn't work at least for K9 mail.

In fact I had to restore my data with Titanium, and as it can't restore only data, I had to restore a second time all my apps.


I'll try when I'll find time the remove system app feature.

Clearly a promising tool, it would be great if an Aroma Installer Style tool/Gui could help basic user to perform easlily the different steps.

Congrats !

Nice to see some (really positive) feedback!!! Thanks for that

If you rightclick on the text-file DL, you can choose the save option to save the user.txt to your Prime. If you don't edit this file, it's exactly the same file as used by default. But it's fun to customize with the user.txt

It's true that only the apps are backuped/restored and not their data. It's a very difficult job to restore all data because the apps all use different formats for that. It would be a hell of a job to restore data from all market apps

For Email accounts: I'm testing it, because sometimes I'm getting all accounts and sometimes only Google. Wifi/Bluetooth works like a charm, tho.

For a gui, I have to ask the devs, as I'm a user as well, but hey, I will contact them and discuss the posibilities for sure....

To be continued!!!
Last edited by MarckX; 27th March 2012 at 11:17 AM.

The Following User Says Thank You to MarckX For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes