yashsingh1/xdaforums huggingface dataset:
[Sony Xperia Z Ultra] [NUT]:
Tips and Tricks

Easy switching between locked and unlocked bootloader states!

NOTE: USE TWRP ONLY for this guide.

NOTE 2: You NEED to have XZDualRecovery 2.7.43 or higher to make this work.

Create a backup, including the Trim Area (TA!)

Unlock your bootloader

Restore backup without TA

Create a new backup of your UNLOCKED TA

Restore the previous TA backup to relock your phone.

Done :good:

Now you can switch between locked and unlocked bootloaders quick and painless: no more system wipes and you can basically do whatever you want :D

How to enable init.d support:

Open a filemanager app and navigate to the location where the XZDualRecovery folder is located and go in to it. Open XZDR.prop as a text file and set dr.initd.active to true.

NOTE: For this ROM it means the init.d script called 99SuperSUDaemon will kick in to action, so it's best to disable (by setting chmod 644) /system/etc/install-recovery.sh for the time being or to clear it's contents.

Done :)

Downgrading to a 4.2 ROM:

Download C6833_14.1.B.1.532_[NUT].ftf (Bittorrent: 760MB) and flash it using FlashTool. I've also added the FTF to the downloads page on the DevDB tab, this will allow straight downloads as well.

This FTF will allow you to downgrade to .532 without loss of your IMEI :good:
[Sony Xperia Z Ultra] [NUT]:
ROM Status: STABLE

Update 1:

C6802 ROM uploaded and seeding.

Update 2:

C6833 ROM uploaded and seeding.

Update 3:

C6806 ROM now uploading, FTF and torrent file links have been updated.

Update 4:

C6806 ROM uploaded and seeding.

Update 5:

A little bug has been discovered in the updater-script. To be able to flash the one you possibly have downloaded already, follow the instructions in this post to get it to work properly!

I will be updating the packages soon, in the mean time I have updated the OP guide to include this small fix.

Update 6:

Removed the files from the bit-torrent seeder. I'm currently uploading them again now. It will probably take about 30 minutes to finish that, will update again once completed and seeding again.

If you have already downloaded the package, make sure to read 'Update 5' with details on that how to fix yours.

Update 7:

Files have been replaced on the seeder box. There is no need to re-download them if you follow the guide pointed to by 'Update 5'.

Enjoy again!
[Sony Xperia Z Ultra] iBuzman:
Good work [MENTION=4904057][NUT][/MENTION] :thumbup:
[Sony Xperia Z Ultra] jpeps:
290 is it lte For C6833
[Sony Xperia Z Ultra] [NUT]:
If you have lte now, then that will be the same for this package :)
[Sony Xperia Z Ultra] LordManhattan:
Yet another ROM! Great work, NUT!
[Sony Xperia Z Ultra] [NUT]:
Anyone who has tested it please do let me know. If you are unable to post here because you just registered on xda, feel free to PM me your experience!
[Sony Xperia Z Ultra] techpal:
Anyone who can upload both the c6802 files anywhere else as cant download from given links.
[Sony Xperia Z Ultra] [NUT]:
Why?
[Sony Xperia Z Ultra] Djezpur:
Failed

Tried a few times to flash C6833_14.2.A.0.290.flashable.zip in TWRP, but each time it failed in the final step:

set_perm: some changes failed
E:Error in /sdcard/C6833_14.2.A.0.290.flashable.zip
(status 7)

So I decided to try the flashable zip from jackie099's thread, and that one was successful.
[Sony Xperia Z Ultra] [NUT]:
Ah frack, because of this report, I just rechecked my edify script, and even though it was correct typo wise, it is trying to set permissions on a file which no longer exists in the package.

I'll redo the packages soon. Packages have been updated. If you have one downloaded already, follow this little guide to fix yours!

In the mean time, open the flashable ZIP in winzip or winrar, extract META-INF/com/google/android/updater-script

and remove this line:

set_perm(0, 0, 0644, "/system/bin/ramdisk.stock.cpio.lzma");

