Congratulations! Your bootloader is now open. Now you can:
Verdict: This method is theoretically possible with extensive kernel hacking, but not practical for most users. unlock bootloader via termux
Unlocking the bootloader of the device running Termux is theoretically complex. Congratulations
You can install android-tools (fastboot/adb) in Termux and try: Unlocking the bootloader of the device running Termux
pkg install root-tools android-tools
su
fastboot devices
But this only works if the phone already has an unlocked bootloader or a custom recovery with OTG fastboot support — very uncommon.