[Q] [BASIC] How to install custom recovery - Xperia Z1 Q&A, Help & Troubleshooting

Hey all.
Long time phone modder so I'm not new to this but this XZ1 has got me stumped.
I can't find anything specifically for recoveries but all ROM install guides I see mention to boot to recovery.
Currently I've got an unlocked bootloader and the ROM and Kernel ready to go.
As far as I know the XZ1 doesn't come with a user-accessible recovery on the stock firmware/kernel.
Now from flashing other ROMs, kernels, recoveries and such I have to come to learn that the boot.img is JUST the kernel, nothing else.
All posts I've read however point to the XZ1 boot.img having the recovery and the kernel all in one spot.
Could someone confirm the process from here or if I'm right regarding the boot.img being kernel AND recovery?
Many thanks.

Enter fast boot mode, them use this
Fastboot flash boot boot.img
Sent from my C6903 using XDA Premium 4 mobile app

gregbradley said:
Enter fast boot mode, them use this
Fastboot flash boot boot.img
Sent from my C6903 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
So I was correct in assuming the boot.img for the XZ1 contains a recovery as well as a kernel?
How come when I flash the iHackers.img to the boot it won't load up any more. As soon as the cable is removed it stays off and won't come back on. Just flashes a red light and buzzes once. Won't go past that. I can reenter fastboot and flashmode (had to reflash a stock several times due to this not working).
I have also confirmed the MD5 sum matches.

potplanty said:
So I was correct in assuming the boot.img for the XZ1 contains a recovery as well as a kernel?
How come when I flash the iHackers.img to the boot it won't load up any more. As soon as the cable is removed it stays off and won't come back on. Just flashes a red light and buzzes once. Won't go past that. I can reenter fastboot and flashmode (had to reflash a stock several times due to this not working).
I have also confirmed the MD5 sum matches.
Click to expand...
Click to collapse
hmm, make sure you have plenty of battery, also you will have to power on the phone and keep pressing volume up until it enters recovery.
If that does not work follow the locked bootloader instructions.
There is no separate partition on sony phones for recovery as they do not come with an accessable factory recovery. All recoveries have to in a custom kernel (For unlocked bootloaders) or installed into system (For locked bootloaders or unlocked bootloaders with a stock kernel)

gregbradley said:
There is no separate partition on sony phones for recovery as they do not come with an accessable factory recovery. All recoveries have to in a custom kernel (For unlocked bootloaders) or installed into system (For locked bootloaders or unlocked bootloaders with a stock kernel)
Click to expand...
Click to collapse
This is a very unsafe way to have recovery. Isn't it? A recovery should work outside of System Partition to do the job right. Recoveries into Kernel or System do not guarantee if something go wrong to run up when a entire partition can be damage or system corrupted.
Am I wrong?

eclyptos said:
This is a very unsafe way to have recovery. Isn't it? A recovery should work outside of System Partition to do the job right. Recoveries into Kernel or System do not guarantee if something go wrong to run up when a entire partition can be damage or system corrupted.
Am I wrong?
Click to expand...
Click to collapse
Well, since xperia phones do not have a recovery partition it is the only way to do it.
Take a look at where dualrecovery install the recovery ramdisks on a locked bootloader...its right in the system partition
system/bin
Its where all xperia recoveries go, unless they are incorporated in the kernel
Its why we lose recovery if we flash a stock FTF, because it formats system..

gregbradley said:
Its why we lose recovery if we flash a stock FTF, because it formats system..
Click to expand...
Click to collapse
Flashing Stock FTF will delete partitions in any case, it's the same with HTC.
Why just don't repartitioning the internal memory and install recovery in a specific partition?

Related

[Q] Question: Failed to flash boot.img, possibly bricked incredible s?

