yashsingh1/xdaforums huggingface dataset:
[Sony Xperia Z Ultra] adfurgerson:
Sorry if I wasn't clear I will try to pull 4.4.2 system img. and boot img. So you could fastboot them per DooMLoRD suggestion. I still am not clear if my nandroid would work on your phone or whether it would put my info at risk. But first thing I am going to try just to satisfy my own curiosity is update to 4.4.3 then flash a boot img. with flashtool, flash custom ROM then try to restore to 4.4.2 using stock recovery and adb. If that works it will be a route for everyone that needs it. I suck at communicating my thoughts into a post but will be willing to help make a guide if it works.
[Sony Xperia Z Ultra] blueether:
Easy enough to remove the version check in the 4.4.2 ota, and I'm sure that it would then install with only a error on patching the bootloader.

Maybe you should move this to the gpe section so doomlord might see it sooner

Sent from CarbonROM on my Z-Ultra
[Sony Xperia Z Ultra] ddslee:
Thanks. 4.4.2 system.img and boot,img files would be of great help to me. I really hope that will fix my device,

Thank you so much!!!!
[Sony Xperia Z Ultra] blueether:
[MENTION=3549760]adfurgerson[/MENTION], another option to help [MENTION=2860375]ddslee[/MENTION] might be to flash a Carbon version (maybe pre 4.4.3) then the the 4.4.2 OTA?
[Sony Xperia Z Ultra] adfurgerson:
[MENTION=3534362]blueether[/MENTION] I am at 4.4.2 GPe right now with advanced stock kernel, DooMLoRD posted stock kernel in a flashable zip that we can get boot img from I assume. Now I need to know how to pull the system img and we should be able to get some progress. My idea of trying to go to custom ROM to get back to stock is probably not the best option for someone only needing to downgrade to get camera back.
[Sony Xperia Z Ultra] blueether:
you will need adb to dump the /system

I think the commands will be something like this:

adb shell
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/sdcard1/system442.img <= check what the path to the external sd card is!
exit
adb pull /sdcard/1/system442.img

be carefull with dd it can very easily brick phones
[Sony Xperia Z Ultra] texaspledge:
That's what I did and it worked. I can't remember what file had the version check but I just opened it with winrar and made the change.
[Sony Xperia Z Ultra] blueether:
the file that needs editing is the updater-script at META-INF\com\google\android

dont extract the file just edit it with notepad++
[Sony Xperia Z Ultra] ddslee:
I am downloading the 4.4.2 OTA right now. I could you give me a more detailed instruction on how to edit the zip file and what needs to be changed into what?

Thanks!
[Sony Xperia Z Ultra] adfurgerson:
[MENTION=2860375]ddslee[/MENTION] this looks like your best option. [MENTION=3534362]blueether[/MENTION] after downgrading with the 4.4.2 with version check removed would it be possible to take future updates? The reason I ask is [MENTION=2784807]DooMLoRD[/MENTION] mentioned not to try update if you flashed just the boot and system imgs from 4.4.2.
[Sony Xperia Z Ultra] ddslee:
Could somebody please post an edited 4.4.2 OTA zip file and help out a desperate noob?

I don't know how and where to begin.

Thank you!!!
[Sony Xperia Z Ultra] adfurgerson:
I am going to see if I can figure it out but I am very much a noon also.
[Sony Xperia Z Ultra] ddslee:
THANK YOU! You have been by far the most helpful person I've met online in my entire life!!!
[Sony Xperia Z Ultra] adfurgerson:
Well don't mistake my willingness to help for knowledge. I have been able to open updater script with notepad++ so far but that is about all I have accomplished. If somebody else wants to give it a shot it would be appreciated.

Edit... I couldn't figure it out I am sorry!
[Sony Xperia Z Ultra] ddslee:
Could you explain in detail what needs to be done to disable the version check on the 4.4.2 OTA zip file?

Thank you so much!
[Sony Xperia Z Ultra] blueether:
It will be the first few line that start with assert(...)

Sent from CarbonROM on my Z-Ultra
[Sony Xperia Z Ultra] ddslee:
Thanks for your input but I have no computer science background. I can flash roms and stuff but have no clue how to proceed with this.

All I want to accompish here is to get the camera working so that I can give the phone to my wife for her birthday present.

I bought this phone in used condition thinking it was stock gpe but I got scammed by a seller who I am sure frequents this site because he had rooted, installed custom recovery, played with custom roms, went back to stock, updated to 4.4.3 and sold me a phone with a broken camera as "like new".

I know it is a lot to ask from a total stranger, but would you help this poor noob by uploading a edited 4.4.2 OTA that I can use to fix this phone please?
[Sony Xperia Z Ultra] adfurgerson:
I may have gotten it to work. Will test it tomorrow before posting link. I would rather mess my stuff up than make yours worse.
[Sony Xperia Z Ultra] ddslee:
You are my hero!

Please also let me know if I should relock the bootloader and remove the custom recovery.

Will side loading the OTA as instructed by DooMLoRD in his thread will bring everything back to stock?

Should I block future OTA updates until 4.4.4 with camera fix is released?

Thank you!!!
[Sony Xperia Z Ultra] adfurgerson:
Shouldn't need to relock or remove recovery.

Sideloading will take it back to 4.4.2 but bootloader will remain unlocked.

If you let it update the camera will be busted again.
[Sony Xperia Z Ultra] ddslee:
I will wait for your edited 4.4.2 OTA file. Thank you so much!

You know, I was just trying to save a $100 and gotten myself into this mess.

From now on, I will avoid buying any used phones on cragslist unless they are brand new in a sealed box.

I thought I was doing my due diligence checking everything, but I just assumed that everything would be good because the box and the phone was in such great shape.

Thank you!!! :good:
[Sony Xperia Z Ultra] ddslee:
Will the phone try to push 4.4.3 updates automatically after the downgrade?

Do I have to root again to block future updates?
[Sony Xperia Z Ultra] adfurgerson:
I am not sure, have updated and downgraded a bunch of times. It downloads on its own when connected to WiFi , then there is a notification in status bar that takes you to screen to select install. Don't know if it will eventually update by itself or not.
[Sony Xperia Z Ultra] adfurgerson:
I think I was able to make a zip but ran into a brick wall trying to test. Wasn't able to upgrade to 4.4.3, so tried to side load my zip I created and that failed also. Will fool with it again tomorrow, unless someone that knows what they are doing is kind enough to help you out. I'm sure it pretty simple if you know what you are doing.
[Sony Xperia Z Ultra] blueether:
That's why I haven't done it, cant test it :(

Did you extract the zip or just edit the file with something like 7zip/winrar and notepad++?

You have to get the zip options correct (store not compress, and maybe something else?) or it wont open in recovery

---------- Post added at 05:17 PM ---------- Previous post was at 04:43 PM ----------

I'm uploading a 4.4.2 zip that only has /system in it. none of the other partitions or the patch for the bootloader/recovery as you are already on the newest ones of these. I think this is the safest way to flash back to 4.4.2, but I think it may break OTAs if they are patch based like the 4.4.3 one was.
[Sony Xperia Z Ultra] ddslee:
(!less_than_int(1386681473, getprop("ro.build.date.utc"))) || abort("Can't install this package (Tue Dec 10 14:17:53 CET 2013) over newer build (" + getprop("ro.build.date") + ").");

getprop("ro.product.device") == "C6806" || abort("This package is for \"C6806\" devices; this is a \"" + getprop("ro.product.device") + "\".");

show_progress(0.500000, 0);

Is that the script that I have to edit?

Do I just delete that code in bold letters?
[Sony Xperia Z Ultra] blueether:
That is the line, but you will want to remove the recovery patch and probably the other partitions at the bottom, but I dont know about that last bit. I don't know enough about the inner workings of the xperias, much less the GPe version
[Sony Xperia Z Ultra] ddslee:
What if I just want to go bone stock (except unlocked bootloader)? I don't mind losing custom recoveries and root.

Do I still have to remove recovery patch and the other partitions?
[Sony Xperia Z Ultra] blueether:
The other poster said that they only remove the version check so may be worth a try :confused:

If you want to keep recovery then remove this line

package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");

if you don't care the that can stay. will replace the kernel and custom recoveries.
[Sony Xperia Z Ultra] ddslee:
So, just delete the code below using NotePad++ and then recompress using 7-Zip and then sideload the edited 4.4.2 OTA Zip file as per DooMLoRD's instructions?

(!less_than_int(1386681473, getprop("ro.build.date.utc"))) || abort("Can't install this package (Tue Dec 10 14:17:53 CET 2013) over newer build (" + getprop("ro.build.date") + ").");

It should leave my device bone stock 4.4.2 with just the unlocked bootloader, correct? (stock recovery, unrooted)

What do you think the chance of my device being bricked beyond repair? Pretty slim?
[Sony Xperia Z Ultra] blueether:
Yeah that line

You should beable to flash it from the custom recovery fine. The chances of a brick: low, but I'm not positive.
[Sony Xperia Z Ultra] ddslee:
I was going to flash it from the stock recovery using adb sideload.

http://xdaforums.com/showthread.php?t=2761698

That should work, right? The only thing different is the version check where I got stopped with the message "Can't install this package (Tue Dec 10 14:17:53 CET 2013) over newer build".
[Sony Xperia Z Ultra] blueether:
Should work, but custom recovery is quicker to get into ;)

