[Q] Method for rooting Xperia with unlocked bootloader - Xperia SP Q&A, Help & Troubleshooting

Hi!
So finally my old phone gave up and I decided to go for Xperia SP thinking I would flash Cyanogenmod on it. Now that I have used it for a while I decided I'd keep the stock but still unlock and root the phone to be able to restore data folders (WhatsApp!).
Now most of the rooting methods here are workarounds for locked boot loader models and involve finding the right firmware from Sony and a lot of hassle with the file patching. Even with unlocked models the rooting works by flashing the exploited kernel and using the exploit to gain root.
My question is why is it not possible to just boot (NOT FLASH) modified kernel with security off via fastboot and then upload SuperSU or Superuser files into device and then after installation continue using the kernel provided by the firmware? This is also called the general method.
I will go this route if there are no reasons not to.
PS. Thanks for this wonderful community. As a long time lurker I finally decided to join you!

Hot booting doesn't work anymore in new Xperias. It used to work when I had the xoeria arc. Now for your rooting wherein you want to retain the stock kernel, just use the advance stock kernel of Doomlord, it's pure stock kernel (only with recovery added). Then flash the SuperSU zip in the recovery.
Here's the link for Doom's kernel. http://forum.xda-developers.com/showthread.php?t=2646193
Tapatalked from my Xperia SP

Okay, thanks for the info. Sucks that hot booting is not available but the method you posted seems fair enough.
I still have one question slightly related to this. In my previous phones the recovery has been installed separately (separate ramdisk and maybe even kernel?). Have I understood correctly that in Xperias the recovery is included in the boot.img instead of recovery.img and it depends on bootloader sent parameters whether the phone boots recovery or the normal mode? In other words if I install sometimes in the future a custom ROM and the recovery included is somehow broken I have to fix it via fastboot?

That's what weird thing about Sony, they don't have a separate recovery image partition.
Most Xperia custom ROMs include their own boot.img(with recovery in it) so that's covered.
Tapatalked from my Xperia P

Some Recovery's are built in into the system and that's nasty because if you wipe your system to install a custom ROM you're recovery will let you down and hang
Sent from my C5303 using XDA Free mobile app

We need to find some way to temp install a recovery into /data.. This will prevent issues when installing ROM's and wont even need root since it is "data" dunno if its possible and how to pull of.

Related

bricked my phone while installing custom rom.

Phone Details:
- Xperia Z (T-Mobile) C6606
- Firmware or Build 10.1.1.B.0.166
I was able unbrick my phone and hope the method I used is helpful to others.
****Here's what happened.....******
Got the phone from T-Mobile had a lot of useless apps. Tried to root the phone all kinds of ways. Connected the phone to PC and opened up Flashtool. Flashtool did not detect the phone. I had to go into USB debugging and uncheck it off and check it back on, phone was detected and it says Root Access Allowed.
Installed Dual Recovery.. and installed the rom from zip. Rom instructions as follow:
Requirements: (Click on link below to get them)
1. Root - You probably don't really need this since this ROM itself also include stable and proper root package but most locked bootloader phones require root access to install recovery.
2. CWM/TWRP Recovery support - This is the real requirements. If you can access Recovery to flash this ROM, the rest should be working fine like root/busybox. Sadly you'll need either root or get custom kernel with recovery so you can forget root and be done with.
Instructions did not say install a different firmware, so I am thinking I can use my original firmware since the rom was based on a stock rom.
After installation of custom zip, cleared dalvik cache and reboot the phone. The phone bricked on me. All it did was cycle through the sony xperia boot screen and restart over and over again. I couldn't even get back to recovery(pressing vol. down on reboot) to restore my back up of my previous rom.
*****How I unbricked my phone*****
Remembered back in the day when I was flashing roms for on my previous xperia... I use Sony Companion Suite to restore my phone back to factory. Luckily it worked for my Xperia Z and now I am back with the stock rom.
Link for xperia Z tmobile repair.
sonymobile.com/us/software/phones/xperia-z-tmobile
Link for other phones.
sonymobile.com/us/software/phones/
Hope others find this post helpful.

Trying to install 4.4 Rom, falling at every hurdle.