I was flashing on MIUI V4 and was following the instructions. it instructed me to flash on the boot.img after flashing the rom
i proceeded to do so, but the boot.img failed to boot. i had to go do something so i powered my phone off from the bootloader. after that my phone would not turn on at all and the charging light would not turn on while charging. From what i understand the boot.img contains the kernel and the ramdisk? and correct me if i am wrong, but even without a kernel or ramdisk i should be able to boot into recovery or bootloader at least right?
EDIT: yeah thanks guys lol. i just left the battery out for a good minute and it booted back into life, cheers for helping.
spazzy1912 said:
I was flashing on MIUI V4 and was following the instructions. it instructed me to flash on the boot.img after flashing the rom
i proceeded to do so, but the boot.img failed to boot. i had to go do something so i powered my phone off from the bootloader. after that my phone would not turn on at all and the charging light would not turn on while charging. From what i understand the boot.img contains the kernel and the ramdisk? and correct me if i am wrong, but even without a kernel or ramdisk i should be able to boot into recovery or bootloader at least right?
Click to expand...
Click to collapse
Yes you should be able to boot into recovery and bootloader as it doesn't even require an installed boot.img. Only the rom relies on the boot.img to boot up.
Sent from my HTC Incredible S using xda premium
spazzy1912 said:
I was flashing on MIUI V4 and was following the instructions. it instructed me to flash on the boot.img after flashing the rom
i proceeded to do so, but the boot.img failed to boot. i had to go do something so i powered my phone off from the bootloader. after that my phone would not turn on at all and the charging light would not turn on while charging. From what i understand the boot.img contains the kernel and the ramdisk? and correct me if i am wrong, but even without a kernel or ramdisk i should be able to boot into recovery or bootloader at least right?
Click to expand...
Click to collapse
Try seeing the link in my signature (how it works).

[Recovery][CWM][TWRP][UB]Flashable Recovery For Xperia ZR