Sorry about the slow upload, but I think my internets are broken ~62% uploaded
[Sony Xperia Z Ultra] ddslee:
I just tried it and got the following error:

E:failed to verify whole-file signature

E: signature verification failed

Installation aborted.

It looks like it passed the version check but what else do I have to do?
[Sony Xperia Z Ultra] blueether:
Was that from stock recovery?
[Sony Xperia Z Ultra] ddslee:
Yes.

Should I flash from clockworkmod and diable signature check? Will it still overwrite the custom recovery and make it bone stock?
[Sony Xperia Z Ultra] blueether:
yes it will overwrite the custom recovery
[Sony Xperia Z Ultra] ddslee:
Won't flashing OTA from CWM brick my phone???
[Sony Xperia Z Ultra] blueether:
It shouldn't. it is a standard flashable zip from what I can see, and from what is posted in the 4.4.2 in the GPe section.
[Sony Xperia Z Ultra] adfurgerson:
Well that is what I got too this morning. Followed that post you sent that showed extracting archive, dragging out updater and so on. Did that and deleted first line from updater.
[Sony Xperia Z Ultra] ddslee:
Flaah from CWM instead of sideload?
[Sony Xperia Z Ultra] adfurgerson:
No I sideloaded from adb I haven't decided whether I want to try with cwm. My phone is on 4.4.2 with camera working I am only doing this for learning experience.

Edit... I opened up updater script to see if anything stuck out as to "whole file" or whatever that error was we got. I didn't see anything but was wondering if maybe the symbol "(" that was at the start of line we deleted was needed? Without the quotations of course.
[Sony Xperia Z Ultra] ddslee:
There is a toggle to turn on and off the signature verification in CWM. I wonder if turning that off and flashing the zip from CWM will work? Is there a reason DooMLoRD used stock recovery and sideloaded it? Blueether thinks that flashing from CWM will work but I don't have the guts to try it out.
[Sony Xperia Z Ultra] adfurgerson:
Adding that symbol back didn't do anything. My guess is developers are so used to using adb they use it without thinking of anything else. I'm trying to work up the nerve to try it for science.

Edit.. Tried cwm with verification off and got the whole file error, then there was option at top of screen where you make selections (like install from SD and so on) that said something like "install untrusted sources" and I chickened out.
[Sony Xperia Z Ultra] ddslee:
Is it normal for an edited ota zip to show warning about installing from untrusted sources when flashing from CWM?
[Sony Xperia Z Ultra] ddslee:
Thanks for trying. I am surprised there are not too many people interested in this thread especially with all the reports of broken camera after 4.4.3.
[Sony Xperia Z Ultra] adfurgerson:
I tried this roundabout way and it didn't work. Sideloaded 4.4.3 then used flashtool to install recovery kernel, after that flashed Carbon custom rom, then stock kernel, entered stock recovery and tried to sideload full unedited 4.4.2 ota and it didn't do anything. Wouldn't install just went back to regular prompt where you would enter commands from. [MENTION=2719316]texaspledge[/MENTION] can you help us out as you are the only one that has been successful here.
[Sony Xperia Z Ultra] ddslee:
Is your camera now broken again as a result of this experiment???
[Sony Xperia Z Ultra] adfurgerson:
I restored my backup of 4.4.2 and camera is working. I didn't bother to check while on 4.4.3 but am certain it was broken as it was every other time I downgraded and updated.
[Sony Xperia Z Ultra] texaspledge:
OK let's see. I'm pretty sure I flashed as sideload from CWM with signatures disabled. has anyone tried that?
[Sony Xperia Z Ultra] adfurgerson:
I took it that far then after disabling signature got "whole file" error then there was the option to go ahead and flash "unknown or insecure file". Does that ring a bell? I didn't try it as I was afraid to find out what would happen.
[Sony Xperia Z Ultra] ddslee:
Did your phone flash flawlessly without any problem? Will it remove root and custom recovery and make the phone bone stock 4.4.2 except the unlocked bootloader???

