yashsingh1/xdaforums huggingface dataset:
[Sony Xperia Z Ultra] DooMLoRD:
[ intro ]

So I recently got the ZU GPe and have been trying few things... and I messed it up bad so things were not even booting properly :D

I was trying to get it back to factory settings but couldnt find any direct way and no one XDA had any good info to go by...

finally i was able to get a procedure to restore to original Google Play Edition firmware! so here is a step-by-step procedure (with pictures) to restore your phone to original firmware!

[ requirement ]

a PC with USB cable

latest FULL OTA ZIP (I used this one from this thread)

adb drivers installed

[ how-to ]

[ 1 ] Get into Graphical Bootloader

to enter graphical bootloader you can either use the command:

adb reboot bootloader

OR

power down device connect the USB cable to phone before connecting the other end of cable to PC keep the VOLUME UP button pressed

this will trigger Bootloader mode:

[ 2 ] Get into Stock Recovery

while in the Graphical Bootloader use the VOLUME keys to navigate to "Recovery Mode"

now press the POWER button to select it, device will now "reboot" and trigger stock recovery entry

[ 3 ] Reveal Stock Recovery menu

at first you will see:

to combination to "reveal" the Recovery menu is:

POWER button + VOLUME DOWN (first press POWER button and then TAP the VOLUME DOWN key ONCE)

you will now see this:

[ 4 ] Flashing FULL OTA ZIP

in the recovery menu use VOLUME keys to navigate and select using POWER button

now navigate to "apply update from ADB"

select it!

this will enable "adb sideload" mode in recovery on phone

now on you PC (hope that you have downloaded the FULL OTA and kept it easily accessible) enter the following command to send the FULL OTA ZIP via sideload:

adb sideload [B]PATH-OF-FULL-OTA-ZIP-INCLUDING-ZIP-FILENAME.zip[/B]

e.g.: if u have saved the KOT49H full ota to c:\ then enter:

adb sideload c:\830f5fda644bfc55f82a4e01fb5fadae4b64fad6.update_1278-8069_R3C_KOT49H.S2.2052_Final_signed.zip

this should start the transfer process to phone and flashing will start once file is fully transferred

after flashing is complete I recommend doing a Factory Reset! THIS WILL WIPE THE INTERNAL SDCARD AND ALL DATA WILL BE LOST! select "wipe data/factory reset"

now select "reboot system now" and device will reboot! thats it!

you will now be on original Google Play Edition firmware!

hope this helps!

regards,

DooMLoRD
[Sony Xperia Z Ultra] adfurgerson:
Thank you for this. I had gotten to the first picture in step 3 accidentally while trying to guess my way through button combo to unlock bootloader in flashtool. Glad to know there is a way to enter stock recovery if needed. My investment is already paying dividends!
[Sony Xperia Z Ultra] adfurgerson:
[MENTION=2784807]DooMLoRD[/MENTION] I installed Minimal ADB and Fastboot and connected phone and can't figure why it doesn't show up when I type adb devices.

Edit...got it needed to go to device manager and pick drivers.
[Sony Xperia Z Ultra] richie138:
Would this overwrite the Advanced Stock Kernel with Dual Recovery? I'm looking to get my phone 100% back to stock.
[Sony Xperia Z Ultra] DooMLoRD:
Yes!

This will get the device back to complete 100% stock!
[Sony Xperia Z Ultra] adfurgerson:
Pretty certain my bootloader remained unlocked after using this process.
[Sony Xperia Z Ultra] richie138:
What about the bootloader unlock status?
[Sony Xperia Z Ultra] DooMLoRD:
that we cannot change...

i havent tried an oem relock.... hold on, will test it out now :)
[Sony Xperia Z Ultra] richie138:
[MENTION=3549760]adfurgerson[/MENTION] thanks for your edit, i had to do the same :)
[Sony Xperia Z Ultra] adfurgerson:
About the drivers? They were the ones from flashtool folder but had to reinstall them for adb to work. I assumed they were there from unlocking bootloader and flashing kernel.
[Sony Xperia Z Ultra] richie138:
I was able to pick Android and then Sony and see the Sony ADB driver. I had installed drivers in the past but it wasn't recognizing my phone right now and your post reminded me :good:

