Fastboot oem serialno command no longer recognized?


#1

ADB stopped working on one of the hikey boards I am working with, and I noticd that the serial number seems to have dissappeared. After reading a few of the topics here pertaining to reflashing the serial, I tried to do a “fastboot oem serialno” command to reflash the serial # and got the following error:

mike@mike-Z87-D3HP:/mnt/AOSP-master$ fastboot oem serialno

FAILED (remote: OEM Command not recognised.)
finished. total time: 0.001s

Since the flash-all.sh command uses this to write the serial # as well it would explain why I don’t have a serial # anymore…

What happened to that command? How do I get it back?

Thanks,
Mike


#2

Hi, @mpanetta

2~3 weeks ago I tried below two methods, which can work at my side:

The first one method is:
Step1: Link J15 1-2 and 3-4 pins so board can run into recovery model;
Step2: sudo python hisi-idt.py --img1=./l-loader.bin -d /dev/ttyUSB1
Step3: fastboot oem serialno, this command will generate random serial number
Step4: fastboot getvar serialno, you could see the serial number

The second method is to rebuild boot.img:
Change Android file device/linaro/hikey/hikey/BoardConfig.mk
"BOARD_KERNEL_CMDLINE := console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime androidboot.serialno=0123456789"


#3

I ended up building the bootloader that came with AOSP master branch and flashed that one. It fixed the issue.

Thanks for the help!

Mike