yashsingh1/xdaforums huggingface dataset:
[Xperia Z Original Android Development] shem2409:
I have managed to successfully flash the recovery to my device. I am unable to mound /sdstorage though and because of that I can't flash any new files to my device.

Any idea why that could be ?

I am on locked bootloader, rooted, with your recovery installed. I tried to flash the black nav and notification bar but I keep getting an error that I need to mount at least one sdstorage.
[Xperia Z Original Android Development] viniss:
hi,

Any idea why i am getting this message?

=============================================

Step2 : Sending the recovery files.

=============================================

27 KB/s (57 bytes in 0.002s)

4259 KB/s (239920 bytes in 0.055s)

1422 KB/s (4370 bytes in 0.003s)

4285 KB/s (3379200 bytes in 0.770s)

3989 KB/s (735308 bytes in 0.180s)

311 KB/s (957 bytes in 0.003s)

.

=============================================

Step3 : Setting up files system partition.

=============================================

/system/bin/sh: su: not found

Thanks

Edit: nvm, part of the rooting script went terribly wrong on my z
[Xperia Z Original Android Development] krabappel2548:
Oh ok, my XZ is in for repair, so haven't been able to test it.. Anyway thanks for the info ;) I'll take a look as soon as I have my XZ back.
[Xperia Z Original Android Development] brambizimski:
Is it possible to enable adb while in CWM? If I can't boot my rom ?
[Xperia Z Original Android Development] Supersaiyan.IV:
1. Backup

2. format /system

3. Restore

4. Boots. All accounts in restored image are gone - gmail force closes etc.

5. Can't boot into CWM

6. When attempting to reinstall CWM, this:

7. Still doesn't boot into CWM

EDIT: I don't need help to fix this, it's just a bug report.
[Xperia Z Original Android Development] changkho1908:
When i wipe data cache, nothing happen, just only show wiping....a long time. And after flash cook rom, i cant enter cwm, no greenled, i must flash cwm again. Why??
[Xperia Z Original Android Development] billytcf:
working!!! you are god! man
[Xperia Z Original Android Development] paalkr:
Hi

Is it possible to add support for 64gb SDXC cards in the recovery? the card works perfectly in the ROM, but recovery does not recognize the card.
[Xperia Z Original Android Development] ali3nfr3ak:
Hi krabappel2548

how would I go about changing the text colour? thanks :)
[Xperia Z Original Android Development] chrisftlse:
Many Thanks

Hi Master Dev,

using your procedure I am now able to benefit entirely my XZ :victory:

Thanks for your knowledge, work and sharing :good:
[Xperia Z Original Android Development] Cxpher:
Re: [Locked Bootloader]CWM recovery 6.0.2.8 for locked bootloaders released[14-03]

CWM not working for me anymore either. I still get the green light after the Sony Logo. But it just boots back into Android.

Tried the twrp app from inside Android and that didn't work either.

The cwm install script bombs out after trying to touch /data/local/tmp/twrp after which it just reboots the device and the script proceeds to say device not found.
[Xperia Z Original Android Development] Cxpher:
Re: [Locked Bootloader]CWM recovery 6.0.2.8 for locked bootloaders released[14-03]

How did you get past points 5 to 7?
[Xperia Z Original Android Development] Cxpher:
@krabappel2548 : I cleaned up run.sh inside the files folder of your original zip file. The script is now more tolerant towards errors. I also noticed that there is some issue with touching the file /cache/recovery/boot if the parent folder /cache/recovery did not exist to begin with.

So i modded the script to be more resilient towards that and detect such an issue and fix it prior to attempting to touch the file. In other words, it fixes the bugs mentioned by the previous poster. I also removed the reboot in run.sh to prevent the reboot from happening while debugging. I didn't add it back because i think it's better that way.

So if you use the cleaned up version, you'll need to add the reboot back at the end of run.sh if that's how you intend it to be.

Update : Use this version instead http://goo.gl/gKnqj

Here is the link to the modded source for your use in your next version if it helps.

Also, despite my fixing the script and it working flawlessly everytime i run it regardless of how many times i run, it still does not bring back my cwm. An issue that i mentioned in the past few posts on this thread.

Therefore, conclusion is that it's got nothing to do with the script at all. It's something else. Anyone made any progress?
[Xperia Z Original Android Development] nobnut:
Not progress exactly, but I've got a satisfactory workaround.

First, here's my own observations. I am not knocking anyone's work and I know that recovery with a locked bootloader isn't easy. Anyway:

