Welcome to the New XDA-Developers Portal!

You may recall that a few weeks ago, we opened up the XDA-2015 forum themesto intrepid users … more

An Android Enthusiast’s Apple iPhone 6 Challenge

The media has gone batty again over Apple “revolutionizing” smartphones. … more

Sony to Extend its AOSP Program to Other Devices

Sony will be offering its users the possibility to use AOSP ROMs as an alternative to the … more

Project Ara: Modified Android L and Hot Swapping

Project Ara is a very exciting topic–both for hardware and software enthusiasts. The … more
Post Reply

[Q] how to upgrade to 4.4 from 4.3 a and backup TA

21st May 2014, 04:50 PM   |  #1  
OP Member
Thanks Meter: 15
 
90 posts
Join Date:Joined: Nov 2012
More
What are all the steps involved from 4.3 bootloader locked to cm11?

Some threads are saying you can brick your internal partition if you don't unlock properly. I used to be a sammy owner( see signature). I'm new to the xperia world. I understand that root is required for TA backup and latest CM need 4.3 baseband. But 4.3 no root with locked bl?

Also, will flashtool flash device with locked bootloader to go from 4.3 > 4.1?
Last edited by theperson333; 22nd May 2014 at 04:13 PM.
22nd May 2014, 04:15 PM   |  #2  
OP Member
Thanks Meter: 15
 
90 posts
Join Date:Joined: Nov 2012
More
Quote:
Originally Posted by theperson333

What are all the steps involved from 4.3 bootloader locked to cm11?

Some threads are saying you can brick your internal partition if you don't unlock properly. I used to be a sammy owner( see signature). I'm new to the xperia world. I understand that root is required for TA backup and latest CM need 4.3 baseband. But 4.3 no root with locked bl?

Also, will flashtool flash device with locked bootloader to go from 4.3 > 4.1?

Also, What is your recommended method of unlocking the bootloader and why?

Please post any answers in a separate thread and link to it, so it can be made a sticky.
23rd May 2014, 10:14 AM   |  #3  
Junior Member
Thanks Meter: 3
 
15 posts
Join Date:Joined: Nov 2009
I am not responsible if anything goes wrong.

Go to http://xperiafirmware.com/8-firmware/40-sony-xperia-m-c1905, and follow the steps under "Upgrade to latest 4.1.2". This works on locked bootloaders too, and it even works if it is a downgrade, not upgrade.

Stock 4.1.2 is rootable with Framaroot's Gandalf exploit (search for it on XDA), root it. Then you can back up the TA partition, either with the flashtool you have downloaded earlier, or in some manual way. Make absolutely sure it went well before proceeding! I think you have read plenty of warnings if you have asked this question.

Then proceed as usual. Go ask Sony for an unlock key, unlock your phone with fastboot. Download the 4.4 ROM you wish to use, then flash the boot.img of it by
Code:
fastboot flash boot boot.img
. Then boot the phone into recovery mode using
Code:
 fastboot reboot
and when it begins to boot, bash the volume up key a few times. Then install your new ROM from recovery.

---------- Post added at 11:14 AM ---------- Previous post was at 11:09 AM ----------

Also, this is from experience, I have a C1905, which I prior upgraded with SEUS to 4.3. The procedure I wrote worked on it nevertheless.

Another thing that happened to me is that in the process my /data partition got corrupted. The "internal sdcard" lives at /data/media, and recoveries want to preserve this folder, so when they can't mount it and rescue files from it, they skip it, and the new ROM won't boot because it can't mount the /data partition either. So if you get a bootloop after installing the new ROM, try formatting /data AND the internal storage, there's an option in the recovery to do this.
The Following User Says Thank You to thermate For This Useful Post: [ View ]
23rd May 2014, 03:43 PM   |  #4  
OP Member
Thanks Meter: 15
 
90 posts
Join Date:Joined: Nov 2012
More
When did your /data/ get corrupt? I read on xda that after boot loader unlock, you must boot a stock firmware to format /data/ properly, is this true? I'll post link to that topic when I have access to computer.(new user of xda app)

