This guide is for non-rooted Xiaomi/Redmi/POCO phones.
- You will first need to install Android Debug Bridge (ADB): https://developer.android.com/tools/adb. On a Mac, you can install it with Brew:
brew install android-platform-tools
- To use adb with a device connected over USB, you must enable USB debugging in the device system settings, under Developer options. On a Xiaomi phone, tap the MIUI version multiple times until Developer Options are unlocked. You can then search the Settings for "USB debugging" and enable it.
- Connect the phone to your computer via USB. Choose “File Transfer” mode.
- Open a terminal and run
adb devices
- Your phone will prompt to add your computer’s key to allowed, whihc you must agree to.
- On the terminal, enter
adb shell
.