Put the updater-script back inside the zip, updating the one there. It should make it flash OK from there on.

Thanks for the report!
[Sony Xperia Z Ultra] mac231us:
thanks for all your hard work! however, torrents do not download (understand dependent on other servers etc) hope someone can post these (C6833) Thanks
[Sony Xperia Z Ultra] [NUT]:
Then your ISP is blocking them... or you are getting blocked by mine :p

Try http://zbigz.com to download the torrent file, they turn it in to a straight download for you.
[Sony Xperia Z Ultra] Djezpur:
And thank you for providing a way to root .290 with a locked bootloader. :good:
[Sony Xperia Z Ultra] [NUT]:
So, you fixed and flashed it and it's confirmed working? :)

I need that confirmation to change the Post 3 status :)
[Sony Xperia Z Ultra] Djezpur:
Yep, all is good now!
[Sony Xperia Z Ultra] Justin^Tan:
sorry for being a noob, but how to flash the stripped ftf part?

im thinking of using flashtool but im stuck on waiting for flashmode, saying i should press back button which we dont have. any help?

im stuck here

thanks before
[Sony Xperia Z Ultra] [NUT]:
Set up flashtool to where it asks you to connect your phone:

Turn off your mobile, then hold Volume down while connecting your usb cable. It will then start flashing.

Holding volume up will put your device in to fastboot mode, FYI :)
[Sony Xperia Z Ultra] Justin^Tan:
ahh, volume down lol. great, that did the rick :)

thanks a lot NUT! appreciate your job hehe. great work

oh right, i still have the notification of OTA update to 290 after i flashing your ROM. is there any way to clear it?
[Sony Xperia Z Ultra] herogjan:
Thanks mate, will give it a go tommorow.
[Sony Xperia Z Ultra] nexus 4 noob:
Just flashed for c6606 and got root for. 290 but lost sony camera app, nfc and bluetooth. As for the update still loading after flash, just reset with the red button beside the simcard and after reboot it will be gone.
[Sony Xperia Z Ultra] stopa10:
Great work, NUT! Definitely the most effective way to upgrade to .290. Thanks ;)
[Sony Xperia Z Ultra] hassanmahmood:
Waiting until someone has confirmed it is working for their C6806 before I try - the previous post with lost bluetooth/nfc worries me.

Look forward to having a confirmed method on a locked bootloader!

Do you mind mentioning what you have included in the stripped FTF? There seems to be a debate about which elements ought to be included when flashing, and which should not.
[Sony Xperia Z Ultra] [NUT]:
Everything except system, userdata, apps_log and cache.

The theory is that you will need everything to successfully update as there is no easy way to see what changed more then just system...

Anyone with a C6806 who is willing to test if nfc and bluetooth will work before restoring the userdata partition can help me solve the problem if all of the C6806 have the same issue. Anyone who is able to test but is unable to post here can contact me by pm.
[Sony Xperia Z Ultra] [NUT]:
You could make a backup of your phone and try the ota update. Users of the C6943 report the same and have reported the ota didn't cause them to lose root or recovery.

It seems to be a small update to bring the customization to the latest version.
[Sony Xperia Z Ultra] pTeronaut:
It's working perfectly on my unbranded C6806, so far, Bluetooth appears to be working better than using the previous locked bootloader stock 290 root method as on that, my phone has randomly disconnected then reconnected with both my SW2 and my Sony factory installed car stereo. Audio hicoughs on my SBH52 appear to be fewer and far between.

NFC works as I paired both my Smartwatch 2 & SBH52 using the NFC method.

Coming from Jackie099's C6806 rooted 290, there was no need for me to use the FTF. I would also expect that the stripped FTF is not needed if coming from any 290 based ROM if flashed through a recovery.
[Sony Xperia Z Ultra] hassanmahmood:
Do you think the reason it is all working perfectly for you but the other guy with the C6806 had issues with his bluetooth/NFC is because you first used the other locked bootloader method and that method included something that this one does not?
[Sony Xperia Z Ultra] pTeronaut:
All that I know is this: :)