Hi There,
Just wondering if anyone had any ideas why my phone refuses to co-operate!
Basically, after getting bored of the stock rom when I first got my phone, I somehow managed to install a CM based rom. That worked, but I got bored of the fact that the camera never seemed to work right, and some apps didn't work/ were graphically buggy. Assuming it was just a badly ported graphics driver or whatever, I found a way, using FlashTool, to revert to the stock rom (C6603_10.3.1.A.0.244_Generic UK to be precise). I wasn't sure exactly what it did, but it was back how it used to be. sorted.
So, since kitkat made it's way to the XZ, I thought I'd try one of those roms, being the curious bugger that I am. The process I ended up going with eventually was:
>Downgrading Kernel to a lower version because the root explot wouldn't work on 10.3.1.A.0.244
>Rooting using "DooMLoRD_Easy-Rooting-Toolkit_v18"
>Upgrading kernel to one that would accept a recovery
>Installing TWRP
>Booting into recovery, CWM appeared instead. Strange, I thought. Oddly, mount USB wouldn't work at all, so I had to boot the phone back up to transfer the kitkat rom over
>Trying to flash the rom gave me an error number 7
>Boot Loop, at which point I just flashed 10.3.1.A.0.244 again.
I've tried this twice now, first with DooM Kernel, and then once with a different one. Neither CWM or TWRP have worked properly. Any help? Or am I just cursed?
Cheers
Tried this again, did literally everything I could think of and still no dice. Help? Have I somehow forced my phone to be on stock software forever?
If you dont unlock your bootloader, you can not use any kind of custom kernel.
That means aosp or aokp based firmwares can not run over locked bootloader.
Locked bootloader checks sign of kernel, if not certificated you will stuck on bootloop.
If you want to use any kind of custom rom... basicly.
1. Backup ta partition. " so you can revert any time you want."
2. Copy firmware zip file tou your internal or external sdcard.
3. Flash custom kernel. "Most of kernel have recovery option build in".
4. Boot in recovery mod. "Mostly press volume down while booting"
5. Insall custom rom.
6.a wipe dalvik-cache
6.b factory reset
Old setting might work or not with new rom. So first try to wipe dalvik- cache. If you stuck on boot loop or any kind of problem, just boot in recovery again and run factory reset.
Sent from my C6603 using Tapatalk
eryen said:
If you dont unlock your bootloader, you can not use any kind of custom kernel.
That means aosp or aokp based firmwares can not run over locked bootloader.
Locked bootloader checks sign of kernel, if not certificated you will stuck on bootloop.
If you want to use any kind of custom rom... basicly.
1. Backup ta partition. " so you can revert any time you want."
2. Copy firmware zip file tou your internal or external sdcard.
3. Flash custom kernel. "Most of kernel have recovery option build in".
4. Boot in recovery mod. "Mostly press volume down while booting"
5. Insall custom rom.
6.a wipe dalvik-cache
6.b factory reset
Old setting might work or not with new rom. So first try to wipe dalvik- cache. If you stuck on boot loop or any kind of problem, just boot in recovery again and run factory reset.
Sent from my C6603 using Tapatalk
Click to expand...
Click to collapse
Hey, thanks for your reply!
I had unlocked the bootloader when I first got the phone and just assumed it would be permanent. Would flashing it back to stock firmware re-lock the bootloader?
But yes, assuming my boot loader is still unlocked ( I have tried to check and it doesn't seem to be locked) I have been through those steps basically. I am fine to flash a kernel with a recovery but the recovery never works properly/ at all. I can root the phone no problem though.
Best to extract the boot.img from the zip file of the ROM you want to flash, and flash that first. Then flash the ROM from its recovery.
Sent from my C6603 using xda app-developers app
shoey63 said:
Best to extract the boot.img from the zip file of the ROM you want to flash, and flash that first. Then flash the ROM from its recovery.
Sent from my C6603 using xda app-developers app
Click to expand...
Click to collapse
Cheers, I'll give that a go - I was under the impression that you weren't supposed to flash kernels that weren't designed for the currently installed ROM though? It just seems that any kernel I flash isn't working properly so I didn't think doing that would play any nicer with the phone
SuburbanKnight said:
Cheers, I'll give that a go - I was under the impression that you weren't supposed to flash kernels that weren't designed for the currently installed ROM though? It just seems that any kernel I flash isn't working properly so I didn't think doing that would play any nicer with the phone
Click to expand...
Click to collapse
You're not actually going to boot into your current rom after flashing the kernel.
Flash the kernel via fastboot, then boot into recovery and flash the rom.
All this should be covered in the installation instructions of whatever rom you're trying to flash in any case....
Sent from my C6603 using Tapatalk
Well, that seems to have done it! Thanks very much for your help.
So, I guess the moral here is that if you're on stock and need a recovery to flash a new ROM, always use the boot.img from the ROM you'll be using.
Thanks again - I'd never seen that said before but quite possibly I wasn't paying attention!

[Q&A] [Rom][D5803] M-XRom

Q&A for [Rom][D5803] M-XRom
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [Rom][D5803] M-XRom. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
Seems to be a way around the DRM problem: http://forum.xda-developers.com/showpost.php?p=57675821&postcount=348
I have 2 suggestions.
First - Congratulations !!!!
Second - I would suggest the DSB of paranoid and the hands Hover (Heads up) of paranoid. I will download and test the rom. But my smart broke the battery cover and I need to arrange for assistance. It'll have to wait a bit for the test and my feedback.
But, all Congratulations !!!
Can some point to to a detailed explanation about the DRM keys ?
How are the keys checked ? In the photo app ? If it's in software can't we just circumvent it ?
I saw this post that claims to solve the DRM issues (for the z3c):
1.Flash ftf file "23.0.1.A.5.77" by Flashtool.
2.Relock bootloader by Flashtool.
3.Flash ftf file "23.0.1.A.5.77" by Flashtool AGAIN.
4.Unlock bootloader by Flashtool.
5.Flash boot.img "AndroPlusKernel v12" by Fastboot.
6.Install DRM restore zip by TWRP.
7.reboot.
How can that save the DRM keys. I assumed as soon as you unlock/reflash you're overwriting the partitions and would lose access to the DRM keys (probably stored on some hidden partition). Did someone try the above method ?
Merci
merci et vive troyes le monde est petit
Changelog?
Hello. I find this Rome very good. Quick question. How can I change the background image of the Notifications / quick settings? Version 1.0.3
solved
sorry, posted by mistake... removed and repost to specific topic.
Not boot
version 1.04 not boot on my phone with locked bootloader phone stucks on sony logo and led color is red and phone rebooting again and again and again..
new version don't work on UBL
rEctifY For locked bootloader
I have a question according to the instruction for LB
" INSTALLATION
For locked bootloader
Flash official Sony's 23.0.1.A.5.77
Root using the method
Install XZDualRecovery (http://forum.xda-developers.com/z3-c...ry-qa-t3014208).
Boot Into Recovery
Wipe Data, Cache and Dalvik Cache
Flash Zip
Reboot and enjoy "
...my question, which method for root???
dr.xavier said:
I have a question according to the instruction for LB
" INSTALLATION
For locked bootloader
Flash official Sony's 23.0.1.A.5.77
Root using the method
Install XZDualRecovery (http://forum.xda-developers.com/z3-c...ry-qa-t3014208).
Boot Into Recovery
Wipe Data, Cache and Dalvik Cache
Flash Zip
Reboot and enjoy "
...my question, which method for root???
Click to expand...
Click to collapse
The instructions are missing a small part. As of now root has been achieved for the z3 line-up using @zxz0O0's giefroot tool.
Although it requires you to be on a firmware prior to the 5.77 (2.93 for example).
After that you should
boot into recovery
Wipe Data, Cache and Dalvik Cache
Flash Zip
Reboot and enjoy!
Sydrox said:
The instructions are missing a small part. As of now root has been achieved for the z3 line-up using @zxz0O0's giefroot tool.
Although it requires you to be on a firmware prior to the 5.77 (2.93 for example).
After that you should
boot into recovery
Wipe Data, Cache and Dalvik Cache
Flash Zip
Reboot and enjoy!
Click to expand...
Click to collapse
thank you very much!
rEctifY LB and ULB keeping DualRecovery
In the end of the instruction it is written:
"Be sure to flash Z3C-XZDRKernel2.8.1-RELEASE.flashable.zip from http://nut.xperia-files.com after installing the ROM and before you reboot, this way you will not lose recovery!"
...but when you look here: http://forum.xda-developers.com/z3-c...ry-qa-t3014208
they say:
"When installing custom ROMs:
Be sure to flash Z3C-lockeddualrecovery[VERSION]-RELEASE.flashable.zip from http://nut.xperia-files.com after installing the ROM and before you reboot, this way you will not lose recovery!"
For now, i am on the Firmware 23.0.1.A.5.77 Generic [ROOT/XZDR/SuperSU] and i want to move to the rEctifY Rom.
Would be very nice, if somebody can tell me which method after flahsing the Rom for keeping the DualRecovery i should use.
Anyway, what is the difference between the Z3C-XZDRKernel and the Z3C-lockeddualrecovery??
Ive installed v. 1.0.4 with XZ kernel .. dual recovery .. UBL .. and DRM restore
Everything is ok except if i install Androplus kernel.. then im stuck at sony logo...when i flash back XZ kernel .. system starts ..
Tried all versions of androplus
From v 18 to the latest
Why cant we use androplus with rectify rom ?
Confirmed for locked bootloader?
Has it been confirmed to work yet with an locked bootloader?
And regarding the instructions;
Firmware 77 needed
Rooted needed
flash rom
clear cache's
reboot and enjoy
The question is: if the phone has a locked bootloader with DRM function then I don't want the DRM function patch and the kernel, because those are for UBL, is this correct?
Also if I've already gained root access (dual recovery method) and kept DRM keys (locked BL) then is it as simple as flashing it in recovery and clearing cache's?
So is it ok to use CWM to flash?
I just want to be clear on the instructions.
Thank You
I just went ahead and used dualboot to boot into CWM, then flashed, everything seems to be working great, very impressed. Thank You.
Hello,
I think I lost recovery. I'd like to re-flash the rom however I'm unable to get to recovery even by re-installing dualrecovery.
Does busybox create known problems? What directory was I supposed to install it under? I noticed this problem after busybox installed to xbin. Busybox could be the problem as I'm unsure it uninstalled and won't re-intall to either bin or xbin.
Thanks
OK so I've downgraded the firmware using flashtool, went through the whole processes to upgrade to .77 (as per instruction to install rectify). During this I maintained root as well as confirmed recovery along the way. It's not until I install rectify mod that I loose recovery, and yes I flash dualboot flashable zip file after rom and before rebooting.
I'm out of ideas, can you please help.
---------- Post added at 07:40 PM ---------- Previous post was at 07:06 PM ----------
Like I'm talking to myself,
So I installed dual recovery from PC... again, however this time it's one of those clean installs and it worked. I haven't touched busy box but I did snoop around and see some links installed already. Is me doing a smart install what caused the problems in the first place?
Nice. Thanks!
Disable Five Buttons
Hi! Great work! How can i disable the five buttons? I just wanna back, home and recent apps. I'm on your new lollipop rom!
Thanks a lot!

[Q] Preserve my recovery while flashing ROM zip

Hello all,
as long as I would like to test new CM12 official nightlies as they become available for my Xperia T, I'd also like to have a fast and easy way to revert back to my previous ROM.
This would be easily done with the backup and restore function of any CWM based recovery, but every time I flash a nightly I get my recovery replaced by Cyanogen's one, that (AFAIK) lacks this useful feature.
Is there any way to prevent my current recovery from being replaced every time I flash a nightly, or a simple way to put it back?
I tried hard not to, but today I ended up restoring bootloader lock, stock firmware and all, then repeating all the steps to install a custom recovery.
Please, tell me there's another way 'round it.
You can flash a boot.img that includes CWM before restoring your backup.
I recommend DoomKernel for this purpose.
Another way would be to flash a revovery for FOTA partition, which will replace all recoveries in kernel.
I flashed DoomKernel v12 via fastboot and it worked really nicely. It's a fast way to put a recovery on my device when I want to flash something, and I can even choose what recovery to use. Thanks!
Having installed a FOTAKernel recovery, are there any precautions I must take while flashing other ROMs if I want to keep the recovery in place? Also, what operations will erase it or make it unavailable?
Darsil said:
I flashed DoomKernel v12 via fastboot and it worked really nicely. It's a fast way to put a recovery on my device when I want to flash something, and I can even choose what recovery to use. Thanks!
Having installed a FOTAKernel recovery, are there any precautions I must take while flashing other ROMs if I want to keep the recovery in place? Also, what operations will erase it or make it unavailable?
Click to expand...
Click to collapse
No rom I know of contains an integrated FOTA recovery, so you shouldn't have to worry about that when flashing a new rom.
The only way to revert to stock recovery is to flash a stock ftf via Flashtool.

How To Flash Tangerine Kernel Or DooMLoRD Kernal Without Phone Data Losing ??

I need to flash Tangerine Kernel Or DooMLoRD Kernal.. one time i test. but my all data erased. i want flash one of kernal without data losing.. Please Can you Help Me ?
Stock 12.1.A.1.205
JellyBean 4.3
C5303
KoRTaN said:
I need to flash Tangerine Kernel Or DooMLoRD Kernal.. one time i test. but my all data erased. i want flash one of kernal without data losing.. Please Can you Help Me ?
Stock 12.1.A.1.205
JellyBean 4.3
C5303
Click to expand...
Click to collapse
Tangerine only works for Lollipop roms so don't even try it or you be stuck in a bootloop, Doom kernel I think it's too old, try Williams Kernel 9.1, best one for 4.3 roms. Did you unlock your bootloader?
HUEguy said:
Tangerine only works for Lollipop roms so don't even try it or you be stuck in a bootloop, Doom kernel I think it's too old, try Williams Kernel 9.1, best one for 4.3 roms. Did you unlock your bootloader?
Click to expand...
Click to collapse
Stock 12.1.A.1.205 / C5303 / JellyBean 4.3 / Bootloader Unlocked / Rooted
Can I Flash Williams Kernel 9.1 Without Any data losing (auto wipe data\chache) or bootloop error ??
KoRTaN said:
Stock 12.1.A.1.205 / C5303 / JellyBean 4.3 / Bootloader Unlocked / Rooted
Can I Flash Williams Kernel 9.1 Without Any data losing (auto wipe data\chache) or bootloop error ??
Click to expand...
Click to collapse
Flashing a kernel doesn't auto wipe data. Since you're completely stock right now, I am guessing you'll be flashing the kernel via fastboot so you should be fine. As for boot loop errors, the kernel's meant for stock based roms so it shouldn't be a problem. I remember using it with Existenz. Worse case scenario, you'll have to reflash the kernel part from the stock firmware with Flashtool if things go wrong. Alternatively you could take a backup of your kernel via Rashr since you're already rooted.
Speaking of Rashr, you could use it to flash a recovery in your Fota partition which doesn't go away unless and until you remove it using stock firmware. This means that no matter which kernel or rom you flash, you'll always have a working recovery to get yourself out of trouble. You can take a complete nandroid backup of your system before even trying Williams kernel and in the off chance your phone is stuck in a bootloop, you can just restore your nandroid backup and you'll be back to stock.
If you're still worried about your data, just get Titanium backup and make a backup before you proceed. I have switched over a dozen roms in the past few months only because of it. Imagine setting up 30-40 apps every time you migrate to a different rom
XenolithicYardZone said:
Flashing a kernel doesn't auto wipe data. Since you're completely stock right now, I am guessing you'll be flashing the kernel via fastboot so you should be fine. As for boot loop errors, the kernel's meant for stock based roms so it shouldn't be a problem. I remember using it with Existenz. Worse case scenario, you'll have to reflash the kernel part from the stock firmware with Flashtool if things go wrong. Alternatively you could take a backup of your kernel via Rashr since you're already rooted.
Speaking of Rashr, you could use it to flash a recovery in your Fota partition which doesn't go away unless and until you remove it using stock firmware. This means that no matter which kernel or rom you flash, you'll always have a working recovery to get yourself out of trouble. You can take a complete nandroid backup of your system before even trying Williams kernel and in the off chance your phone is stuck in a bootloop, you can just restore your nandroid backup and you'll be back to stock.
If you're still worried about your data, just get Titanium backup and make a backup before you proceed. I have switched over a dozen roms in the past few months only because of it. Imagine setting up 30-40 apps every time you migrate to a different rom
Click to expand...
Click to collapse
Thanks For Details And i need to know, How to flash recovery & kernal ?
Kernal Can speedup my XSP ?
KoRTaN said:
Thanks For Details And i need to know, How to flash recovery & kernal ?
Kernal Can speedup my XSP ?
Click to expand...
Click to collapse
If I am not mistaken, SP like most older Xperia phones (not sure about the new ones) does not have a stock recovery nor does it have a recovery partition. The recovery is part of the kernel (the boot.img file or the .elf file). So when you flash a kernel, you are flashing the recovery along with it. This is why people flash a recovery in the Fota kernel partition since its a separate partition and is not overwritten while flashing other roms or kernels. A recovery flashed in the fota partition becomes your primary and only visible recovery irrespective of how many recoveries came bundled with the kernel you flashed. The only way to remove it is by flashing stock firmware or to be more specific, the fota kernel from the stock firmware. If you need it, you can find it here :
http://forum.xda-developers.com/showpost.php?p=59908442
Now since your phone's already unlocked and rooted, go grab Rashr from the playstore and use it to flash the latest Twrp from here :
http://forum.xda-developers.com/showpost.php?p=61698751
This way you will have a permanent recovery which you can use to take a nandroid backup before you try new roms or kernels and restore it if things go wrong.
Your other option is to flash the kernel via fastboot but remember if you flash another rom, the existing kernel will be overwritten by the kernel that came with the rom. It becomes really cumbersome when you are trying different roms. Another reason to flash a recovery in the Fota partition.
As for a new kernel speeding things up, yeah it helps. The first link is also the main thread for Tangerine kernel which has CPU overclocking and governor options and a bunch of other tweaks to improve performance but its only for LP roms. If you wanna stay stock, you can try the Williams kernel. Doesn't have as many features as the Tangerine kernel but more than the stock kernel. If you know which tweaks to make, I am sure you can gain a performance boost from either.

Categories

Resources