Sent from my C1905 using XDA Free mobile app
24th May 2014, 11:55 AM   |  #5  
Junior Member
Thanks Meter: 3
 
15 posts
Join Date:Joined: Nov 2009
Cool
Quote:
Originally Posted by theperson333

When did your /data/ get corrupt? I read on xda that after boot loader unlock, you must boot a stock firmware to format /data/ properly, is this true? I'll post link to that topic when I have access to computer.(new user of xda app)

Sent from my C1905 using XDA Free mobile app

I don't know. All I know is that I did these:
  1. Reflash 4.1.2 from flashtool
  2. Boot it, root it, push a busybox on the thing
  3. dd if=/dev/block/platform/msm_sdcc.1/by-name/TA of=/sdcard/TA.img
  4. Pull TA.img from the internal storage to the computer
  5. On phone: busybox md5sum /dev/block/platform/msm_sdcc.1/by-name/TA, on computer: md5sum TA.img, ONLY PROCEED IF CHECKSUMS MATCH! (They matched the first time for me. As a precaution I put them on my Google Drive along with the checksum, they'll be safe there, you should also find a safe place for your own backup in case you want to restore it later.)
  6. Put the phone in fastboot mode, unlock it using the official method, then flash boot.
  7. Start recovery (bashing vol+), flash full ROM from the SD card, then flash Gapps too.
  8. Boot the phone, watch it being stuck on bootanimation.
  9. Pull the battery, start recovery again, wipe /system, flash ROM
  10. Boot phone, watch another 10 minutes of the boot animation
  11. Pull battery, start recovery, wipe everything, notice that /data won't wipe because it won't mount (WTF?)
  12. Do a bit of Googling, realize that recovery is afraid to wipe /data, because the internal storage (/data/media) is inside it, and precious things can be on it (for example the Nandroid backups, the ROM you were about to flash, family photos etc.)
  13. Use "wipe /data and /data/media" in recovery, this really formats the /data partition.
  14. Flash ROM, flash Gapps, reboot phone, be happy with it.

I marked the steps with lime colour in which I am absolutely sure my /data was corrupted, and dark green when I only suspect it.

On second thought, it may have something to do with unlocking the bootloader in the official way. As far as I know, unlocking the bootloader destroys all user data on the phone as a security measure (say your stock ROM has a password you set but an attacker could flash an alternate ROM with no password to access all of your precious data. To prevent this you can't flash an alternate firmware without unlocking the bootloader and destroying sensitive data in the process). And as fastboot is a pretty simple and dumb piece of code (all it has to do is write the internal flash), I wouldn't be surprised if it didn't bother creating a filesystem on the /data partition, but instead just zeroed it all out. Their philosopy seems to be "if you know how to unlock the bootloader, you are a developer, and developers know how to format the /data partition". So, if my train of thought here is correct, my /data was "corrupted" in the steps marked with any shade of green, only this doesn't really mean "corrupted", it means "zeroed out with no filesystem".

The recovery's "wipe /data" command means: mount /data, and delete everything except the /media folder inside, because the internal storage lives at this folder, which most people don't expect to lose when wiping /data, for idiotic historical reasons.
So all zeroes -> no filesystem -> recovery can't mount it -> recovery pees its pants in horror and doesn't touch it, because it thinks "Oh my Glob, this partition does not contain a valid filesystem, but it may have a corrupted filesystem or one that I don't recognise, and formatting it could destroy my owner's data, which could be inside this hypothetical filesystem's /media directory. Which my owner wouldn't expect and then they would think I am a bad recovery."

------

I just re-read your question. I didn't use any stock software after unlocking, my recovery formatted my /data perfectly for me.
Last edited by thermate; 24th May 2014 at 12:05 PM. Reason: Additional info
The Following User Says Thank You to thermate For This Useful Post: [ View ]
24th May 2014, 03:50 PM   |  #6  
OP Member
Thanks Meter: 15
 
90 posts
Join Date:Joined: Nov 2012
More
Quote:
Originally Posted by thermate

 
I don't know. All I know is that I did these:
  1. Reflash 4.1.2 from flashtool
  2. Boot it, root it, push a busybox on the thing
  3. dd if=/dev/block/platform/msm_sdcc.1/by-name/TA of=/sdcard/TA.img
  4. Pull TA.img from the internal storage to the computer
  5. On phone: busybox md5sum /dev/block/platform/msm_sdcc.1/by-name/TA, on computer: md5sum TA.img, ONLY PROCEED IF CHECKSUMS MATCH! (They matched the first time for me. As a precaution I put them on my Google Drive along with the checksum, they'll be safe there, you should also find a safe place for your own backup in case you want to restore it later.)
  6. Put the phone in fastboot mode, unlock it using the official method, then flash boot.
  7. Start recovery (bashing vol+), flash full ROM from the SD card, then flash Gapps too.
  8. Boot the phone, watch it being stuck on bootanimation.
  9. Pull the battery, start recovery again, wipe /system, flash ROM
  10. Boot phone, watch another 10 minutes of the boot animation
  11. Pull battery, start recovery, wipe everything, notice that /data won't wipe because it won't mount (WTF?)
  12. Do a bit of Googling, realize that recovery is afraid to wipe /data, because the internal storage (/data/media) is inside it, and precious things can be on it (for example the Nandroid backups, the ROM you were about to flash, family photos etc.)
  13. Use "wipe /data and /data/media" in recovery, this really formats the /data partition.
  14. Flash ROM, flash Gapps, reboot phone, be happy with it.

I marked the steps with lime colour in which I am absolutely sure my /data was corrupted, and dark green when I only suspect it.

On second thought, it may have something to do with unlocking the bootloader in the official way. As far as I know, unlocking the bootloader destroys all user data on the phone as a security measure (say your stock ROM has a password you set but an attacker could flash an alternate ROM with no password to access all of your precious data. To prevent this you can't flash an alternate firmware without unlocking the bootloader and destroying sensitive data in the process). And as fastboot is a pretty simple and dumb piece of code (all it has to do is write the internal flash), I wouldn't be surprised if it didn't bother creating a filesystem on the /data partition, but instead just zeroed it all out. Their philosopy seems to be "if you know how to unlock the bootloader, you are a developer, and developers know how to format the /data partition". So, if my train of thought here is correct, my /data was "corrupted" in the steps marked with any shade of green, only this doesn't really mean "corrupted", it means "zeroed out with no filesystem".

The recovery's "wipe /data" command means: mount /data, and delete everything except the /media folder inside, because the internal storage lives at this folder, which most people don't expect to lose when wiping /data, for idiotic historical reasons.
So all zeroes -> no filesystem -> recovery can't mount it -> recovery pees its pants in horror and doesn't touch it, because it thinks "Oh my Glob, this partition does not contain a valid filesystem, but it may have a corrupted filesystem or one that I don't recognise, and formatting it could destroy my owner's data, which could be inside this hypothetical filesystem's /media directory. Which my owner wouldn't expect and then they would think I am a bad recovery."

------

I just re-read your question. I didn't use any stock software after unlocking, my recovery formatted my /data perfectly for me.

Is it better to unlock bootloader with flashtool in this case? IS it possible to recreate partition with ADB?
24th May 2014, 04:57 PM   |  #7  
Junior Member
Thanks Meter: 3
 
15 posts
Join Date:Joined: Nov 2009
Quote:
Originally Posted by theperson333

Is it better to unlock bootloader with flashtool in this case? IS it possible to recreate partition with ADB?

As far as I know, flashtool is just a GUI over fastboot when it comes to unlocking the bootloader, so it does exactly the same thing you would do with fastboot. It makes no difference.

What do you mean by "recreating partition with ADB"?
25th May 2014, 04:16 PM   |  #8  
OP Member
Thanks Meter: 15
 
90 posts
Join Date:Joined: Nov 2012
More
Are there any adb tools or shell tools accessible from adb to recreate partitions?

Sent from my C1905 using XDA Free mobile app

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Xperia M Q&A, Help & Troubleshooting by ThreadRank