How to debrick xperia ZR? - Sony Xperia ZR

I was trying to resize the /system partition using adb and now my zr are refusing to boot.
I cant access fastboot or bootloader, also flashtool didnt help.
is there any hope?

Related

[Q] How to mount system.sin properly?

Hey guys, since we now have working root on 4.3 LB I decided to try and work on a custom rom based on stock 4.3.
Im using a ubuntu virtualbox installation.
After a lot of reading I have managed to end up with a system.ext4 from my system.sin file....
When I mount this in linux it is empty?
Any ideas how to get it to mount properly?
Have tried sin2img script and that fails with bad magic error.
Have tried renaming the ext4 to img and that results in the empty (looking) image when its mounted.
Its obviously possible as iHackerz [NUT] Monx etc have proved but I cannot find any information on how to mount the img properly to start customizing it.
EDIT:
Just found [NUT]'s guide in the Z forum... Will try like that =)

[Q] Backup data partition using ADB

Hi guys!
I need a small help, is it possible to backup the entire /data partition without using a recovery (like cwm)? Like using ADB?
My device is rooted and I have adb insecure access.
try
Code:
adb pull data data
gregbradley said:
try
Code:
adb pull data data
Click to expand...
Click to collapse
This wasn't getting all the files and permissions, I used dd to backup the entire partition image, now I got it on my Ubuntu
Sent from my Xperia Z1 using Tapatalk Pro

ADB: Permission denied

Hi there,
After factory reset I've got a problem which is broken CWM recovery. When I am tryin to flash anything I got error: E: Can't mount sdcard
What I can do in this situation? I got HTC ONE and cyanogenmod which is broken because on loading step is restarting and over and over again.
What can I do? Should I use ATB to flash recovery again? (HOW?)
Download your favorite recovery and place IT in the directory wyjęte tour adb and fastboot files are located. Then use the following commands to flash it.
adb reboot bootloader
fastboot flash recovery recovery.img
Replace recovery.img with the name of the file you downloaded.
Wysłane z mojego HTC One przy użyciu Tapatalka
jdarski said:
Download your favorite recovery and place IT in the directory wyjęte tour adb and fastboot files are located. Then use the following commands to flash it.
adb reboot bootloader
fastboot flash recovery recovery.img
Replace recovery.img with the name of the file you downloaded.
Wysłane z mojego HTC One przy użyciu Tapatalka
Click to expand...
Click to collapse
I did what you just said but problem is still the same. Can't mount sdcard... Any ideas?
Try format the sd card, hope you don't have anything important on there, it will all be gone.
OK, I did flash some kind of boot.img (from Nadroid backup but that was bad move) through adb and it was done well but my phone is starting up and I got black screen. The thing is my laptop system recognise hardware but don't know what it is (like there is no drivers but I have drivers!). From the other hand now I got access to sdcard in recovery but I need to push Nadroid backup - how to do that?
lasdle said:
OK, I did flash some kind of boot.img (from Nadroid backup but that was bad move) through adb and it was done well but my phone is starting up and I got black screen. The thing is my laptop system recognise hardware but don't know what it is (like there is no drivers but I have drivers!). From the other hand now I got access to sdcard in recovery but I need to push Nadroid backup - how to do that?
Click to expand...
Click to collapse
adb push something /something
or
adb sideload rom_name.zip
SaHiLzZ said:
adb push something /something
or
adb sideload rom_name.zip
Click to expand...
Click to collapse
C:\adb>adb push cm.zip /sdcard/lol
failed to copy 'cm.zip' to '/sdcard/lol': Permission denied
lasdle said:
OK, I did flash some kind of boot.img (from Nadroid backup but that was bad move) through adb and it was done well but my phone is starting up and I got black screen. The thing is my laptop system recognise hardware but don't know what it is (like there is no drivers but I have drivers!). From the other hand now I got access to sdcard in recovery but I need to push Nadroid backup - how to do that?
Click to expand...
Click to collapse
it's look you soft brick your phone software corrupted
So install TWRP recovery
Use sideload or USB otg for flashing New Rom
from HTC One

[Q&A] [Recovery][CWM][TWRP][UB]Flashable Recovery For Xperia ZR

