yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Compact General] fedecasaux:
Problem patching kernel

Hi! when I arrived to the step 9 it appears this in the CMD panel. It's normal? cose i made all it says in the guide. Like putting the celphone in fastboot mode.

Microsoft Windows [Versión 10.0.15063]

(c) 2017 Microsoft Corporation. Todos los derechos reservados.

E:\Sony Xperia Z5 Compact\Root Sony\Patch the Kernel\rootkernel_v5.23_Windows_Linux>fastboot flash boot boot.img

< waiting for device >

What have I do to resolve this problem

Thanks in advance

Regards
[Xperia Z5 Compact General] mhaha:
I think you meant Step 8. Are you positive the phone is in fastboot mode? You can tell by looking at the LED indicator, it should be blue.
[Xperia Z5 Compact General] fedecasaux:
Yes sorry I meant Step 8. The led indicator is blue. I think it's a problem with the configuration of the pc or something i have to install in the computer but i don´t know what. I have windows 10 in my computer
[Xperia Z5 Compact General] mhaha:
Sorry mate, I never used Win10.

The only thing I can suggest is to close all applications like Flashtool if you still have them open, there's the possibility that they're conflicting somehow, maybe reboot your computer and open only the command prompt to make sure it's the only thing running.
[Xperia Z5 Compact General] oicirbaf:
fwdwcasaux,

I completed this guide today but I had to switch laptops. I have a Dell win10 (fairly new laptop) which won't recognise the device on fastboot mode. Then I try an old wind10 laptop with exactly the same drivers/apps installed and it worked at the first try.

I hope you find another pc to do it!
[Xperia Z5 Compact General] Mael_RadecFR:
Hi, I don't manage to unlock the bootloader. I follow the official way with Android SDK but I don't understand the step when I need to power off the phone, moreover I can't manage to install the driver (in Windows settings), I get an error why I try to update it.

Can somebody help me please?

EDIT : everything is okay now, but the other guide says to backupTA. Looks like I can't because of Android Nougat, what should I do?
[Xperia Z5 Compact General] NeoBeum:
go flash lollipop
[Xperia Z5 Compact General] Mael_RadecFR:
Yep I'm currently downloading it, 2 hours with my connection...
[Xperia Z5 Compact General] NeoBeum:
just use it as a way to backup the TA, once you're happy, then flash the version you want to run and what ever else you want to

for others, fyi: using rootkernel, you can trick the device, and you can restore drm keys with previously lost keys, and using iovy root when flashing back to lollipop can save the original hardware keys	again so you have a backup.
[Xperia Z5 Compact General] Mael_RadecFR:
After that I will unlock the bootloader, then flash TWRP and LineageOS
[Xperia Z5 Compact General] patach:
Quite new to this.

I'm on Nougat right now, and used this method to root my phone a few months ago, worked like a charm, but I did it using the SuperSU patch instead of phh and my battery's been sapping itself badly ever since (I kept it at bay with some CPU governor stuff).

If I wanted to go back and patch phh on this thing I can save my battery, what's the steps to do that?

Sorry if this is an obvious question.
[Xperia Z5 Compact General] Lozanidas:
I need help. necesito ayuda

hi I rooted my z5 compact and when i rebootet it, it fails since beginning closing apps of the sistem. i did a hard reset and now i can update my android to 7.1.1 which i had before this. now im 5.1.1

hola rutee mi z5 compact y cuando reiniciaba fallaban aplicaciones del sistema que ni siquiera podia hacer el registro inicial y tal, asique lo restaure de fabrica y ahora esta en adroid 5.1.1 y no me deja actualizar a 7.1.1 que es el que tenia
[Xperia Z5 Compact General] panecondoin:
Problems with root/uninstalling system apps with Titanium Backup

Hey there,

