I bought a Xiaomi Mi A2 maybe 10 months from now, and from changing software, or some strange things, I broke the USB port.

The strange thing is that only the "OTG" part got broken. I mean, I still can charge the phone, and use the native USB-C to Micro-Jack convertor, but I cannot use USB-C headphones or correct the phone to my PC.

I sent the phone to the warranty service, but since I had unlocked the bootloader, they didn't cover the charges. It was in christmas, so they didn't even wanted to fix anything, the just sent me the phone back.

But as a developer, I really need USB Debugging, and I bought some nice USB-C headphones, and I can't use them, so I wonder if there's anything I can do to relock the bootloader, and maybe send the phone to them for a repair.

Any ideas? I'd be really pleased. Thanks in advance


Only thing i can think of is maybe it was dropped while being charged and the usb jack is slightly bent inside...


  • Start Fastboot on the PC

  • Use wait-for-device or just devices first

  • fastboot wait-for-device or fastboot devices

  • You should see "waiting for device"

A worthy mention..
This will require your fastboot commands to be constructed as a script file. .

  • write each command in a new text file, line by line ( one command per line )

  • Save the text document as a .bat file on Windows or a .sh file on linux

  • Run the script

    • if .bat ( Double Click )
    • if .sh ( use command sh -c /path/script.sh )


    fastboot wait-for-device
    fastboot oem lock

Script will vary slightly with linux ( !#sbin/sh)

Fastboot should wait for a connection and then execute the next command ( oem lock )

To Use All Of This ...

  • Start the script on PC

  • Plug in the USB to PC but not Device ( important )

  • Now the tricky part, Slowly plug in the USB cable to the device, try to apply a slight amount of pressure going in a circle to find the sweet spot ( the part where the terminals are touching - the angle that the usb is bent on.. )

Try to find the spot where there's a connection, and watch the script run...
You are trying to hold the USB connection for just long enough to run OEM Lock, Fastboot will wait for the sweet spot ( only just connecting ) and then run OEM Lock after it gets a connection...

  • P.S you might have turned USB Charge Only - On Mar 28 '19 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.