Q&A for [Recovery][CWM][TWRP][UB]Flashable Recovery For Xperia ZR
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 [Recovery][CWM][TWRP][UB]Flashable Recovery For Xperia ZR. 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!
NOOB here.. all the threads says just flash the recovery TWRP using recovery mode.
the thing is how do I get into recovery mode on my Xperia ZR in the first place.. rebooting using power and volume down button opens SAFE mode..
please help..
also, TWRP Manager doesn't list Xperia ZR C5502 in the device list. (It has Xperia Z C5502 though)..
can i flash TWRP for Xperia Z(yuga) on my Xperia ZR(DOGO)??
please help.. thanks in advance...
psawardekar said:
NOOB here.. all the threads says just flash the recovery TWRP using recovery mode.
the thing is how do I get into recovery mode on my Xperia ZR in the first place.. rebooting using power and volume down button opens SAFE mode..
please help..
also, TWRP Manager doesn't list Xperia ZR C5502 in the device list. (It has Xperia Z C5502 though)..
can i flash TWRP for Xperia Z(yuga) on my Xperia ZR(DOGO)??
please help.. thanks in advance...
Click to expand...
Click to collapse
If you have no recovery installed, there is no recovery mode bro.. DON"T use power button but go to general section and choose a pre-rooted ROM for your phone and recovery will/should be pre-installed.. after having recovery installed, to get to recovery, reboot phone and at the sony screen a green/pink led will show and you push VOL-UP and that will get you to recovery..
hagar006 said:
go to general section and choose a pre-rooted ROM for your phone and recovery will/should be pre-installed..
Click to expand...
Click to collapse
Okaaay... so in short, you mean to install a custom rom in the first place.. (wipe off everything :crying: )
where do i get this pre-rooted ROM?? could't find it anywhere in XDA.. and it wont require custom recovery to flash it??
basically, the thing is; Im running stock sony Lollipop 10.6.A.0.454 firmware on Xperia ZR. rooted using kingroot.
and Im missing Xposed frameworks badly.. :crying: :crying: earlier the installation was simple with kitkat. however with lollipop, xposed needs to be flashed since its a alpha release.
thats the only reason i need a recovery. I have the TWRP recovery.img for my phone but flashing it is a problem. cant use Flashify also. doesnt work.(gives error: Partition not found)
can you suggest any other simple way to tackle this? using fastboot or ADB?
Place the recovery.img to your phone internal storage and use adb or emulator commands to install to your Fota:
Su
dd if=/sdcard/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel
Go to play store and get android terminal emulator (free) and run the above commands.. Press enter after su and grant root rights and then do the rest of the command and press enter again.. Of all goes well, you'll have recovery..
Sent from my Xperia Z using XDA Forums Pro
hagar006 said:
Place the recovery.img to your phone internal storage and use adb or emulator commands to install to your Fota:
Su
dd if=/sdcard/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel
Go to play store and get android terminal emulator (free) and run the above commands.. Press enter after su and grant root rights and then do the rest of the command and press enter again.. Of all goes well, you'll have recovery..
Sent from my Xperia Z using XDA Forums Pro
Click to expand...
Click to collapse
Didn't work
Was typing in Terminal Emulator, Xperia ZR C5502, stock Android 5.0.2, rooted, locked bootloader
Brembol said:
Didn't work
Was typing in Terminal Emulator, Xperia ZR C5502, stock Android 5.0.2, rooted, locked bootloader
Click to expand...
Click to collapse
Try dual recovery for stock by xenius9.. Should be in his CM12 thread in general section.. Or dual recovery by NUT.. comes with installer or flashable zip.. Look in the cross device section and you will find
Sent from my ZR
hagar006 said:
Try dual recovery for stock by xenius9.. Should be in his CM12 thread in general section.. Or dual recovery by NUT.. comes with installer or flashable zip.. Look in the cross device section and you will find
Sent from my ZR
Click to expand...
Click to collapse
The problem is that I have neither computer (broken), nor recovery. Is there any other way to install recovery (CWM or TWRP) without computer?
Brembol said:
The problem is that I have neither computer (broken), nor recovery. Is there any other way to install recovery (CWM or TWRP) without computer?
Click to expand...
Click to collapse
Yes but the problem is your locked boot loader.. If un locked the emulator would do the job.. But locked, you need to get dual recovery from NUT (with computer for the installer).. But to unlock your boot loader you need computer so you can lock again.. Or a already working recovery.. Sorry mate, I know of no other way..
I've been thinking a little.. Take a look at nut's dual recovery installer and see of there is a way to download to your phone and install using emulator.. Should work.. I think
Sent from my ZR
Haven't found any instruction, which I can understand and tells how to install recovery without PC in [NUT]'s thread. I think it's easier to wait and install using computer. Still thanks for help and sorry for your time
Brembol said:
Haven't found any instruction, which I can understand and tells how to install recovery without PC in [NUT]'s thread. I think it's easier to wait and install using computer. Still thanks for help and sorry for your time
Click to expand...
Click to collapse
If you have root ... download from playstore:
Terminal Emulator
Root Browser
Download the windows recovery installer from here http://forum.xda-developers.com/showthread.php?p=46216491
Steps:
1. unzip the windows installer
2. with root browser :
- go to folder
/data/local/tmp/
-create a new folder called recovery
So you have this path: /data/local/tmp/recovery
- from the unziped windows installer put the following files into the folder you created:
-> ric , charger , chargemon.sh , dualrecovery.sh , busybox , recovery.twrp.cpio.lzma , recovery.cwm.cpio.lzma , supersu.sh
If you have all those files in the folder... Klick on them (in root browser) and change permissions of all those files to rwxrwxr-x
Then go to terminal emulator and type:
su -c /system/bin/ls -la /data/local/tmp/recovery/chargemon
And after that:
su -c /data/local/tmp/recovery/supersu.sh
And then:
su reboot recovery
Then you should have a recovery installed without pc
Sent from my Xperia T using XDA Free mobile app
SdtBarbarossa said:
If you have root ... download from playstore:
Terminal Emulator
Root Browser
Download the windows recovery installer from here http://forum.xda-developers.com/showthread.php?p=46216491
Steps:
1. unzip the windows installer
2. with root browser :
- go to folder
/data/local/tmp/
-create a new folder called recovery
So you have this path: /data/local/tmp/recovery
- from the unziped windows installer put the following files into the folder you created:
-> ric , charger , chargemon.sh , dualrecovery.sh , busybox , recovery.twrp.cpio.lzma , recovery.cwm.cpio.lzma , supersu.sh
If you have all those files in the folder... Klick on them (in root browser) and change permissions of all those files to rwxrwxr-x
Then go to terminal emulator and type:
su -c /system/bin/ls -la /data/local/tmp/recovery/chargemon
And after that:
su -c /data/local/tmp/recovery/supersu.sh
And then:
su reboot recovery
Then you should have a recovery installed without pc
Sent from my Xperia T using XDA Free mobile app
Click to expand...
Click to collapse
Didn't work
After su -c ... /supersu.sh phone rebooted and worked normally. When "Sony" screen appears, LED doesn't work
Brembol said:
Didn't work
After su -c ... /supersu.sh phone rebooted and worked normally. When "Sony" screen appears, LED doesn't work
Click to expand...
Click to collapse
have you set the rights completely?
is your root working properly?
have you any log from terminal rmulator for me?
Sent from my C2105 using XDA Free mobile app
SdtBarbarossa said:
have you set the rights completely?
is your root working properly?
have you any log from terminal rmulator for me?
Sent from my C2105 using XDA Free mobile app
Click to expand...
Click to collapse
I have set the permissions, root works properly.
In "su -c ... chargemon" I wrote "chargemon.sh" instead of "chargemon", because Terminal Emulator said that there was no such directory.
After "su -c ... /supersu.sh" Terminal Emulator said something about checking recovery...
Sorry, can't say what writes Terminal Emulator after "su -c ... supersu.sh". Phone reboots too fast :banghead:
Brembol said:
I have set the permissions, root works properly.
In "su -c ... chargemon" I wrote "chargemon.sh" instead of "chargemon", because Terminal Emulator said that there was no such directory.
After "su -c ... /supersu.sh" Terminal Emulator said something about checking recovery...
Sorry, can't say what writes Terminal Emulator after "su -c ... supersu.sh". Phone reboots too fast :banghead:
Click to expand...
Click to collapse
Hm... If you want install teamviewer from playstore and i will look into it
Sent from my Xperia T using XDA Free mobile app
New to root
Hi, I'm quite new to root. Can you tell me how to flash custom recovery???
Android4Lyfeee said:
Hi, I'm quite new to root. Can you tell me how to flash custom recovery???
Click to expand...
Click to collapse
It's not really that complicated but it depends on if you have locked bootloader and already rooted or not, what firmware are you on.. If your bootloader is locked, go to cross device section and download TA backup so you can back up your keys for locking your bootloader again..if you have unlocked bootloader, things are simpler.. Let me know and I'll give you a step by step tutorial..
Sent from my ZR
hagar006 said:
It's not really that complicated but it depends on if you have locked bootloader and already rooted or not, what firmware are you on.. If your bootloader is locked, go to cross device section and download TA backup so you can back up your keys for locking your bootloader again..if you have unlocked bootloader, things are simpler.. Let me know and I'll give you a step by step tutorial..
Sent from my ZR
Click to expand...
Click to collapse
My bootloader is locked, but I am rooted. I'm also running Android 5.0.2 Lollipop right now.
Sent from my C5502 using Tapatalk
Android4Lyfeee said:
My bootloader is locked, but I am rooted. I'm also running Android 5.0.2 Lollipop right now.
Sent from my C5502 using Tapatalk
Click to expand...
Click to collapse
Ok.. Go to the cross device section and download dual recovery installer by NUT.. Extract the installer to your desk top, make sure you have debugging checked on your phone, connect your phone to pc with usb, go to dual recovery folder and click the .bat according to your root ie superuser or supersu. Follow the instructions and you have working recovery.. Please note, this will not work with kingroot.. Horrible app anyway..
Sent from my ZR
hagar006 said:
Ok.. Go to the cross device section and download dual recovery installer by NUT.. Extract the installer to your desk top, make sure you have debugging checked on your phone, connect your phone to pc with usb, go to dual recovery folder and click the .bat according to your root ie superuser or supersu. Follow the instructions and you have working recovery.. Please note, this will not work with kingroot.. Horrible app anyway..
Sent from my ZR
Click to expand...
Click to collapse
I rooted with Kingroot, but I changed it to SuperSU. Is this okay?
EDIT: Wow, thanks, it worked!
Sent from my C5502 using Tapatalk

