[XPERIA X10 Android Development] DooMLoRD:
{ INTRODUCTION }

Hi everyone.... I thought of working on this issue for helping users who have a broken or damaged USB port as they are stuck on custom (rooted/etc) roms and are unable to use FLASHTOOL to get back to stock SE firmware (FW)….

This is something that I have been working on for a few months now along with help from rendeiro2005.

A BIG thanks to Bin4ry & Androxyde for their inputs and for scripts in FLASHTOOL.

Also I want to tell everyone that one of the users miniGT has already used this and has sent his X10 for warranty claim and it WORKED!!!!

P.S.: i know that this is a VERY long post but actually its very easy to do...

PLEASE READ THE COMPLETE POST BEFORE TRYING ANYTHING OUT

DIFFICULTY:

Medium

<- This is for Xperia X10 only but I am sure ppl can use similar technique to get back to stock even on other android devices ->

{ WHAT DOES THIS EXACTLY DO? }

Basically I have created this in two parts:

[1] I will provide nandroid/recovery backups of stock SE 2.1 ROMS which are/have:

Pre-rooted

Busybox installed (@ /system/xbin/ )

Working recovery (FreeXperia Recovery)

[2] A “Master Uninstaller Script” which can be flashed via recovery. This will basically remove:

busybox binary

busybox symbolic links (from /system/xbin/)

su binary

Superuser.apk app (from /system/app/Superuser.apk)

Recovery files (from /system/recovery/ & others)

chargemon & charger file (from /system/bin/)

and replace chargemon with original stock SE chargemon file

{ HOW TO USE IT? }

[ STEP 0 ] Requirements

This will work on ALL available custom/stock/modded roms

Make sure that u have a working recovery

SD Card reader / wifi explorer / some way to transfer big files to SDCARD

Know wht is the current baseband on ur phone (Settings -> About Phone -> Baseband Version)

Get/Find the true SI number of your phone. Its on the sticker below the battery or it will be on the original box of the phone. Its basically looks something like this: 1264-7894. This is required to get ur X10 back to original branding/region/

Highly recommend using Root Explorer (paid app from market) to change SI number. If required I will provide a shell script, to do this.

[ STEP 1 ] Preparing the files/folders

[1] You will need to download specific stock FW files which I will provide below. Only download that file which is compatible with ur current baseband.

Currently we have:

|- FIRMWARE -|- BASEBAND -|
---------------------------
2.1.B.0.1 - 2.1.67
2.1.A.0.492 - 2.1.65
2.1.1.A.0.28 - 2.1.61
2.1.1.A.0.16 - 2.1.58
2.1.1.A.0.6 - 2.1.55
2.1.A.0.435 - 2.1.54
2.0.2.A.0.24 - 2.0.49 / 2.0.52
2.0.A.0.504 - 2.0.46

As of now, I have only the nandroid/recovery backups of the following three firmwares:

GLOBAL GENERIC 2.1 [ X10i_2.0.A.0.504_stock.rar ]

(MD5 hash): aaa70f592f7eebe1d996a656d42ac1ef

GLOBAL GENERIC 2.1 [ X10a_2.1.A.0.435_stock.rar ]

(MD5 hash): db9ef9292aeab439ffb3791559c64603

AT&T Branded 2.1 [ X10a_2.1.A.0.492_AT&T_stock.rar ]

(MD5 hash): e281bbf1bde077f90d106fafe98d7c63

Ideally stick to (download) the specific stock ROM backup which is for the baseband on ur X10.

Even if the current baseband is different than the above files which I have listed don’t worry. If ur baseband version is:

2.0.46 / 2.0.49 / 2.0.52 u can still use the file: X10i_2.0.A.0.504_stock.rar

2.1.54 / 2.1.55 / 2.1.58 / 2.1.61 / 2.1.65 / 2.1.67 u can still use the file: X10a_2.1.A.0.435_stock.rar OR X10a_2.1.A.0.492_AT&T_stock.rar

So that atleast u get the radio (wcdma/gsm module) working

Upon request (and if I get time) I will create nandroid/recovery backups for other firmware’s also.

[2] Once u have downloaded the backup file for ur specific firmware:

extract it to a temporary folder on ur PC

the temporary folder will now have a new folder with 4 files:

cache.img

data.img

system.img

nandroid.md5

then connect the SDCARD of your X10 (sdcard reader/wifi explorer/samba file sharing app/etc)

