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

Search This thread

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
{ 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:
    screenshot52x.png
  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 :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 :)
 
Last edited:

GlossGhost

Senior Member
Dec 22, 2010
634
120
Sofia
127.0.0.1
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 ;)
 

depulle87

Senior Member
Nov 25, 2010
673
117
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
 

Crowds

Senior Member
Jun 9, 2008
3,709
2,224
48
Azeitão
nivelcosmeticos.com
OnePlus 3
now a serious reply.

i think we ALL should have both files on sdcard. why? simple.
with all different roms/mods based on different basebands...

imagine you just download 435 fw but GOD DAMN my usb port feaks out when i`m on some rom based on 52 bb...:D
 

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
eh.. still no radio.. booted up root still.. i found this though never saw it..
now i know said too much but what is this?
androidboot.hardware=es209ra vmalloc=256M g_android.product_id=0x312E console=ttyMSM0 mtdparts=msm_nand:0x00440000@0x3fbc0000(appslog),0x06f40000@0x38c80000(cache),0x160a0000@0x05ae0000(system),0x1d100000@0x1bb80000(userdata) androidboot.hardware=es209ra vmalloc=128M g_android.product_id=0x312E console=ttyMSM0 semcandroidboot.serialno=CB511J3MFK semcandroidboot.startup=0x00000018 semcandroidboot.000008A2=583130

Lol meant too take out my serial number..

Looks like my cache has a space in it when it shouldnt.. could that be a problem?
any more ideas on fixing a broken radio?
You think cause in sys/kernel/logger/log_main/ and log _radio thd file was_overrun has a 1 and not a zero?

@j.anderson618
please stop spamming...

@all
wht he has posted above is:
https://github.com/freexperia/FreeXperia/blob/master/boot_tools/build-bootimg-X10/makeit.sh

@MODS
guys please do something regarding this "j.anderson618" user...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 42
    { 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:
      screenshot52x.png
    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 :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 :)
    2
    Mods, please shut this idiot up (again).
    1
    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!!!
    1
    ****!!!!

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

    GOD DAMN YOU BECAME MORE AND MORE LIKE A GOD HERE :D:D


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

    180pxclaphands377.jpg
    180pxclaphands377.jpg
    180pxclaphands377.jpg
    180pxclaphands377.jpg
    180pxclaphands377.jpg
    1
    Then we need many custom kernels to choose from also.

    Sent from my X10i using XDA App