[MENTION=3549760]adfurgerson[/MENTION] tried it and ran into a warning prompt.
[Sony Xperia Z Ultra] adfurgerson:
[MENTION=2860375]ddslee[/MENTION] I am trying it again. I tried install zip not sideload.
[Sony Xperia Z Ultra] ddslee:
Let me know if you were successful with the flash.
[Sony Xperia Z Ultra] adfurgerson:
I kept getting status 7 error, this is for 6806 not togari. I tried with DooMkernel for GPe and advanced stock v2. I have taken second line with getprop out of updater, if that doen't work I'm done foolin with it. Waiting for cwm to restore so I can give it one last shot.
[Sony Xperia Z Ultra] ddslee:
Is you device a gpe model purchased from google? I thought gpe versions are 6806 togari-gpe.

Are you using the ota zip file from DooMLoRD's thread over at the GPE specific forum?
[Sony Xperia Z Ultra] adfurgerson:
Yes I have GPe and using the full ota for 4.4.2, I don't know why those recoveries are giving error it should have been fixed in those versions.

edit.. with second line removed it gives status 4 aborted. Either I have no idea what I am doing, or somebody else used magic to install it.
[Sony Xperia Z Ultra] texaspledge:
so I did get this far and went in and edited the file to change the check from 6806 to togari. I literally went in with note++ and when I saw 6806 in first or second line I changed it to togari.

now this is assuming you guys are at same point as me. do at your own risk I'm worried it could brick you if there's something different going on.
[Sony Xperia Z Ultra] adfurgerson:
Were you keeping this a secret? You could have saved me a whole lot of trouble if you mentioned it before.
[Sony Xperia Z Ultra] ddslee:
I want to try this when I get home today.

Could you explain how to sideload the OTA rom with sig verification off using CWM recovery?

Thank you!
[Sony Xperia Z Ultra] ddslee:
You guys completely lost me here with 6806 and togari stuff.

Aren't the GPE editions purchased from google play c6806?

Then why would they fail the device check???
[Sony Xperia Z Ultra] adfurgerson:
Well we may have all the pieces of the puzzle now. I would have liked to have had it work for me but I have to leave it alone for now. CWM was taking 45 minutes to restore a backup which I did too many times today. I know there was a fix posted somewhere but I didn't get around to finding it. If you have any questions you think I can answer do a mention by putting @ symbol in front of my user name and I will get email notification.

You sideload through adb much the same way as DooMLoRD's return to stock guide, but from cwm instead of stock recovery. In cwm choose "install zip" then there will be option to "install from sideload". In adb type adb sideload then path and enter.

---------- Post added at 06:04 PM ---------- Previous post was at 05:58 PM ----------

It has to do with custom recovery I think. The original recovery would fail to flash custom ROM's because device check thought it was "honami" which is the Z1 I think. The doomkernel gpe v1 and advanced stock v2 will flash custom roms fine now so not sure why it fails the chek for update.
[Sony Xperia Z Ultra] ddslee:
1. Edit out (delete) the version check from the installer script

2. Change 6806 to togari from installer script

3. Flash the edited zip from CWM sideload mode (toggle signature check to off)

[MENTION=3534362]blueether[/MENTION]: Is that what you did to your ZU GPE to get it back to stock 4.4.2?
[Sony Xperia Z Ultra] adfurgerson:
Blueether doesn't have GPe but that sounds like what [MENTION=2719316]texaspledge[/MENTION] did to get it to flash.

Steps I took were download 4.4.2 ota zip, right click on it and select 7zip then open archive, navigate to updater and drag it out to desktop then delete one in archive, right click on updater on desktop and select edit with notepad++ , do the edits,then click the file button, save as updater, drag back into archive. I just ran out of time before I could try changing 6806 to togari.
[Sony Xperia Z Ultra] texaspledge:
yeah sorry to piecemeal this out guys. I did it late one night, half asleep and frustrated. I honestly thought it would brick but didn't care anymore at that point...
[Sony Xperia Z Ultra] adfurgerson:
It's all good we'll get it figured out eventually. I could update and downgrade in my sleep now. Gave me an excuse to goof off all day instead of doing chores.
[Sony Xperia Z Ultra] ddslee:
Changing C6806 to togari is necessary?

getprop("ro.product.device") == "C6806" || abort("This package is for \"C6806\" devices; this is a \"" + getprop("ro.product.device") + "\".");

How would I edit the above command? I would really appreciate a bit more detail so I can get this device fixed and ready for my wife's birthday.

Thanks!
[Sony Xperia Z Ultra] blueether:
gee you boys have been busy while I've been at work ;)

You could just remove that line as well.

I'm still a little worried about the patch and flashing the other partitions. but if texaspledge has done it I'll upload a zip for you, to use at your own risk.
[Sony Xperia Z Ultra] ddslee:
How should I flash the zip to bypass signature check?
[Sony Xperia Z Ultra] blueether:
This one should be unsigned if I did it right :confused: just use the switch in CWM...
[Sony Xperia Z Ultra] ddslee:
​

