yashsingh1/xdaforums huggingface dataset:
[Sony Xperia Z Ultra] ShALLaX:
Please note that I have since written a much more detailed procedure for this. I will not remove this post as it gives a good overview of what is required to obtain root access to your device. However, if you want to run through the process, I would recommend starting with this post: http://xdaforums.com/showpost.php?p=44612882&postcount=15

So, I can share the steps, but I can't really share the binaries since they belong to Sony. When I get some more time, I'll make this a bit more detailed.

1) Unlock bootloader. This is required as this method uses flashboot, not flash mode.

2) Obtain the HK 471 version of the stock ROM (ftf) and flash it. It's uploaded on these forums. (You'll lose ALL OF YOUR DATA!)

3) Extract system.sin

4) Explode system.sin to system.elf.

5) Extend system.elf to the correct size. (dd if=/dev/zero of=/tmp/moreZeroes bs=4096 count=5118; cat /tmp/system.elf /tmp/moreZeroes > /tmp/system.fixed)

6) Mount it. (mount -o loop /tmp/system.fixed -t ext4 /mnt/rootfs)

7) Replace su (obtain the hacked version, copy it to /mnt/rootfs/xbin/su; chmod 06755 /mnt/rootfs/xbin/su)

8) Repackage the file system (make_ext4fs -s -l 2048M -a system /tmp/system.img /mnt/rootfs)

9) Boot to "FastBoot" mode.

10) fastboot flash system /tmp/system.img

11) Boot to "Flash" mode.

12) Reflash the HK 471 ROM, but exclude ALL .sin files. Only choose to clear DATA, CACHE and APPSLOG. (You'll lose ALL OF YOUR DATA... AGAIN!)

13) Boot.

14) Log into Google account.

15) Install SuperSU.

16) Install Root Checker.

17) Enjoy.
[Sony Xperia Z Ultra] kkkok8051:
Thanks dude! But I don't know how to extend, extract,explore,exam,excuse...........!!!!!!!! Sorry:*)

Just upload the ftf file you make, so easy. can you do that for your fans? Thank you so much:cool:
[Sony Xperia Z Ultra] ShALLaX:
As I said, I can't release these files because they do not belong to me. They are the property of Sony and I cannot redistribute them.

If someone else wants to take on this risk, that will be their decision. Maybe someone like DooMLoRD can write a shiny script to do all of this automatically. However, you'll always need to source an "FTF" from Sony using this method.
[Sony Xperia Z Ultra] Drakosha:
ShALLaX, can this method be applied without unlocking bootloader? Flashtool generally can flash everything but the kernel on locked phones, but here it seems there's no need for kernel flashing at all...
[Sony Xperia Z Ultra] ShALLaX:
It's a fair question and something I was wondering. "I don't know," is the answer. I'm very, very green/ new when it comes to Android (I've only owned an Android device for about a week and have never used one previously). If it is possible without unlocking the boot loader, then that's fantastic news (and makes me wish that I hadn't unlocked mine). Unfortunately, I have no way of trying this myself anymore. If anyone wants to give it a go, they're more than welcome...

When the boot loader is unlocked, I would have expected Sony to put in some sort of verification of what's being flashed. This way, they could reject unofficial system.img flashes. Without this, it's pretty much impossible to secure the device from being rooted; once you have unadulterated access to the file system, you can do anything you like.