The C6806 flashable zip used in the other method could not have contained all of the files required for my phone to boot as I had to flash another 290 flashable zip beforehand in order to get my phone to fully boot. [NUT]'s zip worked when installed immediately after a system wipe.

With the earlier method, Bluetooth connected devices would occasionally lose connection (although I never noticed that whilst they were in use), I have never noticed anything wrong with NFC with either ROMs.

Tomorrow will be another test for this method as I will need BT for my car, but in the past two days, I have spent nearly two hours shoveling snow and experienced a few stutters from my SBH52, but that could be down to the app that I was listening to my music with. There were more stutters over a similar period of time before this ROM.

Or course, Your Mileage May Vary.
[Sony Xperia Z Ultra] [NUT]:
I have had a notification through PM, that for the C6806 the ftf didn't flash correct... Anyone else experienced that?
[Sony Xperia Z Ultra] hassanmahmood:
Post #22 seems to have had issues.
[Sony Xperia Z Ultra] nexus 4 noob:
I am post #22. After reflashing from start still got the same results. Tried it lots of times and still no solution... Will flashing the. 290 ftf with system fix my problem? i e.. Bluetooth, NFC and sony stock camera app? Confused...

---------- Post added at 01:45 AM ---------- Previous post was at 01:42 AM ----------

Edit: Whenever I downgrade to. 532 excluding baseband still won't recover IMEI...
[Sony Xperia Z Ultra] blueether:
Flash .290 ftf again (full wipe) and flash this again?

I havn't run this rom so the above is guesswork
[Sony Xperia Z Ultra] [NUT]:
You need to flash the FTF too, because it updates to the latest baseband and kernel, if you previously used any other FTF to update to 4.3, it's wise to still do that. It can fix your bluetooth and nfc issues.

If you go back to .532 it could be needed to flash the previous update to get down to .532 keeping the IMEI. For the Z1 I created a combined FTF which did the 2 tasks as one single flash operation.

I don't own a Z Ultra myself but you could try this when going down to .532:

Flash 14.1.B.2.257 except for the cache, system, userdata and appslog partitions;

Flash 14.1.B.1.532 excluding everything but the kernel, cache, system, userdata and appslog partitions;

This fixed the IMEI issue on the Z1.

If this works OK, i'll do a single FTF for the Z Ultra too and attach it to this topic as I have done for the Z1.
[Sony Xperia Z Ultra] blueether:
I'll test tonight if no one else has, but I think it is one of the suggestions I have put in the guide thread in general. If you make an ftf I'll include it in the guide as well. I could try and make an ftf but I'v only done it once and I'd feel better if an experienced dev built it ;)
[Sony Xperia Z Ultra] [NUT]:
If anyone can actually confirm this works then I will create the ftf for sure :)
[Sony Xperia Z Ultra] hassanmahmood:
With all the seemingly never-ending complications getting a carrier-locked Xperia Z Ultra C6806 to have full root without losing any functionality and without running the risk of a brick, I'm strongly considering forgoing root and just doing the OTA update to 4.3 I have available.

Obviously I'd love to have fully functioning root - but the trials and tribulations almost don't seem worth it anymore.

So frustrating because I've been trying to find a fool-proof method for weeks now.

I just don't understand what Sony were thinking.
[Sony Xperia Z Ultra] [NUT]:
Sony is thinking about protecting you and your data, the carrier is thinking about maximizing their profits on the phones.

It's not that weird they did it the way they did, simply because they are not responsible for keeping you rooted. Not all ota updates strip you from root though, it all depends on what gets updated. This one does as it is a platform update, so every binary gets updated.

I'm fairly sure you will end up with a good working phone, the issues you see floating around are resolvable. Many more people report it working fine compared to the people who report problems, while humans are generally more inclined to complain instead.

Just do a nandroid and try it. You won't be sorry you did. If anything goes wrong, I'll be here to help you resolve any remaining base issues.