I will wait for your upload. I really appreciate your help.

Btw, do I just flash from SD or do sideload?
[Sony Xperia Z Ultra] blueether:
from sd should be fine if you don't like adb

only getting ~700kbps upload today, but still better than the ~90 - 100 kbps I had yesterday. I ended up killing the uploads yesterday as they said about 6-7 hours to upload at times :(

---------- Post added at 07:05 PM ---------- Previous post was at 06:31 PM ----------

try this http://xdaforums.com/devdb/project/dl/?id=7097&task=get

EDIT: this just has the checks removed and repacked. Still has the patch (that I think will fail - hopefully without error) and the 'other' partitions. It will flash the stock kernel overwriting the custom recovery
[Sony Xperia Z Ultra] ddslee:
[MENTION=3534362]blueether[/MENTION], Thanks for the upload. Just a couple of questions.

1. I have unzipped and viewed the updater script file and it looks like this is an UNEDITED version. Still has the version and device checks in them.

(!less_than_int(1386681473, getprop("ro.build.date.utc"))) || abort("Can't install this package (Tue Dec 10 14:17:53 CET 2013) over newer build (" + getprop("ro.build.date") + ").");

getprop("ro.product.device") == "C6806" || abort("This package is for \"C6806\" devices; this is a \"" + getprop("ro.product.device") + "\".");

2. What did you mean by "Still has the patch (that I think will fail" ? Do you mean patch to fix broken camera?

Thanks. I will wait for your response.
[Sony Xperia Z Ultra] ddslee:
It is so frustrating trying to piece together a working solution for going back to stock 4.4.2 on my Z Ultra Google Play Edition (not a converted Xperia Z Ultra). [MENTION=2719316]texaspledge[/MENTION], I would really appreciate it it you could comment a little more and help me out as it appears you are the only person who had successfully downgraded to 4.4.2 from 4.4.3 on ZU GPE without using a nandroid backup.

Please check if the following steps are correct.

1. Get a hold of 4.4.2 OTA file

2. Using 7-zip and notepad++, delete the first two lines of the code (version check and device check) from installer script

3. Copy the edited file onto an external sd card

4. Boot into CWM recovery and flash from SD with signature check disabled

5. My device gets magically transformed into 4.4.2 with stock firmware and stock recovery with a fully functioning camera

[MENTION=3534362]blueether[/MENTION], thanks for the upload but It looks like your updater script is not an edited one.

[MENTION=3549760]adfurgerson[/MENTION], do you think this will work?

[MENTION=2784807]DooMLoRD[/MENTION], could you please help out this noob please?
[Sony Xperia Z Ultra] adfurgerson:
I would delete first line and edit the "c6806" to "togari" both places in second line. When I deleted first line I got error for device, when I deleted both lines I got status 4 error. I only tried side loading from adb through cwm, flashing it from SD may work.
[Sony Xperia Z Ultra] blueether:
Would you believe I forgot to save :eek:

No the patch for the bootloader from 4.3(?) to 4.4.2

If you try and edit the updater script again make syre that it is save in unix format
[Sony Xperia Z Ultra] prohan:
I'm looking to go back to 4.4.2 also - I think the easiest thing would be if we could get someone's 4.4.2 system dump
[Sony Xperia Z Ultra] ddslee:
There is a 4.4.2 system dump in one of the threads. I just don't know what to do with it.

I wish somebody would upload a signed 4.4.2 OTA zip for ZU GPE with version check and device check edited.

I am surea lot of people would benefit from the file in case you have to send the device in for warranty repairs, for example.
[Sony Xperia Z Ultra] ddslee:
[MENTION=3534362]blueether[/MENTION], will this work?

1. Get a hold of 4.4.2 OTA file

2. Using 7-zip and notepad++, delete the first two lines of the code (version check and device check) from installer script

3. Copy the edited file onto an external sd card

4. Boot into CWM recovery and flash from SD with signature check disabled

5. My device gets magically transformed into 4.4.2 with stock firmware and stock recovery with a fully functioning camera
[Sony Xperia Z Ultra] prohan:
So I believe all you should have to do is:

1. Unzip the 4.4.2 dump

2. Boot your phone into the bootloader

3. Flash with fastboot:

fastboot flash system system.img​

That should work - I'm waiting to download the dump now from http://xdaforums.com/showthread.php?t=2570197 but it's taking a while.

Hopefully someone else can verify that won't totally mess your system.
[Sony Xperia Z Ultra] ddslee:
Any success???