OEM unlocking - Sony Xperia XZ1 Compact Questions & Answers

Hello,
I have a brand new Xperia XZ1 Compact (G8441) and I'm setting out to install LineageOS on it.
I understand the first step is to unlock the bootloader. I have followed Sony's instructions here but I get this error when I run the fastboot unlock command:
./fastboot oem unlock 0xE8475F4F6417A194B (I also tried without the 0x)
FAILED (remote: 'Incorrect format for unlock data')
I then tried following a different article at getdroidtips but I get this error:
./fastboot -i 0x0fce oem unlock 0xE8475F4F6417A194B
fastboot: invalid option -- i
I'm also confused if I even have to run the above commands because I managed to enable "OEM Unlock" from the Developer options menu. This OEM Unlock option wasn't initially visible when I first enabled Developer Options so I'm curious why it suddenly appeared.
Any help would be greatly appreciated, thank you!

I was able to get it to work on a windows machine, after installing this:
[Tool] Latest ADB Fastboot and USB Driver installer tool for Windows
All praise and All Thanks to God ADB Fastboot and USB Driver installer tool for Windows, which will always install the latest version. To update the adb fastboot and usb drivers again, just rerun the tool. OS Requirements: Windows 7 and Above...
forum.xda-developers.com

u can also do it using flashtool thats how i did it

Related

Unable to unlock N6 bootloader (Android 6.0.1 Build MMB29X) [resolved]

Hi,
I am unable to unlock the bootloader on my Nexus 6, which was purchased new from Amazon.com. Or more accurately, I can issue the fastboot flashing unlock command without error, but my phone still says LOCKED and screen is frozen for 60 seconds.
I have followed the various HOWTOs on this website to the best of my ability:
1. Installed latest Android SDK tools(25.1.4.rc1), Platform-tools (24rc2) & Java8. I originally installed with the 23.1 platform-tools but then moved to the preview channel release when I had no luck.
2. USB debugging and OEM unlocking are both ON
3. Both "adb device" and "fastboot device" show my phone's serial number when in their respective modes, so I know communication is good between my laptop and phone.
How to replicate problem:
a. With my phone connected, I first issued "adb reboot bootloader". My phone then sucessfully changes to the AP Fastboot Flash Mode (Secure) screen. Beneath the green BATTERY OK (Charging) are the lines
Device is LOCKED. Status Code: 2
Transfer Mode: USB Connected
b. I then type "fastboot flashing unlock" and the output is
...
OKAY [ 0.016s]
finished. total time: 0.016s
However my phone does not ask me if I want to unlock. In fact, the screen then appears to be frozen -- pressing the volume up and down buttons does not change the power button selection menu. If I try to issue any other fastboot command, it says FAILED (command write failed (Unknown error)) finished. total time: 5.017s
The screen is frozen for 60 seconds. After that, the bootloader screen is once again functional (I can change menu options again) and I can issue new fastboot commands, such as 'fastboot reboot'
However, the device still says LOCKED and will refreeze for 60 seconds if I type 'fastboot flashing unlock'
Any suggestions would be appreciated!
Thank you.
type fastboot oem unlock to unlock your bootloader, then follow instruction. But beware, this will wipe your device
TMG1961 said:
type fastboot oem unlock to unlock your bootloader, then follow instruction. But beware, this will wipe your device
Click to expand...
Click to collapse
In newer versions of fastboot, the command is fastboot flashing unlock, not OEM unlock.
Code:
$ ./fastboot
usage: fastboot [ <option> ] <command>
commands:
update <filename> Reflash device from update.zip.
flashall Flash boot, system, vendor, and --
if found -- recovery.
flash <partition> [ <filename> ] Write a file to a flash partition.
flashing lock Locks the device. Prevents flashing.
flashing unlock Unlocks the device. Allows flashing
any partition except
bootloader-related partitions.
@webtrader,
@TMG1961 was trying to help you. Have you tried his recommendation before replying?
cam30era said:
@webtrader,
@TMG1961 was trying to help you. Have you tried his recommendation before replying?
Click to expand...
Click to collapse
No, I had not. I tried using fastboot oem unlock on an older version of the SDK toolkit and that had failed, but I had not tried using oem unlock again on the latest version, having noticed that "oem unlock" was no longer listed as an option.
I just tried it now on the latest SDK toolkit and it does indeed work for me. :good:
Thank you to the both of you for helping me out!
webtrader said:
No, I had not. I tried using fastboot oem unlock on an older version of the SDK toolkit and that had failed, but I had not tried using oem unlock again on the latest version, having noticed that "oem unlock" was no longer listed as an option.
I just tried it now on the latest SDK toolkit and it does indeed work for me. :good:
Thank you to the both of you for helping me out!
Click to expand...
Click to collapse
Welcome
i do believe the "fastboot flashing unlock" is for when a manufacture issues a binary token kinda of like how HTC does it. If the Nexus or any phone that is not carrier branded, "fastboot oem unlock" will be the command to pass.

oneplus 3t android 7.1.1 OS 4.5.1 unlock bootloader

Hi Guys
I am unable to unlock my bootloader. I have downloaded adb and fastboot drivers. I connect device. run adb devices, device details are displayed. i then run command to reboot into the bootloader. it reboots into the bootloader. when i run fastboot unlock oem nothing happens.
I have enabled the developer options, USB debug, OEM unlock, Advanced reboot
is there something I am not doing right?
adb is working in your system but fastboot is not working.
Check your drivers properly, they are not installed properly.
search for how to install adb and fastboot drivers on windows. There is no problem in windows xp but in windows 10 as in my case, you need to activate the developer option in setting and manually install the drivers. Go to device manager and check if your device is showing as android device when you go to fastboot mode.
ismailf007 said:
Hi Guys
I am unable to unlock my bootloader. I have downloaded adb and fastboot drivers. I connect device. run adb devices, device details are displayed. i then run command to reboot into the bootloader. it reboots into the bootloader. when i run fastboot unlock oem nothing happens.
I have enabled the developer options, USB debug, OEM unlock, Advanced reboot
is there something I am not doing right?
Click to expand...
Click to collapse
Did you type fastboot devices?
It should show you that your phone is connected.
Then you can run the unlock command.
Sent from my OnePlus3T using XDA Labs
ismailf007 said:
Hi Guys
I am unable to unlock my bootloader. I have downloaded adb and fastboot drivers. I connect device. run adb devices, device details are displayed. i then run command to reboot into the bootloader. it reboots into the bootloader. when i run fastboot unlock oem nothing happens.
I have enabled the developer options, USB debug, OEM unlock, Advanced reboot
is there something I am not doing right?
Click to expand...
Click to collapse
the correct command is "fastboot oem unlock"
Hi Guys it was the fastboot drivers. After installing it correctly it worked 100%. Assistance is highly appreciated

"FAILED (remote: unknown command)" trying to unlock bootloader