---------- Post added at 04:49 PM ---------- Previous post was at 04:42 PM ----------

If anyone figures out how to re-lock the bootloader they'd be the man ;)
[Sony Xperia Z Ultra] blueether:
I would think OEM relock should work?

I would make a backup of the unlocked TA so that you could restore that and have the data wipe that you get with OEM unlock.
[Sony Xperia Z Ultra] DooMLoRD:
dont flash TA from another device!
[Sony Xperia Z Ultra] EvoYas:
So I went back to stock GPE and updated to 4.4.3. How would I re root my phone again. Thank you.
[Sony Xperia Z Ultra] adfurgerson:
Same process as for 4.4.2 except you would use advanced stock kernel v.2 this time.
[Sony Xperia Z Ultra] EvoYas:
Can't seem to find V.2, is that DoomKernal or a different one?
[Sony Xperia Z Ultra] adfurgerson:
Link http://doomlord.xperia-files.com/do...lLUFkdlN0a0tlcm5lbC1LVFU4NEwuUzEuMzA1Ni12MDI=

From this thread http://xdaforums.com/showthread.php?t=2579005
[Sony Xperia Z Ultra] EvoYas:
Thank you, rooted successfully again :)
[Sony Xperia Z Ultra] acbc2k:
My GPE already on 4.4.3 before stuck on Google boot up screen. Already tried the above method for 4.4.2 but encountered an error of "Can't install this package (Tue Dec 10 14:17:53 CET 2013) over newer build (Mon May 12 11:10:10 CEST 2014)". Any ideas how to restore this phone?
[Sony Xperia Z Ultra] adfurgerson:
You don't have any backups from 4.4.2? I wonder if you were to flash a custom ROM then try this method would it work? [MENTION=2784807]DooMLoRD[/MENTION] do you know?

Another question I have is can a backup be restored to a different device and if so would it put me at risk?

Example... Restore my phone to completely stock 4.4.2 then skip signing into Google accounts and create a backup to share with people needing to restore back from 4.4.3 update.
[Sony Xperia Z Ultra] acbc2k:
Nope. I just got the unit and immediately updated to 4.4.3 upon boot up. After update done, phone stuck at Google logo and that's it.
[Sony Xperia Z Ultra] adfurgerson:
Did you try reset button under flap for Sim and SD card? Just so you know I tried forcing update over top of the update after wiping data/factory reset in stock recovery, it started to install then aborted with status 7 error and was nothing but error messages when it booted.
[Sony Xperia Z Ultra] DooMLoRD:
So you guys having issue with 4.4.2 or 4.4.3?
[Sony Xperia Z Ultra] adfurgerson:
Camera is broken on 4.4.3 for me and others. [MENTION=3351981]acbc2k[/MENTION] had update to 4.4.3 fail leaving phone stuck at Google splash screen.

Another question I have, is it possible to use Gparted or another tool so I could convert my phone to Sony? Starting to regret buying GPe, if I had only known Sony would drop their price before I had ordered from Play Store.
[Sony Xperia Z Ultra] EvoYas:
Also is there a way to get back to stock 4.4.3? I tried the version in this thread but it keeps failing maybe cuz my phone is on 4.4.3.
[Sony Xperia Z Ultra] blueether:
flash the system dump with fastboot, [MENTION=2784807]DooMLoRD[/MENTION] (?) did mention how to do it somewhere.

Edit:

You should be able to do this on the 4.4.2 as well as the 4.4.3 builds
[Sony Xperia Z Ultra] DooMLoRD:
yes...

if you have the older 4.4.2 files you can try:

you can try this:

http://xdaforums.com/showpost.php?p=53302754&postcount=8

flash system.img using fastboot & flash boot.img using fastboot

AFTER THIS DO NOT TRY TO USE OTA ZIP!
[Sony Xperia Z Ultra] ddslee:
Dear DooMLoRD, please share your finite wisdom!