Update: Since this uses flashboot, unlocking is required. If this was restricted purely to flash mode, then an unlock would not be necessary.
[Sony Xperia Z Ultra] kkkok8051:
Pls, can you share more details at colum 4,5,6,7,8 how to explore ,expand n mount, and use what tools to do that? Flashtool,7zp,cmd I got and what tool need prepare? Thx
[Sony Xperia Z Ultra] Rado_vr6:
It has finally been accomplished. Pretty freaking sweet!
[Sony Xperia Z Ultra] Drakosha:
Well, almost every Samsung device gets rooted exactly the same way :) I'll wait for someone to put the modified ftf file in the Internet and then I'll try to flash it not with fastboot, but with Flashtool using flashmode. As far as I remember, only kernel.sin does not flash this way on locked phones.
[Sony Xperia Z Ultra] ShALLaX:
Yes, I'm just leaving the office now. As I said in my original post, I'll put up more detailed instructions a bit later. Certainly today. Thanks for your patience.
[Sony Xperia Z Ultra] kkkok8051:
thanks your are the man.:good:
[Sony Xperia Z Ultra] corrado85:
I'll wait for the automatic root :P
[Sony Xperia Z Ultra] E90 Commie:
Thanks for this accomplishment!

Pandora's Box is now open. I am eager to root immediately but I think I will wait a little bit and see some further development of the methods.

I guess the ADB commands described is to be performed through FastBoot.
[Sony Xperia Z Ultra] brosenz:
This is fantastic, thanks a lot
[Sony Xperia Z Ultra] LordManhattan:
You should make a new thread in the "Xperia Z Ultra Android Development" section, and make a mod sticky it so people can easily find it :)
[Sony Xperia Z Ultra] ShALLaX:
This isn't really "Android Development," though. It's not even Linux development. It's just hacking/ manipulation at best.
[Sony Xperia Z Ultra] yeeson:
Please release it, we really need root！

---------- Post added at 03:24 PM ---------- Previous post was at 03:21 PM ----------

Very complicated!
[Sony Xperia Z Ultra] LordManhattan:
Well, if you go to a random device section here at XDA, you'll quickly realize that the rooting tutorials are in that section. Original Android Development is only for original development (Cyanogenmod, AOKP, kernels etc.), while the regular Android Development is for guides, kanged ROM's (Sony ROM's, kanged CM/AOKP, kernels etc.), so if you make an (somewhat) easy to follow tutorial, it should go there :) If you're in doubt, just PM a mod :p
[Sony Xperia Z Ultra] avsquare:
np ;)
[Sony Xperia Z Ultra] Johnnynho:
Rooted! Thanks a lot to all.

Mine is already .475 and need to do only steps 38 to 42.

Cheers!
[Sony Xperia Z Ultra] dralex88:
NO BRAVIA = no X-Reality? Maybe we should pledge for root without unlock bootloader from developers with some $$ as reward... Haha...
[Sony Xperia Z Ultra] yeeson:
According to http://xdaforums.com/showthread.php?t=2261606 can enter Recovery
[Sony Xperia Z Ultra] ShALLaX:
I don't see anything about the Xperia Z Ultra here.
[Sony Xperia Z Ultra] yeeson:
After the test，can use！
[Sony Xperia Z Ultra] danilos2k:
What do you mean? That you test it and is working ?

Inviato dal mio HTC One usando Tapatalk 4
[Sony Xperia Z Ultra] ShALLaX:
I wish people would stop spreading misinformation like this. I'm fairly confident that this won't work. There is no mention of the Z Ultra here, and if someone had figured out how to do this, don't you think there would be a post dedicated to it?
[Sony Xperia Z Ultra] yeeson:
Tested
[Sony Xperia Z Ultra] GOF007:
Look nice but it need root to install and we can not root our Z Ultra without unlocking the bootloader now. -*-
[Sony Xperia Z Ultra] danilos2k:
Think and than write

Inviato dal mio HTC One usando Tapatalk 4
[Sony Xperia Z Ultra] kkkok8051:
Pictures:) strooooooong proof. My XZU Done.
[Sony Xperia Z Ultra] epulrevo:
Why didnt someone contact doomlord to help root for locked bootloader. I will if nobody contact him yet once i get my XZU
[Sony Xperia Z Ultra] GOF007:
Someone already did.

