add virtual serial number to the system

1,017 views
Skip to first unread message

MOHAMMAD RASIM

unread,
Oct 2, 2019, 5:10:51 AM10/2/19
to Android-x86
Hi,
I'm trying to install an app that needs to read the serial number of the device to allow registration.
It reads the (ro.serialno) value but this value requires the following sysfs path to exist (/sys/class/android_usb/android0/iSerial) which is not available in an X86 install of android.

What my way around this? how can i tell the kernel to create this device for me (virtually)?

Regards

Chih-Wei Huang

unread,
Oct 3, 2019, 5:28:43 AM10/3/19
to Android-x86
MOHAMMAD RASIM <mohammad...@gmail.com> 於 2019年10月2日 週三 下午5:10寫道:
Could you just set that property (by root)?

setprop ro.serialno 12345678


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

MOHAMMAD RASIM

unread,
Oct 7, 2019, 3:43:14 PM10/7/19
to Android-x86
Nope, I can't

x86:/ # setprop ro.serialno 1234567890
setprop: failed to set property 'ro.serialno' to '1234567890'


Povilas Staniulis

unread,
Oct 7, 2019, 4:10:28 PM10/7/19
to andro...@googlegroups.com
You have to do this from init.sh/init.rc
> --
> You received this message because you are subscribed to the Google
> Groups "Android-x86" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to android-x86...@googlegroups.com
> <mailto:android-x86...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-x86/4fc10316-ff4d-4e7b-8020-8de32524ce9d%40googlegroups.com
> <https://groups.google.com/d/msgid/android-x86/4fc10316-ff4d-4e7b-8020-8de32524ce9d%40googlegroups.com?utm_medium=email&utm_source=footer>.


MOHAMMAD RASIM

unread,
Oct 8, 2019, 8:21:14 AM10/8/19
to Android-x86
Doesn;t make a difference, I added the command in the init_misc function and still after the virtual machine is booted I don't see the value saved (tested using getprop command).


On Monday, October 7, 2019 at 11:10:28 PM UTC+3, Povilas Staniulis wrote:
You have to do this from init.sh/init.rc

On 2019-10-07 22:43, MOHAMMAD RASIM wrote:
> Nope, I can't
>
> x86:/ # setprop ro.serialno 1234567890
> setprop: failed to set property 'ro.serialno' to '1234567890'
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android-x86" group.
> To unsubscribe from this group and stop receiving emails from it, send

MOHAMMAD RASIM

unread,
Nov 25, 2019, 11:26:23 PM11/25/19
to Android-x86
Any new ideas on this /

Chih-Wei Huang

unread,
Nov 26, 2019, 4:19:30 AM11/26/19
to Android-x86
MOHAMMAD RASIM <mohammad...@gmail.com> 於 2019年11月26日 週二 下午12:26寫道:
>
> Any new ideas on this /

The simplest way is to add androidboot.serialno=xxx
to kernel cmdline.

Din Assegaf

unread,
May 28, 2022, 4:50:06 AM5/28/22
to Android-x86
On Tuesday, 26 November 2019 at 16:19:30 UTC+7 Chih-Wei Huang wrote:
>
> Any new ideas on this /

The simplest way is to add androidboot.serialno=xxx
to kernel cmdline.


this is seem a solution to make the device unique, but when we replicate example on VM, the same serialno=xxx is used the same accross vm, make the software we use inside the Android X86, can be replicated ..
any idea about this, I know this will be unusable if developers read this, and still able to do "things" but at least some users who just replicate our rom, can be detected.


Reply all
Reply to author
Forward
0 new messages