I was scammed on craigslist and bought a Z Ultra GPE phone (not a converted one. I have the GPE box with matching IMEI) that has been rooted with dual custom recovery (+ clockworkmod, - twrp). Currently, it is showing 4.4.3 with official kernel version and baseband version.

Everything works well except a malfunctioning camera with the exact symptoms described on this forum by multiple different members here.

Did anyone finally find a solution to fix the broken camera?

I have tried to reflash 4.4.3 system.img and clear cache/dalvik cache but the camera is still broken.

Is there a way to bring my tampered device back to 100% stock with fully working camera and future OTA from google?

I will be eternally grateful if you could help out this poor noob, DooMLoRD!
[Sony Xperia Z Ultra] palexis06:
Hello, can we do with this process pass of Sony Z ultra ROM has Google play édition ROM ?

Thank you ;)
[Sony Xperia Z Ultra] blueether:
What?
[Sony Xperia Z Ultra] ddslee:
I have managed to edit the updater script to bypass the version check, but it failed due to signature verification failure.

Can I flash the edited OTA from CWM recovery (disable signature check) and achieve the same result (Restore to original GPE firmware)???
[Sony Xperia Z Ultra] palexis06:
Sorry for my bad english :-\ my z ultra is a non GPE Z ultra and i would like passed in GPe rom this topic is work for me ?
[Sony Xperia Z Ultra] adfurgerson:
NO DON'T USE THIS ON NON GPe PHONE! There are ports of the GPe firmware in the regular android development section.
[Sony Xperia Z Ultra] blueether:
As [MENTION=3549760]adfurgerson[/MENTION] said DON'T cross flash GPe and non GPe firmware.

If you want to use the the GPe software use this poet http://xdaforums.com/showthread.php?p=53620863
[Sony Xperia Z Ultra] egzthunder1:
Hi [MENTION=2784807]DooMLoRD[/MENTION],

I am attaching a link for your OP. This is a 4.4.2 zip with a modded updater script to avoid getting the error message that your device is not the one for which the package is for ("This is package is meant for C6806. This is a togari"). Considering that there are not too many flashable 4.4.2 stock roms out there that are custom recovery ready, I figured I would share this with those who want to get out of 4.4.3 and 4.4.4 and back to 4.4.2 without having to jump through hoops opening the script and whatnot.

Feel free to add the link to your OP if you see fit.

Link:

http://d-h.st/KMe
[Sony Xperia Z Ultra] blueether:
Thanks, I'll add it to my guide as well
[Sony Xperia Z Ultra] bigdbag:
I'm getting a 'E:footer is wrong' and then 'E:signature verification failed' error.
[Sony Xperia Z Ultra] cg87:
I am on stock 4.4.4 and I want to downgrade to 4.4.2 so that I can root using Towelroot. But recovery won't let me flash it.
[Sony Xperia Z Ultra] blueether:
Towelroot, as far as I know, will root 4.4.4 GPe ZUs. see the GPe guide thread
[Sony Xperia Z Ultra] gautam703:
I'm getting a 'E:footer is wrong' and then 'E:signature verification failed' error.
[Sony Xperia Z Ultra] cg87:
It worked but I had to use 1337 0 1 0 4 0. But the stock recovery wont let me flash an older firmware. I just wanted to be sure that I can restore everything to back to stock before I start messing with the phone.
[Sony Xperia Z Ultra] blueether:
no, I dont think the stock recovery will let you flash an older firmware :(
[Sony Xperia Z Ultra] cg87:
So does that mean that if I flash another rom like cyanogenmod, I cannot go back to stock?
[Sony Xperia Z Ultra] egzthunder1:
It won't. You need to be on custom recovery in order to downgrade. Stock will check for the build date in the updater script and if it is older than the current one, it will fail.

You want me to put the hammer down?
[Sony Xperia Z Ultra] cg87:
What custom recovery can I install for 4.4.4?
[Sony Xperia Z Ultra] egzthunder1:
Just download either one of Doomlord's kernels and hotboot them through flashtool. That will give you the custom recovery you seek.

You want me to put the hammer down?
[Sony Xperia Z Ultra] cg87:
Is it the Advanced Stock Kernel with Dual Recovery or the DooMKernel? But both require 4.4.2. What is hotboot and whats the difference between fastboot? I'm sorry if this is too many questions. But I just want to know if there is a way to go back to stock completely after I install a custom rom or recovery. Thanks.
[Sony Xperia Z Ultra] adfurgerson:
Hotboot is booting kernel in fastboot without flashing it. As for getting back to stock the only way I.can think of at this time would be to use the stock recovery zip DooMLorD posted for 4.4.2 and the update zip for 4.4.2 with the checks removed.
[Sony Xperia Z Ultra] egzthunder1:
As long as you can boot into recovery, it makes no difference. You are trying to flash a stock ROM, which means that stock kernel will also be flashed once the process finishes. You don't really care if your current ROM boots or not. All you need to worry about is being able to get into recovery.

You want me to put the hammer down?
[Sony Xperia Z Ultra] egzthunder1:
You can't simply "remove the checks"... The moment you change a single byte on that ROM, the signature and hash verifications will fail and the stock recovery will simply quit. Simply use one of doomlord's kernels (advanced kernel or the other one... The name currently escapes me), and flash from there.

You want me to put the hammer down?
[Sony Xperia Z Ultra] cg87:
Thanks for all the help. It worked perfectly. I just wished google would provide factory images for GPE devices just like the nexus devices.
[Sony Xperia Z Ultra] egzthunder1:
Anytime :)