Current exploit Doomlord use to root many Xperia models is patched in Ultra firmware.
[Sony Xperia Z Ultra] brosenz:
What download did you use?, I did not see one for the Xperia Z Ultra, thanks
[Sony Xperia Z Ultra] yeeson:
http://xdaforums.com/showthread.php?t=2261606

Is Xperia Z, but in Xperia Z Ultra can also be used
[Sony Xperia Z Ultra] brosenz:
Can you choose between CWM and TWRP at boot ?

What are the pre-requisites for the Xperia Z Ultra:

- Unlock Bootloader?

- Root?

- Something else?
[Sony Xperia Z Ultra] yeeson:
CWM，but have bug，Over time will restart

- Unlock Bootloader?--- yes

- Root?--- yes

- Something else?--- adb
[Sony Xperia Z Ultra] dralex88:
What use? This can't root phone... Need root only install this = what use?
[Sony Xperia Z Ultra] E90 Commie:
Getting CWM/TWRP on the Ultra is an important step forward and I look forward to custom ROMs and kernels. The bootloader unlock is necessary for AOSP/AOKP/CM ROMs and custom kernels (undervolt, overclock) on stock ROMs and to me, they are important.;)

I unlocked the bootloader on the Z quickly too in order to be able to flash DoomLord's kernel in order to lower the operating temperature with undervolting.

When we have working custom recoveries onboard, I am pretty sure that CM10.2 will be coming.

For those that are "afraid" of loosing their Sony apps under CM and other ROMs: don't worry - many of them works great (launcher, Album, Walkman, Socialife, TrackID, Movies etc) under non-stock based ROMs. I have a "Sony flavored" PAC on my Z with all those apps and it works great - it is a superb combination of those apps with the rich feature set of the ROM itself including tablet mode etc.

Edit: I look forward to the first step: a deodexed ROM for the Ultra so the easy modding can begin.
[Sony Xperia Z Ultra] GOF007:
[MENTION=1547420]E90 Commie[/MENTION]

Will Bravia Engine and X-Reality work?
[Sony Xperia Z Ultra] yeeson:
DooMLoRD Temporary also cannot solve！
[Sony Xperia Z Ultra] maquan:
Hi, I already in 475, follow instruction to unlock my bootloader and flash the system.img file. But after step 42, my phone is hang on the SONY logo and not continues to boot. How can I do?

I try to follow from step 22, but the flashtool keep saying like this:

20/048/2013 22:48:36 - ERROR - Error in processHeader : 1 : Incorrect function.

20/048/2013 22:48:36 - ERROR - Error flashing. Aborted

Please help :(
[Sony Xperia Z Ultra] E90 Commie:
BE2 is deactivated with BL unlock but to me, it doesn't matter at all. The first thing is that I use QuickPic as my main gallery (I like the ability to hide folders etc and the fact that it shows the pictures the way I have sorted them rather than showing everything like Album) and I use BSPlayer et al for movies. So BE/X-Reality isn't something I encounter in daily use.;)

The other thing is that I think the Ultra has such a fantastic display already that I don't see the need for further processing of the pictures. The color reproduction, black levels etc is extremely good already.

There are ports of Bravia Engine in circulation and I am pretty sure that X-Reality will be ported as well and therefore run even on devices with unlocked bootloaders etc.

To me, a ROM like PAC is much more important than those two image enhancers that I seldom or never use.

I would even say that if a screen needs "image enhancers" in order to perform better, I think something is missing. I think the Ultra screen is superb on its own, without any "image enhancing".
[Sony Xperia Z Ultra] Drakosha:
E90 Commie, as far as we know, X-Reality is hardware function, made available by enormously powerful CPU of ZU. It should work a lot like hardware upscalers\image processors of quality A\V receivers. I seriously doubt that we'll ever see this ported to any device without Snapdragon 800.
[Sony Xperia Z Ultra] GOF007:
[MENTION=1547420]E90 Commie[/MENTION]

Thank you for clarification. I'm running PAC ROM on my 7.7 too and also looking for it on Ultra.