I cannot uninstall some system apps via Titanium Backup, despite being rooted (phh's superuser because SuperSu gave me battery drain). I tried changing Selinux to permissive, but to no avail.

Root is there and other things like AdAway work properly, only the uninstallation of system apps wont work. Anybody run into something like this?

I'm on 32.4.A.1.54 btw.

Cheers!
[Xperia Z5 Compact General] ben_pcc:
Hiya! I'm having some troubles with the backupTA step, any chance anyone can help? I tried posting in the backupTA thread but it said I can't because I'm not a developer. I posted my question (with more info) here:

https://xdaforums.com/general/help/backupta-xperia-z5-compact-t3712187
[Xperia Z5 Compact General] ben_pcc:
Nevermind! iovryroot did the trick handily.
[Xperia Z5 Compact General] Acex89:
Hi guys, I really need some help there. I have a Z5C and wanna root android MM (6.1).

I followed every step but faced some difficulties when patching the kernel.

I downloaded the software from xperifirm, flash it on the phone and extracted the kernel.sin file, converted into kernel.elf and then create the boot.img file with rootkernel tool.

1- For some reasons I cannot use the script "fastboot flash boot boot.img" using the command prompt from the folter of the tool. it says the command is not recognises, and so I've tried 3 ways:

a- moving the boot.img file onto the "minimal ADB and fastboot" folder in my pc and use the command from that tool (open the .exe file, thats open a cmd prompt where the script is reconized and work, and it will do it sayng a series of "sending boot.... OKAY.... writing boot.... Okay... finished. No error lines.

b- use flashtool to flash the kernel by its built-in function.

c- tried different versions of the program (v 5.23, 5.0 and 4.31).

All of those ways semms to patch the kernel good, no errors in the cmd but for some unknow reasons my Z5C still not power up, it stuck on the "powered by android" logo, black out and the led start flickring in red 3-4 times, then the phone reboot again and do the same thing.

-For the moment I have flashed again the downloaded firmware (32.2.A.5.11) and the phone will power up and work well.

OTHER HINTS

-DRM keys backup done.

-The setting (install busybox, drm fix etc...) I've used for patch the kernel and create the boot.img file are different (tried to re-do many times the patching with different settings) none of them works.

I have NO IDEA what is the issue, please guys help, I want this f****** root.
[Xperia Z5 Compact General] Acex89:
SOLVED BY MYSELF. POSTING THE ANSWER FOR AWARENESS FOR OTHER USERS

So, when I was supposed to flash the boot.img file... i realized I can install TWRP and SU whit another method.

1- Downloaded the recovery.img file from one of the many sources available online

1.1- copyed SU and Xposed .zip files in the memory of the phone (so after flashed the phone with Flashtool with a new firmware you have to power it on, inizialize it and activate USB debug )

2- flashed recovery.img file with ADB schell installed as described at the start of this guide, using with the appropriate command line (fastboot flash recovery recovery.img)

3- powered on the phone in recovery mode and installed SU and Xperia with TWRP directly

4- powered up the phone and garanted root access, DONE!

Hope my small effort will help other users.

Cheers, Acex.
[Xperia Z5 Compact General] gavranpero:
''Open command prompt and navigate to the rootkernel directory''

How ? Use cmd, and navigate, but windows constantly close. I cannot create anything.
[Xperia Z5 Compact General] trax7:
Go in the folder. Hold shift (or ctrl, cant remember this late) and right click on blank space. You'll see Open Command Prompt here pop up in the menu. Good luck.
[Xperia Z5 Compact General] bobby.surya26:
Okey, I made it following the instruction in first page.

but if I updating again to nougat is SuperSU will stay or disappear?
[Xperia Z5 Compact General] dermaze:
Hello.

I'm on exactly the same firmware version (localized DE) with my z5c, all options with the rootkernel script set to yes, also with phh's superuser, TWRP 3.0.1 (as included) and no XPosed or TA Backup.

I ran into the same problem. So I removed those apps via TWRP. You have to start up your TWRP, then mount /system, and then you can delete the apks/folders one by one under -> Advanced -> File Manager (or something like that).

I removed the following apps:

in system/priv-app

com.sonyericsson.textinput.chinese

somc-get-to-know....

com.mobisystems.fileman... (I prefer SManager)

com.sonymobile.retaildemo/

sonyentrance2-release/...

in system/app

SemcEmail/SemcEmail.apk (I perfer TypeMail)

Photos/Photos.apk (It's the Google App)

Gmail2/Gmail2.apk (I organize all mails with TypeMail)

Videos/Videos.apk (It's the Google App)

Music2/Music2.apk (It's the Google App)

ExternalKeyboardJP/...

SomcPOBox/SomcPOBox.apk

com.spotify.music/...

Of course you'll have other/more apps to remove depending on your localization/bloatware version. In most cases you can find out the filename in TitaniumBackup when you click on the app you want to delete and choose "special functions -> search" (or similar, "Besondere Funktionen -> Durchsuchen" in German).
[Xperia Z5 Compact General] panecondoin:
Hey thanks for responding. It seems I cannot even access TWRP now... Could you hint me to your rooting procedure? I was following the instructions here but cannot seem to get back into TWRP. Thanks again for answering.
[Xperia Z5 Compact General] dermaze:
I followed the instructions in this thread, as well. Are you sure everything was ok when you patched the kernel?

You can try it with my kernel.

This is the log of rootkernel when I patched it:

Rootkernel V5.23

- Unpacking kernel
Found elf boot image
Kernel version: 3.10.84-perf-g99119bc
Found appended DTB
- Detected vendor: somc (Sony), device: suzuran (Xperia Z5 compact), variant: row
- Unpacking initramfs
- Detected platform: 64-bit
- Detected Android version: 7.1.1
- dm-verity is enabled. Disable? (Say yes if you modify /system) [Y/n] y
Disabling dm-verity
- Sony RIC is enabled. Disable? [Y/n] y
Disabling Sony RIC
- Install TWRP recovery? [Y/n] y
Installing TWRP
Compressing TWRP image
- Found superuser.zip. Install? [Y/n] y
# Make su permissive (Permits any action as su)? [Y/n] y
Adding service entry for superuser
Adjusting SE Linux policy for superuser
- Install DRM fix? [Y/n] y
- Install busybox? [Y/n] y
- Creating new initramfs
- Creating boot image
- Cleaning up
Done

As described in post #1, you can flash it with the command

fastboot flash boot boot.img

You can enter TWRP with Vol-UP when the status LED lights up for the first time during boot up.
[Xperia Z5 Compact General] panecondoin:
I guess I will have to try that again some time. Maybe the rootkernel script has been updated since I tried it. I really appreciate your help! Have a good time.
[Xperia Z5 Compact General] ilitirit:
Hi

I've rooted my phone using the method in the first post and it worked fine. The problem is I'm now stuck on build 32.2.A.5.11 and the phone keeps pestering me to upgrade, which doesn't work since I'm rooted. And every time it fails it just tries to download the firmware again.

So is there anyway to install this firmware? I'm willing to "unroot" the phone if necessary. I just need the instructions on how to do so...
[Xperia Z5 Compact General] trax7:
Use Flashtool
[Xperia Z5 Compact General] interestor:
That pestering is the bad part. One of my main rooting reasons was to disable Software Update. I did eventually figure out how to uninstall it (not installed for this user, it now says) via adb.

But now I get bad reception and have missed many calls. Does anyone out there know if the Software update app is somehow related to phone signal reception?
[Xperia Z5 Compact General] trax7:
I've disabled/removed it in the past without any adverse effects. If you want to be 99% sure that nothing bad will happen, just freeze it, dont uninstall. I use Titanium Backup for this :)
[Xperia Z5 Compact General] interestor:
Thanks, glad to hear you had no bad effects disabling updater. Maybe I should try titanium backup. Hmm, how do I go about reinstalling that bothersome software update app?
[Xperia Z5 Compact General] trax7:
Dont do it. Just reinstalling it has a very very low chance to work imo. Reflash the system partition if you have a recent backup. If not, I suggest flashing the latest firmware with Flashtool. Take it as a chance to start on a clean slate :)

That's just my suggestion though if you want to reinstall the app yourself, go for it.

Link: https://drive.google.com/file/d/139l8DLDLBChtK1taDhn6a1XxwvQadS65/view?usp=sharing

Instructions: extract folder and put in /system/priv-app with suitable permissions.
[Xperia Z5 Compact General] interestor:
Yeah, I was thinking reinstall is even more reckless than uninstall; thanks for the file though, I might try.

Also, I have been thinking of reflashing the whole thing. But first I'll try to fix the current setup.

So, you disabled the software update app, preventing the update nagging, and had no trouble with reception, right? That is what I want. Must be a coincidence that I could not receive calls. What tips can you give for isolating the reception problem?

(btw, what is the Update Service app?) It took me some time to learn how to uninstall the what's new app.
[Xperia Z5 Compact General] trax7:
Isn't this what nags you for updates? What's New can be disabled in the same, I find it pretty annoying too haha :D

All in all these apps should not have anything to do with reception at all... The suggestion to isolate the problem would be to grab and look at logcat/dmesg and see what kind of errors are posted there, we can then further pinpoint the issue (which, again, is most likely *not* gonna point to these apps but eh..) :D
[Xperia Z5 Compact General] interestor:
I know the "Software Update" app nags to update. And I recall it would eventually take over my phone connection until it downloaded and installed its update (hence my mystical connection of app to reception). The other one, the "Update Service" app, I haven't looked into, not sure what it does.

I will do some more reception testing, see if I can learn some details; I'll try to figure out how to grab a look at logcat/dmesg.
[Xperia Z5 Compact General] interestor:
This phone used to work well on 4G. Now it only connects on GSM. No signal on 4G or WCDMA. I can't understand it.

Please have a look at these 2 logs and see if you can find something repairable.

View attachment dmesg.txt

View attachment dmesg.txt

I attached dmesg log, but logcat is at this link:

https://app.box.com/s/igj787m1dbp5utw61o43em94r4y3vfg9
[Xperia Z5 Compact General] trax7:
Logcat seems fine. Looked 900 lines into dmesg, did not see anything relatable there too. If you don't have 3/4G try downloading the APN settings again (Settings > More > Internyet Settings) :)
[Xperia Z5 Compact General] interestor:
Hey thank you for looking into those. I did see a lot of the word "error", but don't know what to do with it. I did previously check my APN, it is the right one, then I did download settings again anyway. Seems I am stranded.

But back to the software update problem. It does take over my signal trying to connect to Sony to force an update. But if allowed to update, that will erase TWRP, and cause a need to reinstall that recovery and reroot. That is a big problem. How do other users comfortably prevent this "update" thing?
[Xperia Z5 Compact General] trax7:
Freeze the apps. That's what I do. You could also just block the notification.
[Xperia Z5 Compact General] interestor:
Well, blocking the notification, and even background data, didn't actually work. It still disabled the phone trying to update.

I will look into this app for freezing; I didn't like it when I had used it on another phone before.
[Xperia Z5 Compact General] GeorgeRM:
Thanks

First of all thanks for writing this guide. I have successfully rooted my z5c with it.

I have one question left though. As i was on Nougat i could not backup my TA partition with the tool mentioned (BackupTA). Tried the tool even though on windows and linux, no succes. So in the end i did lose my camera:crying:

At step 2 of your guide i was thinking it would be better to have something in stead of nothing at all so i made a backup of my TA partition with Xperia Flashtool 09.24.4. This left me with 2 plain text files 1.TA and 2.TA. They contain the TA units with their respective values. Is there any way to proces these files?

Regards
[Xperia Z5 Compact General] irfan_hjw:
nevermind. turns out the bootloader is already unlocked
[Xperia Z5 Compact General] irfan_hjw:
when I run CONVERT TA.IMG I have this message
[Xperia Z5 Compact General] Pandemicc:
[MENTION=5435249]dermaze[/MENTION] thanks for the boot.img. I hope that it works flawlessly
[Xperia Z5 Compact General] bootloopers:
I have unlocked the bootloader without backing up the TA first, can I still continue the root step? have my sony z5c e5803 nougat 7.1.1 built number 32.4.A.0.160 do i have to downgrade first to nougat 7.0
[Xperia Z5 Compact General] trax7:
No. If you don't care about DRM (you have already unlocked) you dont need to downgrade.
[Xperia Z5 Compact General] bootloopers:
very important DRM do you think? what if I ignore the DRM process, is there any harm in this?
[Xperia Z5 Compact General] trax7:
You have already lost the DRM keys since you unlocked without the downgrading process. It doesn't matter for you anymore. Read the OP, everything you need is there.
[Xperia Z5 Compact General] bootloopers:
Which version of kernel root tool is suitable for root nougat 7.1.1? I have little trouble understanding step 6
[Xperia Z5 Compact General] bootloopers:
aku binggung

in step kernel patching, it will be easier if someone want to make a video, I do not understand,> put supersu in kernel root folder, I've seen steps 4 & 5 in a video and I understand on that part,
[Xperia Z5 Compact General] bootloopers:
I also have problems when step 6, when open cmd and type "rootkernel kernel.elf boot.Img" Appears notes. Access denied, I know in this case I failed, is there any guide for me, Why there is no option "y" to su shrub and exposed, please help
[Xperia Z5 Compact General] fetchaspade:
Hello,

I downgraded from Android N to L in order to backup the TA partition but I run into a bit of trouble. Whenever I launch it, backupTA outputs a success message and an image is indeed created... except it is an empty file (0 bytes) every time. Any idea how to progress on the matter :p ? Has anybody already run into a similar issue?

EDIT: I'm stupid, I didn't see I get two "CANNOT LINK EXECUTABLE: empty/missing DT_HASH in "/system/bin/run-as" (built with --hash-style=gnu?)" (another one for checkta)

I tried to build those two excecutables myself. I can build checkta but I cannot build run-as because I miss the android specific header in selinux: selinux/android.h (and most importantly the library which is why I could not run that executable in the first place).

I'm running Archlinux, do you know of a package on the AUR (or an official one) that would do the trick?

Alternatively, does anybody have a self-built "run-as" executable that encompasses the missing library?

EDIT2: I tried to backup the TA partition from flashtool (TA > raw device > backup) but it does not work either. I found that, internally, it uses the exact same executable files so I imagine it runs into the same issue. I'm starting to wonder if the exploit can be run at all on my phone (E5823 downgraded to Android 5.1.1 with flashtool, kernel 3.10.49 october 2015).

EDIT3: Same exact situation as this guy: https://xdaforums.com/general/help/backupta-xperia-z5-compact-t3712187

No answer though on his thread :(

Thank you for your help ;)

EDIT4: HALF SOLVED

Eventually I gave up on using the dirtycow exploit and gave a chance to the iovyroot exploit with great success.

I'm leaving this here in case somebody gets stuck on the same, and still unsolved, mystery :)
[Xperia Z5 Compact General] ben_pcc:
Hi! got your PM, and yes, that's what worked for me.

https://xdaforums.com/z5-compact/ge...nful-using-t3549388/post74829886#post74829886
[Xperia Z5 Compact General] VstrokeX:
I did everything as described and there is simply no root at all.

I install the phh root apk and it displays an empty list, root checker notifies that root is not installed.

If i tried installing superuser.zip with twrp it just hangs on sony logo.

I have used rootkerenel 5.23 on linux but I couldn't actually get it to work because of the "Cannot execute binary file" error.

So I moved my files on my windows laptop and everything went fine.

Except I still have no root.

I flash with flashtool, install the DRM keys, then flash the boot.img.

Then I boot the device, go through the "Welcome" steps and install pph superuser.

Sadly this gives me no access to su.

What I might have done wrong?

I am flashing the "E5823_Customized UK_1298-5497_32.4.A.1.54_R3E" rom as the base for the modified boot.img

[MENTION=309187]edit[/MENTION]

after rebooting the phone the phh superuser notifies me that the superuser binary must be updated.

but how do i do this?
[Xperia Z5 Compact General] yuzgen:
I was going to go mad with TABACKUP. Pretty please update first post. This iovyroot will backup your DRM keys after downgrading. https://xdaforums.com/showpost.php?p=70281143&postcount=5
[Xperia Z5 Compact General] MatthiasHGW:
Where does encryption fit into this process?

I have successfully rooted my phone according to the instructions in this thread. Now I would like to encrypt it. I have read that encryption does not work with rooted phones, and indeed after I start the process, the phone shows the encryption screen for a couple of seconds and then simply reboots.

Has anybody managed to encrypt a rooted Z5C and how would I do that?
[Xperia Z5 Compact General] RURon:
...I also have the problem that PHH's Superuser tells me that SU binary needs to be updated but I have no idea how to do that - and root is therefore not enabled.
[Xperia Z5 Compact General] Acex89:
Hi guys. I need help again.

A month ago my rooted z5c started to face some issues: eventually when I had to power it off and on again, it stuck on bootloop a few times before gettin on. One day the issue was critical and I was unable to power up again the phone.

I didn't do nothing to my phone, never installed malicious app or similar, just playing a bit with xposed modules but everything was super fine. I think that maybe a background update of one of google service may have interferred with my root and the phone software was then unable to load up the system. This because one day I noticed that my home screen grid could be modified in a 5x5 fashion never seeen before.

So i tried to restore a backup from recovery, nothing. I had to flash a stock firmware again. Tried root again, stuck in bootloop and the only thing working is twrp recovery mode. If i unistall it the phone works.

Now I'm stuck with a original firmware and without DRM keys (i have the backup but I am unable to load them again even with flashtool also if the software load them properly, in the service menu there is error message.)

What the hell happened?

Some help to root properly again my phone?

Thanks guys I'm becoming crazy
[Xperia Z5 Compact General] tekemlaef:
Trouble installing Xposed

Hey there,

thank you fort he great detailed guide, but I got trouble installing Xposed framework.

- Followed the guide and got rootaccess on 7.1.1, 32.4.A.1.54 via phh’s superuser but without TWRP and Xposed. (no official TWRP für 7.x on Z5)

- Flashed TWRP i got frome here: https://xdaforums.com/crossdevice-dev/sony/twrp-3-1-0-z5-z5c-z5p-t3571050 which worked fine.

- Tried to install Xposed Framework xposed-v89-sdk25-arm64.zip, using

o	unofficial Material Design Xposed Installer

o	Official version: https://xdaforums.com/showthread.php?t=3034811

o	TWRP

resulting in bootloop, which can be fixed by using xposed-unintaller in TWRP

Did anyone succeed in installing Xposed-Framework after gaining rootaccess via this tutorial?

Hope I didn’t miss any ovious solutions or already posted answers :)

Thanks in advance

Best regards

Tekem
[Xperia Z5 Compact General] trax7:
Xposed works only through Magisk on 7.x.