Here are two flashable zip for you to flash the recovery, CWM or TWRP into your Xperia ZR.
Quoting from this thread by @championswimmer:
What are the advantages of this method ?
Every time you flash a kernel, the recovery gets changed, because the recovery is present in the kernel. But if we are hotbooting a recovery in the fotakernel partiton, then even after flashing a new kernel (given that it supports extract_elf_ramdisk), your recovery is not changed. Thus even if the kernel's inbuilt recovery is broken, you can continue to use the recovery you have flashed onto your fotakernel.
All I have done with the installer script is pushing the recovery.img into your fotakernel so the recovery you prefer will always stay in the device no matter what kernel/ROM you flashed.
Benefit?
You will not need computer to perform the installation as you only need to flash on your device and you're good to go.
How to install?
1. Download the recovery zip you want
CWM: View attachment clockworkmod_touch_6.0.4.5.zip
TWRP: View attachment twrp_2.6.3.0.zip
2. Copy onto your device, boot into recovery and flash like normal zip
3. Reboot recovery to see if it changes your recovery to the one you flashed
If you like my work, press the THANKS button or consider to buy me a beer.​
wai10691 said:
Here are two flashable zip for you to flash the recovery, CWM or TWRP into your Xperia ZR.
Quoting from this thread by @championswimmer:
What are the advantages of this method ?
Every time you flash a kernel, the recovery gets changed, because the recovery is present in the kernel. But if we are hotbooting a recovery in the fotakernel partiton, then even after flashing a new kernel (given that it supports extract_elf_ramdisk), your recovery is not changed. Thus even if the kernel's inbuilt recovery is broken, you can continue to use the recovery you have flashed onto your fotakernel.
All I have done with the installer script is pushing the recovery.img into your fotakernel so the recovery you prefer will always stay in the device no matter what kernel/ROM you flashed.
Benefit?
You will not need computer to perform the installation as you only need to flash on your device and you're good to go.
How to install?
1. Download the recovery zip you want
CWM: View attachment 2587832
TWRP: View attachment 2587840
2. Copy onto your device, boot into recovery and flash like normal zip
3. Reboot recovery to see if it changes your recovery to the one you flashed
If you like my work, press the THANKS button or consider to buy me a beer.​
Click to expand...
Click to collapse
Can we have dual recovery pls?
If we need to remove what is the way. Once I was in boot loop when using nut recovery and only thing I had to do add a file to sd card recovery folder to stop recovery
Sent from my C5502 using Tapatalk
Lasantha said:
Can we have dual recovery pls?
If we need to remove what is the way. Once I was in boot loop when using nut recovery and only thing I had to do add a file to sd card recovery folder to stop recovery
Sent from my C5502 using Tapatalk
Click to expand...
Click to collapse
The intention was only install one recovery in FOTAKernel. DualRecovery using another method but if you want you can use the other dualrecovery.
I have made CWM and TWRP available for user to move around without losing any recovery.
wai10691 said:
The intention was only install one recovery in FOTAKernel. DualRecovery using another method but if you want you can use the other dualrecovery.
I have made CWM and TWRP available for user to move around without losing any recovery.
Click to expand...
Click to collapse
Thanks this is only for unlocked boot loader right?
Will it work on ZU?
wai10691 said:
Here are two flashable zip for you to flash the recovery, CWM or TWRP into your Xperia ZR.
Quoting from this thread by @championswimmer:
What are the advantages of this method ?
Every time you flash a kernel, the recovery gets changed, because the recovery is present in the kernel. But if we are hotbooting a recovery in the fotakernel partiton, then even after flashing a new kernel (given that it supports extract_elf_ramdisk), your recovery is not changed. Thus even if the kernel's inbuilt recovery is broken, you can continue to use the recovery you have flashed onto your fotakernel.
All I have done with the installer script is pushing the recovery.img into your fotakernel so the recovery you prefer will always stay in the device no matter what kernel/ROM you flashed.
Benefit?
You will not need computer to perform the installation as you only need to flash on your device and you're good to go.
How to install?
1. Download the recovery zip you want
CWM: View attachment 2587832
TWRP: View attachment 2587840
2. Copy onto your device, boot into recovery and flash like normal zip
3. Reboot recovery to see if it changes your recovery to the one you flashed
If you like my work, press the THANKS button or consider to buy me a beer.​
Click to expand...
Click to collapse
Great work!! I just have two questions:
1. Does this work on LB?
2. Does offline charging work with this recovery?
is it possible to use recovery in kernel when fotarecovery is installed?
how can it be uninstalled?
can u plz make a fastboot .img file to cwm or twrp ?
Can you find newer versions of CWM/TWRP? Or, can you teach me how to make em myself?
If I flash kernel that contains recovery (i.e CM11) will it be overwritten?
Sent from my C5503 using XDA Premium 4 mobile app
adize said:
If I flash kernel that contains recovery (i.e CM11) will it be overwritten?
Sent from my C5503 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Yes !
But if the previous recovery was in system and was not with Kernel then they both may stay together.
any update to twrp 2.8?
Yes.Find it herehttp://forum.xda-developers.com/showthread.php?t=3047602
Sent from my Xperia ZR using XDA Free mobile app
Right now I have no recovery on my XZR, so I cannot flash the recoverys.
What must I do, to get a recovery on my ZR, so that I can flash?
Lemmi1 said:
Right now I have no recovery on my XZR, so I cannot flash the recoverys.
What must I do, to get a recovery on my ZR, so that I can flash?
Click to expand...
Click to collapse
Install XZ dualrecovery from here http://forum.xda-developers.com/showthread.php?t=2261606
Tapped from my furious ZR
It works perfect, thank you so much.
Need urgent help
wai10691 said:
Here are two flashable zip for you to flash the recovery, CWM or TWRP into your Xperia ZR.
Quoting from this thread by @championswimmer:
What are the advantages of this method ?
Every time you flash a kernel, the recovery gets changed, because the recovery is present in the kernel. But if we are hotbooting a recovery in the fotakernel partiton, then even after flashing a new kernel (given that it supports extract_elf_ramdisk), your recovery is not changed. Thus even if the kernel's inbuilt recovery is broken, you can continue to use the recovery you have flashed onto your fotakernel.
All I have done with the installer script is pushing the recovery.img into your fotakernel so the recovery you prefer will always stay in the device no matter what kernel/ROM you flashed.
Benefit?
You will not need computer to perform the installation as you only need to flash on your device and you're good to go.
How to install?
1. Download the recovery zip you want
CWM: View attachment 2587832
TWRP: View attachment 2587840
2. Copy onto your device, boot into recovery and flash like normal zip
3. Reboot recovery to see if it changes your recovery to the one you flashed
If you like my work, press the THANKS button or consider to buy me a beer.​
Click to expand...
Click to collapse
How do I enter in to recovery. I hav etried all the possible PnC's found online but nothing seems to worlk andI end up starting the phone.
help me flashed twrp with official twrp app , not device is not booting in recovery mode with key combination and twrp app to... my device is bootloader unlocked and rooted help me to flash twrp in device

[Q] Recovery wont mount storage

I'm on a C6603 with an Unlocked Bootloader running 10.5.A.0.230 from an FTF flash.
I flashed this recovery's boot.img via fastboot and it worked fine. Went in to recovery and it can't flash anything. The internal storage only shows default folders but it claims they are all empty. SD Card wont mount at all, when I click on it it just hangs for like 30 seconds then errors saying unable to mount. I'm guessing this may be due to not flashing the full zip and only the boot.img? If so, how do I go about flashing the full zip since my recovery wont find it? I amen't rooted since I can't flash the SU APK & Binary zip in recovery...
Any ideas on how to fix recovery then gain root? (I'm having the battery drain issue and I can't live with like 2 hours screen off time)
Roscobigfoot said:
I'm on a C6603 with an Unlocked Bootloader running 10.5.A.0.230 from an FTF flash.
I flashed this recovery's boot.img via fastboot and it worked fine. Went in to recovery and it can't flash anything. The internal storage only shows default folders but it claims they are all empty. SD Card wont mount at all, when I click on it it just hangs for like 30 seconds then errors saying unable to mount. I'm guessing this may be due to not flashing the full zip and only the boot.img? If so, how do I go about flashing the full zip since my recovery wont find it? I amen't rooted since I can't flash the SU APK & Binary zip in recovery...
Any ideas on how to fix recovery then gain root? (I'm having the battery drain issue and I can't live with like 2 hours screen off time)
Click to expand...
Click to collapse
Try a different recovery like twrp
For twrp img file click here
androidtweaker1 said:
Try a different recovery like twrp
For twrp img file click here
Click to expand...
Click to collapse
The install instructions, if you could actually call them that, are horrendously worded. Any more understandable ones? (I'm not a noob, I'm pretty experienced, those instructions are truly just ****ty)...
uninstall recovery & reinstall latest xzdual recovery by nut.
Try Dual Boot recovery with Philz Touch CWM Advanced Edition and TWRP by @shoey63
Sent from my C6603 using Tapatalk

Unfixable bootloop?