The images do exist, the problem is that more often than not, you cannot use them to go back to an earlier version. I blame this on Sony rather than Google though as the issue lies within the bootloader software, which is Sony's code (which is why you see the camera not working on stock ROMs over 4.4.2 if the bootloader is unlocked)...

Either way, glad it worked for you.
[Sony Xperia Z Ultra] blueether:
More to this, if you are on a custom ROM CM/Carbon/Omni the recovery that is included in them will flash the full 4.4.2 OTA package (I believe)
[Sony Xperia Z Ultra] inbead:
I upgraded to 4.4.4 OTA and then tried to install one of the kernels. My phone will not boot now and hangs at the rom logo. I tried to install the stock rom from the front page and then it said that my phone's rom is newer. Is there a newer 4.4.4 OTA available so I can get my phone booted?
[Sony Xperia Z Ultra] blueether:
What kernel did you try?

how did you install it?

TA backed up?

BL unlocked?
[Sony Xperia Z Ultra] inbead:
I used the pac43 kernel

Used the flashtool to install

TA is backed up

BL is unlocked.
[Sony Xperia Z Ultra] blueether:
if that is the case you should have a custom recovery (push the vol. up key when the LED turns purple just as the boot starts)

This should work, may need signature verification turned off and you may have to edit the install script in the zip to remove the checks - there is a thread somewhere on what to edit

Download 4.4.2 Full OTA http://xdaforums.com/showthread.php?t=2574264

Rename it to something short like "ZU-GPe-442.zip"

??? Edit Script ???

Boot into recovery

Connect to PC

Select "install zip"

Select "sideload..."

On PC with adb installed do: "adb sideload <name_of_ota.zip>"

Flash 4.4.2 full OTA

Boot into 4.4.2 and OTA to 4.4.3 the 4.4.4
[Sony Xperia Z Ultra] inbead:
What is the meaning of "??? Edit Script???"?

Tried above, got error message " Can't install this package (Tue Dec 10 14:17:53 over newe build (Mon Jun 16 2014). Error in /tmp/update.zip. Status 7,. Installation aborted"

Edit: Tried CM11 and it worked right away, I have a booted phone now. Sticking with CM11 now!
[Sony Xperia Z Ultra] geeyoupee:
Anyone know if I can get back to stock android?

Currently on Carbon rom 4.4.4

Unlocked BL

Tried flashing the 4.4.2 OTA but it didn't work.
[Sony Xperia Z Ultra] egzthunder1:
You need to be on custom recovery and you need to make sure that the ROM file's updater script says that it is for the model that the recovery states it is.

You want me to put the hammer down?
[Sony Xperia Z Ultra] geeyoupee:
Yeah I have a custom recovery.

How does one change the rom file's updater script?

