For MediaTek (MTK) devices:

On Device B, go to Settings > Developer Options and toggle on OEM Unlocking and USB Debugging . Step 1: Prepare the Termux Environment

Once the target device is securely resting in Fastboot mode, you can execute the unlock commands.

The Android phone whose bootloader you want to unlock.

Depending on the manufacturer and age of Device B, execute one of the standard universal unlock commands: fastboot flashing unlock Use code with caution. Alternatively, for older devices: fastboot oem unlock Use code with caution.

Unlocking the bootloader allows you to:

I can give you the specific code blocks or workarounds for your exact setup! Share public link

The device you wish to unlock must have its bootloader unlockable and its developer options properly configured:

A data-capable USB OTG adapter or a USB-C to USB-C cable to connect both phones. 2. Software & Settings Preparation

How to Unlock Your Bootloader Using Termux: A Complete Guide