1) Using CWM recovery, I can very rarely (after the first couple of reboots) actually boot into recovery. It's as if it's just gone.

2) Using TWRP, I could use the app to boot into recovery... and whilst backup/restore work fine, 99 times out of 100, it just hangs when you click on 'install'

So, my workaround is to flash CWM but boot in to it from Cpasjuste's app. At least this way I can actually boot into a recovery which allows me to install as well as backup/restore :)
[Xperia Z Original Android Development] Cxpher:
I actually tried this earlier. Flashed CWM and boot in with the TWRP app but it does nothing. Boots me right back into Android.

I'll give it another go and see if it works.

Update : Just tried it. Green light flashes for a moment and then it's gone.

I'm using AUR rom (1.4.1). I noticed in root explorer that despite the cwm script touching the /cache/recovery/boot file, after every reboot, the cache folder is empty again. Is this the case with other roms?
[Xperia Z Original Android Development] nobnut:
I'm using stock and I have the following in cache:

/cache/chargemon/:

- chargemon.log

- chargemon.log.old

- keycheck

/cache/lost+found/:

- [empty]

/cache/recovery/:

- last_install

- last_log
[Xperia Z Original Android Development] Cxpher:
Looks like my cache folder may be bonked. Or are other AUR users encountering this too?

Anyone know where a pre-startup execution script is located on the Xperia Z rom? The equivalent of /etc/rc.local on Linux?

Anyone knows how to re-create a cache partition? Or is wiping it out and letting it get recreated on it's own the way to go?

If so, is "rm -rf /cache" sufficient?
[Xperia Z Original Android Development] Stu308:
Done it! What can I do now and how?
[Xperia Z Original Android Development] nobnut:
Re: [Locked Bootloader]CWM recovery 6.0.2.8 for locked bootloaders released[14-03]

The first thing to do is to post what you've done, then explain what you want to do, then ask for help.
[Xperia Z Original Android Development] krabappel2548:
Thx, posted updated version in first post :)
[Xperia Z Original Android Development] Stu308:
Well, I flashed CWM and now want to flash roms's. Just need to know which to use (or not) and whatever else can improve the phone. Please help. :)
[Xperia Z Original Android Development] danw_oz:
Thanks so much for providing such an easy to install CWM Recovery, nice to have a familiar interface :) and knowing what is going to happen when I click something within the menus (self explanatory). Next touch recovery ;). I really appreciate your hard work.
[Xperia Z Original Android Development] Cxpher:
You're welcome. I actually tested it quite a fair bit and used adb shell to verify the results so it should be accurate.

Do let me know if there is anything that's misbehaving and i'll assist to update the script.
[Xperia Z Original Android Development] nobnut:
Generally, the first thing to do is to backup in recovery.

Then, find the ROM you like (read the ROM OP thread fully). Copy the ROM.zip to your SD card and then boot into recovery. Use the 'install zip from sdcard' option and then choose 'install zip from external sdcard'. Then select and accept warning.

Done.
[Xperia Z Original Android Development] Cxpher:
@krabappel2548

Version 3 of the run.sh script is out.

Updated my initial post with the latest link and sent you a priv msg with it. Do let me know if you've received the msg. For some reason, it's not in my sent messages folder.
[Xperia Z Original Android Development] Stu308:
Thanks nobnut, so I dont need to use flashtool now I have cwm?
[Xperia Z Original Android Development] nobnut:
Technically, no. You can use CWM to flash ROMs, mods, backup and restore.

But it is still useful however. If you flash something that doesn't work and everything goes horribly wrong, or you get into a soft brick situation, you can use Flashtool to get yourself up and running again. Don't wipe data and cache and you should be back to normal :)

If you use Flashtool, you will need to root and flash your recovery again however. But that only takes a couple of minutes.
[Xperia Z Original Android Development] krabappel2548:
Got it, I'll post updated recovery soon :)
[Xperia Z Original Android Development] fado69:
Hi,thanks for your great job

But i have a problem.

the installation is okey, but when phone is starting, i don't have green LED ...

I can't enter into the recovery ...

Do you have a solution plz ?
[Xperia Z Original Android Development] sunshine76:
iam not able to switch on NFC. and the data folder in the root is empty as well. any help guys....
[Xperia Z Original Android Development] nobnut:
The NFC issue is related to root, not CWM. If you unroot, you will be able to get it back again.

I'm not sure which file location you are referring to. Do you mean the cache folder?
[Xperia Z Original Android Development] Tyseyh:
EDIT- Turns out I didn't have Debugging on ..lol.. Stupid mistake on my half.

Curious if someone can help me, here is my situation.

IMy bootloader is unlockable, but, i would like it locked so Bravia Engine2 will work.

So, I flash a stock ROM, Rooted, Stock Kernel, Great stuff.

I'm just struggling to flash a Recovery.

I tried this one here but every time i turned my phone on , I got the Sony logo, but couldn't get into recovery.

The phone then shows ??/100. ( may of also said charging )

I couldn't get the phone to boot up. So, i unlocked my bootloader and installed TWRP and everything works. Just my question is, How do i flash a recovery on a stock but rooted ROM with a locked bootloader?

I've read about threads but i keep getting all kinds of information.

If someone can help me with this, i would be very grateful.
[Xperia Z Original Android Development] Cxpher:
Download this mod and run install.bat inside it.

That should do it. Do it while your phone is on and connected via usb cable. That should allow adb container to function.
[Xperia Z Original Android Development] hush66:
I'm sure you're looking at the wrong folder. The data folder contains your phone data and apps, so it cannot be empty.
[Xperia Z Original Android Development] jigarpatel22:
Not able to mount SD Card ( External Card ) in recovery.

I have SanDisk 64 GB Class 10 card formatted with FAT32 file system.

Or recovery requires some other file system on SD Card. i.e. ( ext2, ext3, ext4 )
[Xperia Z Original Android Development] VtHondaGuy08:
I keep getting this, any ideas?
[Xperia Z Original Android Development] Cxpher:
You're rooted or not?
[Xperia Z Original Android Development] igogold:
Have you unpacked all files from .7z archive? Or you run .bat file just from archive? You should unpack before.
[Xperia Z Original Android Development] VtHondaGuy08:
Yes

Yes
[Xperia Z Original Android Development] Cxpher:
Use adb in the archive and run adb.exe devices.

Is your device listed?
[Xperia Z Original Android Development] VtHondaGuy08:
Yes it is, when its done running it says shell access granted on the Phone.
[Xperia Z Original Android Development] Cxpher:
Step 2 is where it uses adb to push the files to your phone. But it didn't work for you according to your screenshot. Can you show me the output of adb devices?
[Xperia Z Original Android Development] VtHondaGuy08:
Here Ya go
[Xperia Z Original Android Development] brutal_noise:
everytime i try to flash a rom with this recovery it stuck on "format system...". I didn't hate this problem with unlocked BL.
[Xperia Z Original Android Development] timchew:
Is there any way to have two recoveries, CWM and TWRP recoveries?

I flashed TWRP.zip and lost CWM recovery. I tried to use this method to install CWM recovery but the message is installation failed. Thanks.
[Xperia Z Original Android Development] dsmaori:
I keep getting an error message...

[ERROR] We Need one sdcard mounted!

[EXIT] Check and configure MOD. config

I've tried flashing it from both external SD and internal SD but with no joy. Also tried mounting and unmounting both. What am I doing wrong?
[Xperia Z Original Android Development] dhruvzz:
I went through this same problem as well..and had to flash using flashtool again...i think this problem happens if v flash from the memory card..if the files are in the internal memory it flashes them properly..
[Xperia Z Original Android Development] efgee:
Firts time it went to "daemon started succesfully", but then it stopped (waited 10+ minutes).

Now it says "step 1" and "waiting for device", but nothing happens.

Root (unlocked BL, adb drivers installed).
[Xperia Z Original Android Development] snark_be:
Same for me! :(

I used CWM recovery, flashed a zip and did a Wipe Cache. It freezed in the Wipe Cache so I did a reset.

Since this, I cannot go into recovery. I also tried flashing TWRP, either from the Android app and from the ADB package. Installing the recovery always works but I suspect something is missing on the file system due to the failed cache wiping.

The files changed by the CWM and TWRP packages are well on the device, as checked with Root Explorer. Root works fine.

Any idea?

Is /cache a directory in /, or is it supposed to be a filesystem? For me it's a directory. When I check with "df" in a shell, no filesystem mounted to /cache. I would have thought cache would be a filesystem. It seems to be confirmed by this post:

The presence of lost+found seems to indicate it's its own filesystem.
[Xperia Z Original Android Development] snark_be:
I made a full reset with Sony Update Service, then rooted, installed CWM and RomAur. After checking, I confirm: /cache should be in its own filesystem. This is probably where your problem is coming from. I don't know how to fix it other than doing a full reinstall.

---------- Post added at 02:20 PM ---------- Previous post was at 01:58 PM ----------

Again the problem with I do a Wipe Cache with CWM. It stays on

"-- Wiping cache...

Formatting /cache..."

I'll let it run a while but if it does not complete, I will reset again and end up with a messed up cache partition.

Any idea why the formatting fails?
[Xperia Z Original Android Development] mickey878:
here's how to fix this:

1.Stop your adb.exe service through the windows taks manager (ctrl + alt + Del)

2.before you extract the files, delete the previously created "files" folder in you C: drive

3.now extract the zip and run the install file.
[Xperia Z Original Android Development] Cxpher:
Yep. This works perfectly. Do it cleanly and it works fine.
[Xperia Z Original Android Development] reignzy:
you need to set phone connection to ums I'm pretty sure

Same as above
[Xperia Z Original Android Development] Cxpher:
I found a bug with this.

When you restore a nandroid backup when you have your bootloader locked via cwm, it is unable to properly restore the /cache folder and hence, it's empty.

As such, when you reboot, you no longer has cwm and no matter how many times you run this installer, it won't restore cwm.

I believe it can be done however if anyone has the /cache folder with locked bootloader and cwm installed and can upload it to me. Preferably with RomAUR 2.0 for locked bootloaders installed.

I'm going to test if just merely restoring the folder and then running cwm installer again will work and if it does, i can probably modify the installer to incorporate such a check and rectify if necessary.

Can anyone help?
[Xperia Z Original Android Development] reignzy:
Try this:

https://drive.google.com/fe/m
[Xperia Z Original Android Development] Cxpher:
You need to send me a link that has the cache folder.
[Xperia Z Original Android Development] reignzy:
I don't know how sorry. Can you pm your email and I will send you zip?
[Xperia Z Original Android Development] krabappel2548:
Cache folder will just be rebuild when you boot into the rom :)

It's not really important, I think I'll maybe try to exclude backup of cache for locked bootloaders, because recovery is located there :)
[Xperia Z Original Android Development] reignzy:
Do you want the zip file?
[Xperia Z Original Android Development] Cxpher:
It rebuilds but alas, it's empty. So you can boot into the rom you restored from nandroid but you can't get into recovery anymore. If we somehow can exclude the cache partition from being affected after a nandroid restoration, then it should work fine.
[Xperia Z Original Android Development] reignzy:
So does anyone want the cache files???
[Xperia Z Original Android Development] Cxpher:
You'll probably need to upload a direct link. Either using a https based file sharing service or sftp.
[Xperia Z Original Android Development] hydkrash:
After the device hung on me during a cache wipe, had to hard reset the device.

Since then, it was never possible to get into CWM.

The install still works, but CWM simply does not load when pressing the up or down buttons during the boot.
[Xperia Z Original Android Development] snark_be:
Just recreating the folder won't work, it's the whole cache filesystem that is gone.

---------- Post added at 10:07 AM ---------- Previous post was at 10:05 AM ----------

Same for me, and again linked to the /cache filesystem being gone.

I hope the recovery developers will look into this matter
[Xperia Z Original Android Development] pete dorothy:
Hey Guys,

Is there another way to get into recovery? I accidentally wiped the recovery and reboot the system (probably because I'm still living on Fullwipe the Galaxy Nexus). Now I'm at the start only to the Sony boot logo because it remains hanging. Backup I have made!
[Xperia Z Original Android Development] eagle1977:
+1 :(
[Xperia Z Original Android Development] xl VipeR lx:
That is what im doing now,

TO give some further feedback, everytime it boots - I get the Sony logo,

then where the xperia logo should be, i get a white battery icon, the size of a normal icon, then it reboots and the whole process starts again.
[Xperia Z Original Android Development] krabappel2548:
ok, I think I know where the problem is then :) can you enter recovery by pressing volume buttons or touching the screen?
[Xperia Z Original Android Development] barbik:
no
[Xperia Z Original Android Development] heretic:
So I've flashed it too. Haven't rebooted yet. What to do now? Try not to power off or reboot until this issue going to be fixed? Can't be without phone now.
[Xperia Z Original Android Development] xl VipeR lx:
Nope, nothing at all, just keeps bootlooping

---------- Post added at 02:17 PM ---------- Previous post was at 02:16 PM ----------

Yes or reflash stock firmware without wiping data
[Xperia Z Original Android Development] krabappel2548:
You can try to remove the files from your system folder with root explorer before rebooting, remove:

- system/bin/charger

- system/bin/chargemon

- system/bin/recovery.tar

Then your phone should will work like it should :)

