Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,209 Members 36,833 Now Online
XDA Developers Android and Mobile Development Forum

[DEV][How-To] Get Back to Stock Even With Broken / Damaged USB Port

Tip us?
 
DooMLoRD
Old
(Last edited by DooMLoRD; 13th June 2011 at 05:59 AM.)
#1  
DooMLoRD's Avatar
Recognized Developer - OP
Thanks Meter 38,381
Posts: 13,058
Join Date: Jul 2010
Location: Noida
Angry [DEV][How-To] Get Back to Stock Even With Broken / Damaged USB Port

{ 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:
Code:
|- 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:
  1. GLOBAL GENERIC 2.1 [ X10i_2.0.A.0.504_stock.rar ]
    (MD5 hash): aaa70f592f7eebe1d996a656d42ac1ef

  2. GLOBAL GENERIC 2.1 [ X10a_2.1.A.0.435_stock.rar ]
    (MD5 hash): db9ef9292aeab439ffb3791559c64603

  3. 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
  1. verify that u have all the files in place from the above step.
  2. if u want take a backup of ur current ROM because the following procedure will WIPE ur SYSTEM & DATA (it wont touch sdcard)
  3. 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
  4. once the device restarts u will now get stock 2.1 SE rom
  5. DO NOT INSTALL ANYTHING RIGHT NOW
  6. reboot device to verify that u can still access recovery
  7. once u have verified that recovery is intact now reboot phone into android OS
  8. 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...
  9. 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:
  10. sometimes RootExplorer creates backup file /system/build.prop.bak remove that file
  11. once that is done reboot the device and check if everything is working
  12. 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
  • 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
The Following 42 Users Say Thank You to DooMLoRD For This Useful Post: [ Click to Expand ]
 
xPlayGunZ
Old
#2  
xPlayGunZ's Avatar
Senior Member
Thanks Meter 546
Posts: 2,113
Join Date: Nov 2010

 
DONATE TO ME
Great work, let's hope it gets something!
Like a boss
 
cocolwsq
Old
#3  
Member
Thanks Meter 5
Posts: 55
Join Date: Feb 2011
Coooooool man,what you're doing will absolutely saves many people's x10~
 
GlossGhost
Old
#4  
GlossGhost's Avatar
Senior Member
Thanks Meter 115
Posts: 527
Join Date: Dec 2010
Location: Pazardzhik
Great Doom,
It'll be very usefull for everyone with Broken or not USB.
Mine is not f*cked for now but my cable is doing problems..
I'll get new one in a week.
Anyways, very needed and usefull for me
 
varshil
Old
#5  
varshil's Avatar
Senior Member
Thanks Meter 391
Posts: 707
Join Date: Sep 2010
Location: mumbai
Grt dude....

Sent from my X10i using XDA Premium App
CURRENT ROM- slimkat
4.4


CURRENT KERNEL- Faux V4
 
depulle87
Old
#6  
depulle87's Avatar
Senior Member
Thanks Meter 117
Posts: 671
Join Date: Nov 2010
A lot of people had problem with the usb port but are afraid SE is going to piss about the custom ROM, this freaking awesome
Sony Tablet-S
Whatsapp on your Sony tablet-S

Hit if someone helps you out and most of all HAVE FUN
 
Adolf1994
Old
#7  
Adolf1994's Avatar
Senior Member
Thanks Meter 66
Posts: 384
Join Date: Jun 2010
Location: FertőrŠkos
OH LORDY
KERNELMANAGGGEEEEEEEEER!!!!oneone!11
Mipony Download Manager - the ultimate download manager for crappy hosts, like hotfile... Spread the word to make downloading much easier

Am I the only one here with animated avatar?
 
DooMLoRD
Old
#8  
DooMLoRD's Avatar
Recognized Developer - OP
Thanks Meter 38,381
Posts: 13,058
Join Date: Jul 2010
Location: Noida
Quote:
Originally Posted by Adolf1994 View Post
OH LORDY
KERNELMANAGGGEEEEEEEEER!!!!oneone!11
he he... u have a good eye...

anyways i will be releasing it soon... hopefully tonight... it still isnt fully complete... and as of now its in the form of a few scripts but i believe we can make it into something awesome!!!
The Following User Says Thank You to DooMLoRD For This Useful Post: [ Click to Expand ]
 
Adolf1994
Old
#9  
Adolf1994's Avatar
Senior Member
Thanks Meter 66
Posts: 384
Join Date: Jun 2010
Location: FertőrŠkos
Quote:
Originally Posted by DooMLoRD View Post
he he... u have a good eye...
exactly

hope to see that well-spotted thing soon
Mipony Download Manager - the ultimate download manager for crappy hosts, like hotfile... Spread the word to make downloading much easier

Am I the only one here with animated avatar?
 
Crowds
Old
#10  
Crowds's Avatar
Recognized Contributor
Thanks Meter 2,005
Posts: 3,442
Join Date: Jun 2008
Location: Azeit„o

 
DONATE TO ME
****!!!!

I CAN`T BELIVE WHAT MY EYES SEEN WHEN I CHECK MY PM!!!

GOD DAMN YOU BECAME MORE AND MORE LIKE A GOD HERE


now just a curiosity...WTF do you exactly doing?!?!?! kernel manager?!?!

Follow me on
Follow me on

Bela Lugosi`s Dead Rom


If you want to donate HERE I promise that i will use your money wisely

The Following User Says Thank You to Crowds For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes