Termux - Unlock Bootloader Via
Ensure that the android-tools package was installed successfully. Try running pkg install android-tools again.
: Required if the device (like Xiaomi) needs to verify account binding or download specific tokens. Step-by-Step Guide via Termux Install ADB and Fastboot in Termux
Warning: Unlocking the bootloader will completely factory reset your target device. Back up all critical data before proceeding. Step-by-Step Guide: Unlocking via Termux (Phone-to-Phone)
If the OEM Unlock toggle on the target device cannot be flipped: unlock bootloader via termux
termux-usb -r -e $SHELL -E /dev/bus/usb/002/002
A pop-up prompt should appear on both devices asking for USB permissions. Grant access to Termux on the host device. Step 5: Boot the Target Device into Fastboot Mode
Ensure your host cable configuration supports data transfer, not just charging. Step-by-Step Guide via Termux Install ADB and Fastboot
: Validates device codenames before sending flash commands.
Unlocking the bootloader will factory reset the target device. Back up all photos, contacts, and personal data before proceeding. Step-by-Step Guide: Unlocking via Termux
Typical on-device Termux approach (high-level): Grant access to Termux on the host device
In the Termux terminal on the host device, verify that the target device is recognized correctly: adb devices Use code with caution.
If fastboot devices returns an empty string, Termux lacks direct USB permission headers. You may need to install the termux-usb package or use a specialized script like adb-fastboot-plus within Termux to route the USB interface properly without root permissions on the host. 2. OEM Unlocking Grayed Out
On the target device, navigate to Settings > About Phone and tap Build Number seven times. Go to System > Developer Options and toggle on OEM Unlocking and USB Debugging . Step 1: Set Up Termux on the Host Device
One of the most practical uses of Termux+ADB is removing bloatware without needing root access. You can use ADB to disable or uninstall system apps, but be careful—disabling critical system packages can cause issues. For a starting point, you can use the following commands:
Do not install the Play Store version (it is outdated). Download the latest version from or GitHub .