Fastboot oem: command failed - android

I wanted to install a custom rom on my Xiaomi Mi A3, so I had to install the twrp. I enabled oem unlock from the developer settings of the phone and rebooted into bootloader mode, but when I ran the command "fastboot oem unlock" it gave me as a result
FAILED (remote: 'unknown command')
fastboot: error: Command failed
(this on linux)
Then I tried on windows, but fastboot did not recognize my device, while windows and adb yes.
Any solution?

You have to use Xiaomi's unlock tool, not fastboot. After 7 days you'll be able to unlock. If your xiaomi is not recognized on windows, download an older xiaomi unlock tool (on their website there are lots on the faq), it will have a driver installer, then your xiaomi is going to get recognized so you can unlock.

As Guerlando OCs said, you will need to use Xiaomi's unlock tool to unlock your Xiaomi device (Windows only). Also, you can use XiaoMiTool V2 if you are on Mac or Linux (on Windows will also work).
fastboot oem unlock will not work, because OEMs set their own fastboot oem commands. Xiaomi unlock tool uses a modified version of fastboot which adds a command: fastboot flashing unlock_bootloader [UNLOCK_CODE], that unlocks the bootloader of the device after obtaining the code from Xiaomi's servers.
If you need to install drivers, download MiFlash from here and install the device drivers from there.

Related

Fastboot devices not showing device

I am trying to unlock bootloader on my Samsung A40 with Android software tools. I have installed software tools through Android SDK Manager in Android Studio.
Adb lists devices:
However when I enter bootloader by typing adb reboot bootloader my device doesn't show with command fastboot devices:
I have tried installing drivers from Samsung site and through Android Studio Google drivers but neither worked. I installed drivers manually through device manager too.
I tried doing same commands in VM with Debian 10 but with same result.
I have tried flashing TWRP with Odin too but I got error: custom binary (vbmeta) blocked by oem lock.
I tried different USB ports too and a different cable.

"Waiting for any device" when attempting to fastboot Galaxy S8

I've been trying to install TWRP custom recovery on my galaxy s8 and haven't had much luck getting past this particular issue. After looking on several forums and watching pretty much all of the solutions on youtube I've resorted to posting my problem.
So, after enabling usb debugging and OEM unlocking I open up platform-tools in cmd prompt and type in the following:
adb devices - this is showing me that my device has been detected by my pc
adb reboot bootloader - this then takes me to the bootloader mode
fastboot flash recovery recovery.img - which presents me with "waiting for any device"
All the solutions that I've seen have something to do with the drivers but I believe mine is up to date after installing it manually from C:\Users\"My Name"\AppData\Local\Android\Sdk\extras\google\usb_driver
Any help would be much appreciated. Thanks
I have run into exactly the same issue on a Mi 11.
A working solution has been provided by Shendai on the GrapheneOS Discussion Forum (https://discuss.grapheneos.org/d/2753-trouble-installing-google-usb-drivers-w-fastboot-onto-windows-10/2).
For this, the usb/fastboot drivers for your phone need to be downloaded onto your computer.
To fix this, execute set devmgr_show_nonpresent_devices=1 in an administrator command prompt, then unplug the phone from the computer.
Next go to the Device Management on Windows and uninstall all drivers related to the phone. Connect the phone to the computer again, find the now unknown device in the device manager and install the drivers by browsing the computer for drivers and selecting the corresponding files.
After this, you can run adb reboot bootloader to enter the bootloader and fastboot devices to verify, that the phone is being detected.
Worked in Windows 11 with disabled driver signature enforcement.

ADB cannot list my device when my nexus 6p is in recovery mode

I want to update my nexus 6p to Nougat (manually OTA), so I went to settings to activate dev options and checked debbuging mode.
When my phone is full booted and I run this command on terminal adb devices it list my device, but when I run adb reboot recovery and I get into recovery mode if try to run adb devices adb doesn't show my device and if I try to apply update from adb it says:
MYs-MacBook-Pro:Android etomas$ adb sideload angler-ota-mtc20f-5a1e93e9.zip
loading: 'angler-ota-mtc20f-5a1e93e9.zip'
error: no devices/emulators found
So far I've tried:
oem unlocking;
when in recovery mode run adb kill-server disconnect and connect my usb cable and then run adb devices;
force to add my device to adb_usb.ini sudo echo 0x18d1 >> /Users/etomas/Library/Android/adb_usb.ini;
to unload this sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext;
reboot my phone my laptop;
updating my sdk platform to the latest version 24.0.2;
MacBook Pro (Retina, 13-inch, Mid 2014)
OS X El Capitan 10.11.6
I'm already running android studio on my laptop;
My nexus 6p
Android Version:6.0.1
Android Security Patch Level: August 5, 2016;
BaseBand Version: angler-03.61;
Kernel Version: 3.10.73-g909746b
Build number: mtc20f
Thank you in advance
TL;DR
You need to wipe the cache partition and then go to the recovery menu.
Boot into recovery:
adb reboot recovery
You will see the Google logo for a few seconds followed by a green android on his back with
“No command” underneath.
Press and hold Power, then tap Volume Up once, then release Power.
You should see Android Recovery menu (yellow with device info, firmware build version, keys).
NOTE: If your device starts rebooting at this point, your only recourse is to contact your
place of purchase about a warranty replacement or repair.
Remove the USB cable between the Computer and the Nexus 6P (maybe not needed but recommended).
Tap volume down to select "Wipe cache partition" (confirm with power).
Plug USB cable back.
Finally select "Apply Update from ADB" and run it.
adb sideload lineage-15.1-20200204-nightly-angler-signed.zip
Reboot the system.
Credits: rfdesign21, see https://forum.xda-developers.com/nexus-6p/help/stock-nexus-6p-wont-flash-ota-t3468928, https://drive.google.com/file/d/0Bz6x7k-VkpUJRjl6WjRhVmdXU0E/view

Unable to unlock Android bootloader via Fastboot on Ubuntu 12.04 - waiting for device

I am trying to unlock my Nexus 7 (2012)'s bootloader running Android 5.1.1 on Ubuntu 12.04 (Desktop).
I am able to communicate & send commands to the device using adb (USB-Debugging on Nexus turned on - Android SDK & Fastboot tool installed on Ubuntu):
niq#vb-ubuntu:~$ Android/Sdk/platform-tools/adb devices
List of devices attached
015d2a4ffb401e0c device
and the following command does the expected job aswell:
niq#vb-ubuntu:~$ Android/Sdk/platform-tools/adb reboot bootloader
After setting my tablet to fastboot mode I can communicate with it using the fastboot commands:
niq#vb-ubuntu:~$ sudo fastboot devices
015d2a4ffb401e0c fastboot
However when I now try to unlock the device's bootloader, that is when I run into troubles, first try does the following:
niq#vb-ubuntu:~$ sudo fastboot oem unlock
...
When I open another terminal now and try it another time I get the infamous "waiting for device" message displayed in my terminal:
niq#vb-ubuntu:~$ sudo fastboot oem unlock
< waiting for device >
Same thing happens when I login as root rather than using sudo. And also doesn't make a difference if I use this command (also results in waiting for device):
niq#vb-ubuntu:~$ sudo fastboot oem get_identifier_token
< waiting for device >
My Ubuntu clearly is able to talk to the tablet and execute commands on the device, why is it not possible to unlock the bootloader given that it is recognised and all the other commands work seamlessly?
Another thing I tried:
niq#vb-ubuntu:~$ lsusb -v | grep Google
Couldn't open device, some information will be missing
Bus 001 Device 004: ID 18d1:4e40 Google Inc.
idVendor 0x18d1 Google Inc.
iManufacturer 1 Google, Inc
/etc/udev/rules.d/11-android.rules:
UBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", MODE="0640", OWNER="mbp"
and finally:
niq#vb-ubuntu:~$ sudo service udev stop
udev stop/waiting
niq#vb-ubuntu:~$ sudo service udev start
udev start/running, process 2424
Am I missing something here?
I believe the issue here is with the device being locked by the carrier.
Check the "OEM-Locking" under developer setting, if it greyed out then you will not be able to unlock the bootloader.
I just tried it on my Pixel 4a that is carrier locked to Verizon and had no success just 3 dots ... after executing the oem unlock command, same story as yours.
From what I read online - Phone needs to have OEM-Locking turned on, meaning phone must be unlocked by the carrier. If OEM-Locking is greyed means phone is locked by the carrier and bootloader cannot be unlocked.
I had the same problem but I was able to solve it. Android version 5.1 running on Ubuntu 14.04.
In the terminal type:
~$ adb reboot bootloader.
then:
sudo fastboot oem unlock
Hope it works.

Android Fastboot devices not returning device

At the moment I would like to reinstall Android on my device(custom hardware device). I got the image files after building. But when I enter fastboot devices nothing returns.
adb devices is working. It return my device. fastboot flashall -w is also not working. I returns <waiting for devices> and stays like that until I exit.
So the 70-android.rules.d file is right. I have also set ANDROID_PRODUCT_OUT. But someone knows why fastboot does not see my device, but adb does?
Restarting udev or adb does not work. Some people recommend that on the internet.
OS: Ubuntu 11.10
For Windows:
Open device manager
Find Unknown "Android" device (likely listed under Other devices with an exclamation mark)
Update driver
Browse my computer for driver software
Let me pick from a list of devices, select List All Devices
Under "Android device" or "Google Inc", you will find "Android Bootloader Interface"
Choose "Android Bootloader Interface"
Click "yes" when it says that driver might not be compatible
Are you rebooting the device into the bootloader and entering fastboot USB on the bootloader menu?
Try
adb reboot bootloader
then look for on screen instructions to enter fastboot mode.
TLDR - In addition to the previous responses. There might be a problem with the version of the fastboot command. Try to download the newest one via Android SDK Manager instead of default one available in the OS repository.
There is one more thing you can do to fix this issue. I had the similar problem when trying to flash Nexus Player. All the adb commands we working fine while in normal boot mode. However, after switching to fastboot mode I wasn't able to execute fastboot commands. My device was not visible in the output of the fastboot devices command. I've set the right rules in /etc/udev/rules.d/11-android.rules file. The lsusb command showed that the device has been pluged in.
The soultion was quite simple. I've downloaded the the fastboot via Android Studio's SDK Manager instead of using the default one available in Ubuntu packages.
All you need is sdkmanager. Download the Android SDK Platform Tools and replace the default /usr/bin/fastboot with the new one.
I had the same issue, but I was running Ubuntu 12.04 through a VM. I am using a Nexus 10. I had added the usb device as a filter for the VM (using virtual box in the virtual machine's settings).
The device I had added was "samsung Nexus 10".
The problem is that once the device is in fastboot mode, it shows up as a different device: "Google, Inc Android 1.0." So doing "lsusb" in the VM showed no device connected, and obviously "fastboot devices" returned nothing until I added the "second" device as a filter for the VM as well.
Hope this helps someone.
If you got nothing when inputted fastboot devices, it meaned you devices fail to enter fastboot model. Make sure that you enter fastboot model via press these three button simultaneously, power key, volume key(both '+' and '-').
Then you can see you devices via fastboot devices and continue to flash your devices.
note:I entered fastboot model only pressed 'power key' and '-' key before, and present the same problem.
You must run fastboot as root. Try sudo fastboot

Categories

Resources