What I understand after reading your reply is X-Reality only works on some Sony specific apps not the whole OS, it that correct?
[Sony Xperia Z Ultra] E90 Commie:
If I understand everything correctly, X-Reality is a successor to the Bravia Engine and if the older sibling is to be followed, it will only show up in the Sony apps like Album and Movies. Third party apps like QuickPic, BSPlayer et al can't use it.

Bravia Engine requires DRM keys to work for photos but should work for videos even without those, i.e. bootloader unlock. How the X-Reality will work in that regard is something I don't really know yet - i.e. if it require those DRM keys or not.

The fact that those image enhancers are restricted to Sony Album and Movies makes them of non-importance to me but since it seems like they work in Movies without DRM keys (Bravia Engine that is), I consider the "trade-off" that is being made with rooting and unlocking the bootloader is worth it.

PAC ROM is certainly where I am heading, my plan for now is to keep using it on the Xperia Z until it is available for the Ultra and works well - after that, I am going to reflash the Z with a stock based ROM like Monxdified.

The key enabler here is to get custom recoveries on the Ultra - when that step has been accomplished, the ROM development will start and the first ones out will be deodexed stock ROMs followed by optimized stock based ROMs and shortly after that CM support and PAC.

Most of those things will happen when the C6833 hits the stores and more developers get the device.
[Sony Xperia Z Ultra] GOF007:
It would be nice if we can backup the DRM keys before unlocking the bootloader just in case it may be needed later ^.^
[Sony Xperia Z Ultra] Mucho79:
I hope there will be a way to lock the bootloader again.
[Sony Xperia Z Ultra] beenoliu:
Is it said DooMLoRD have found out the new root exploit already, but can't build the booting kernel now?
[Sony Xperia Z Ultra] yeeson:
Yes, to wait for the official Sony！

Look at my screenshot！
[Sony Xperia Z Ultra] dralex88:
Hope it won't be something like Iphone jailbreak... Where DoomLord have to keep find kernel exploit while Sony keep patching it... LoL...
[Sony Xperia Z Ultra] beenoliu:
Wait a minute, build booting kernel is it for the root of unlock bootloader device?