Hello, I'm trying to follow This guide and This one to unlock the bootloader with no luck.
This is what I get:
Code:
C:\Minimal ADB and Fastboot>fastboot devices
ZY322MF6XP fastboot
C:\Minimal ADB and Fastboot>fastboot oem get_unlock_data
...
FAILED (remote: unknown command)
finished. total time: 0.000s
I updated drivers and adb and fastboot with no luck.
Any help?
Edit: I have a Moto G6 Plus in RETLA channel with the march security patch.
I'd double check that Allow OEM Unlock in dev options is actually on
ZeroPoke said:
I'd double check that Allow OEM Unlock in dev options is actually on
Click to expand...
Click to collapse
Tried it with it on and off twice!
Angelelz said:
Tried it with it on and off twice!
Click to expand...
Click to collapse
Same thing happened to me. When you get your unique identifier find an online generator and then paste that into the Motorola website, worked for me.
H0LT3R said:
Same thing happened to me. When you get your unique identifier find an online generator and then paste that into the Motorola website, worked for me.
Click to expand...
Click to collapse
Yeah, can't get the unique identifier though, that particular command is not working for me. Anyone have any idea why?
Hi,
For Working this command "Fastboot oem get_unlock_data"
First you need to remove or delete your phone's SCREEN LOCKS like your fingerprint, face-unlock, pattern or password etc... And keep on NONE option in lock screen. After all above procedure done than, You run that commend "Fastboot oem get_unlock_data". After runing thant command, You will not get "FAILED (remote: unknown command)"
It will work 200%.
PRUTHVIRAJ S VASUDEV said:
It will work 200%.
Click to expand...
Click to collapse
no. it doesnt.
It depends on your fastboot version. Please check "fastboot --version" and post it here.
---------- Post added at 03:49 AM ---------- Previous post was at 03:44 AM ----------
...or try "fastboot oem help". This option will show you whether this command is available.
hi!
i have same problem.
product: Lenovo TB-7504x
fastboot getvar info:
warranty: yes
unlocked: no
secure: yes
kernel: lk
product: WT98997_LTEROW
version-preloader: 0.1.00
version: 0.5
PS: Allow OEM Unlock in developer options is actually on
Also having this issue trying to root my LG G6; I successfully set up adb, fastboot, and started up into bootloader, but it keeps returning the failed/unknown command error when I try to do any further steps. "fastboot devices" shows up correctly but "fastboot oem device-info", device-id, "fastboot flash recovery twrp.img", all keep failing
renforrest-EX said:
Also having this issue trying to root my LG G6; I successfully set up adb, fastboot, and started up into bootloader, but it keeps returning the failed/unknown command error when I try to do any further steps. "fastboot devices" shows up correctly but "fastboot oem device-info", device-id, "fastboot flash recovery twrp.img", all keep failing
Click to expand...
Click to collapse
same
Did you try another USB port? Some users reported that USB 3.0 did not work but 2.0.
I would be willing to bet this is happening on devices that are not allowed to be unlocked. Like those purchased from a phone company.
its been a week since i'm trying on my htc 10, but getting the same error, i tried,
- delete the drivers and re-install
- delete sync manager
- enabled debug & oem unlock
- done reset factory for the phone
- change USB ports and cables
- tried 3 latops
nothing works, sometimes i'll just the error "waiting for any phone" and other times "FAILED (remote: unknown command)"
Angelelz said:
Hello, I'm trying to follow This guide and This one to unlock the bootloader with no luck.
FAILED (remote: unknown command)
finished. total time: 0.000s[/CODE]
I updated drivers and adb and fastboot with no luck.
Try fastboot oem unlock first, then fastboot oem get_unlock_data
Any help?
Edit: I have a Moto G6 Plus in RETLA channel with the march security patch.
Click to expand...
Click to collapse
Try fastboot oem unlock first then fastboot oem get_unlock_data
I'm following a tutorial and obviously got stuck and the very same step as you did. And presumably you are following a tutorial, too.
1. Go to Security Settings and remove device lock (PIN, fingerprint, whatever you are using) and set it to NONE.
2. Go to Developer Settings and Unlock Bootloader. (If you skip step 1., you'll be asked to unlock your device here, but find that the Unlocking failed afterwards. Hence, go to step 1. and remove the lock first.)
3. fastboot oem unlock
Done. (Bootloader is unlocked now. Confirm via boot to fastboot mode (Volume down + Power button))
fastboot oem get_unlock_data is probably removed (deprecated) and maybe you don't even need a key from the manufacturer to unlock anymore.
gelignite said:
maybe you don't even need a key from the manufacturer to unlock anymore.
Click to expand...
Click to collapse
You still need a key to unlock the bootloader for the first time! When it's locked with status "flashing_locked" you don't need a key for it.
Is it a brand new device...?
WoKoschekk said:
You still need a key to unlock the bootloader for the first time! When it's locked with status "flashing_locked" you don't need a key for it.
Is it a brand new device...?
Click to expand...
Click to collapse
If that question refers to my post: I have a Moto E4 (XT1762). Bought it like half a year ago to tinker around with. I started it, ran all updates available and set a device lock (here: PIN).
Today I finally found the time to get started with lineageos and followed the guide at: rootmygalaxy.net (download-and-install-lineage-os-16-on-motorola-moto-e4-android-9-0-pie)
I got stuck at the error the OP had. (This lead me here.)
In my case I got past the error by doing the steps mentioned in my first post, i.e.
1. started the device (normal boot) and got rid of the device lock (PIN in my case), enabled USB debugging, enabled bootloader unlocking
2. powered off the device and started it again in fast boot mode (volume down + power button)
3. On computer / in terminal: fastboot oem unlock (without any key from the manufacturer)
The device showed a confirmation dialog. (Volume up: Yes, Volume down: No)
Code:
[email protected]:~/downloads/lineageos/Android_SDK_platform_tools/platform-tools$ ./fastboot oem unlock
(bootloader) Start unlock flow
OKAY [ 9.657s]
Finished. Total time: 9.667s
Now in fast boot screen I see Device Status: unlocked
I just wanted to share my experiences from today's struggles and maybe it'll help the OP.
gelignite said:
If that question refers to my post: I have a Moto E4 (XT1762). Bought it like half a year ago to tinker around with. I started it, ran all updates available and set a device lock (here: PIN).
Today I finally found the time to get started with lineageos and followed the guide at: rootmygalaxy.net (download-and-install-lineage-os-16-on-motorola-moto-e4-android-9-0-pie)
I got stuck at the error the OP had. (This lead me here.)
In my case I got past the error by doing the steps mentioned in my first post, i.e.
1. started the device (normal boot) and got rid of the device lock (PIN in my case), enabled USB debugging, enabled bootloader unlocking
2. powered off the device and started it again in fast boot mode (volume down + power button)
3. On computer / in terminal: fastboot oem unlock (without any key from the manufacturer)
The device showed a confirmation dialog. (Volume up: Yes, Volume down: No)
Code:
[email protected]:~/downloads/lineageos/Android_SDK_platform_tools/platform-tools$ ./fastboot oem unlock
(bootloader) Start unlock flow
OKAY [ 9.657s]
Finished. Total time: 9.667s
Now in fast boot screen I see Device Status: unlocked
I just wanted to share my experiences from today's struggles and maybe it'll help the OP.
Click to expand...
Click to collapse
Moto E4 is a developer's device without a locked bootloader. I thought you were talking about a Moto G6.
Baronstragen said:
Try fastboot oem unlock first then fastboot oem get_unlock_data
Click to expand...
Click to collapse
fastboot oem unlock worked for me

Bootloop, flash locked. What can I do?

Short story: my phone bootloops (shows the Android One screen for 3 seconds, then reboots), and I cannot unlock the flash in fastboot. fastboot oem unlock fails, fastboot flashing unlock fails, fastboot flashing critical_unlock fails.
What can I do, is my phone definitely bricked?
Long story: I installed september OTA and then rooted with Magisk using the image patch method. Now I wanted to get October OTA, so uninstalled Magisk to recover the unpatched bootloader, but the OTA refused to install. So I tried the flash_all method, but it failed because I did not do the critical unlock. So I tried the fastboot flash critical_unlock, but it continuously refused to work.
So I decided to agan lock flash, and do the oem lock, to restart the unlock procedure from the beginning. But after locking, the phone does not boot anymore (and it was booting fine before!). On top of that, I cannot oem unlock anymore, fastboot oem unlock always fails.
Is there any way to recover the phone?
Try fastboot oem edl
then use mi flash
Thanks for help.
Unfortunately fastboot oem edl fails:
Code:
# fastboot oem edl
FAILED (remote: Device is already locked!)
Finished. Total time: 0.001s
And as fastboot oem unlock also fails, I cannot unlock the bootloader.
doragasu said:
Thanks for help.
Unfortunately fastboot oem edl fails:
And as fastboot oem unlock also fails, I cannot unlock the bootloader.
Click to expand...
Click to collapse
I'll need more info than that
what's the error you get when using oem unlock or unlock_critical?
are you using minimal adb? If so, don't, use this instead https://developer.android.com/studio/releases/platform-tools
Are you using a usb 3.0 port? Switch to a usb 2.0 if you are
I am working from Linux, and I have the full Android Studio installed. I cannot use adb, since I cannot boot the phone (and as far as I know, adb does not work on fastboot, but I might be wrong).
I will try with the one you linked and come back with the results.
doragasu said:
I am working from Linux, and I have the full Android Studio installed. I cannot use adb, since I cannot boot the phone (and as far as I know, adb does not work on fastboot, but I might be wrong).
I will try with the one you linked and come back with the results.
Click to expand...
Click to collapse
Minimal adb includes fastboot, if you have minimal adb or you installed it from the repo then it's outdated, use the one I linked
Nothing was working for me, so finally I recovered the phone by opening it and using the deep flash method.

Unlock OEM via ADB

Hi, so my Xiaomi MI A2 is kinda not working and I think that wiping cache partition might help but I can't access the recovery so I wanted to install TWRP. The thing is I have the boatloader locked, I have the USB depuration activated but not the OEM, so how can I unlock boatload or unlock OEM via fastboot?
Thanks
_08_ said:
Hi, so my Xiaomi MI A2 is kinda not working and I think that wiping cache partition might help but I can't access the recovery so I wanted to install TWRP. The thing is I have the boatloader locked, I have the USB depuration activated but not the OEM, so how can I unlock boatload or unlock OEM via fastboot?
Thanks
Click to expand...
Click to collapse
run "fastboot oem unlock" and "fastboot oem unlock_critical" see if its execute without error , then run " fastboot oem device-info" , let us know what the result.
shihabrumel said:
run "fastboot oem unlock" and "fastboot oem unlock_critical" see if its execute without error , then run " fastboot oem device-info" , let us know what the result.
Click to expand...
Click to collapse
It won't let me. It says:
my command: fastboot oem unlock System: FAILED (remote "flashing unlock is not allowed")
Fastboot: error: command failed.
Same with the critical. I also had an error trying another command, it said, not allowed in lock mode.
Actually, I'm trying other commands and it's the same error with all comands.
My Mi A2 was not booting
My mi a2 last updated to 19/04/05 pie version, then i install the Google camera using below steps..
1. Turn on debugging mode/oem & turn off the phone
2. Then power button+vol dwn Fastboot mode & connect to pc (Pc already have the adb)
3. In pc>adb>folder>Cmd> type "fastboot oem unlock"
4. Then factory reset the phone and reboot again to fastboot mode
5. Then boot the patched image for phone
6. Then install the magisk and gcam work perfectly.
Simply i used these methods
the***********.com/enable-camera2-api-xiaomi-mi-a2-lite-guide/
But then I tried to relock the bootloader, using below commands on cmd
1. "adb reboot-bootloader"
2."fastboot oem lock"
I tried these 2 commands 4 or 5 times
But phone is not power on with locked bootloader. Then I unlock again oem and try again,, But not working,
Then i unlock bootloader again and try these commands to lock it again,
1. "adb reboot-bootloader"
2."fastboot flashing lock"
3. "fastboot oem lock"
Unfortunately it is not work, also i can't give command "fastboot oem unlock", also i can't turn on my phone, Please help me... I want to restore my phone to working mode... Please help me, Quick, urgent :crying::crying::crying::crying:

Categories

Resources