Dirty ROOT solution - for unlocked BL

I have ported the Z5 Compact root method to Z5.
Please note that both recovery.img and kernel img are different from the Z5 Compact thread. Do not use recovery or kernel for Z5 Compact on your regular Z5 phone.
Disclaimer
I am well aware that this is not the nicest method of rooting, but I got the phone a few hours ago and haven't got the time to put together a better way.
Credits
@Tommy-Geenexus for Zombie kernel
@AndroPlus for Z5 recovery and guidance :good:
@Chainfire for SuperSU
Guide
First, you need to unlock you bootloader (I know, I know, now stop weeping :crying::crying::crying
A rooted device does not boot using default kernel, so you need to install an insecure kernel.
I have repacked stock Z5 (32.0.A.4.11) kernel to disable Sony RIC, dm verity, make it insecure, etc.
Flash using:
Code:
fastboot flash boot z5_stock_fixed.img
Reboot your phone using:
Code:
fastboot reboot
And verify that it works as expected.
Now, reboot your phone to bootloader again (see info how to at the end of post).
Then issue:
Code:
fastboot boot recovery.img
This recovery is partly broken, but it works well enough to install root.
Thanks to @AndroPlus for TWRP.
The phone will boot to a black screen, but you can connect to it using ADB.
You need to manually mount the system and userdata partition by issuing:
Code:
adb shell mount /dev/block/platform/soc.0/by-name/system /system
adb shell mount /dev/block/platform/soc.0/by-name/userdata /data
If you get this error:
mount: mounting /dev/block/platform/soc.0/by-name/system on /system failed: No such file or directory
You probably just need to wait a while and try again. You usually have to wait ~120 sec for the mount to work. Be patient.
If you got /system and /data to mount, you can now push SuperSU to the phone and install it:
Code:
adb push UPDATE-SuperSU-v2.46.zip /data/media/0/
adb shell twrp install /data/media/0/UPDATE-SuperSU-v2.46.zip
adb shell rm /data/media/0/UPDATE-SuperSU-v2.46.zip
If it all works, just reboot and enjoy root:
Code:
adb reboot
Files
z5_stock_fixed.img
recovery.img (for Z5)
Extra info
Boot to bootloader by adb command:
Code:
adb reboot bootloader
or by turning off the phone, and then hold down VOL UP while plugging in the USB cable.
works like a charm, finally I can use my Z5 =)
thank you mate.
Awesome, do we need to backup TA partition anymore to keep X-Reality etc?
komugi said:
Awesome, do we need to backup TA partition anymore to keep X-Reality etc?
Click to expand...
Click to collapse
You need to unlock the bootloader, so I don't think you can backup the TA partition.
Does this change anything in the kernel? Will battery life be the same?
If you unlock yourbootloadeR TA partition it lost forever! You can't get it back and things like x-reality won't work anymore.
Gesendet von meinem E6653 mit Tapatalk
We know that, but it must have a way (yet to find?) to backup and restore the TA partition just like previous devices (it was possible on Z and Z1, don't know about the others)
Sent from my E6653
are there unlocked bootloader Z5s? how do we check if our bootloader is locked?
GOOGLE
Go to calls,enter *#*#7378423#*#* and go to service info-configuration.
Sent from my E6653 @ XDA Portal
I ran through these instructions, and I now have root privileges, but I can't write to /system. Is there something I missed to enable this, or does this just not work?
Sent from my E6653 using Tapatalk
mindstormsguy said:
I ran through these instructions, and I now have root privileges, but I can't write to /system. Is there something I missed to enable this, or does this just not work?
Sent from my E6653 using Tapatalk
Click to expand...
Click to collapse
You need to mount /system as read/write (default: read-only).
You can use an app or shell command to do this.
For example:
http://forum.xda-developers.com/wiki/Guide:Using_the_Terminal#Mount
nilezon said:
You need to mount /system as read/write (default: read-only).
You can use an app or shell command to do this.
For example:
http://forum.xda-developers.com/wiki/Guide:Using_the_Terminal#Mount
Click to expand...
Click to collapse
I see I have this problem too.
Using terminal cmd
# mount -o rw,remount /system
replies
mount: Operation not permitted
Also not possible with Root Explorer
In this way it's also not possible to install Busybox.
I reinstalled kernel but didn't change anything.
Operation not permitted for me too. And I also tried reinstalling the kernel before posting.
Sent from my E6653 using Tapatalk
mindstormsguy said:
Operation not permitted for me too. And I also tried reinstalling the kernel before posting.
Sent from my E6653 using Tapatalk
Click to expand...
Click to collapse
Hmm. Same for me. Maybe Sony RIC or SELinux is not fully disabled after all.
harfot said:
I see I have this problem too.
Using terminal cmd
# mount -o rw,remount /system
replies
mount: Operation not permitted
Also not possible with Root Explorer
In this way it's also not possible to install Busybox.
I reinstalled kernel but didn't change anything.
Click to expand...
Click to collapse
nilezon said:
Hmm. Same for me. Maybe Sony RIC or SELinux is not fully disabled after all.
Click to expand...
Click to collapse
@DooMLoRD:
Hello my friend,
Long time no see - hope you are doing well.
Am I wrong if I remember this "half" root once in a DooMKernel? Cannot find it but I'm sure you know the reason.
Thanks
It looks like Zombie kernel doesn't have changes like this:
https://github.com/AndroPlus-org/an...mmit/f0544c997bb22da293005ffcaaeeeb4a55394c8d
I think he can improve this current method...
AndroPlus said:
It looks like Zombie kernel doesn't have changes like this:
https://github.com/AndroPlus-org/an...mmit/f0544c997bb22da293005ffcaaeeeb4a55394c8d
I think he can improve this current method...
Click to expand...
Click to collapse
I don't think it is needed.
Setting:
CONFIG_SECURITY_SONY_RIC=n
in kernel config seem to solve the remount rw problem.
It's much cleaner to remove Sony RIC module this way, than just patching it, IMHO.
It's sad this can't be done by just repacking stock ramdisk.
@nilezon do we need a new compiled kernel for every new firmware?
Azdian said:
@nilezon do we need a new compiled kernel for every new firmware?
Click to expand...
Click to collapse
You can run an older kernel, but the latest is often then best.
nilezon said:
I don't think it is needed.
Setting:
CONFIG_SECURITY_SONY_RIC=n
in kernel config seem to solve the remount rw problem.
It's much cleaner to remove Sony RIC module this way, than just patching it, IMHO.
It's sad this can't be done by just repacking stock ramdisk.
Click to expand...
Click to collapse
Is the fixed version in the main post now, then?

Categories

Resources