ok, I'll fix the not booting issue first then issue of entering recovery.
[Xperia Z Original Android Development] eagle1977:
Am I able to flash via flashtool this firmware http://xdaforums.com/showthread.php?t=2173528&page=5

I have an austrian sim lock device witch hang in bootloop :p
[Xperia Z Original Android Development] heretic:
No go. Failed to delete files. Both Root Explorer and Solid Explorer.
[Xperia Z Original Android Development] krabappel2548:
yes, should work :)

oh ok, I added a new version now, v1.3.
[Xperia Z Original Android Development] heretic:
Safe to flash, huh? :)
[Xperia Z Original Android Development] krabappel2548:
I had the whit battery icon too, but I have unlocked bootloader so I restored by flashing rom again in recovery :p

Now I flashed v1.3 and don't have whit battery icon, but because my bootloader is unlocked and I don't have full stock fw it can be different for you guys and me.
[Xperia Z Original Android Development] heretic:
So I'll have to wait and see someone confirm then. Don't have a lot of time to be flashing. BTW, I'm on locked BL for now. :(
[Xperia Z Original Android Development] xl VipeR lx:
im still waiting for stock FTF to download :silly::crying: :eek: TAKING AGES!!!!

any body have a faster link for uk FTF
[Xperia Z Original Android Development] krabappel2548:
I know, this recovery is for locked bootloader, that's why I can't test and confirm it works ;)

Making something like this work can be a painful process for you guys because you need to restore with flashtool every time.. but I can't make it work without your help :)
[Xperia Z Original Android Development] heretic:
That's exactly my point. Don't have those AGES.:( Please take the time to post how it went with update and reinstall v1.3. Thanks!
[Xperia Z Original Android Development] xl VipeR lx:
its 14:43, i have to leave for work at 15:15, if it is not fixed by then ill have to resume at 21:00 when i get back from work.

Is there anyway of ecxtracting recovery.img from the stock firmware and then flashing using fastboot?
[Xperia Z Original Android Development] krabappel2548:
You only need to flash system from stock ftf ;) not recovery, recovery for locked bootloader is relocated to /system/bin because boot partition is locked.

And anyway, thx for testing until now guys!! I think I should get this working this week for sure ;)
[Xperia Z Original Android Development] barbik:
the same battery and can continue
[Xperia Z Original Android Development] xIceCream:
I'm sorry but I can't test it. I need to have a working phone tomorrow. Its 10.46pm here. And TFT taking ages to download... Just incase if i bricked my phone like others do... Thats why I cant test it. sorry :(
[Xperia Z Original Android Development] jigarpatel22:
I am able to mount 8 GB SD Card in Recovery formatted in FAT32 fs. but not able to mount 64 GB SD Card formatted in FAT32 fs.
[Xperia Z Original Android Development] recz:
please help I already root and install cwm recovery but I can not go to recovery mode
[Xperia Z Original Android Development] reignzy:
To enter recovery mode you must press the volume up button while booting when you see the green notification light
[Xperia Z Original Android Development] recz:
Press volume up but nothing happen
[Xperia Z Original Android Development] reignzy:
My guess would be then recovery not installed...
[Xperia Z Original Android Development] kannanX10:
in order to return to stock/remove CWM recovery,should i flash stock fw using SUS/PCC/flashtool or should I flash/restore stock recovery/kernel from having installed CWM recovery for locked bootloaders?

(bcos in htc i need to restore stock recovery from Custom recovery before flashing thro' RUU)
[Xperia Z Original Android Development] reignzy:
Using Pc suite to restore to stock would be the easiest way. Saves you trawling the web for .tft files
[Xperia Z Original Android Development] Cxpher:
That's strange. Works fine for my 64 GB in fat32.
[Xperia Z Original Android Development] [NUT]:
If anyone is curious enough to 'test' the key test and finds himself stuck there... hold power+vol UP for a few seconds and your phone will reboot.

:fingers-crossed:
[Xperia Z Original Android Development] Cxpher:
Anyway that the CWM recovery can support exfat for the external sdcard?

How does it work? Initrd? I can recreate the Initrd with exfat likely if that's the case.
[Xperia Z Original Android Development] [NUT]:
Warning to all it may concern: updating to the latest Sony ROM put my Z into a bootloop, though I also have rooted my locked bootloader phone.