I was able to open the updater-script but not sure exactly what to change.
[Sony Xperia Z Ultra] egzthunder1:
It isn't as much as you needing to change it. I guess I should have started with a question... What kind of error are you seeing when you try to flash stock?

You want me to put the hammer down?
[Sony Xperia Z Ultra] geeyoupee:
I copied the error from a previous post. Not sure about the dates but the error is the same.

"Can't install this package (Tue Dec 10 14:17:53 CET 2013) over newer build (Mon May 12 11:10:10 CEST 2014)"
[Sony Xperia Z Ultra] blueether:
There is a thread in either Q&A or General that has the steps need to be done to get the Google 4.4.2 zip to flash from a custom recovery

Boils down to having to remove the top line or two that do the checks on the date, and maybe the line that checks the model. Don't extract the zip, use 7zip or the like to edit it, and I think all line endings have to be unix (shouldn't be a problem if you are just deleting lines)
[Sony Xperia Z Ultra] geeyoupee:
Awesome It was buried but I was able to find it.

Had to make one change through. Changed C6806 to togari_gpe.

I copied and posted below in case someone needs it.

From user prohan:

1. Download 4.4.2 OTA zip from http://xdaforums.com/show....php?t=2574264

2. Open the ZIP with 7zip (don't extract)

3. Edit META-INF\com\google\android
[Sony Xperia Z Ultra] draiko913:
So this is related to the main post but slightly different, but I wasn't sure if starting a new thread would be the best idea. I had rooted my GPE, done a backup of my TA, unlocked my bootloader, took another backup of my TA and then started playing with some of the GPE roms. I decided with Lollipop looming (and a few other issues with roms) to go back to stock. So I found this thread but had some issues with the bootloader not allowing the use an older version of the software. In the end, I realized that I had done a backup with TWRP right after I unlocked.

So I restored this backup and everything came up fine with stock 4.4.4 with root and an unlocked bootloader. So I decided to then restore my TA partition to lock my bootloader and then recovery my DRM keys. Everything seems to have gone ok, but now my phone won't boot. I can still access fastboot and stock recovery but am not sure how to get the system fully booting again. From some other (non-GPE) threads, it appears that after restoring your TA, it's expected that it won't boot and that you need to use a FTF file to get it running. I've see a lot of warning about not flashing Sony FTF files to a GPE because of the partitions being different so I've left it as it is for the moment. Can anyone offer advice on how to get the system booting again?
[Sony Xperia Z Ultra] blueether:
I have to go out, I'll reply latter if you are still having issues.

You may have to flash a 4.4.2 zip

Did you have a different kernel loaded when you made the twrp backup?

Flashing [MENTION=2784807]DooMLoRD[/MENTION]'s stock kernel may bring it back if that will run on a locked BL?
[Sony Xperia Z Ultra] draiko913:
Thanks for the quick reply! I was following the directions from the "[Guide] Your New GPe" thread. So I did the TA backup initially right after rooting, then unlocked the bootloader and did another TA backup so I have both. The original is the one I restored from before unlocking. After that, I loaded up [MENTION=2784807]DooMLoRD[/MENTION]'s advanced stock kernel and made my backup with TWRP. Then flashed several roms after that.

Although it re-locked my bootloader, I did save the instruction from Sony with my unlock key. Not sure if it can be used again (or if I should even try) but I have that if it helps also.
[Sony Xperia Z Ultra] blueether:
Resoring the TA from after the unlock should get you booting for now I think (or re-running the unlock instructions - but that will wipe the device) or the other way would be to flash a stock boot.img for 4.4.4
[Sony Xperia Z Ultra] draiko913:
Thanks for the help! I'm back up and running again. Tried flashing the stock boot.img from the 4.4.4 dump but I was getting "FAILED (remote: Command not allowed)". Not sure if that was because of the bootloader being locked at the time but I couldn't get that to work. So in the end, I re-ran the command to unlock the bootloader, then flashed DoomLord's advanced stock kernel and rebooted. I had already backed everything up previously, so wiping the phone wasn't a huge deal. Eventually, I'll attempt to get back fully to stock with my original TA restored, but this will work for now.

Quick update - So I was able to push the stock 4.4.4 boot.img by doing the following.

adb push boot-4.4.4.img /storage/sdcard0/Download
adb shell
su -
cd /storage/sdcard0/Download
dd if=boot-4.4.4.img of=/dev/block/platform/msm_sdcc.1/by-name/boot

After a reboot and using towel root, I then restored my original TA backup. Just to make sure everything was clean, I rebooted into recovery and did a full wipe. So I am back to stock, with a locked bootloader and TA restored. Thanks again for your guidance!
[Sony Xperia Z Ultra] cerebralplaya74:
I cannot get my computer to recognize my phone. I have followed the steps to the letter but I get the "not recognized as a command" error in command prompt. Help!!!!
[Sony Xperia Z Ultra] egzthunder1:
Press and hold power and press and release volume up while you are in the "no command" screen. The recovery menu should come up

Sent from mALL GLORY TO THE HYPNOTOAD!!
[Sony Xperia Z Ultra] cerebralplaya74:
Great. But I have the same error when I try to sideload. It says " cant load older version over new version". I cannot add GApps with the Stock Cyanogen recovery or via sideload. What can I do next to either go back to stock or load GApps via the stock recovery?
[Sony Xperia Z Ultra] egzthunder1:
You cannot add gapps via stock recovery. It simply won't happen. The recovery with the "No command" is actual stock, not cm.

Sent from mALL GLORY TO THE HYPNOTOAD!!
[Sony Xperia Z Ultra] Nillanic:
I'm having trouble trying to restore to stock from a CandyKat Rom on 4.4.4. How should I go about this? I'm assuming I can't just use the 4.4.2 OTA zip and flash it over the 4.4.4 ROM can I?

EDIT: Yep, tried, and I get an error "cant install over newer build" so where can I get the 4.4.4 OTA?
[Sony Xperia Z Ultra] blueether:
You have to flash a modified 4.4.2 zip, and yes this can be over top of any ROM.

You can either download the modified zip from the stickie [guide] above or edit the one you have in notepad++ (in unix mode) and remove the first two line from the updater script
[Sony Xperia Z Ultra] Nillanic:
Already done! I JUST remembered that I could do that. Already on Lollipop, but I had to flash the OTA's, for some reason going to System Update and checking there gave me no results. Oh well, everything works now
[Sony Xperia Z Ultra] matthewtech770:
Sony Xperia Z Ultra C6806

:confused:Hello DooMLoRD I have a Sony Xperia Z ultra C6806 for the USA can I use the to covert my phone into a full stock Google Play Edition Phone dont realy care for Sony stock software my phone is brand new 3 days ago running Kitkat out of the box.
[Sony Xperia Z Ultra] blueether:
No you cant convert a c6806 to a GPe, but you can run the GPe port ROMs
[Sony Xperia Z Ultra] couldnthinkaone:
Lollipop issues...

Good morning all. New to the Sony phone scene, coming from 1+1. Having a lot of issues with Lollipop on my GPe. I bought it used, with a broken screen.

I installed a new screen and 5.0 was downloaded ota. I figured 'what the heck...' And decided to try it. Downloaded the ota, factory reset, flashed, factory reset again, then setup. Having a lot of wifi issues. Tried reseting and setup phone again, but to no avail. I'm assuming I can flash the 4.4.2 in this thread, but is there anything I should do to prepare? I have NO backups of anything...I have the bootloader unlock instructions and key from sony, just curious if I should flash the old rom and update back to 4.4.4 thru ota's, or just wait another couple weeks for the 5.0.1/5.0.2 patch...

Good-n Confused,

Scott:confused:
[Sony Xperia Z Ultra] egzthunder1:
Back up your TA partition before you unlock the device. Once you unlock the bootloader, the auto focus on the camera will no longer work on android versions over 4.4.2.

As far as bugs, 5.0.2 supposedly fixed a bunch of things. So it might be worth waiting just for now. And just an FYI, you will not be able to downgrade without unlocking the bootloader anyways.

There are two rules in life for being successful:

1. Never reveal everything you know;

2.