Hello I have a Z5 Compact and tried to unlock the bootloader but it failed. System info said Bootloader unlock allowed: No. Can I still root my phone?
I guess it should work when you downgrade to the oldest available Android release for Z5 compact (5.x?). As far as I remember starting with Android 6.0 they introduced the dm-verity flag - therefore the device wont boot if /system is modified.
[email protected] said:
I guess it should work when you downgrade to the oldest available Android release for Z5 compact (5.x?). As far as I remember starting with Android 6.0 they introduced the dm-verity flag - therefore the device wont boot if /system is modified.
Click to expand...
Click to collapse
That's the first thing I did. Unfortunately it still says bootloader unlock is not allowed.
Ryhorse said:
That's the first thing I did. Unfortunately it still says bootloader unlock is not allowed.
Click to expand...
Click to collapse
Yeah you will always get that message since you are not allowed to unlock your bootloader. But there should be rooting exploits for android marshmallow that dont require an unlocked bootloader.
[email protected] said:
Yeah you will always get that message since you are not allowed to unlock your bootloader. But there should be rooting exploits for android marshmallow that dont require an unlocked bootloader.
Click to expand...
Click to collapse
I searched but I didn't find anything. Are you sure you can root an Xperia Z5c with a locked bootloader. Can you provide me with links?
I see you need to go back to Android Lollipop. Get a Lollipop ftf and flash it with Flashtool. Then get something like KingRoot or KingoRoot, these should be able to root your device.
[email protected] said:
I see you need to go back to Android Lollipop. Get a Lollipop ftf and flash it with Flashtool. Then get something like KingRoot or KingoRoot, these should be able to root your device.
Click to expand...
Click to collapse
As I said, I already downgraded to the lowest android version possible with Z5C (5.1.1). KingRoot didn't work and KingoRoot needs an unlocked bootloader.
Ryhorse said:
As I said, I already downgraded to the lowest android version possible with Z5C (5.1.1). KingRoot didn't work and KingoRoot needs an unlocked bootloader.
Click to expand...
Click to collapse
Unfortunately I don't know about a working exploit, in theory it should be possible with android 5. I've found threads like https://forum.xda-developers.com/xperia-z2/general/root-t3108230 but they all suggest Kingroot. Maybe only a specific version of kingroot works with it? AFAIK there was another exploit called iovyroot (based on dirtycow?) which is able to provide temproot on android 6(?). Dunno if that works on android 5 without dm-verity flag as well
[email protected] said:
Unfortunately I don't know about a working exploit, in theory it should be possible with android 5. I've found threads like https://forum.xda-developers.com/xperia-z2/general/root-t3108230 but they all suggest Kingroot. Maybe only a specific version of kingroot works with it? AFAIK there was another exploit called iovyroot (based on dirtycow?) which is able to provide temproot on android 6(?). Dunno if that works on android 5 without dm-verity flag as well
Click to expand...
Click to collapse
That thread is for Xperia Z2 and Z3. iovyroot works and I already made a TA backup with it. Unfortunately it doesn't seem to be of any other use. I guess I will have to manage without root.
I have a crazy idea, if you want to tinker around: Maybe you could create a prerooted (google for "sony prerooted firmware creator" android 5 system partition and flash it on android 6 through iovyroot exploit. That would require an application that is capable of flashing update.zip during the smartphone beeing in a booted state. These applications exist but i dont know a specific one.
After (hot-) flashing the update zip (system partition) you could power off the phone and flash an android 5 .ftf excluding system.sin
In theory you should end up with a rooted android 5
Related
I am a rookie with these things and I would like to get some clarification.
I want to root my tablet, I am very satisfied with it and its system, all I need is to root it without touching my bootloader and drm keys. There are so many threads about it claiming its possible without unlocking the BL and I am not sure which tutorial should I use to root my device.
My device is LTE version, nothing modified and firmware is 23.0.1.A.0.16.
HenrichGrinch said:
I am a rookie with these things and I would like to get some clarification.
I want to root my tablet, I am very satisfied with it and its system, all I need is to root it without touching my bootloader and drm keys. There are so many threads about it claiming its possible without unlocking the BL and I am not sure which tutorial should I use to root my device.
My device is LTE version, nothing modified and firmware is 23.0.1.A.0.16.
Click to expand...
Click to collapse
you can try Towelroot as I see Z3TC is supported but I didnt test it on my tablet
where did you see that z3tc is supported by towel ? i can't find a device list or so.
HenrichGrinch said:
I am a rookie with these things and I would like to get some clarification.
I want to root my tablet, I am very satisfied with it and its system, all I need is to root it without touching my bootloader and drm keys. There are so many threads about it claiming its possible without unlocking the BL and I am not sure which tutorial should I use to root my device.
My device is LTE version, nothing modified and firmware is 23.0.1.A.0.16.
Click to expand...
Click to collapse
There is only one method at this time to get root on this tablet and this method involves unlocking your bootloader after doing a backup of you DRM keys (TA partition). Once you rooted your device with the unlocked bootloader you can reflash the TA partition and the bootloader will be locked again with all DRM keys intact as if you never unlocked it in the first place, but with root. Towelroot is not supported as the kernel exploit that was used is patched since nearly half a year now.
Hey guys,
I own a stock Xperia Z3 Tablet LET (SGP621) and I have never upgraded it, still running stock 4.4.4.
I want to root it and only root (to Lolipop). I have read topics but there are so many and written in strange language for me I have no idea where to start.
I read I could just flash prerooted ROM without even touching my drm keys, right? But then I was not sure how could I do it.
Any help would be appreciated.
Thanks!
There is no method to root the tablet without unlocking the bootloader. The root exploit which most of the guys mentioning in these strangely written topics (giefroot, easy root tool, geohot, blablabla...) is useless now since Sony surely patched it. So to root, you have to unlock the bootloader. But wait, you would loose the DRM keys.
So, it means that you need to make a backup.
But, without root you can't backup.
But, how should you root if you don't have an unlocked bootloader??? And it goes on and on and on and on....
The "trick" is to flash a firmware from another device (not z3 tablet compact) that can be rooted via the exploit. But nobody wanta to use the "other" firmware to gain root. This "other" firmware is only used to gain root temporary so you can backup the drm keys.
Then you likely have to flash back the stock firmware (and root will be lost again).
Now that you backed up the drm keys, you are ready to unlock the bootloader and let the drm keys disappear for a while.
And then you still have to do some complex steps to achieve root on your stock firmware, then restore drm keys (bootloader locks up itself again...), blablabla
TL;DR forget rooting this device unless you are ready to do all these above steps. If you don't understand the steps and are new to rooting sony devices, I recommend you not to root and enjoy the stock firmware. Next thing is that lollipop will come and you could easily update without problems (via OTA). Until then, wait for some magicians/hackers/crackers find a new exploit which can root 2015 sony devices without unlocking the bootloader.
If you want to know if your device (firmware) can be rooted via exploit, try xdualrecovery. It contains the exploit root method. But if you are unsuccessful flashing xdualrecovery, that is because the exploit doesn't work and your firmware is patched.
Sadly, sony devices are nothing like nexus. And including this "afraid of loosing the drm keys", simply unlocking the bootloader might not be a pleasing thing to do.
just to add maybe we don't need to unlock bootloader to root our tablet
we temporarely flash z3 kitkat system to get a rootable core and we flash again z3 tablet compact system before reboot
or so I understood
ChiDi9901 said:
There is no method to root the tablet without unlocking the bootloader (false, there is a method detailed in this thread). The root exploit which most of the guys mentioning in these strangely written topics (giefroot, easy root tool, geohot, blablabla...) is useless now since Sony surely patched it. So to root, you have to unlock the bootloader. But wait, you would loose the DRM keys.
So, it means that you need to make a backup.
But, without root you can't backup.
But, how should you root if you don't have an unlocked bootloader??? And it goes on and on and on and on....
The "trick" is to flash a firmware from another device (not z3 tablet compact) that can be rooted via the exploit. But nobody wanta to use the "other" firmware to gain root. This "other" firmware is only used to gain root temporary so you can backup the drm keys (false, the other firmware is used to gain root and then install a custom recovery, so you can flash a prerooted and updated lollipop firmware based on official Xperia Z3 Tablet Compact firmware).
Click to expand...
Click to collapse
I would advise not to answer questions about root without understanding the process and/or misguiding people asking for help.
The information you give above is wrong. You don't need to unlock your bootloader provided you downgrade to an explotable firmware.
The thread that details how to root your Xperia Z3 Tablet Compact is this one:
http://forum.xda-developers.com/z3-...to-rooted-lollipop-locked-bootloader-t3083980
1. Obtain root by first flashing SGP621_23.0.1.A.0.167_CE.ftf and the system partition of D6603_23.0.A.2.93_Generic_20GLOBAL.ftf. Then use giefroot to root.
2. Prepare prerooted flashable zip of 23.1.A.0.690 NOBA on your internal storage or external SD.
3. Install XZDualRecovery and now you will have TWRP to install 23.1.A.0.690 NOBA on your SD card.
You may ask any doubts in that thread.
BarajaVLC said:
I would advise not to answer questions about root without understanding the process and/or misguiding people asking for help.
The information you give above is wrong. You don't need to unlock your bootloader provided you downgrade to an explotable firmware.
The thread that details how to root your Xperia Z3 Tablet Compact is this one:
http://forum.xda-developers.com/z3-...to-rooted-lollipop-locked-bootloader-t3083980
1. Obtain root by first flashing SGP621_23.0.1.A.0.167_CE.ftf and the system partition of D6603_23.0.A.2.93_Generic_20GLOBAL.ftf. Then use giefroot to root.
2. Prepare prerooted flashable zip of 23.1.A.0.690 NOBA on your internal storage or external SD.
3. Install XZDualRecovery and now you will have TWRP to install 23.1.A.0.690 NOBA on your SD card.
You may ask any doubts in that thread.
Click to expand...
Click to collapse
Well, the OP (junior member) mentioned "strange languages". So he/she might not understand all this complex steps. That's why I "let it be" to keep the things easy. If he/she understands these steps then it's good for him/she. But you're right, I lied. And thanks for the clarification and pointing out my wrong information.
Personally, I had every Xperia unlocked without backing up the DRM keys. I never had any disadvantage. I was, however, a little reluctant with the XT3C. That's because I use it as both my phone and tablet.
Still, did it now. No adverse effects. Root is SO much more important than the Bravia engine or whatever. And the camera isn't very good anyway so I don't miss the 'better' quality. It's bad either way
I have mine updated to 5.1.1 and the bootloader is unlockable. However, the rooting instruction is confusing for this version.
I am looking for the definite solution for rooting (if it is required to unlock the bootloader, should I backup TA partition first?) 100% stock 5.1.1.
Frankly, I don't want to mess with Kingroot or similar tools from China.
I'm interested in this as well. Sent for warranty repair and came back with 5.1.1. Looking for recommended way to root and backup TA (though I have the original backup somewhere)
http://forum.xda-developers.com/xperia-z-ultra/general/guide-how-to-root-install-recovery-t3210207
I managed to root the device. Here is a guide:
http://forum.xda-developers.com/xperia-z-ultra/general/comprehensive-guide-rooting-5-1-x-t3219502
This is how i did it...downgraded to 4.4.4 and root it,TA backup, unlocked the device, updated to 5.1.1 with stock ftf installed the new recovery an flashed the TWRP after that flash the SuperSU zip and done...
fnldstntn said:
This is how i did it...downgraded to 4.4.4 and root it,TA backup, unlocked the device, updated to 5.1.1 with stock ftf installed the new recovery an flashed the TWRP after that flash the SuperSU zip and done...
Click to expand...
Click to collapse
That's a waste of time. OP has an unlockable bootloader, so he just has to:
- Flash recovery
- Flash SuperSU
- Reboot
Klaos3000 said:
That's a waste of time. OP has an unlockable bootloader, so he just has to:
- Flash recovery
- Flash SuperSU
- Reboot
Click to expand...
Click to collapse
unlockable =/= unlocked
mingkee said:
unlockable =/= unlocked
Click to expand...
Click to collapse
Unlocking the BL is still FAR quicker than going through that hellish process for locked bootloaders. It's like trying to juggle with your hands tied to your back, but they're not really tied. Not sure why WE are arguing though. You provided a guide for a locked bootloader, while I gave one for unlocked. What OP decides to do is currently a mystery.
Klaos3000 said:
Unlocking the BL is still FAR quicker than going through that hellish process for locked bootloaders. It's like trying to juggle with your hands tied to your back, but they're not really tied. Not sure why WE are arguing though. You provided a guide for a locked bootloader, while I gave one for unlocked. What OP decides to do is currently a mystery.
Click to expand...
Click to collapse
Here is a deal: unlocking bootloader will remove DRM key. The only workaround is to backup TA partition. However, doing such also requires root, so you have to root before unlocking bootloader.
Don't you know your method is no brainer???! But dealing with DRM key is another story.
Hello !
Frankly you should try with kingroot it's not really a big deal it's quicker and don't worry you will not mess up your phone. I did the same on mine, and it's quick...
LordBli said:
Hello !
Frankly you should try with kingroot it's not really a big deal it's quicker and don't worry you will not mess up your phone. I did the same on mine, and it's quick...
Click to expand...
Click to collapse
Kingroot does not work with 5.1.x, sorry.
I still have to rollback to 4.4.x and use dualrecovery method 3.
mingkee said:
Kingroot does not work with 5.1.x, sorry.
I still have to rollback to 4.4.x and use dualrecovery method 3.
Click to expand...
Click to collapse
Okay, so roll back to KitKat, root, backup your TA, unlock bootloader, and then update to 5.1.1 again. You'll then be able to just flash a recovery and root. If you don't care about the TA partition, then unlock bootloader and flash recovery and root.
Be aware that if your device is still under warranty, it'll be voided the second you lose the DRM keys (TA). If you're not under warranty anymore, it doesn't make any difference. If your device has to go into repairs down the road, it won't matter since you don't have warranty either way. But if you have, it's a good idea to back it up.
Also, the X-Reality engine etc. were at one point dependent on the TA partition, but this changed on KitKat, so X-Reality still works on an unlocked bootloader (even though it's really bad).
Klaos3000 said:
Okay, so roll back to KitKat, root, backup your TA, unlock bootloader, and then update to 5.1.1 again. You'll then be able to just flash a recovery and root. If you don't care about the TA partition, then unlock bootloader and flash recovery and root.
Be aware that if your device is still under warranty, it'll be voided the second you lose the DRM keys (TA). If you're not under warranty anymore, it doesn't make any difference. If your device has to go into repairs down the road, it won't matter since you don't have warranty either way. But if you have, it's a good idea to back it up.
Also, the X-Reality engine etc. were at one point dependent on the TA partition, but this changed on KitKat, so X-Reality still works on an unlocked bootloader (even though it's really bad).
Click to expand...
Click to collapse
Here is what I did as mentioned on the post linked on earlier post.
Download the latest ROM with Xperifirm, and 4.4.x ROM found in a sticky on the general section.
Pack the 5.1.X ROM as flashable pre-rooted.
Use Flashtool to rollback to 4.4.x, completely wipe, made initial setup and enable debug, and install recovery.
Install pre-rooted ROM through TWRP.
Backup TA partition and device data.
Unlock bootloader.
Restore TA partition and device data.
Done.
Here's just a quick guide of how I just successfully rooted my P10 (from android nougat)
Use this file (https://drive.google.com/open?id=1c1iQBvvP7zTUiKz5PZmlJUH5DKBxxC3L)
It has everything you need inside in one package. (I havent anything to do with the development of any of the tools, this is just my compilement of them)
1. BACK UP
Back up everything you can on you phone to your pc
2.Drivers
Easiest was is to install Huawei's HuSuite otherwise do a manual driver install
3.Get bootloader unlock code
This will cost 4eur but is now the only way to get the code since Huawei stopped providing the codes. I can verify DC unlocker are legit, their tools are scary powerful and well worth the cost. Follow the below tutorial for this.
https://www.dc-unlocker.com/how-to-read-huawei-bootloader-unlock-code
4.Unlock the bootloader
On the phone enable developer mode (look this up its easy) and enable usb debugging and oem unlock. Then plug the phone into your pc and run cmd.exe inside the set folder. Enter the command without quotes "adb reboot bootloader". This will restart the phone in bootloader mode. Next enter the command "fastboot oem unlock CODE" with your code that you got from dc unlocker. This will restart the phone from factory so you will need to do a quick set up and enable developer settings and usb debigging again.
5. Installing custom recovery
Enter the bootloader mode again with "adb reboot bootloader". Then from the bootloader mode enter the command "fastboot flash recovery twrp-3.1.1-0-vtr.img" this will install twrp recovery.
6. Installing Magisk root
Copy the zip file Magisk-v17.1.zip onto an sd card and insert into the phone.
Restart the phone into system again and use "adb reboot recovery". This will start the phone into twrp recovery mode. From here go to install, navigate to the zip and install it.
7.Finishing
Then boot the phone and Magisk manager should be installed on your now rooted phone for managing you super user and root.
Any questions or help needed message me, or my email is in my set folder.
@Jyndon use MEGA or zip files and attach it to the thread. People won't download from this, since they need premium feature to download folder.
Yeah bro I need it plz
Enviado desde mi VTR-L09 mediante Tapatalk
What is Android version on your P10? My one is Oreo 8.0 and DC-Unlocker did not work. It showed "unknown error 375"
qlong1505 said:
What is Android version on your P10? My one is Oreo 8.0 and DC-Unlocker did not work. It showed "unknown error 375"
Click to expand...
Click to collapse
I think we are out of luck I was just asked for 30 euros to get the bootloader unlocked as I am also on 8.0
On DC-Unlocker page it says:
Huawei P10 VTR-xxx upgraded to Android 8x not supported
Huawei P10 plus VKY-xxx upgraded to Android 8x not supported
Not sure if downgrading and then unlocking would make sense...
velvel said:
I think we are out of luck I was just asked for 30 euros to get the bootloader unlocked as I am also on 8.0
On DC-Unlocker page it says:
Huawei P10 VTR-xxx upgraded to Android 8x not supported
Huawei P10 plus VKY-xxx upgraded to Android 8x not supported
Not sure if downgrading and then unlocking would make sense...
Click to expand...
Click to collapse
Hi,
it's possible downgrading to previous version or to Nougat without unlocking bootloader first? Pheraps you mean forcing update via microsd slot?
Thank you
[email protected]
[email protected] said:
Hi,
it's possible downgrading to previous version or to Nougat without unlocking bootloader first? Pheraps you mean forcing update via microsd slot?
Thank you
[email protected]
Click to expand...
Click to collapse
Here is what I know so far:
1. You do not necessary to be on Nougat to unlock the bootloader, you should be able to unlock it if your firmware is before June patch
2. If you are on firmware after June patch, you would first need to rollback/downgrade to pre June firmware by finding previous firmware
3. Rolling back from after June patch to previous firmware might brick your phone
Currently, I did not find a way to unlock the bootloader on C654B327 as I cannot find any pre June firmware for my branding (C654) and rebranding to some other (C432) cannot be done without unlocked bootloader. And so far I did not hear of anyone downgrading and unlocking from C654B327 so I am a bit afraid I could brick my phone.
Guess I will wait and see if there are any good news in the future...
velvel said:
I think we are out of luck I was just asked for 30 euros to get the bootloader unlocked as I am also on 8.0
On DC-Unlocker page it says:
Huawei P10 VTR-xxx upgraded to Android 8x not supported
Huawei P10 plus VKY-xxx upgraded to Android 8x not supported
Not sure if downgrading and then unlocking would make sense...
Click to expand...
Click to collapse
I'm not suggesting to unlock the bootloader with DC, you should be able to do that normally with adb the same as you would on nougat
Jyndon said:
I'm not suggesting to unlock the bootloader with DC, you should be able to do that normally with adb the same as you would on nougat
Click to expand...
Click to collapse
The problem is getting the unlock code wont work to
qlong1505 said:
What is Android version on your P10? My one is Oreo 8.0 and DC-Unlocker did not work. It showed "unknown error 375"
Click to expand...
Click to collapse
I was on nougat when I wrote this guide. Maybe try rolling back to android 7.0 to get the bootloader code then upgrade again after. To do this I'm assuming you might be able to use some dload method perhaps.
Jyndon said:
I was on nougat when I wrote this guide. Maybe try rolling back to android 7.0 to get the bootloader code then upgrade again after. To do this I'm assuming you might be able to use some dload method perhaps.
Click to expand...
Click to collapse
True, if he hasn't latest security patch installed. With patch from Dec 2018 it seems that Huawei introduced something new so you can't roll back even with dload method
[email protected] said:
True, if he hasn't latest security patch installed. With patch from Dec 2018 it seems that Huawei introduced something new so you can't roll back even with dload method
Click to expand...
Click to collapse
In that case you could always send an email to DC to see if they are working to update it to work for 8.0. They seem pretty helpful and responsive from when I've contacted them before so I'm sure they might be able to offer some information.
Jyndon said:
In that case you could always send an email to DC to see if they are working to update it to work for 8.0. They seem pretty helpful and responsive from when I've contacted them before so I'm sure they might be able to offer some information.
Click to expand...
Click to collapse
Yes, I did it, but cusromers sevice told to me that they have no plan about supporting new security patch
velvel said:
I think we are out of luck I was just asked for 30 euros to get the bootloader unlocked as I am also on 8.0
On DC-Unlocker page it says:
Huawei P10 VTR-xxx upgraded to Android 8x not supported
Huawei P10 plus VKY-xxx upgraded to Android 8x not supported
Not sure if downgrading and then unlocking would make sense...
Click to expand...
Click to collapse
hi,
I tought so but I did downgrading with HiSuite and then locked all requirements for DC Unlocker and I've got my bootloader unlock code now to do anything !!!!
It took a while and lot of nerves but at the end you should do step by step all points which was mentioned in the begining of this thread.
in case of dc-unlocker problems try to use other usb port (other than usually you use for connecting the phone to computer)
rymcio80 said:
hi,
I tought so but I did downgrading with HiSuite and then locked all requirements for DC Unlocker and I've got my bootloader unlock code now to do anything !!!!
It took a while and lot of nerves but at the end you should do step by step all points which was mentioned in the begining of this thread.
in case of dc-unlocker problems try to use other usb port (other than usually you use for connecting the phone to computer)
Click to expand...
Click to collapse
Hello,
Hisuite method does not work with latest firmware/security patch. Tried many times, but no option to downgrade appears. It looks like Huawei would prevents to let us downgrade as they stated.
[email protected] said:
Hello,
Hisuite method does not work with latest firmware/security patch. Tried many times, but no option to downgrade appears. It looks like Huawei would prevents to let us downgrade as they stated.
Click to expand...
Click to collapse
yes unfortunatelly you are right , i checked and there is no option any more for downgrading to Nougat from B365 in my case.
Hey i bought 4 credits and when i try to read bootloader code i get "unknown error (375)". Maybe you know why?
justinas2003 said:
Hey i bought 4 credits and when i try to read bootloader code i get "unknown error (375)". Maybe you know why?
Click to expand...
Click to collapse
What? Where? If you mean DC unlocker tool maybe your device isn't supported, but you should ask them not here.
@justinas2003 which software version and security patch you got? Here some additional info:
https://forum.dc-unlocker.com/forum/modems-and-phones/huawei/172205-unknown-error-375
lukastob said:
@justinas2003 which software version and security patch you got? Here some additional info:
https://forum.dc-unlocker.com/forum/modems-and-phones/huawei/172205-unknown-error-375
Click to expand...
Click to collapse
So I should downgrade through HiSuite?
I have already seen these two threads
https://forum.xda-developers.com/xperia-xz1/how-to/guide-how-to-persistant-root-xperia-xz1-t3718375
https://forum.xda-developers.com/xperia-xz1/how-to/twrp-root-android-pie-xz1-t3883262
But I believe these two only work on non-Japan version.
Ragerets said:
I have already seen these two threads
https://forum.xda-developers.com/xperia-xz1/how-to/guide-how-to-persistant-root-xperia-xz1-t3718375
https://forum.xda-developers.com/xperia-xz1/how-to/twrp-root-android-pie-xz1-t3883262
But I believe these two only work on non-Japan version.
Click to expand...
Click to collapse
Give @j4nn a shout he'll be able to give you more info...
Ragerets said:
I asked this question and @lilbrat said that you could give me more info?
Click to expand...
Click to collapse
@Ragerets, I cannot comment on the linked guides, only from quick look I guess you need to unlock the bootloader via fastboot with unlock code from sony in order to start with those guides.
The most important question is: can your bootloader be unlocked?
You can check that in phone's service menu - Rooting status: Bootloader unlock allowed - needs to say "yes".
If it says "No", you cannot unlock via sony code unfortunately.
For now, you may only downgrade to exploitable fw and use a temp root (like renoroot). See following thread for more details:
[XZ1c/XZ1/XZp] temp root exploit to backup drm keys implemented
I would recommend to use the above guide to backup locked state TA as the first step in any case.
I am working on a permanent root method without need to unlock bootloader, but it's not finished, you can find more details in following thread:
Android PIE VerifiedBoot Bypass: sony xperia XZ1c locked bootloader permanently rooted