I'm what you'd call a super noob at this stuff and I've got my poor little SP in a crazy bootloop... I've tried LITERALLY EVERYTHING the internet has told me to try; wiping every cache out there, flashing custom roms, stock roms, you name it. It began when I just got CWM (don't ask me why it happened then, I have no clue why) and this is even BEFORE I put a ROM on! (I was all ready to put a ROM after getting CWM but bootloop happened).
Note: I have CWM recovery, I think I have lost my stock recovery, if I try some ROMS (ex. CM 12) they give me this error 7, once I found certain ROMS (PACMAN ROM, unofficial stock ROM) that would flash and install, they did but still left me with a bootloop, I have tried wiping so many caches it's not even funny, I've tried flashing the original firmware, nothing works... so I'm here for help.
I have looked at every google link and every method possible in trying to fix this thing! I really can't afford a new phone and I just love this one too much... please help!
farahtasnim said:
I'm what you'd call a super noob at this stuff and I've got my poor little SP in a crazy bootloop... I've tried LITERALLY EVERYTHING the internet has told me to try; wiping every cache out there, flashing custom roms, stock roms, you name it. It began when I just got CWM (don't ask me why it happened then, I have no clue why) and this is even BEFORE I put a ROM on! (I was all ready to put a ROM after getting CWM but bootloop happened).
Note: I have CWM recovery, I think I have lost my stock recovery, if I try some ROMS (ex. CM 12) they give me this error 7, once I found certain ROMS (PACMAN ROM, unofficial stock ROM) that would flash and install, they did but still left me with a bootloop, I have tried wiping so many caches it's not even funny, I've tried flashing the original firmware, nothing works... so I'm here for help.
I have looked at every google link and every method possible in trying to fix this thing! I really can't afford a new phone and I just love this one too much... please help!
Click to expand...
Click to collapse
please state your current bootloader status. Is it unlocked or still locked?
TechnoSparks said:
please state your current bootloader status. Is it unlocked or still locked?
Click to expand...
Click to collapse
I have unlocked my bootloader. Thank you for replying!
farahtasnim said:
I have unlocked my bootloader. Thank you for replying!
Click to expand...
Click to collapse
Splendid! Knowing that your BL state is unlocked, this will make the whole process A LOT easier!
http://forum.xda-developers.com/xperia-sp/development/ubl-twrp-f2fs-support-xperia-sp-huashan-t3150230
Please go to the above link to get TWRP. Also, please keep in mind that TWRP is now the only still supported recovery around. CWM and PhilZ are both really outdated and no longer maintained due to the introduction of Cyanogen Recovery which is very minimal in features.
Once you get yourself the download, extract the files from the zip and get the twrp.img file. We will need this to flash into the boot partition of Xperia SP, granting you a direct boot into recovery once it is flashed. Please then copy the original zip to your sd card, as we will be flashing the original zip via TWRP later to give you access to TWRP in the future.
Using your preferred tool, flash the twrp.img file into the boot partition.
Connect your Xperia SP via fastboot. Make sure SP is shut down, hold volume up key and connect the SP with your computer.
If you're using a fastboot tool via command prompt, the command would be
fastboot flash boot twrp.img
If you're using flashtool, hit the lightning icon in the toolbar, select fastboot mode. Then select "Select kernel to flash". Make sure the file type is "img" else you won't able to find your TWRP img file. Navigate to mentioned img file and select it.
Afterwards, when flashing complete, you may insert sdcard and start the device. It will boot directly into TWRP as we flashed a recovery to the boot partition.
Clean wipe data, cache, dalvik cache, system. You may leave internal storage.
Flash the ROM zip you acquired (make sure file integrity is checked beforehand!) then the TWRP zip earlier. Flashing the TWRP zip grants you a persisting recovery, as explained in the linked thread.
You may now reboot and enjoy

Do I have to flash TWRP everytime using Flashtool if I need to access it?

Newbie to the 'Dark Side of the Android World' and just curious.
well, after rooting your phone you only need to flash custom recovery once then you can access it as many times as you want
Your question is a little bit weird. Can you link me to a place of reference? Or at least explain what you are actually wanting to do?
Flashing TWRP is a one-time action, once flashed it remain on your Xperia SP. However, FlashTool doesn't offer flashing TWRP to other partitions via fastboot other than the "boot" partition. So far, the only way to correctly flash TWRP is via a recovery.
If you indeed flashed TWRP image via FlashTool, then you are actually putting TWRP into your boot partition, and this makes your device to only boot into TWRP infinitely until you flash a ROM (which will of course again override the boot partition).
The reason why I asked is because this method of accessing recovery is posted in my custom ROM guide, so I want to know if you get this kind of idea from my guide.
Thanks

Categories

Resources