Unlock Bootloader Using Termux Link «Reliable — HOW-TO»
Back in Termux on Phone A, run:
mtk da seccfg unlock
Or, on newer versions:
python mtk.py da seccfg unlock
If successful, you will see output indicating the bootloader is now unlocked. Reboot Phone B, and you will see the dreaded (but exciting) "Orange State" warning.
| Scenario | Use Termux? | | :--- | :--- | | MediaTek device (Tecno, Infinix, some Xiaomi Redmi Note series) | ✅ Yes – Works great. | | Google Pixel, OnePlus, Motorola | ❌ No – Use a real PC. | | Samsung (Exynos or Snapdragon) | ❌ No – Requires Odin. | | You want to unlock without wiping data | ❌ Impossible – Unlocking always wipes. | unlock bootloader using termux link
If you are running Termux locally on the device you want to unlock, you can use the adb tools to interface with the device's own shell (using adb tcpip or similar methods if rooted), but typically you use Termux to connect to another device or to verify the connection state.
If you are trying to use Termux to control the device from a PC perspective (connecting a phone to a PC), run:
adb devices
Unfortunately, no. Termux cannot replace a PC for these brands because: Back in Termux on Phone A, run: mtk da seccfg unlock
The only alternative for these devices: Use adb over network (adb connect ip:port) to reboot to bootloader, but you still cannot send the unlock command without a PC.
Exploit mtk-su (by XDA dev diov) gives temporary root on locked bootloaders for some MediaTek chips (MT67xx, MT8163).
From Termux (with root access gained via mtk-su), you can:
# Only if exploit works and partition writable
su
dd if=/sdcard/unlocked_aboot.img of=/dev/block/platform/mtk-msdc.0/by-name/bootloader
Why it fails now: MediaTek patched aboot write protection in newer bootloaders. Or, on newer versions: python mtk
This is the legitimate method to unlock from your phone using another phone as the "PC".
Almost certainly not. Carrier-locked devices usually have the bootloader unlock flag removed entirely.
Since Termux does not come with ADB/Fastboot pre-installed, you need to install the necessary packages.