I have tried to relock my Zenfone Max pro m2,but after installing stock recovery when I tried to run relock.cmd, it is not working showing that

write to device failed(invalid argument)

Even when I have tried to find the device info using fastboot command, but I'm getting the same error as

write to device failed( too many links) 

Please help me with this.

  • I don't get it: where are you issuing fastboot commands? Are you on bootloader mode or in recovery mode?
    – esQmo_
    Apr 6, 2019 at 18:18
  • Bootloader mode Apr 6, 2019 at 18:20
  • Did you enable OEM unlocking in development options?
    – esQmo_
    Apr 6, 2019 at 18:24
  • Yes , I have enabled usb debugging Apr 6, 2019 at 18:24
  • No, I mean OEM unlocking
    – esQmo_
    Apr 6, 2019 at 18:25

1 Answer 1


I don't know if you are running relock.cmd as a file or a command, but the usual way to lock the bootloader in Fastboot is

fastboot oem lock


fastboot devices

And wait until you see your device is found, then do the lock

fastboot oem lock

Try also,

fastboot flashing lock     
fastboot flashing lock_critical
  • Those commands are not working Apr 7, 2019 at 7:20
  • Try fastboot flashing lock - or - fastboot flashing lock_critical Apr 7, 2019 at 7:27
  • 1
    Yeah it worked ...!!!! , i tried changing the usb port. and thanks for your suggestions Apr 7, 2019 at 7:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .