yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ Questions & Answers] blackhawk:
Sometimes it takes a while to get replies especially with older phones.

Yeah I found this. Hope that gets it for you.

Try Google searches like: "Sony Xperia XZ, your device is corrupted and cannot be trusted"

Google searches are the easiest and probably the best way to search the XDA forum🤣

The Google web crawlers never sleep... they don't find everything though even with precise key words. You may dig up some more useful information as it is out there by now.

Cross platforming works many times; it doesn't need to be that exact Sony model. Many issues are long standing and are found on to several models even years apart. Use whatever comes in handy...
[Sony Xperia XZ Questions & Answers] faizikari:
Woah, thanks a bunch for posting link for that thread, I keep Googling it but never found that thread on Sony's forum yet.

I did found some Xperia XZ2 that had the same issue as mine. I totally curious what cause the software to be corrupt like that, bad apps maybe? I did uses a few cracked apps that I sideload the APK, maybe that one of the reason.
[Sony Xperia XZ Questions & Answers] blackhawk:
Bad apps can screw up the user partition data and sometimes cause a boot loop. They normally can't corrupt the system partition though... they shouldn't be able to.

There's the little monster xhelper. Android 8 and lower are vulnerable to it. Always scan any side loaded apps first with Virustotal. A seemingly good app could also latter download its payload.

If any doubt exists do not install it.
[Android Q&A, Help & Troubleshooting] Oldschool297:
I have a Sony Xperia L3 and i have tried to root but it seems impossible. How can i do it? I have tried to root the phone with Sony Xperia C Root but it could not do it. Kingo Root is the same, fail. Also tried dr.fone but it did not support l3.
[Android Q&A, Help & Troubleshooting] chiteroman:
You must unlock the bootloader and then follow this steps: https://topjohnwu.github.io/Magisk/install.html
[Android Q&A, Help & Troubleshooting] Oldschool297:
I have check and my phone can be unlocked, i have downloaded fastboot but i do not understand what to do next. I got to step 8 https://www.xda-developers.com/install-adb-windows-macos-linux/ i can see my phone in the command line, what to do next?
[Android Q&A, Help & Troubleshooting] Oldschool297:
I cannot find the fastboot icon under devices and printers
[Android Q&A, Help & Troubleshooting] Oldschool297:
I got to https://mobilewithdrivers.com/unlock-bootloader/sony-xperia-l3-32gb-3gb-ram i got it into fastboot mode but no commands works, fastboot flashing unlock, fastboot oem unlock. Unknown command, command not allowed.
[Android Q&A, Help & Troubleshooting] Oldschool297:
Should i have a unlock code? I only see Xpeira L2 on the site for getting a unlock code, no L3 https://www.getdroidtips.com/unlock-bootloader-xperia-device/
[Android Q&A, Help & Troubleshooting] Oldschool297:
It seems to be something wrong in developer mode, oem do not turn on, no green, it is just off.
[Android Q&A, Help & Troubleshooting] xXx yYy:
What's phone's Android version? Android 8.1 ? If so, look inside here:

https://xdaforums.com/t/how-to-root-android-8-1-devpreview-1-opp5.3696278/
[Android Q&A, Help & Troubleshooting] Oldschool297:
Thanks. I cannot unlock the bootloader to try. I do not get the oem under development mode to work. It is only off. I can't get it on to unlock the bootloader.
[Android Q&A, Help & Troubleshooting] xXx yYy:
Why not contact Sony ?

Sony Support Consumer Electronics

services.sony.co.uk
[Android Q&A, Help & Troubleshooting] Oldschool297:
I tried the guide https://www.kingoapp.com/root-tutorials/how-to-unlock-bootloader-android-device.htm i get it to fastboot and the light is blue but i only get. Failed remote: Command not allowed, Finished. total times 0.045s.
[Android Q&A, Help & Troubleshooting] Oldschool297:
I tried

Use the Command Prompt window to retrieve your unlock key as described by your manufacturer. If you own a Motorola device run the command: fastboot oem get_unlock_data, HTC run the command: fastboot oem get_identifier_token.

Select the token which is spit out by the Command Prompt window and copy and paste it into the applicable box of the form on your manufacturer's website without any spaces.

And: fastboot -i 0x0fce oem unlock 0x07B7BFEA7AC879F0 https://www.getdroidtips.com/unlock-bootloader-sony-xperia-x-f5121f5122/
[Android Q&A, Help & Troubleshooting] Oldschool297:
I downloaded android_winusb.inf were should i add it?
[Android Q&A, Help & Troubleshooting] Oldschool297:
I get this.
[Android Q&A, Help & Troubleshooting] Oldschool297:
I also tried https://techbeasts.com/how-to-unlock-bootloader-of-sony-xperia-devices-guide/ the problem in fastboot seems to be that i- becomes and unknown option
[Android Q&A, Help & Troubleshooting] Oldschool297:
https://forums.androidcentral.com/t...tloader-fastboot-exe-unknown-option-i.895276/ fastboot R26 seems to work for the most i have the 34. platform-tools v 28.0.0 does not work with the provided command from the official manual.
[Android Q&A, Help & Troubleshooting] Oldschool297:
Yes it was the version, it is the second time i try to mess with andriod phones. I learn more and more. I tried fastboot.exe i- 0x0fce getvar version and i got version 0.5, finished, total time 0.000s
[Android Q&A, Help & Troubleshooting] Oldschool297:
I tried fastboot.exe -i 0x0fce oem unlock 0x and got FAILED, command not allowed. I did only find Sony L, L1 and L2 on sony oem https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/#unlock-code can it be that? I remeber i had a Sony Xperia X code.

I also tried fastboot flashing unlock, FAILED unknown command. with fastboot devices i got my phone visable.
[Android Q&A, Help & Troubleshooting] Oldschool297:
Were to find a unlock code for Sony L3? I only get pages were i need to oder. L1 and L2 are free on Sony. But L3 is missing.
[Android Q&A, Help & Troubleshooting] Oldschool297:
A 0 number is not good? Maybe that was for the network?
[Android Q&A, Help & Troubleshooting] Oldschool297:
One of the problems is that i can't get the OEM unlocking under Developer options to be on.

I can't find it under Devices and Printers. The second is the OEM unlocking in the Developer options and the third is that sony don't got the l3 so i can get a code.

Windows computer users can open the Devices and Printers directory > Right-click on the fastboot driver > Click on Update > Browse and select the location of the new android_winbus.inf file.
[Android Q&A, Help & Troubleshooting] Oldschool297:
I might need to download Android SDK? Were to find a version for Windows 8.1? I only have the platform-tools folder. But it seems like i already have the Android SDK. https://theunlockr.com/how-to-unlock-bootloader-on-xperia-devices-official-method/

I can't find this folder c:\android-sdk\extras\google\usb_driver to place the android_winusb.inf file.
[Android Q&A, Help & Troubleshooting] Oldschool297:
Do i need this? https://guides.codepath.com/android/installing-android-sdk-tools I downloaded cmdline-tools. when i run sdkmanager i get, ERROR: Java home is not set and no java command could be found in your path.
[Android Q&A, Help & Troubleshooting] alecxs:
Hi @Oldschool297,

first, you already connected phone in fastboot mode, so obviously you don't need drivers.

second, One Click Root solutions like Kingo Root won't work on new devices, just forget about it.

No need to download whole Android SDK, you have already discovered the xda guide in post #3 there is a download link to Android SDK Platform Tools ZIP file for the standalone platform-tools, that's all you want.

For OEM unlocking it's not quite clear to me, you can't find it, or you can't toggle?

https://www.youtube.com/watch?v=YwUx5_x7Skc

Beware you will permanently lose DRM keys on unlocking. And -as always- lose all data due the forced factory reset.

as for the official unlocking, did you submit your IMEI to Sony and obtain unlock code? the code is required to type as argument to fastboot oem unlock, you have to request specific for each device.

for rooting with Magisk you need copy of your current ROM (boot.img) - do you have it? without you can't root the device.
[Android Q&A, Help & Troubleshooting] Oldschool297:
How to take a copy of the ROM? I can't find my L3 on Sony's unlock site, they only have L, L1, L2, but not L3. I can't toggle the OEM under developer options. When i write in the pin the OEM is just like before off. It should be on after but not. Thanks for your help.
[Android Q&A, Help & Troubleshooting] alecxs:
you can download ROM from official servers with XperiFirm or from 3rd party sites like xperiastockrom.com

Not sure what pin you mean, but try again after factory reset with no pin set.
[Android Q&A, Help & Troubleshooting] Oldschool297:
If you check developers options you see a toggle to turn on that allow oem unlocking but i can't turn it on. Then it becomes impossible to lock it up. I can turn it on in my Xperia XZ3 and Xperia X but not on my L3
[Android Q&A, Help & Troubleshooting] alecxs:
what is the outcome of step 1 from link in post #13
[Android Q&A, Help & Troubleshooting] alecxs:
Did you read this posts right above yours?
[Android Q&A, Help & Troubleshooting] Oldschool297:
It says bootloader unlocked Yes. fastboot oem unlock <UNLOCK-CODE> must i use <> and insert the code between <>?
[Android Q&A, Help & Troubleshooting] Oldschool297:
I don't know were to get one since sony only got for L, L1 and L2, L3 is missing.
[Android Q&A, Help & Troubleshooting] alecxs:
try all
[Android Q&A, Help & Troubleshooting] alecxs:
It is allowed to unlock bootloader, that's not the same as unlocked bootloader.
[Android Q&A, Help & Troubleshooting] alecxs:
I am pretty sure that is a typo. Oldschool297 accessed the service menu according to instructions, and the answer was Yes. or do you think the service menu said that bootloader is unlocked? How was Oldschool297 supposed to unlock bootloader without code then?

maybe you should read more carefully.
[Android Q&A, Help & Troubleshooting] Oldschool297:
It is locked, almost sure. I can't see the install option when pressing power and volume down. I can't understand why just L3 is missing on sony's unlock page. A unlock code for the other models can't go? I tried to email them but they don't answer other then buisness.
[Android Q&A, Help & Troubleshooting] alecxs:
did you try L/ L1/ L2?
[Android Q&A, Help & Troubleshooting] Oldschool297:
I will try, i guess it is not 5 try attemps like when you should lock up the sim card from an operator?
[Android Q&A, Help & Troubleshooting] alecxs:
Nope. We have even script kiddies trying to brute force unlocking ;)

https://xdaforums.com/t/huawei-bootloader-brute-force.4151859
[Android Q&A, Help & Troubleshooting] Oldschool297:
I will try the codes first. I guess i can get the phone broken by that script?
[Android Q&A, Help & Troubleshooting] alecxs:
no it won't harm, but it's pretty pointless. don't waste your time with bruteforce scripts. get the unlock code from Sony. I am curious the codes are different for the same IMEI?
[Android Q&A, Help & Troubleshooting] Oldschool297:
I tried the codes for L, L1 and L2 and it was the same codes, i get: FAILED command not allowed. I guess it must be that i cannot toggle on allow to unlock oem under developers options.
[Android Q&A, Help & Troubleshooting] alecxs:
On my phone I don't need pin for OEM unlocking, can you explain more?
[Android Q&A, Help & Troubleshooting] Oldschool297:
I tried the scipt and entered my imei and the program restarted the phone, i got reponce but after awhile the program turned off. Fastboot error: Command failed, Could not parse output. Please check the output above yourself, If you want to disable this feature, switch variable unknownfall to False.
[Android Q&A, Help & Troubleshooting] Oldschool297:
I can't turn the OEM unlock toggle on in developers options.
[Android Q&A, Help & Troubleshooting] Oldschool297:
I fixed it by chaning true to false, it's running now
[Android Q&A, Help & Troubleshooting] alecxs:
you already have the unlock code from sony, why bruteforce? you cannot unlock bootloader this way without having OEM unlocking enabled.

