[HTC Incredible S] Dude360:
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

- HTCSetupRemover

- 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

EVERYTHING BELOW THIS RED LINE YOU DONT NEED TO KNOW.

ITS A COMPLETE REFERENCE GUIDE FOR THE ENTIRE TOOLSET

_______________________________________________ <- The Red Line

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.

On flashing, the RC zip will do the following things:

Install our script and related files to /tmp

Check if the folder is present on the SD card, if not then it will create it.

Install the default cleaner list (ROMCleaner.txt) overwriting any older versions.

Check to see if a custom list is present (ROMCleaner_User.txt).

If it is then it will check for Windows encoding and convert to UNIX if needed.

If it is not then it will use the default.

Proceed to read the list and delete all the files and folders.

Copy any backuped up apps back to /data/app

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 ;)

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

data/app

to

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:

Install our script and related files to /tmp

Check if the folder is present on the SD card, if not then it will create it.

Backup WiFi APs keys, Bluetooth pairings and Mail accounts (including Inbox)

Copy all apks found in /data/app/

Create Logs on the SD Card.

Wifi, BT and Mail accounts can only be restored using the 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 sotred 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.

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

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 Phone!

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

/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:

UselessApp.apk

Simple as that ;)

To add folders:

"/system/app/UselessFolder"

Ignored example:

Here, both the empty folder and UselessApp2 will be deleted while UselessApp1 will be ignored.

"/system/app/EmptyFolder"
#UselessApp1.apk
UselessApp2.apk

We have also included the ability to batch delete a certain filetype by using the following syntax -

"/path/to/folder/*.fileextension"

Heres an example from the default list to remove all .png images from the resources folder:

"/system/customize/resource/*.png"

The default ROMCleaner.txt also includes these instructions to help you start your own list.

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.

SuperWipe

Flash ROM

Flash ROMCleaner

First Boot

Setup Phone

Flash HTCSetupRemover

Use Phone 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. Most notably within the 'Add Widget' section of Rosie.

The only way to remove these artifacts is to clear data from HTC Sense

Settings > Applications > All > HTC Sense > Clear Data

WARNING - THIS WILL RESET YOUR HOMESCREEN LAYOUTS

This is not our fault. This is the design by HTC. Please do not complain to us, we hate it too.

We have added the ability to clear this data automatically while flashing to save you this trouble but have # it out by default to avoid all the whining posts blaming us about why peoples homescreens have been reset.

We highly recommend you use a custom list if you are performing upgrades and un# the appropriately marked section found in the default ROMCleaner.txt

This would be your ideal flashing method when using the cleaner on a rom upgrade.

Flash ROM

Flash ROMCleaner using custom list with Sense data cleared

Boot

Setup Phone

Flash HTCSetupRemover

Use Phone 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, wifi, bt and mail settings, 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.

Flash Backup Tool

SuperWipe

Flash Rom

Flash Cleaner which will also install apps

First Boot

Setup Phone

Flash HTCSetupRemover

Flash Mods & App Installer

Flash Settings Restoer

Use Phone

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.

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 phone 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.

[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]