Read Only Properties Initialize

Post Reply
bryanmtdt
Posts: 3
Joined: Tue Feb 03, 2015 9:30 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Read Only Properties Initialize

Unread post by bryanmtdt » Fri Apr 17, 2015 1:36 am

Hi,

I'm trying to change the default properties ro.*, on the XU3 lite, it's been 2 weeks trying by now.

One of the attemps was to modify files on the android platform
Modified the file:
device/hardkernel/odroidxu3/system.prop
adding the lines, trying to change the serial number.

Code: Select all

ro.serialno=1234567812345678
ro.boot.serialno=1234567812345678
And flashed with fastboot the kernel, system, userdata, cache, uboot.bin, bl1, bl2 and tzsw, also erase fat.
All new compiled (except bl1, bl2, tzsw)

But serial number keep showing unknown.

If I run getprop I get
ro.serialno=[]

How can I change the serial nomber and other ro properties.

Thanks

Update

I've modify init.rc and seems to change ro.serialno, but I want to know the right way to change initial ro properties.

User avatar
tobetter
Posts: 4671
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 88 times
Been thanked: 338 times
Contact:

Re: Read Only Properties Initialize

Unread post by tobetter » Sat Apr 18, 2015 10:20 am

bryanmtdt wrote:Hi,

I'm trying to change the default properties ro.*, on the XU3 lite, it's been 2 weeks trying by now.

One of the attemps was to modify files on the android platform
Modified the file:
device/hardkernel/odroidxu3/system.prop
adding the lines, trying to change the serial number.

Code: Select all

ro.serialno=1234567812345678
ro.boot.serialno=1234567812345678
And flashed with fastboot the kernel, system, userdata, cache, uboot.bin, bl1, bl2 and tzsw, also erase fat.
All new compiled (except bl1, bl2, tzsw)

But serial number keep showing unknown.

If I run getprop I get
ro.serialno=[]

How can I change the serial nomber and other ro properties.

Thanks

Update

I've modify init.rc and seems to change ro.serialno, but I want to know the right way to change initial ro properties.
Have you read the code this? This is the genuine AOSP code which initiate the kernel boot parameter and ro.serialno is also exported from here. Storing ro.serialno into
system.prop won't help you since it will be updated again on next boot by this code block.
https://github.com/codewalkerster/andro ... nit.c#L735

Basically bootloader, U-boot in ODROID case, should pass such value by kernel argument adding ro.serialno=1234567812345678, for example, and Android will use this. But since ODROID-XU3 does not have particular storage for serial number by default, you should set where/how serial number is stored. You can also do the such things is bootloader but you should do code signing, or alternatively you can modify init where I pointed out so that it can read somewhere from particular memory or kernel driver for each boards different serial number.

XP1
Posts: 2
Joined: Mon May 04, 2015 4:29 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Read Only Properties Initialize

Unread post by XP1 » Mon May 04, 2015 4:32 am

bryanmtdt wrote:Update

I've modify init.rc and seems to change ro.serialno, but I want to know the right way to change initial ro properties.
I also have the same problem. I need to set a serial number for my Android device.

What lines did you modify in init.rc? Can you copy and paste your code?

I am still interested even if init.rc workaround works.

User avatar
tobetter
Posts: 4671
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 88 times
Been thanked: 338 times
Contact:

Re: Read Only Properties Initialize

Unread post by tobetter » Mon May 04, 2015 8:35 am

XP1 wrote:
bryanmtdt wrote:Update

I've modify init.rc and seems to change ro.serialno, but I want to know the right way to change initial ro properties.
I also have the same problem. I need to set a serial number for my Android device.

What lines did you modify in init.rc? Can you copy and paste your code?

I am still interested even if init.rc workaround works.
C1 has its own serial number, that's why you don't need to set it in init.rc at all unless you like to use your own format. Please refer the link what I have posted.

XP1
Posts: 2
Joined: Mon May 04, 2015 4:29 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Read Only Properties Initialize

Unread post by XP1 » Mon May 04, 2015 7:27 pm

tobetter wrote:
XP1 wrote:
bryanmtdt wrote:Update

I've modify init.rc and seems to change ro.serialno, but I want to know the right way to change initial ro properties.
I also have the same problem. I need to set a serial number for my Android device.

What lines did you modify in init.rc? Can you copy and paste your code?

I am still interested even if init.rc workaround works.
C1 has its own serial number, that's why you don't need to set it in init.rc at all unless you like to use your own format. Please refer the link what I have posted.
I am not using an ODROID. I have a cheap, off-brand Android device called Xtreme Tab 7 (A13) that is showing unknown serial number in Settings > About tablet > Status. The problem is that I need to have a serial number to trade in a tablet at Best Buy.

I just want to do it the easiest way possible. I only need the serial number to show up in Settings > About tablet > Status. For my circumstance, it doesn't matter if it is done the best way or not.

I edited "init.rc" the first time, but I was surprised and frustrated that it didn't work. The second time, I edited "default.prop", and it worked!

Here is how I did it:
1) Save image of boot partition:

Code: Select all

cat /dev/block/nandc > nandc.img
md5sum nandc.img /dev/block/nandc
2) Copy the "nandc.img" image from tablet into the "boot-resources" folder of Carliv Image Kitchen for Android ("CarlivImageKitchen-Windows_v1.0.zip").
3) Run "carliv.bat", and follow the steps of unpacking and repacking the boot image.
4) Edit "init.rc" under "on boot" section:

Code: Select all

on boot
    ...

# Set serial number.
    setprop ro.serialno 1234567812345678
    setprop ro.boot.serialno 1234567812345678
    setprop ril.serialnumber 1234567812345678

    ...
5) Edit "default.prop". Put this at the top:

Code: Select all

ro.serialno=1234567812345678
ro.boot.serialno=1234567812345678
ril.serialnumber=1234567812345678
6) Repack boot image.
7) Copy the repacked boot image in "output" folder to tablet.
8) Write the boot image:

Code: Select all

cat /dev/zero > /dev/block/nandc
cat boot-nandc_012345.img > /dev/block/nandc
md5sum boot-nandc_012345.img /dev/block/nandc
9) Reboot.

Here is my partition layout:

Code: Select all

nanda -> bootloader (Loads Android or recovery and contains boot animation, battery charging images, etc.)
nandb -> env (Sets environment variables and helps bootloader)
nandc -> boot (Android kernel and ramdisk; loads on normal boot)
nandd -> system (Everything in /system)
nande -> data (Everything in /data)
nandf -> misc (Used to store temporary data between boot stages and reboots)
nandg -> recovery (Recovery kernel and ramdisk)
nandh -> cache (Various temporary files)
nandi -> databk (A backup of some of the more important files in /data)
nandj -> sdcard (Internal SD card /mnt/sdcard)
Note: Commands may vary.

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 8 guests