Or use on root the locked bootloader device?
[Sony Xperia Z Ultra] yeeson:
Flash boot，Have to unlock
[Sony Xperia Z Ultra] maquan:
I followed correctly as the instruction, unlock bootloader, flash the 475 ftf, fastboot system.img, flash again the stock 475 with all exception and wipe ticked. But still got the BOOTLOOP :(

I try all on win8, win7 and even Mac OS. Win8 can not process but win7 and Mac OS running all process just fine. But still BOOTLOOP after all

Anyone could support me please? I want to root badly :(
[Sony Xperia Z Ultra] GOF007:
If so, whats the point? We can root on unlocked bootloader already.

The exploit would need to root the "locked" bootloader.
[Sony Xperia Z Ultra] sev7en:
I to everyone,

I've the same issue for starting the flashing procedure: it won't start. I can update the device by using Bridge but following the usual procedure (just pushing the vol- then plugging the cable), I see the notification LED cycling for a sec o least nothing happens... what's that?

My bootloader is unlocked.

Cheers
[Sony Xperia Z Ultra] yeeson:
DoomLord Kernel+Recovery，is a need to unlock
[Sony Xperia Z Ultra] beenoliu:
He wiil not make a rooting toolkit for locked bootloader?

At last, we must unlock bootloader to get root?
[Sony Xperia Z Ultra] yeeson:
yes，In the late，There should be Not unlocked root
[Sony Xperia Z Ultra] beenoliu:
You said it will have a root method for C6802 which is locked bootloader?
[Sony Xperia Z Ultra] yeeson:
Possible, we need to wait, [MENTION=2784807]DooMLoRD[/MENTION] there is no way is now！
[Sony Xperia Z Ultra] beenoliu:
O......we need patient to wait, hope can root this device before the end of September. :crying:
[Sony Xperia Z Ultra] ShALLaX:
Guys, it's simple. Unless an exploit is found in the stock, official ROM (any version should be fine, providing that downgrading is possible), then rooting without a bootloader unlock will not be possible.
[Sony Xperia Z Ultra] yeeson:
Europe was listed to September
[Sony Xperia Z Ultra] :
And waiting for it... looks like a full year... damn days last longer! :p
[Sony Xperia Z Ultra] avetny:
.....be honest I'm shocked that we are still talking here in general selection. Kind of disappointed that we still don't have a easy root method with recovery., no stock deodex roms. The phone is already floating on the stores shelves in China and India :mad:

I bought at the same time with Z Ultra other phone htc butterfly s which is launched at the same time with Ultra (same regions) and the phone already overcrowded with roms...etc. I guess my favorite Asians people don't like this huge phone :P
[Sony Xperia Z Ultra] yeeson:
The Chinese are very like huge screen mobile phone！
[Sony Xperia Z Ultra] samseud:
I absolutely agree with you...I came from Samsung Note...and its sad we dont have even basic root...forget custom ROM. Sony is not helping by following the iPhone path of fixing all the possible exploits allwing the device to be rooted.

I guess we will have to wait and hope that our European friends like this phone and we get lots of Customised stuff...

This phone has excellent hardware just needs software tweaks!!

Hope and pray we get some good developers working on this device.
[Sony Xperia Z Ultra] GOF007:
That is not correct, Sony is not following iPhone path. Patching exploit is normal practice. You can root the device after unlocking the bootloader.

And Sony allow you to unlock your bootloader.
[Sony Xperia Z Ultra] baileyjr:
Well assuming you don't buy the phone through a carrier. Majority of the carrier phones are bootloader unlockable. Thats a pretty bitter pill to swallow for someone who just wants root access.
[Sony Xperia Z Ultra] ShALLaX:
I don't really follow the logic. Sony seems to be one of the few manufacturers willing to accept that the hardware is yours and for you to do with as you wish - the caveat being that you will be unsupported in your endeavours.

Don't blame the carriers for ruining this.

It is rightly stated that patches for exploits are the norm as these could be used maliciously to run up phone bills or install key loggers, etc.

On a personal level, I'm rather offended at having given a "basic root" solution only for it to be deemed unacceptable.
[Sony Xperia Z Ultra] baileyjr:
What I'm gutted about is the the fact that you have to unlock the bootloader, thereby voiding your warranty just to get root access.

Also the fact that the carrier models are unlockable means you have to buy the sim free device just to get basic root access.

Over here in the UK the samsung devices on the same carriers are unlocked already or unlockable, so I don't really know who is at fault in this case, sony or the carriers?
[Sony Xperia Z Ultra] ShALLaX:
Can we clarify what you mean by "unlockable"? To me, this means that the device can be unlocked - it is "able" to be "unlocked".

Secondly, devices released by Sony can be unlocked. If this is changed it is due to the carrier, not Sony.

I think it's a fair compromise to forfeit your warranty for purposes of modification. By modifying your device, you can make it do things that it wasn't designed to do, which could be damaging to it. Sony needs to protect itself against idiots who change things which could brick the device through no fault of the manufacturer.
[Sony Xperia Z Ultra] baileyjr:
Yes by unlockable I mean the bootloader is locked and cannot be unlocked.

The sim lock can be unlocked on all devices by the carrier. But here in the UK the carrier versions of the sony phones are bootloader unlockable. However other manufacturers phones on the same carrier are unlockable eg Samsung devices.

So I'm not 100% the carriers have requested that they be unlockable, although that is a possibility. Either way it sucks because the only way to get a rootable device is to buy the device sim free, ie not as part of a carrier subsidised package.

My contract is up next month but I will have to get a sim only plan and buy the phone outright because I want to root it.
[Sony Xperia Z Ultra] E90 Commie:
I don't get the complaining about the root solution. I have it rooted and it works great. In order to experience full root and recovery, including custom kernels - the bootloader has to be unlocked so I just don't see any problems with the present implementation.

Shallax made a great job with providing the guide and I am forever grateful to him for that since it made my Ultra "proper" and allowed me to put it into full use, something I couldn't as long as it was unrooted.;)

On the Xperia Z, the evidence clearly shows that locked bootloader is a hassle even if there are recoveries for it. In order to take full control over the device and flash DoomKernel or AOSP ROMs etc, the BL has to be unlocked.

I am waiting for PAC to arrive on the Ultra and it certainly requires unlocked BL.

Regarding carrier branded devices: Just don't buy them. Carriers just mess with the product like locking bootloaders, installing bloatware etc. Avoid. Buy it from an independent retailer instead - there are retailers that can do contracts even on unlocked devices (Katshing in Sweden is one example). It is the branded versions that are to be avoided.

A basic requirement for the Xperia line is that the bootloader can be unlocked. If it says YES on that, then it is fine to buy - if it says NO, buy somewhere else. Complaining that root etc requires unlocked BL after buying a version with locked, unlockable bootloader is just a bad idea.

The present root implementation works great, the next step is to get custom recovery and then the fun can begin with ROM development and flashing.

To me, a fastboot package with CWM/TWRP is perfectly fine.

---------- Post added at 11:49 AM ---------- Previous post was at 11:42 AM ----------

The carriers take the decision to remove their devices from the bootloader unlock service. So blame the carrier if the bootloader can't be unlocked.

Buying the SIM free device? That is the way to go, simply put. Getting a carrier branded device is always a bad idea and there should be retailers in the UK that can sell an unlocked phone on contract like there are in Sweden (those countries are pretty similar in this regard). Usually, a retailer like The Phone House can sell you a SIM free phone, completely unlocked and put it on a contract extension. That is what I can do in Sweden. Even 3 that usually sells "3 Mobiles" with locked bootloaders etc can be bypassed at The Phone House, i.e. I can buy a SIM free phone with contract extension, for contract price from them - on 3.

Or do you mean that there's no independent retailers in the UK so the option are to buy branded devices on contract or SIM free off contract like in the US? That is not my experience from UK though.

In the US, that is the rule: on contract always requires a terrible device (branded, locked bootloader, bloatware) and unlocked devices must be purchased off contract from an independent store that carries import models. US models are always branded with some exceptions (Nexus and some Xperia's).
[Sony Xperia Z Ultra] ShALLaX:
Again, we are at odds when it comes to correct use of English; please read and comprehend the language in my post.

I guarantee you that Sony ships devices that may be unlocked - carrier customisation then changes this so that devices may not be unlocked. The only reason that Sony would be complicit with this request would be to allow sales to a carrier. Maybe you can blame Sony for not digging their heels in and not mandating that bootloaders are able to be unlocked (unlockable), but welcome to the world of business. Without complying with a carrier's requests, they wouldn't sell handsets so easily.
[Sony Xperia Z Ultra] baileyjr:
I always root, install custom roms, kernels etc so the bootloader unlock requirement is not an issue. Big thanks to Shallax on that one buy the way :good:

I'm just a little disappointed that I will have to fork out upfront for the device when I haven't had to do that with previous devices.

Of course I will get it back (and probably more) over the length of the contract anyway with the lower sim only payments.

I do feel disappointed for people who buy the device from a carrier and then find out they can't root it. Not everyone can afford to pay upfront for the device.

Im on 3 and every other device I have bought of them has been unlockable, but this will not be the case with the ultra, nor was it with the normal xperia Z.

I will check out the carphone warehouse option, but personally I'm resigned to buying it off contract, unless I can specifically check in the carphone warehouse shop that the bootloader is unlockable, I'm not taking any chances with not having root access :)