I've bee trying to install twrp on my Asus Zenfone Max Pro M1 X00TD. So, first I enabled USB debugging, connected my phone to computer and booted into fastboot by adb reboot bootloader. After that I tried to run command fastboot oem unlock. But the device showed the following error.

FAILED (remote: 'unknown command')
fastboot: error: Command failed

No matter what command I try it responded in the same manner except for the fastboot reboot command which rebooted my device into system. Also in the fastboot mode the screen shows CSC FASTBOOT MODE instead of FASTBOOT MODE. I don't know if this has something to do with the problem.

this is the script I used to unlock my bootloader.


#    This file is create by liunianliang
#    For download all img by fastboot
#    2018/01/17

# set path
if [ -z "`which fastboot`" ] && [ -e "fastboot" ];then
    for i in `echo $PATH | sed -e 's/:/ /g'`;do
        cp -rf fastboot $i/fastboot > /dev/null
    export PATH=`pwd`:$PATH

# check fastboot tool
if [ -z "`which fastboot`" ];then
    echo -e "Error: No fastboot tool found !!!"
    exit 1

# default platform

# default buildtype

# default slot

# get platform from fastboot command
platform=`fastboot getvar platform 2>&1 | grep platform | awk '{print $NF}'`

# get build-type from fastboot command
buildtype=`fastboot getvar build-type 2>&1 | grep build-type | awk '{print $NF}'`

# get slot from fastboot command
slot=`fastboot getvar current-slot 2>&1 | grep current-slot | awk '{print $NF}'`

secret_key=`fastboot getvar secret-key-opt 2>&1 | grep secret-key-opt | awk '{print $NF}'`
secret_partition=`fastboot oem get_random_partition 2>&1 | grep bootloader | awk '{print $NF}'`

if [ -z "$platform" ];then

if [ -z "$buildtype" ];then

if [ -z "$slot" ];then

if [ "$buildtype" = "user" ];then
    echo $secret_key > default_key.bin
    fastboot flash $secret_partition default_key.bin
    fastboot flashing unlock
    fastboot flashing unlock_critical

# function of download
split=$(printf "%-60s" "-")
function flash_one_image() {
    echo -e "\n${split// /-}"
    if [ -e "${platform}_$2" ];then
        echo -e "\E[0;32mbegin fastboot download ${platform}_$2\E[00m\n"
        fastboot flash $1 ${platform}_$2
    elif [ -e "$2" ];then
        echo -e "\E[0;32mbegin fastboot download $2\E[00m\n"
        fastboot flash $1 $2
        echo -e "\E[1;31mCan't find file: $2 or ${platform}_$2, Skip!\E[00m\n"

echo -e "\nAll is download,do you want to reboot(y/n) ?"
read x
if [ "$x" == "y" ] || [ "$x" == "Y" ];then
    fastboot oem recovery_and_reboot

Recently my phone was given to service. I don't know whether they have done anything wrong with my system firmware.

  • 1
    fastboot oem indicates that all commands that begin with that words are non-standardized. That means the command you try is simply not implemented in your device model or you have to use a slightly different command. Check the net for an description for your exact model how to unlock bootloader. Be aware that some site just provide generated tutorials that are simply wrong.
    – Robert
    Dec 10, 2021 at 18:25
  • @Robert it's not an issue just with oem unlock. No matter whatever command I try it responds the same. I was using an unlock file from the internet. I will update the post with that. Dec 11, 2021 at 4:19
  • xda-developers.com/…
    – alecxs
    Dec 11, 2021 at 10:59
  • @alecxs I use manjaro and these binaries are in their latest version. Dec 11, 2021 at 12:32
  • 1
    Why don't use official UnlockTool.apk
    – alecxs
    Dec 11, 2021 at 21:18


You must log in to answer this question.

Browse other questions tagged .