place the extracted folder in /sdcard/xrecovery/backup/

[VVVIMP] verify the directory/file structure on sdcard. So e.g. if u have used X10i_2.0.A.0.504_stock.rar then the directory structure on ur sdcard (after copying the files) should be:

/sdcard/xrecovery/backup/X10i_2.0.A.0.504_stock/cache.img

/sdcard/xrecovery/backup/X10i_2.0.A.0.504_stock/data.img

/sdcard/xrecovery/backup/X10i_2.0.A.0.504_stock/system.img

/sdcard/xrecovery/backup/X10i_2.0.A.0.504_stock/nandroid.md5

Make sure that the above is correct and that there are no spaces in the file names else u WONT BE ABLE TO RESTORE THIS BACKUP

[3] Download the Master Uninstaller script. And place it in ur SDCARD (preferably root of sdcard i.e. /sdacard/ )… you can download it from here:

master_uninstaller_2.1only_v8.zip

the above Master Uninstaller script is an update.zip flashable via recovery.

[WARNING]

THE ABOVE FILE WILL WORK ONLY ON 2.1 STOCK SE ROMS AND THAT TOO ON THE NANDROID/RECOVERY BACKUPS WHICH I PROVIDE

IF U USE THIS ON ANY OTHER ROM AND U END UP BREAKING UR SYSTEM/ANDROID OS THEN I AM NOT RESPONSIBLE

U HAVE BEEN INFORMED

[ STEP 3 ] Restoring provided nandroid/recovery backup & prepping system

verify that u have all the files in place from the above step.

if u want take a backup of ur current ROM because the following procedure will WIPE ur SYSTEM & DATA (it wont touch sdcard)

reboot into recovery and :

"Backup and Restore"

"Restore"

select the extracted image name (X10i_2.0.A.0.504_stock OR X10a_2.1.A.0.435_stock OR X10a_2.1.A.0.492_AT&T_stock)

now the restore process will start

it will take some time

after restore is complete Reboot Phone

once the device restarts u will now get stock 2.1 SE rom

DO NOT INSTALL ANYTHING RIGHT NOW

reboot device to verify that u can still access recovery

once u have verified that recovery is intact now reboot phone into android OS

now u need to change the SI number in /system/build.prop... keep ur original/true SI number at hand... i suggest that u use RootExplorer to do this modification... u can check this thread on where exactly u need to make the changes... once changes are done save the file and exit RootExplorer...

using Root Explorer navigate to '/system/' then "mount r/w" and long press on 'build.prop' file and select 'Permissions'... make sure the permissions are as follows:

sometimes RootExplorer creates backup file /system/build.prop.bak remove that file

once that is done reboot the device and check if everything is working

now uninstall RootExplorer

[ STEP 4 ] FINALLY!!! Doing the MAGIC!!! ;)

Well now we came to the LAST step

once u have made changes to build.prop now just reboot into recovery

flash master_uninstaller_2.1only_v8.zip

it will take some time as there are many files to be deleted ~360 files

once its done just reboot phone and viola!!! u should have a clean & unrooted stock SE 2.1 ROM :D

u can check that the su binary is no longer present in /system/bin/ and u can no longer access recovery!!!

[ STEP 5 ] Clean-up

remove/uninstall all user installed apps (if any) especially those who require root

Turn off/uncheck installing unknown apps from: Settings -> Applications -> Unknown Sources

Turn off/uncheck USB Debugging from: Settings -> Applications -> Development -> USB Debugging

{ADDITIONAL INFORMATION}

How to create compatible nandroid/recovery backups

Rooted the OS using SuperOneClickv1.7-ShortFuse which also installs busybox... it installs the busybox symlinks to /system/xbin/ and doesnt disturb /system/bin/toolbox symlinks...

Installed Recovery using FlashTool v0.2.9.1

Finally booted into recovery and took backup

Still to workout..

i dont know exactly how to remove the rageagainstthecage & psneuter exploit

if someone can help me with that we can truly CLEAN the complete rom

[ REROOT ]

Since the rooting exploit is not yet removed u can use z4root app to root phone again

Busybox Installer from market to install busybox links

xRecovery installer to install recovery

BUT IF U DO THIS THE UNINSTALLER SCRIPT WILL NOT WORK. THEN U WILL NEED TO RESTORE THE ABOVE PROVIDED BACKUP VIA RECOVERY

phew... this was about 6 pages in MSWORD :)