you better go for any unofficial alternative.
[Android Q&A, Help & Troubleshooting] Oldschool297:
The script only seems to force with numbers and not letters. I think Sony Xperia needs letters to?
[Android Q&A, Help & Troubleshooting] Oldschool297:
I understand, then it must be something wrong with my phone when i can't turn it on. What can the fault be?
[Android Q&A, Help & Troubleshooting] alecxs:
No clue. it's probably intentionally blocked by carrier specific ROM version, I doubt that is a bug. usually one can unlock with mtkclient but Sony is a bit "special"

https://github.com/sonyxperiadev/device-sony-common/issues/806

you could try bootless-root method.
[Android Q&A, Help & Troubleshooting] Oldschool297:
Can i see what version i have? I wanted to install Xposed Frameworks and i must be unlocked to do that, can't find the install option now. Thanks for all help you made it more clear to me.
[Android Q&A, Help & Troubleshooting] alecxs:
settings - about phone. if bootless-root works you don't need unlocked bootloader. Magisk v21.4 should work with Riru 25.4.4 and EdXposed.
[Android Q&A, Help & Troubleshooting] Oldschool297:
Is the mtk client a phyton script? I am new to this. I have used Phyton before on Vista since 2017 for creating subtitles from videos. Is this a phyton script to. I create the folders on my phone? https://xdaforums.com/posts/82081703/show
[Android Q&A, Help & Troubleshooting] alecxs:
before you try with Magisk confirm the exploit works - download it from post #1 and try from adb shell
[Android Q&A, Help & Troubleshooting] Oldschool297:
I use Windows 8.1 and the newest phyton. Should i install by? How to open command prompt?

git clone https://github.com/bkerler/mtkclient

cd mtkclient

pip3 install -r requirements.txt

python3 setup.py build

python3 setup.py install

Install rules​

sudo usermod -a -G plugdev $USER

sudo usermod -a -G dialout $USER

sudo cp Setup/Linux/*.rules /etc/udev/rules.d

sudo udevadm control -R
[Android Q&A, Help & Troubleshooting] alecxs:
as I wrote mtkclient won't work with Sony. However if you want to try use linux, or carefully read the install instructions for windows. but if you don't know how to open cmd.exe this tool is not for you, for windows it's more complicated than in linux.

(note mtkclient is unrelated to bootless-root with mtk-su)
[Android Q&A, Help & Troubleshooting] Oldschool297:
Sorry missed that, i thought about that because one app told me i can't use mtk. Then this is the only way to go? https://xdaforums.com/posts/82081703/show
[Android Q&A, Help & Troubleshooting] alecxs:
I don't know you tell us

Critical MediaTek rootkit affecting millions of Android devices has been out in the open for months

A critical flaw in MediaTek processors went unpatched in devices due to OEM neglect. Google hopes the March 2020 Android Security Bulletin will fix this.

www.xda-developers.com
[Android Q&A, Help & Troubleshooting] Oldschool297:
I have to buy the app to seup the init.d app. I may found it somewere in full version.
[Android Q&A, Help & Troubleshooting] alecxs:
so you have tested the exploit work?
[Android Q&A, Help & Troubleshooting] Oldschool297:
I got it, i am at this point. Do i need a sd card to? What was the exploit work again?

Download the current magisk-boot script, unzip it, and put magisk-boot.sh inside your /sdcard/init.d folder.

A device compatible with mtk-su in app mode, i think my sony l3 can't handle mtk?
[Android Q&A, Help & Troubleshooting] alecxs:
please try the exploit first. you must download mtk-su from post #1 and copy it to /data/local/tmp. according to post #4 your device is supported.
[Android Q&A, Help & Troubleshooting] Oldschool297:
I will try, i use windows 8.1 right now. A terminal app, what is that? Shift and choice command prompt inside a folder?

A PC with ADB installed to interact with your device, or

A terminal emulator app
[Android Q&A, Help & Troubleshooting] alecxs:
refer to https://xdaforums.com/t/sony-xperia-l3-root-phone.4579483/post-88462111
[Android Q&A, Help & Troubleshooting] Oldschool297:
I use fastboot? Should i connect my phone to fastboot in normal mode? Then use fastboot for the commands?

Connect your device to ADB and push mtk-su to your /data/local/tmp folder
[Android Q&A, Help & Troubleshooting] Oldschool297:
If i get it to work it must be possible to install Xposed frameworks after?
[Android Q&A, Help & Troubleshooting] Oldschool297:
Were is the adb push path/to/mtk-su /data/local/tmp/ located?
[Android Q&A, Help & Troubleshooting] alecxs:
type 'adb help' for usage

device commands:
adb push <local>... <remote>
- copy files/dirs to device
adb pull [-a] <remote>... <local>
- copy files/dirs from device
(-a preserves file timestamp and mode)

get some sleep and read again tomorrow
[Android Q&A, Help & Troubleshooting] Oldschool297:
I do not know if i have adb in my computer. I have platforms-tools26. Should i copy the file to my phone, Thanks for all help i really appriciate it.
[Android Q&A, Help & Troubleshooting] alecxs:
you have linked a brief guide for ADB in your post #3
[Android Q&A, Help & Troubleshooting] alecxs:
@jwoegerbauer It's polite to read a thread before posting. If a thread needs to be closed is OP or moderators decision, not yours. I have asked Oldschool297 at least four times to confirm the exploit of post #55 still works (#59, #63, #65, #67) as the vulnerability has been fixed about a year ago.

Usually I am fine with spoon feeding, but here in that case it's dangerous to blindly follow instructions without understanding, so everybody read read read. If Oldschool297 is not able to adb push a file to his device, this method is not suitable for him.

The app you have linked is just a 3rd party wrapper app to automatize the steps. It's even more pointless to run this app as noob because the danger remains (and this obviously includes you too). For this reason, and because the app has willingly bundled the exploit binary despites explicitly prohibited by author diplomatic I haven't linked the app, and I ask you to not recommend rooting apps you haven't tested yourself.

@Oldschool297 if the exploit still works we can continue with installing Magisk v21.4 (according to post #1000) and you don't need to buy anything, you can use Termux:Boot for the init.d script.

But before that, I would like you to try enable OEM unlocking from command line. I will tell you the exact command once you confirmed mtk-su is working.

I didn't want to announce things I have in mind before I got the confirmation, but if the OEM unlocking attempt failes, there is maybe another way to unlock bootloader by modifying seccfg partition. It requires python, so needs some investigation on my side. but without the exploit it's wasted time.
[Android Q&A, Help & Troubleshooting] Oldschool297:
I mixed things together, i am sorry. You mean the https://github.com/bkerler/mtkclient#unlock-bootloader i can't install in my python. What to type in cmd? I get errors with the commands at the site. I have Python 23.0.1 and Windows 8.1 pro right now, thanks for the understanding, i appriciate it. I am new to this but i learn more and more
[Android Q&A, Help & Troubleshooting] alecxs:
no, sorry. mtkclient won't work.

please proceed with #72 mtk-su
[Android Q&A, Help & Troubleshooting] Oldschool297:
Sorry i thought about something else. I have it in my computer. In what folder is /data/local/tmp/ located? I should put mtk-su there? The problem seems to be with adb, i only got the platform-tools folder. Version 26.
[Android Q&A, Help & Troubleshooting] alecxs:
/data/local/tmp is a directory in your phone's /data partition
[Android Q&A, Help & Troubleshooting] Oldschool297:
I understand. Can i copy the file manuel or must i use the command tool? Should the mtk-su be placed in the platform-tools folder? I can copy it to my phone by the folder myself it it works.
[Android Q&A, Help & Troubleshooting] alecxs:
one can't access /data by phone itself. only shell is supposed to do that. did you read the instructions?

yes you can place the file inside platform-tools directory.
[Android Q&A, Help & Troubleshooting] Oldschool297:
I placed it in platform-tools and got. adb server version <41> dosen't match this client <39>; killing. daemon started successfully, abd error;: failed to get feature set: no device emulators found
[Android Q&A, Help & Troubleshooting] alecxs:
then carefully follow steps in post #3
[Android Q&A, Help & Troubleshooting] Oldschool297:
I get by following #3. Android debug bridge version 1.0.39, Revision , installed as c:\platform-tools\adb.exe
[Android Q&A, Help & Troubleshooting] alecxs:
this tells me nothing but you missed step 1 (because version of this link is 1.0.41 / 34.0.1)

go back to the guide and find this section:

if you can't see your phone on step 8 anymore, my only guess is you messed up with drivers (I can see bad instructions later after this post)

so in that case uninstall all drivers and re-install the drivers as described here. In device manager, pick the connected android device, on properties, select
[Android Q&A, Help & Troubleshooting] Oldschool297:
I get List of devices attached HQ695T4895. When trying to move the file i get Cannot stat, no such file or directory. I use the 34 version. I tried in the device manager and i already had the best driver.
[Android Q&A, Help & Troubleshooting] alecxs:
"no such file or directory" means that no such file or directory exist. please copy-paste the terminal commands (with mouse + enter) in [CODE]code[/CODE] tags here so I can see what is your mistake.
[Android Q&A, Help & Troubleshooting] Oldschool297:
When typing adb devices i get, adb server version <41> doesn't match this <39>, daemon started sucessfully, then i see my device
[Android Q&A, Help & Troubleshooting] Oldschool297:
adb push path/to/mtk-su /data/local/tmp/ is the command i wrote.
[Android Q&A, Help & Troubleshooting] alecxs:
replace "path/to" with the path to "mtk-su"
[Android Q&A, Help & Troubleshooting] Oldschool297:
My biggest thanks to you, i am very thankful for your help. Now it did go. 1 file pushed
[Android Q&A, Help & Troubleshooting] Oldschool297:
I got to step 7, Failed critical init step 1,
[Android Q&A, Help & Troubleshooting] alecxs:
try other versions of mtk-su
[Android Q&A, Help & Troubleshooting] Oldschool297:
Were to find? This was r23
[Android Q&A, Help & Troubleshooting] alecxs:
there is also r22 in the same OP #1
[Android Q&A, Help & Troubleshooting] Oldschool297:
I tried 22 to, it becomes the same.
[Android Q&A, Help & Troubleshooting] alecxs:
have you tried all 32-bit and 64-bit versions?
[Android Q&A, Help & Troubleshooting] Oldschool297:
Yes i tried all 4 and it's gets the same
[Android Q&A, Help & Troubleshooting] alecxs:
found a post on page 74 that confirmes the vulnerability was patched a year ago. maybe downgrade ROM?
[Android Q&A, Help & Troubleshooting] Oldschool297:
I do not know how to downgrade when i can't unlock bootloader. I need oreo 8.0 instead of 8.1?
[Android Q&A, Help & Troubleshooting] Oldschool297:
It isn't any other way to install xposed frameworks without unlocking the bootloader. It seems like a heck of a mess to unlock it on this phone, but it is a bugdet phone
[Android Q&A, Help & Troubleshooting] alecxs:
How to Flash Sony Xperia Stock Rom using FlashTool

Step-by-Step guidelines to flash Sony Xperia Stock Rom (firmware) on Sony Xperia Smartphones and tablets using the Xperia FlashTool on Windows Computer.

xperiastockrom.com

https://xdaforums.com/t/tool-update-04-09-2015-flashtool-version-0-9-19-10-windows-linux-mac.920746/
[Android Q&A, Help & Troubleshooting] Oldschool297:
It seems more easy. It seems impossible to lock up the bootloader now. It was for 8.0 and not for 8.1?
[Android Q&A, Help & Troubleshooting] Oldschool297:
It was possible to install magisk without root? I want to run some modules that comes with it