Question Unlocking X3 on linux? - Xiaomi Poco X3 Pro

The unlock tool by fernando does not seem to work anymore . I don't own a windows machine, is there anyway to unlock X3 bootloader using linux? Thanks!

elementtest8 said:
The unlock tool by fernando does not seem to work anymore . I don't own a windows machine, is there anyway to unlock X3 bootloader using linux? Thanks!
Click to expand...
Click to collapse
X3 ? Wrong forum.
You can try some Windows bootable flash drive.

pl1992aw said:
X3 ? Wrong forum.
You can try some Windows bootable flash drive. I have the right forum I believe.
Click to expand...
Click to collapse
I'd like to know how how to unlock my Xiaomi Poco X3 Pro using a linux OS. I have tried virtualbox, ventoy ( to make a windows bootable), and Francesco Tescari's unlock tool. All three methods have failed for me and I don't have access to a windows computer. Have been trying to solve this problem for multiple weeks now.

bit of an update with the struggle. I have set up a fairly functional windows VM using this guide:
How to set up a KVM / QEMU Windows 10 VM
Over the weekend, I wiped Windows on my Zephyrus G14 and installed Pop!_OS on it. I’ve been trying to get a Windows 10 Virtual Machine as I need it for school. It’s also great to have a setup like…
raphtlw.medium.com
and have gotten the xioami unlock tool working within the virtual machine.
However, the USB is not recognized so it wont connect to my phone to unlock it.

Trying to look into permissions maybe? They recommended using gksu to open virt-manager but that is now deprecated... Hard problem... Feel so much closer using QEMU virtual machine, but still won't recognize my poco x3 pro

elementtest8 said:
Trying to look into permissions maybe? They recommended using gksu to open virt-manager but that is now deprecated... Hard problem... Feel so much closer using QEMU virtual machine, but still won't recognize my poco x3 pro
Click to expand...
Click to collapse
Make a bootable Windows from a flash drive.
Boot Windows without using virtual machine.
Example :
How to Run Windows From a USB Drive
Loading and running Windows 10 or Windows 11 from a USB drive is a handy option when you're using a computer saddled with an older operating system.
www.pcmag.com

just make a bootable windows from flashdrive using rufus

Thanks for the post guys. Unfortunately I couldn't get the thumb drives to work
I have solved the issue and I am posting the solution I found just in case anyone else happens to stumble on this post: fyi, I had a POCO x3 Pro and this worked in March 2022
sudo apt install git openjdk-11-jre openjdk-11-jdk gradle` - I am not sure all of this is required
mkdir xiaomi_unlock && cd xiaomi_unlock (make a directory before copying all the files over in step 3 to make it more organized
git clone https://github.com/francescotescari/XiaoMiToolV2.git && cd XiaoMiToolV2 && git checkout linux`
cd XiaoMiToolV2`
./gradlew build && ./gradlew run`
The xiaomi program should run. When prompted, I chose "Global" region and logged in
(possible step) had an error with my java version not syncing I had to set the home variable
I had to enter this command to make it work
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
if you are running ubuntu and or mint you might find the same solution there. Google where your java is installed and play around setting the JAVA_HOME. Took me 2 or 3 attempts before I finally found the right one
TLDR: how to unlock POCO X3 PRO using linux mint / ubuntu in March 2022

elementtest8 said:
Thanks for the post guys. Unfortunately I couldn't get the thumb drives to work
I have solved the issue and I am posting the solution I found just in case anyone else happens to stumble on this post: fyi, I had a POCO x3 Pro and this worked in March 2022
sudo apt install git openjdk-11-jre openjdk-11-jdk gradle` - I am not sure all of this is required
mkdir xiaomi_unlock && cd xiaomi_unlock (make a directory before copying all the files over in step 3 to make it more organized
git clone https://github.com/francescotescari/XiaoMiToolV2.git && cd XiaoMiToolV2 && git checkout linux`
cd XiaoMiToolV2`
./gradlew build && ./gradlew run`
The xiaomi program should run. When prompted, I chose "Global" region and logged in
(possible step) had an error with my java version not syncing I had to set the home variable
I had to enter this command to make it work
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
if you are running ubuntu and or mint you might find the same solution there. Google where your java is installed and play around setting the JAVA_HOME. Took me 2 or 3 attempts before I finally found the right one
TLDR: how to unlock POCO X3 PRO using linux mint / ubuntu in March 2022
Click to expand...
Click to collapse
People running into the captcha problem on login (it isn't shown) can try a patched version. Just replace step 3 with:
git clone https://github.com/Dav4555/XiaoMiToolV2_urlfix_captchafix && cd XiaoMiToolV2 && git checkout linux

homeboot said:
People running into the captcha problem on login (it isn't shown) can try a patched version. Just replace step 3 with:
git clone https://github.com/Dav4555/XiaoMiToolV2_urlfix_captchafix && cd XiaoMiToolV2 && git checkout linux
Click to expand...
Click to collapse
Apparently unlocking doesn't work anymore. I have to wait a week to check.

The original unlock tool works with a Windows guest inside Virtualbox on my Debian Testing. I used a developer VM one can download for free. Rename the downloaded file to windev_VM_virtualbox.zip, unzip it and import the appliance in virtualbox. Make sure your current user is a member of the vboxuser group to make USB pass-through work. You may or may not need the guest extensions, I installed them.

Related

64 bit USB driver

Dunno if anyone actually uses 64 bit Vista around here, but if you do, I made a 64 bit version of the USB driver. It's unsigned, so before installing it you'll have to put Vista into test mode or it will refuse to load the driver:
1) Type "bcdedit /set testsigning on" at an admin command prompt
2) Reboot
3) Check to see if the desktop says "Test Mode" on the corners
(I'm not paying $300/yr for a kernel code signing certificate)
After that you should be able to install it like a normal driver. If adb seems to be freezing occassionally, try using adb_fixed.exe instead (don't forget to kill the adb server first).
Sweet! Thanks so much. I have XP 64 but it should work fine
dammit! a bit too late...i used vmware on my 64bit vista to create a virtual machine and 32 bit drivers..lol
but thank you for the drivers...will make my life easier
and welcome to xdadevs!
thank you, I like wise used a work around and dual booted xp and xp x64 so I could use the drivers but I will definilty thankfully switch back over to x64 now thanks much!
it works!
i'm working with original adb, no hangs at all.
aziwoqpd said:
Dunno if anyone actually uses 64 bit Vista around here, but if you do, I made a 64 bit version of the USB driver. It's unsigned, so before installing it you'll have to put Vista into test mode or it will refuse to load the driver:
1) Type "bcdedit /set testsigning on" at an admin command prompt
2) Reboot
3) Check to see if the desktop says "Test Mode" on the corners
(I'm not paying $300/yr for a kernel code signing certificate)
After that you should be able to install it like a normal driver. If adb seems to be freezing occassionally, try using adb_fixed.exe instead (don't forget to kill the adb server first).
Click to expand...
Click to collapse
Awesome! You should see if you can get the changes submitted to Google and then they might be inclined to release it with their signing cert.
Nice job aziwoqpd! I don't use vista myself, but lack of 64 bit vista drivers was a glaring problem.
Mods: this should probably be stickied
Thanks a lot, works like a charm
(Using Vista64 business edition)
Source ?
Hey, that's sounds really great ! Congratulations...
Can you provide the sources to your modifications ?
I'd like to be able to rebuild this myself. Yes, I'm a little anxious at the idea of installing a random driver from the Internet on my system ;-)
adb fixes?
aziwoqpd said:
If adb seems to be freezing occassionally, try using adb_fixed.exe instead (don't forget to kill the adb server first).
Click to expand...
Click to collapse
What's the issue with adb and what does your adb_fixed fixes? My adb seems to work fine, how do I know which one to use?
Could you give the source patch for adb, I like to see what I'm running too
adb_fixed just includes this patch: http://www.telesphoreo.org/pipermail/g1-hackers/2008-December/000191.html
I've attached a diff of the changes I made to the driver. Basically the only difference is that a pointer used for communication between the 32bit DLL and the 64bit driver needs to be explicitly defined as a 32bit pointer so that it's only 4 bytes wide. I also changed the version of Microsoft's WDF library to 1.7 since that's what I already had installed.
You'll also need the driver development kit (the WDK) from Microsoft to compile and link the thing. It's a (big!) free download, though. Just google for "WDK". It includes a command line utility called "build" that's not unlike make for userland code (you can try to use Google's Visual Studio files, but you'll have to hack them to work with x64 and they just end up calling build.exe anyway). For Vista you'll also have to test-sign the driver with a dummy certificate (the WDK help files have a walkthrough somewhere covering this). Or you could pay $300 a year to globalsign for a key! What a deal....
Hmm, it's not letting me attach the file. I'll just paste it:
Code:
diff -U4 -r ./common/android_usb_common_defines.h /mnt/sukiyaki/dev/andusb/common/android_usb_common_defines.h
--- ./common/android_usb_common_defines.h 2008-10-31 17:43:13.000000000 -0700
+++ /mnt/sukiyaki/dev/andusb/common/android_usb_common_defines.h 2008-11-14 14:18:51.439171200 -0800
@@ -132,8 +132,8 @@
ULONG transfer_size;
/// Pointer to the actual buffer for ADB_CTL_BULK_WRITE request. This field
/// is not used in ADB_CTL_BULK_READ request.
- void* write_buffer;
+ void* POINTER_32 write_buffer;
};
#endif // ANDROID_USB_COMMON_DEFINES_H__
diff -U4 -r ./driver/android_usb.inf /mnt/sukiyaki/dev/andusb/driver/android_usb.inf
--- ./driver/android_usb.inf 2008-10-31 17:43:13.000000000 -0700
+++ /mnt/sukiyaki/dev/andusb/driver/android_usb.inf 2008-11-14 15:54:04.556495700 -0800
@@ -10,9 +10,9 @@
Class=USB
ClassGuid={F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}
Provider=%GOOG%
DriverVer=date,1.0.0009.00000
-CatalogFile=androidusb.cat
+;CatalogFile=androidusb.cat
; ================= Class section =====================
[ClassInstall32]
@@ -27,9 +27,9 @@
; ================= Device section =====================
[Manufacturer]
-%MfgName%=Google,NTx86
+%MfgName%=Google,NTamd64
; For Win2K
[Google]
; For loopback testing
@@ -38,9 +38,9 @@
%USB\VID_0BB4&PID_0C01.DeviceDescRelease%=androidusb.Dev, USB\VID_0BB4&PID_0C01
%USB\VID_0BB4&PID_0C02&MI_01.DeviceDescRelease%=androidusb.Dev, USB\VID_0BB4&PID_0C02&MI_01
; For XP and later
-[Google.NTx86]
+[Google.NTamd64]
; For loopback testing
%USB\VID_18D1&PID_DDDD.DeviceDescTest%=androidusb.Dev, USB\VID_18D1&PID_DDDD
; HTC Dream
%USB\VID_0BB4&PID_0C01.DeviceDescRelease%=androidusb.Dev, USB\VID_0BB4&PID_0C01
@@ -85,21 +85,21 @@
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles
[CoInstaller_CopyFiles]
-wdfcoinstaller01005.dll
+wdfcoinstaller01007.dll
[SourceDisksFiles]
-wdfcoinstaller01005.dll=1 ; make sure the number matches with SourceDisksNames
+wdfcoinstaller01007.dll=1 ; make sure the number matches with SourceDisksNames
[CoInstaller_AddReg]
-HKR,,CoInstallers32,0x00010000, "wdfcoinstaller01005.dll,WdfCoInstaller"
+HKR,,CoInstallers32,0x00010000, "wdfcoinstaller01007.dll,WdfCoInstaller"
[androidusb.Dev.NT.Wdf]
KmdfService = androidusb, androidusb_wdfsect
[androidusb_wdfsect]
-KmdfLibraryVersion = 1.5
+KmdfLibraryVersion = 1.7
;---------------------------------------------------------------;
[Strings]
THanks for the help....but how do I disable test mode after enabling it?
Thank you.
Thanks!
much appreciated.
remiks3 said:
THanks for the help....but how do I disable test mode after enabling it?
Click to expand...
Click to collapse
"bcdedit /set testsigning off" will turn testsigning back off, but you won't be able to use unsigned drivers any longer.
Thanks, I registered just so I could download that driver...
Just got my G1 flashed to the hacked RC and I wanted to play with some tethering on Vista X64...
This works perfectly on my XP 64 bit machine! Thank you!
I don't know if can help to sign the 64 bit driver , i try to post.
Test-signing the Micro Framework USB driver for installation on Vista 64-bit systems
The 64-bit version of Windows Vista requires all kernel mode drivers or services to pass a validation. In this follow-up of building USB driver in the Micro Framework, I’ll briefly outline the necessary steps to sign a driver that meets the requirement. These steps are intended for users working in a development environment. If you are planning to distribute drivers to third-parties, you should submit the driver for a WHQL signature or use a software publisher certificate. For more information about the bigger picture, review the kernel-mode signing guide on the WHQL website.
Let’s get on with the technical process. I’ve assumed you have a 64-bit Micro Framework USB driver built. If not, you’ll need to use the WDK and the WDK setup script, SETENV.BAT, to build the porting kit sample driver for an x64 (64-bit) Vista operating system. See the prior blog for detailed steps.
1. Open a command prompt with administrative privileges.
2. Run the command to enable test signed kernel mode drivers.
BCDEDIT /SET TESTSIGNING ON
3. Confirm the setting is correct by listing the Windows Boot Loader settings.
BCDEDIT /ENUM
4. Reboot to enable the new boot loader setting.
SHUTDOWN –t 60 –r
Notice the desktop background displays a new water mark after the reboot.
5. Open a command prompt and run the WDK SETENV.BAT command.
C:\apps\WDK\bin\SETENV.BAT C:\apps\WDK fre x64
6. Change directory to the porting kit root.
7. Set up the certificates folder.
MD Certificates
CD Certificates
8. Generate a self-signed certificate and private key.
Makecert –r –pe –ss MFCertificateStore –n “CN=MicroFrameworkOEM” OEMCertificate.cer
9. Open a MMC console and snap-in certificates for the current user. You will see the MFCertificateStore containing a private key and certificate. The certificate containing the public key is in a file called OEMCertificate.cer.
10. Add the certificate to the trusted publisher store.
Using the MMC certificate snap-in, right-click on the Trusted Publisher folder. Select import. Browse to the PK\Certificates\OEMCertificate.cer file.
11. Next, create a CAT file. First change directories to the Drivers\Vista64 folder. This folder contains the 64-bit USB driver under amd64 and the INF file.
CD BUILDOUTPUT\DRIVERS\VISTA64
12. Edit the INF file so that the version is 6.0.0.1 (or later as it matches the OS) and the driver date string is current.
13. Create a CAT file. The parameter to the “/driver” option must be the full path. Confirm the INF2CAT status output displays success with no warnings or errors.
INF2CAT /driver:C:\PK\Buildoutput\Drivers\Vista64\ /OS:Vista_x64
14. Sign the CAT file. The tool will use the the private key stored safely in the workstation certificate store.
SIGNTOOL sign /v /s MFCertificateStore /n MicroframeworkOEM /t http://timestamp.verisign.com/scripts.timestamp.dll MFUSB_PortingKitSample.cat
15. Verify the digital signature.
SIGNTOOL verify /kp /c MFUSB_PortingKitSample.cat amd64\MFUSB_PortingKitSample.sys
16. Plug in the Micro Framework device and install the newly signed driver. You’ll notice a pop-up that asks for permission to install the driver.
The steps above provide a process for signing 64-bit drivers that I use for Vista 64-bit testing. It is good to know the steps. But combined with the prior blog describing USB driver building, the labor to perform all these steps is too time-consuming. We’ll follow-up at a later time how to automate most if not all steps using the POWERSHELL toolset.
Jeff Simon
.Net Micro Framework
SDET - Porting Kit
Awesome, after 3 months finally got Windows to recognize. Thanks.
Vista 64 Development Mode Driver?
I'm runnin vista 64, and i can't get the "64 bit driver" that i found somewhere on here to work in Debug/Development Mode. anyone have one that they KNOW works?

Noob Tutorial: Ubuntu on Transformer

I've been looking around for some good tutorials, but in my opinion, almost everything was pretty difficult to understand for me.
But finally I found out how things are working (except of wifi, can You help me?
http://forum.xda-developers.com/showthread.php?t=1295718)
So I want to share my knowledge with You all and try to make it easy to understand.
1. The ony way in the moment to install Ubuntu on Your Transformer is over a Ubuntu or other Linux PC. (I easily installed Ubuntu virtually in VMware Workstation)
2. Get the required files on Your Linux machine:
http://forum.xda-developers.com/showthread.php?t=1191141
On this link, in the second post is written flash kit for linux:
klick on "here" to download the flash kit.
3. Extract the flash kit into a folder (e.g. Desktop)
4. Now download the Ubuntu root files. They are located here:
http://rootzwiki.com/showthread.php?1072-ubuntu-on-the-transformer
You have to scroll a bit down then You see
"ubuntu-rootfs:
is available here md5sum(95eda389e64461533c51fd1e4e237a30)"
Again, click on "here" to download the rootfiles. (It'll take a while, since the file is 950mb)
4. Once this is done, extract the rootfiles into linux-flash-kit/images. (This folder is the one You have extracted in 3.
5. When You want to Dual-Boot Your device with Andoid AND Ubuntu, read on, otherwise go to point 6.
You have to download a nvflashable rom like for example "PRIME!"
http://forum.xda-developers.com/showthread.php?t=1251044
There You download the NVflash version and extract the image files in it, to linux-flash-kit/images, like You have done it with the ubuntu image file.
6. Now You have to choose.
If You want only linux: remember flash-purelinux.sh
If You want linux and Android Dual-Booting with Android as default OS:
flash-linux-android.sh
If You want linux and Android Dual-Booting with Linux as default OS:
flash-linux.sh
If You want to restore back to android: flash-android.sh
If You want to get to factory state: restore-default.sh
Now You have to install the APX drivers. How to do this, You can read in other threads. Basically download the NVflash file from this thread, in it, You'll find the drivers: http://forum.xda-developers.com/showthread.php?t=1123429
So connect Your tablet to Your PC, turn it off, and turn it on while holding down the Power Button and the Volume+ button.
What You'll see is nothing. Now Your device is in APX mode.
In Your Linux Computer, open up the console and go to the linux-flash-kit directory (In my case it is on the Desktop)
so I do:
cd Desktop\linux-flash-kit
So now You are in Your linux-flash-kit directory. From here You have to type:
sudo sh flash-linux-android.sh
OR You type this in what You have remembered in Point 6.
e.g.
sudo sh flash-purelinux.sh
or
sudo sh flash-linux.sh
This will take a while because the files are transfered to Your device.
7.
When it's done, Your device will start.
Turn it off, and start into Your Ubuntu.
When Ubuntu is Your main system, You start it up normally by pressing the power button.
When Android is Your main system and You are Dual-Booting it, hold down the power button and the Volume down key until the device says that Your have to press the Volume-up key. Do this and You will see a Linux code with two penguins on the top running down Your screen. That's just good like it is.
Finally You should see the Ubuntu Setup with the language selection.
Now You can go on, and now You can set up Your Ubuntu PC!
FYI:
When You have not got a keyboard-dock, Connect Your tablet with Your pc and enter the adb shell
When You don't know how to enter it:
open up Your console, get into the directory of the android-sdk and into the platform-tools.
Then You type:
adb shell
Now You should be in the ADB shell
Now You can type:
DISPLAY=:0 onboard
Then a virtual keyboard should appear on Your tablet and You're ready to go!
Just to create a vocal point, This requires root doesn't it?
Also, is the wifi and stuff working? What's not working?
Mr.Ox said:
1. The ony way in the moment to install Ubuntu on Your Transformer is over a Ubuntu or other Linux PC. (I easily installed Ubuntu virtually in VMware Workstation)
Click to expand...
Click to collapse
Nice guide. There is one correction: it took me a while to find this but there is a windows-flash kit that I've used to install ubuntu on the transformer from Windows 7.
roflcopterofl said:
Just to create a vocal point, This requires root doesn't it?
Click to expand...
Click to collapse
I don't think so, because everything is flashed via nvflash. This way, You can flash a rom without having it rooted, too.
But I'm not quite sure..
moseskim said:
Nice guide. There is one correction: it took me a while to find this but there is a windows-flash kit that I've used to install ubuntu on the transformer from Windows 7.
Click to expand...
Click to collapse
Oh, that's a nice one, I haven't seen this yet! Thank You!
asdfuogh said:
Also, is the wifi and stuff working? What's not working?
Click to expand...
Click to collapse
What's working and not You can read in the Q&A Thread, there is written everything, I just tried to explain it a littlebit easier.
The thread is here:
http://forum.xda-developers.com/showthread.php?t=1191141
There You can see what's working, what not, and how to connect to a WiFi network (For me it doesn't work...)
Thank for this, I am itching to try this... Is there any "easy" way to get back to stock honeycomb after i try this ?
(sorry for this stupid question, I do no know much about these things)
In my opinion it's very easy.
On the one hand, run the command
Flash-android.sh
Or
Restore-default.sh
Or your use nvflash to wipe the device and get a normal rom on it.
Sent from my HTC Desire using xda premium
Thanks, I will try this later today then
tombolek said:
Thanks, I will try this later today then
Click to expand...
Click to collapse
Yeah, when You get Your wifi working, please tell me how because mine does not work
Sent from my HTC Desire using xda premium
Hello yesterday i've try to put linux and android on transformer, all work's great but after 5 minut nvidia apx was disconnected because battery load 0%; i work on vmware machine; after I've charged my dock e tablet and run again the script but that's is the result
sudo sh '/media/Nuovo volume/linux-flash-kit/flash-linux-android.sh'
/media/Nuovo volume/linux-flash-kit/flash-linux-android.sh: 2: /ubuntu/abootimg-i386: not found
/media/Nuovo volume/linux-flash-kit/flash-linux-android.sh: 3: /nvflash: not found
rm: impossibile rimuovere "linux.img": File o directory non esistente
why?
I've already tryed to restore with nvflash all partition and download all in new virtual hdd but not work.

[Q] adb devices returns '??????????????? no permissions'

This is just with Linux Mint- works in OS X.
adb in Mint works with Nexus 4 and One X every time but the OPO won't show up at all whether stock OS or Mahdi.
Any way to fix?
JAMCx said:
This is just with Linux Mint- works in OS X.
adb in Mint works with Nexus 4 and One X every time but the OPO won't show up at all whether stock OS or Mahdi.
Any way to fix?
Click to expand...
Click to collapse
Did u allow your pc from the phone when connecting it to adb?
JAMCx said:
This is just with Linux Mint- works in OS X.
adb in Mint works with Nexus 4 and One X every time but the OPO won't show up at all whether stock OS or Mahdi.
Any way to fix?
Click to expand...
Click to collapse
Just "sudo adb devices"
Happens to me on my ubuntu build VM too
bud77 said:
Just "sudo adb devices"
Happens to me on my ubuntu build VM too
Click to expand...
Click to collapse
Didn't work. The OTO does not show up in Mint as a connected device for some reason while the Nexus 4 and One X do and they respond to adb devices.
The OTO says connected as media device, android debugging enabled. Again it does connect and respond in OS X.
JAMCx said:
Didn't work. The OTO does not show up in Mint as a connected device for some reason while the Nexus 4 and One X do and they respond to adb devices.
The OTO says connected as media device, android debugging enabled. Again it does connect and respond in OS X.
Click to expand...
Click to collapse
Did yo follow these steps already ?
If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux:
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules
Click to expand...
Click to collapse
(From here)
bud77 said:
Did yo follow these steps already ?
(From here)
Click to expand...
Click to collapse
Above my pay grade ... I'll just plug it in the Mac
Thanks though.
Just plugged it into a W7 Pro machine and it saw it as a portable device and let me browse the folders without any tweaking.
JAMCx said:
Above my pay grade ... I'll just plug it in the Mac
Thanks though.
Just plugged it into a W7 Pro machine and it saw it as a portable device and let me browse the folders without any tweaking.
Click to expand...
Click to collapse
Just had the same problem and solved it by creating the file above.
Create the file
sudo vim /etc/udev/rules.d/51-android.rules
add the line below:
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
and reload the the new rules by using this command (or reboot ):
sudo udevadm control --reload
unplug the device and plug it back in and now "sudo adb devices" should show the correct name and status.
Do sudo bash, then password, the adb and fastboot work fine for me. If using windows cmd, run as admin.

[Q] Opensuse and ADB/Fastboot

Hello,
I am primarily a windows user but have tinkered with various Linux distros over the years. Really enjoying running the latest Opensuse 42.1 with the kde desktop.
My wife wants me to root her Moto G 1st edition, which I did a few years ago on Windows 7.
Curious to know how Opensuse and ADB/Fastboot play when it comes to rooting, flashing factory images etc?
With windows 7 I found it pretty straight forward, however I seem to remember it was a bit of a nightmare on Ubuntu getting the distro to find the phone (my HTC) and I gave up. Tried the 51 android rules and all that, but still no luck.
To get to the point, anyone have Opensuse playing nicely with their Moto G' and could post some instructions so I can get back to rooting?
Thanks,
Simply install Android Tools.
In openSUSE: http://software.opensuse.org/package/android-tools
In Ubunutu: sudo apt-get install android-tools-adb android-tools-fastboot
Tip: 'sudo' may be required to run fastboot / adb - i.e, sudo fastboot devices
Does it still need 51 android rules creating for the device? I had an awful time with permissions and trying to find the phone on Mint (Ubuntu based) last time I tried this.
Many thanks for your reply.
maritimesbob said:
Does it still need 51 android rules creating for the device? I had an awful time with permissions and trying to find the phone on Mint (Ubuntu based) last time I tried this.
Click to expand...
Click to collapse
No configuration or setup is required.

[TOOL][WIN/LIN/MAC] MiUnlockTool - Unlock bootloader of xiaomi devices on mac & linux

[TOOL][WIN/LIN/MAC] MiUnlockTool - Unlock bootloader of xiaomi devices on mac & linux
Ciao xda users, I'm here to introduce a new tool of mine, MiUnlockTool.
MiUnlockTool is an unofficial tool used to unlock bootloader on Xiaomi devices. This tool is copied from the original windows MiFlashUnlock tool and works the same way. The main feature of this tool is compatibility with linux and mac operating system (and windows too).
If you want more information about the tool and the story behind you can read below, if you just want the download link, here it is:
DOWNLOAD LINK
Requirements: java (javafx for gui if not included in your jdk/jre)
Usage:
- Download and extract the zip file
- If you don't have it, install java
- On windows:
-- open MiFlashUnlock.bat for graphical interface or:
-- open a cmd windows and cd into extracted dir and use "MiUnlockTool.bat username password" command for command-line usage
- On linux:
-- open a terminal window and cd into extracted dir and use "sudo ./MiUnlockTool.sh" command for gui interface or "sudo ./MiUnlockTool.sh username password" for command-line
- On mac:
-- open (double click) MiFlashUnlock.command for graphical interface or
-- open a terminal window and cd into extracted dir and use "./MiFlashUnlock.command username password" for command-line
- Attach your locked device in fastboot mode.
- If you are using gui just follow what you see on your screen
- If you are using command line version remember that there is no confirmation request before unlock and no check if the bootloader is already unlocked.
Possible errors:
- If you get a permission related error on linux or mac when launching the tool, open a terminal and cd into extracted dir and use "chmod 777 MiUnlockTool.sh" (or MiUnlockTool.command on mac) to set the executable permission.
- If your device isn't recognized:
-- On windows: install adb drivers
-- On linux/mac trying launching the tool with sudo (sudo ./MiUnlockTool.sh on linux or sudo ./MiUnlockTool.command on mac)
- Other problems launching the tool: try running "java -jar bin/MiUnlockTool.jar" command
- If you get some errors with javafx class not found stuff when you try to launch the gui, then you are missing javafx library. See openjfx package on linux.
- Any other problem: provide feedback in the comments.
Additional info: original MiFlashUnlock tool is just a bridge between fastboot, you (and your account login credentials) and xiaomi server: the tool gets device info from the device and send them to the server together with the account login token, the server checks wherever you satisfy all their requirements (account authorized, account associated with device in developer settings etc) and if everything is okay the server reply with the unlock key for your device instance (every time you reboot your phone you need a new key). Then the tool send the key to the device with a custom build of fastboot and if the key is right then the device is unlocked, else it reboots. After I discovered all the process behind the original unlock tool (and all the security encryption techniques) I decided to replicate it with a java (cross-platform) tool which embeds a custom fastboot version and replicates what the original tool does. That's a simple explaination of how my tool works (obviously it's more complicated than that).
This tool requires all of what is required by the original tool (an authorized xiaomi account binded to the device through developer options for three days if I remember correctly).
FAQs:
- Is this tool safe to use?
Yes, the main part is communication between tool and server, a safe thing. Also the unlock procedure itself is safe: or the key is correct or it is not. In both cases the device will not be damage.
- How did you find out how to replicate the original tool?
Thank you for your question. It's been a bit difficult since the original tool has been obfuscated and virtualized (protected against reverse engeneering) with a powerful protector: VMProtect. I've spent some time to reverse it (and custom fastboot too) and I finally did it. I will not explain in details how I did it.
- Is this tool more powerful than the original on? why should I use it on Windows?
Absolutely not, my tool is worst than the original one (it will have more bugs and on windows it doesn't manage drivers for example), that's why you should NOT use it on Windows. I made it work even with Windows because it was very simple to do. You can use it one Windows just to test it if you like, but I recommend using the better original tool MiFlashUnlock.
- Wow, you did a tool already done by developers paid by xiaomi, who is paying for the effort you put into this?
No one, I try to help people and getting appreciation for my work is a bit of a reward to me, but if you want to show your gratitude even more and support me as a developer you can make a donation, I will appreciate that even more (donation link below)
- I have to put my xiaomi account credentials, should I trust this?
I'm the developer of XiaoMiTool, I hope that a little bit of my reputation together with the hopefully good early feedback of reckless users on this tool is enough. If you are more a geek you can track the traffic and see that the only server connected are xiaomi and miui.
- I wanted too see the source of this tool but I see it is a bit obfuscated, why?
Xiaomi clearly doesn't wanted people to see how MiFlashUnlock works (since they obfuscated it a lot), I don't want to disrespect xiaomi decision by releasing the source plain, so I decided to obfuscated it a bit just to make it a bit harder to see (even if my tool is 100 times easier to reverse than the original)
- Can I share this tool?
Of course yes, but I would like you to share it using the xiaomitool.com link (not mega.nz one) so that if I release an update new people will get that and not the old version (there is no tool update enginge built in).
- You're english is not wonderful...
I know, hopefully it is understandable enough
Feedback.
I love feedback, feedback is the best you can do to help me improving this tool. I have not time to answer everybody's questions but I generally read feedback and do my best to make the tool work. If the tool worked or if the tool didn't worked you can write it in the comments, adding additional information like what error you get, what screen you see when the tool get stuck or even what you tried to solve the problem are precious to me. I have not all of xiaomi devices, I fully ested my tool only with two devices (a redmi 4x and a mi note 2) and only on two operating systems (linux and windows), so any new combination could lead to new errors or problems. Please include also your operating system when leaving feedback. Sometimes there are problems on gui which are not on command-line version, so if the tools fails launching or when using gui I suggest trying the command-line version.
Donation: free software is great from users prospective, but developers who spend hours of their time and don't get money for it are more unhappy to develop further free tools, so if you liked the tools and it saved you from the need to do 5000 kilometers to get a windows pc, or from the need to download a virtual machine image with your 32kB internet connection, you can show your gratitude by offering me a tasty, cold beer by clicking the link below
DONATION LINK
Download: you missed the download link at the top? Here it is again:
DOWNLOAD LINK
Fully obfuscated tool. Maybe bloatware or password hijacker
Problems with mi unlock on ubuntu system
Dear,
I tried to run this miunlock on my linux pc and it did not work. I installed the javafx using "sudo apt install openjfx" . After I ran "sudo ./*.sh". The program open, but when I put my email and password, it does not connect with the xiaomi server. I tried to access using facebook login and I have the same problem. How can I solve this problem? Do you have any idea?
Thanks
Danillo
The program does not find the phone connected. But "sudo fastboot reboot" work
---------- Post added at 12:03 PM ---------- Previous post was at 11:51 AM ----------
dpvalverde said:
Dear,
I tried to run this miunlock on my linux pc and it did not work. I installed the javafx using "sudo apt install openjfx" . After I ran "sudo ./*.sh". The program open, but when I put my email and password, it does not connect with the xiaomi server. I tried to access using facebook login and I have the same problem. How can I solve this problem? Do you have any idea?
Thanks
Danillo
Click to expand...
Click to collapse
Reinstall certs
disconnects phone on checking bootloader status with an error message on top left corner of phone "press any key to shutdown"
and stays stuck after reconnecting in fastboot mode when reading device info.
How to install it on manjaro arch Linux. did u keep it in AUR.?
Status : Success unlock bootloader
Device : Redmi 4X
Waiting Time : 72hours
Thx for the tool . love3 ??????
worked a treat.
had been struggling to use the mi tool for windows and my device was not being detected.
this took me barely a minute to unlock.
Waiting for a fastboot device...
Well, the communication with the 'net seems to work as intended but that is where it stops:
Code:
[18:01:15][INFO ] Starting login procedure
[18:01:24][INFO ] Login procedure succeeded
[18:01:25][INFO ] Checking account unlock permission
[18:01:27][INFO ] Unlock permission confirmed
[18:01:27][INFO ] Waiting for a fastboot device
Using the fastboot command line works for the same user account so this won't be solved by running the tool as root. The device reports itself as 18d1:d00d Google Inc. and shows up clearly when using the fastboot command line tool:
Code:
$ fastboot devices
deadbeef fastboot
(no, my device ID is not deadbeef)
Tried OpenJDK 10 and 9, Oracle JRE 8, no difference.
Digging deeper using strace shows the problem: the 'special' fastboot command you include (in bin/MiUnlockTool_res) is a 64-bit executable while I'm running the tool on a 32-bit machine. Substituting the provided tool for a link to the version already present on this machine makes the command progress to the error:
Code:
$ java -jar bin/MiUnlockTool.jar '[email protected]' 'mysupersecretpassword'
[18:19:25][INFO ] Starting login procedure
[18:19:36][INFO ] Login procedure succeeded
[18:19:36][INFO ] Checking account unlock permission
[18:19:39][INFO ] Unlock permission confirmed
[18:19:39][INFO ] Waiting for a fastboot device
[18:19:39][INFO ] Device connected: deadbeef
[18:19:39][INFO ] Obtaining device info...
[18:19:40][INFO ] Device info obtained
[18:19:40][INFO ] Checking if unlock will erase data and server message
[18:19:42][INFO ] Unlock procedure will erase userdata
[18:19:42][INFO ] Server message: An unlocked device is an easy target for malware which may damage your device or cause financial loss.
[18:19:42][INFO ] Querying unlock server for unlock key
[18:19:48][ERROR ] Unlock request replied with error code 20036
[18:19:48][ERROR ] Error meaning: After %d hours of trying to unlock the device
I guess I have to wait, how long I do not know as this is not shown in either mode (command line or GUI).
Anyway, you might want to add a 32-bit fastboot command or just tell users to install a native version and use that.
@YetAnotherForumUser
I see the same error message when I tried to unlock MI 8 (global version bought yesterday in official Xiaomi store in Poland). I tried official Xiaomi tools on Windows 10, but without any success (verify failed at 50%).
I'm using it on a Linux laptop, I get "buffer overflow detected" after "starting final unlock procedure" and then it fails
i have this 2 errors on linux tring to unlocking my redmi note 5 [20:59:38][ERROR ] Unlock request replied with error code 20036
[20:59:38][ERROR ] Error meaning: After %d hours of trying to unlock the device
After waiting 360 hours I was able to unlock my Mi 8 with this tool on my Ubuntu! With official MiFlashUnlock tool I wasn't able to unlock this device on Windows 10. Thanks a lot!
YetAnotherForumUser said:
Code:
...
[18:19:48][ERROR ] Unlock request replied with error code 20036
[18:19:48][ERROR ] Error meaning: After %d hours of trying to unlock the device
I guess I have to wait, how long I do not know as this is not shown in either mode (command line or GUI).
Click to expand...
Click to collapse
After about 13 days - I only tried twice in between - the thing is now unlocked. I needed to run the tool on a 64-bit machine as the 32-bit fastboot crashed (with a message in the lines of "* buffer overflow detected *"), possibly due to the longish argument used in the unlocking procedure.
YetAnotherForumUser said:
After about 13 days - I only tried twice in between - the thing is now unlocked. I needed to run the tool on a 64-bit machine as the 32-bit fastboot crashed (with a message in the lines of "* buffer overflow detected *"), possibly due to the longish argument used in the unlocking procedure.
Click to expand...
Click to collapse
I also used 64-bit OS -> Ubuntu 18.04 x64. It would be nice to see amount hours instead of %d, however it's just a minor bug. This tool is the best choice for Linux, MacOS and event Windows 10 users.
Hey guys,
Although I've unlocked & rooted other Android's in the past, this is my first time with a Xiaomi device. I've tried running the tool, and appear to get the "Error meaning: After %d hours of trying to unlock the device" error. Am I right in thinking this is just a bug in terms of the hours displayed, and that I will just need to wait the 15 or so days before I can unlock the device? At what point does that 15 days begin?
Also, once unlocked, what is the best way to flash a ROM? ADB via Terminal?
Looking to flash the Global MIUI over the Chinese one I currrently have.
Thanks!
Help. Can not connect to my phone in fastboot when using this tool. But the MiUnlock is still connected
huynhkhoa said:
Help. Can not connect to my phone in fastboot when using this tool. But the MiUnlock is still connected
Click to expand...
Click to collapse
Windows or linux ?
naik2902 said:
Windows or linux ?
Click to expand...
Click to collapse
window bro, please help me :crying:
huynhkhoa said:
window bro, please help me :crying:
Click to expand...
Click to collapse
Why r u not using original miunlock tool for windows ?
Did u enable oem unlock, usb debugging?
Installed fastboot drivers
Use fastboot devices command to check if u r device connected to pc.
Did u bind ur account to miunlock status in developer option?

Categories

Resources