Where is default androidboot.seralno kernel command line parameter stored?

Hello,

I went through the following question:

and understood how to the change the default device id.

But i was curious to find out where in the source is the default device ID stored.

That is, the kernel command line parameter androidboot.serialno=XXXX shows up when I run:

cat /proc/cmdline

but i could not find this to be set in device/linaro/hikey960/BoardConfig.mk

It would be very helpful if someone could tell me where the default device ID is stored ?

Thank you for your time,

Regards,
Nishad

Not totally sure but believe it’s here: Platforms/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c - device/linaro/bootloader/OpenPlatformPkg - Git at Google

1 Like

Thanks very much for the quick reply.

I will try to modify it an check if it affects the device ID after flashing and post my results.

Thanks again,
Nishad

Before you go mucking around in the source code…

Have you read this?
https://source.android.com/setup/build/devices#960serial

Not sure if I understand the question but what you see is the result of fastboot setting the serial number it have stored in flash as kernel command-line argument.

Why do you not run this once for every board with uniqueue serial-numbers

fastboot getvar nve:SN@123456789012345

Usually when one have to resort to modifying the kernel it is a sign something is not as it should be…

Hello,

Thanks for the reply.
Yes i have gone through this and the same thing is also mentioned in the post i referred to in my first comment.

I just want to make sure this is where the default device ID is stored.

I understand that for such kind of a change it is not recommended to modify the Kernel Source and I would probably use the method you mentioned to modify the device ID.

Thanks again,
Nishad

I carried out some tests and I think It indeed is the place where the “androidboot.serialno” is stored.

Thanks very much. it helped a lot.

Regards,
Nishad

1 Like