Just do it :good:
[Sony Xperia Z Ultra] nexus 4 noob:
After flashing 14.1.B.2.257 except for the cache, userdataand appslog partitions; my phone went to bootloop at the sony logo. Then I flash the full. 257 then flash. 532 excluding baseband and got my imei back!!! From there on just root and restore backup to. 257.
[Sony Xperia Z Ultra] blueether:
Just doing a backup and charging the phone then will test...

I've been trying to push [MENTION=4418141]hassanmahmood[/MENTION] into installing DoggRom for a good week now ;)
[Sony Xperia Z Ultra] hassanmahmood:
lol - completely guilty as charged.

The hard bricks just have me scared ****less, lol.
[Sony Xperia Z Ultra] blueether:
Ok as expected a full install of C6802_14.1.B.1.526 loat imei (had to do a full wipe/install as wasn't on stock based rom)

Looks like I did things arse about face but nevermind...

flashed .257 still no imei

flashed .526 -...

bugger, I'll start again from a full .290...

Flash .290 all defaults

Flash .257 Unticked Cache, Data and Apslog. Excluded system;

Flash .526 Left Cache, Data and Apslog ticked. Excluded everything kernel and system

Worked like a charm

Why does flashing .290 take ~40% battery but 3 or 4 flashes of .526/.257 only used ~8%

Weirder still the battery was down at ~45% after flashing .290, I charged to 50% then flashed .257 and then .526 - rebooted and the battery was back at 86%

No wonder phones are getting bricked
[Sony Xperia Z Ultra] [NUT]:
As long as you don't mess with the content of the TA and have your phone fully charged a HARDbrick is a very unlikely outcome when flashing roms.

A softbrick is always recoverable :)
[Sony Xperia Z Ultra] [NUT]:
I'll do the ftf somewhere today, thanks for the confirmation :)
[Sony Xperia Z Ultra] [NUT]:
Oh yes... I know what I'm talking about, been there myself with my Z and Z1, they both are still alive and kicking :)
[Sony Xperia Z Ultra] [NUT]:
Uploading the 'Return to 4.2.2' FTF to the Downloads tab of the project bar right now, I'll update post #2 once it's online.

[MENTION=3534362]blueether[/MENTION] once it's online, can you flash it to confirm it can restore your phone to 14.1.B.1.532 without loss of IMEI?

-- EDIT --

FTF released, post #2 has the links.
[Sony Xperia Z Ultra] ronald_loulan:
21/048/2014 21:48:00 - INFO - <- This level is successfully initialized

21/048/2014 21:48:00 - INFO - Flashtool Version 0.9.13.0 built on 2013-06-04 22:50:00

21/048/2014 21:48:04 - INFO - Device disconnected

21/048/2014 21:48:09 - INFO - Selected C6802 / 14.2.A.0.290 / R4B

21/048/2014 21:48:09 - INFO - Preparing files for flashing

21/048/2014 21:48:09 - INFO - Please connect your device into flashmode.

21/048/2014 21:48:21 - INFO - Device connected in flash mode

21/048/2014 21:48:22 - INFO - Opening device for R/W

21/048/2014 21:48:22 - INFO - Reading device information

21/048/2014 21:48:22 - INFO - Unable to read from phone after having opened it.

21/048/2014 21:48:22 - INFO - trying to continue anyway

21/048/2014 21:48:22 - INFO - Start Flashing

21/048/2014 21:48:22 - INFO - Processing loader.sin

21/048/2014 21:48:22 - INFO - Checking header

21/048/2014 21:48:22 - INFO - Ending flash session

21/048/2014 21:48:22 - ERROR - Error in processHeader : 1 : Incorrect function.

21/048/2014 21:48:22 - ERROR - Error flashing. Aborted

21/048/2014 21:48:22 - INFO - Device connected in flash mode

Followed the step but get this error when wanted to flash the ftf... :confused:
[Sony Xperia Z Ultra] [NUT]:
Redownload the FTF and restart your PC. Make sure pc companion or SUS are not running.

Then try again.

If it fails again and you have a full .290 FTF for your phone already, you could also test using that by doing this:

- Un-check all wipe options,

- Exclude system by un-checking it.

- Flash it.

If you had to do it this way after re-downloading the FTF, let me know, I'll recreate and re-upload the FTF for the C6802 then.
[Sony Xperia Z Ultra] ronald_loulan:
The full .290 FTF u meant is the stock sony 4.3 ftf?

I tried restarting few times,reinstalling driver n flash tools few times too...

Btw the S1 with exclamation mark i updated it to SA0106...

Not sure isit correct or not...

I think i got what u mean...

I will try to flash the .290_stripped.ftf without any wipe n exclude system...
[Sony Xperia Z Ultra] [NUT]:
If you have access to another pc, try to use that to flash the ftf, it might just be your pc causing the problem...
[Sony Xperia Z Ultra] pTeronaut:
Having an issue with the downgrade ftf.

21/051/2014 18:51:24 - INFO - Selected C6833 / 14.1.B.1.532 / [NUT]
21/051/2014 18:51:24 - INFO - Preparing files for flashing
21/051/2014 18:51:51 - ERROR -
21/051/2014 18:51:51 - INFO - Cannot open bundle. Flash operation canceled

Using FlashTool 0.9.13.0

---------- Post added at 07:23 PM ---------- Previous post was at 06:53 PM ----------

This did work for me. :)
[Sony Xperia Z Ultra] ronald_loulan:
It worked after i redownload the ftf...

But after i flash the ftf i reboot it and it boot in successfully but i cant get in to TWRP after i power it off...

Now im getting this triangle with screwdriver and animated bar at bottom... :confused:

Update:

After waiting like 20mins it rebooted and im able to go in TWRP...

Restored Data...

All working for now...
[Sony Xperia Z Ultra] blueether:
Have a job interview shortly but will try latter tonight
[Sony Xperia Z Ultra] [NUT]:
Ah cr*p, thanks for warning... I think i know what's wrong, it just isn't easy debugging what you can't use/test yourself :rolleyes:

Well... It seems it doesn't work as it is now... As you can read just above :x
[Sony Xperia Z Ultra] hassanmahmood:
Steps 12, 13 and 14 of the OP are not needed right?

Only if I don't want to manually re-install my apps?
[Sony Xperia Z Ultra] [NUT]:
Correct, if you want to start fresh you can skip everything after the first .290 boot and simply finish the initial setup.
[Sony Xperia Z Ultra] hassanmahmood:
The other guide I'd read recommended first installing this recovery: http://xdaforums.com/showthread.php?t=2426739

And then flashing yours from that recovery.

Is there anything gained by doing that or should I just do as the OP says and flash it once from windows after rooting .532?
[Sony Xperia Z Ultra] [NUT]:
That's nolonger needed, this should do just fine.
[Sony Xperia Z Ultra] blueether:
Step 6 would replace the step of installing krabappel's recovery, the one in this thread is newer
[Sony Xperia Z Ultra] hassanmahmood:
Oh I just realized - in order to do step 5 - I would need to have a working recovery already installed.

Should I first install krabappel's recovery to do Step 5 - or should I switch Step 6 with Step 5?
[Sony Xperia Z Ultra] [NUT]:
:D

Get XZDualRecovery as stated in the OP, it is safer to use as it accounts for a lot of issues not yet resolved in the one by krabappel.
[Sony Xperia Z Ultra] hassanmahmood:
Should I use Flashtool.exe or Flashtool64.exe?

Running 64-bit Windows 7.
[Sony Xperia Z Ultra] [NUT]:
It really should not matter, but when running an x64 version of windows, it will almost never hurt to run the x64 application if you have the choice :)

I'm working on either linux x64 or Windows 7 x64 myself :)
[Sony Xperia Z Ultra] hassanmahmood:
[MENTION=4904057][NUT][/MENTION] or [MENTION=3534362]blueether[/MENTION]

After flashing from recovery and powering off - do I start the phone in flash mode to flash the FTF?

How do I do that? I think I read that I keep the Vol down button pressed as I'm plugging the USB cable into my USB port?
[Sony Xperia Z Ultra] [NUT]:
You read that correctly, it's probably the easiest way. :good:

If you have flashtool standing by at the 'press back button and connect cable' screen, it will start flashing right away :)
[Sony Xperia Z Ultra] hassanmahmood:
So in short, power the phone off, then keep the Volume down button pressed as I plug it in to my laptop - then start flashtool and follow the on-screen instructions?

I have just completed making CWM and TWRP nandroids and transferring to my PC - just charging the phone up to 100% before I start the flashing process.

Thanks so much for all your help so far, [MENTION=4904057][NUT][/MENTION] and [MENTION=3534362]blueether[/MENTION] - I really, really appreciate it.
[Sony Xperia Z Ultra] [NUT]:
Here to please :D

1: Fire up flashtool, set it up to wait at he screen where it asks you to power on your mobile.

2: While holding vol-down, connect the USB cable.

3: Done :good:
[Sony Xperia Z Ultra] hassanmahmood:
Awesome.

I'll keep you posted on my results.

Thanks again.

Provided everything goes through the way it should, I'll go through this thread and sprinkle thanks everywhere I can. ;)

Also - from what I read - even after completing this process, there may still be a notification to upgrade to 290 OTA on my phone?

You had said that even though it would be rooted and thus a slightly modified kernel, since the update would likely be very minor, this should not in any way soft-brick the phone or lose root, correct?
[Sony Xperia Z Ultra] [NUT]:
Yes, I've probably used a slightly outdated customization to create this package, so Sony is trying to update you to the next incarnation of that customization. Usually this process replaces only a few packages or files as it is no longer a platform update, loss of root is not to be expected.

The kernel however is 100% untouched, it's the ROM which has been modified slightly to provide recovery and root access.

Best is to create a backup of your phone after this update process completes. Once you have done that, you can attempt to install the OTA update. The chance the OTA update removes recovery is very slim, so even if you lose root (also unlikely) you can flash the latest SuperSU from recovery anyway :)

I'm working on the updated (and working) return to 4.2 FTF as we speak: I found what was missing in the current FTF.
[Sony Xperia Z Ultra] [NUT]:
Updated the 'Return to 4.2' FTF, it will now correctly flash.

For when you already downloaded it:

If you have already downloaded one before, open it in WinRar or WinZip and drag the content of the attached zip in to the FTF you have on disk, this will make that FTF work correctly and will make sure you don't have to download the full package again :good: :)
[Sony Xperia Z Ultra] hassanmahmood:
Once I've got rooted .290 running - if I decide I want to go back to rooted .532 - can I just restore the nandroid I just created - or do I have to go through the entire downgrade procedure?

And if so - how do I get back to Bell's firmware?
[Sony Xperia Z Ultra] hassanmahmood:
[MENTION=4904057][NUT][/MENTION] [MENTION=3534362]blueether[/MENTION] [MENTION=4663180]pTeronaut[/MENTION]

Do I check anything under wipe in flashtool?
[Sony Xperia Z Ultra] blueether:
I'v forgotten where you are up to...

if it is step 9 in [NUT]'s guide the I guess there are no .sin that wipe data/cache/apps_log as none show up here

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

Works a treat - tested on a C6802

Updated the Downgrade guide http://xdaforums.com/showthread.php?t=2593918 to include this.
[Sony Xperia Z Ultra] [NUT]:
yes and no, if the ftf for the bell firmware has been done correctly it should be all you need to get back to your original firmware.

Then from there on you can restore your nandroid backup.

Remember that your phone also gets a new baseband and modem firmware during this update process, these will never be backed up by recovery, they can be read, but not flashed from recovery.

That's exactly the reason for the 2 stage update process in this thread.

Thanks :)
[Sony Xperia Z Ultra] techpal:
Awesome work. I have c6802 .290 unrooted so after downgrading to .532 by your ftf, then root and later upgrading to .290(via c6802 ftf) will show c6802?
[Sony Xperia Z Ultra] [NUT]:
Yes it will :good:
[Sony Xperia Z Ultra] techpal:
Thanks:) Will follow your steps to root .290.