Daily Archives: 2010/10/06

Motorola Fills up Android Property System

milestone-propsysFor almost half a year now, I have been having sporadic problems with my Mororola Milestone. After booting the phone, everything worked alright but after some usage, some features started to fail. Either WiFi connections didn’t work any more or 3G data connections stopped working or VPN failed to establish a connection. Also, some settings (for example: notification sound for SD card availability) failed to persist through reboots.

I finally found out why!

Android has a low level property system that lives in the init process. A good writeup of how it works can be found at

http://rxwen.blogspot.com/2010/01/android-property-system.html

The important part is that the property system only has space for 247 system properties. The properties are filled from the following files:

/default.prop
/system/build.prop
/system/default.prop
/data/local.prop

Additional properties are created by scripts with the setprop utility and by various processes (wifi manager, vpn manager etc.)

Since Android 2.1, Motorola has filled the above files with lots of properties so that the property service is almost filled up by the time the phone has finished booting. When opening a WiFi connection, additional properties have to be set. If no more properties are available, things start to fail.

I have commented out quite a few of the properties from above files to make some space and now everything works smoothly again. I am not sure yet, which properties are important and which not, once I have done some more research, I will post the changes I have made.

I hope this helps Milestone users with similar problems.

Update:

Here is my modified /system/build.prop:

# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=SHOLS_U2_02.36.0
ro.build.display.id=SHOLS_U2_02.36.0
ro.build.version.incremental=8985865
ro.build.version.sdk=7
ro.build.version.codename=REL
ro.build.version.release=2.1-update1
##ro.build.svn=24
##ro.build.date=Thu Jun  3 12:47:57 CDT 2010
##ro.build.date.utc=1275587277
##ro.build.type=user
##ro.build.user=milestcm
##ro.build.host=il93lnxebld02
##ro.build.tags=rel-keys
ro.product.model=Milestone
ro.product.brand=MOTO_VFDE
ro.product.name=umts_sholes
ro.product.device=umts_sholes
ro.product.board=sholes
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=motorola
ro.product.locale.language=de
ro.product.locale.region=DE
ro.wifi.channels=
ro.board.platform=omap3
# ro.build.product is obsolete; use ro.product.device
ro.build.product=umts_sholes
# Do not try to parse ro.build.description or .fingerprint
ro.build.description=umts_sholes-user 2.1-update1 SHOLS_U2_02.36.0 8985865 rel-keys
ro.build.fingerprint=MOTO_VFDE/umts_sholes/umts_sholes/sholes:2.1-update1/SHOLS_U2_02.36.0/8985865:user/rel-keys
# end build properties
#
# system.prop for UMTS Sholes
#

rild.libpath=/system/lib/libril-moto-umts-1.so
rild.libargs=-d /dev/ttyS0
ro.sf.lcd_density=240
ro.default_usb_mode=0

# Default network type.
# 3 -> GSM/WCDMA (auto mode, according to PRL)
# AVAILABLE Application Settings menu
ro.telephony.default_network=3

wifi.interface = tiwlan0
# Time between scans in seconds. Keep it high to minimize battery drain.
# This only affects the case in which there are remembered access points,
# but none are in range.
wifi.supplicant_scan_interval = 15

# The OpenGL ES API level that is natively supported by this device.
# This is a 16.16 fixed point number
ro.opengles.version = 131072

# This is a high density device with more memory, so larger vm heaps for it.
dalvik.vm.heapsize=24m

#proximit sensor screen off delay
mot.proximity.delay=450

#proximit sensor disable touch distance 
mot.proximity.distance=60

#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.product.multi_touch_enabled=true
ro.product.max_num_touch=2
ro.product.tfdt_string=com.motorola.android.app.tfdt.START
dalvik.vm.jniopts=warnonly
ro.com.motorola.smartsensor=true
ro.config.notification_sound=F1_New_SMS.ogg
ro.config.alarm_alert=Alarm_Classic.ogg
ro.telephony.call_ring.multiple=false
ro.telephony.call_ring.delay=3000
##ro.url.safetylegal=http://www.motorola.com/staticfiles/Support/legal/?model=A855
ro.setupwizard.enable_bypass=1
ro.media.enc.hprof.file.format=mp4
ro.media.enc.hprof.codec.vid=h264
ro.media.enc.hprof.codec.aud=aac
ro.media.enc.hprof.vid.width=720
ro.media.enc.hprof.vid.height=480
ro.media.enc.hprof.vid.fps=25
ro.media.enc.hprof.vid.bps=3000000
ro.media.enc.hprof.aud.bps=96000
ro.media.enc.hprof.aud.hz=16000
ro.media.enc.hprof.aud.ch=1
ro.media.enc.hprof.duration=60
##ro.media.enc.lprof.file.format=mp4
##ro.media.enc.lprof.codec.vid=m4v
##ro.media.enc.lprof.codec.aud=amrnb
##ro.media.enc.lprof.vid.width=320
##ro.media.enc.lprof.vid.height=240
##ro.media.enc.lprof.vid.fps=15
##ro.media.enc.lprof.vid.bps=200000
##ro.media.enc.lprof.aud.bps=12200
##ro.media.enc.lprof.aud.hz=8000
##ro.media.enc.lprof.aud.ch=1
##ro.media.enc.lprof.duration=30
ro.media.enc.file.format=3gp,mp4
ro.media.enc.vid.codec=h264,m4v,h263
ro.media.enc.aud.codec=aac,amrnb
ro.media.enc.vid.h264.width=176,720
ro.media.enc.vid.h264.height=144,480
ro.media.enc.vid.h264.bps=64000,8000000
ro.media.enc.vid.h264.fps=1,30
ro.media.enc.vid.h263.width=176,720
ro.media.enc.vid.h263.height=144,480
ro.media.enc.vid.h263.bps=64000,8000000
ro.media.enc.vid.h263.fps=1,30
ro.media.enc.vid.m4v.width=176,720
ro.media.enc.vid.m4v.height=144,480
ro.media.enc.vid.m4v.bps=64000,8000000
ro.media.enc.vid.m4v.fps=1,30
ro.media.enc.aud.amrnb.bps=5525,12200
ro.media.enc.aud.amrnb.hz=8000,8000
ro.media.enc.aud.amrnb.ch=1,1
ro.media.enc.aud.aac.bps=8192,96000
ro.media.enc.aud.aac.hz=16000,16000
ro.media.enc.aud.aac.ch=1,1
ro.media.dec.aud.wma.enabled=1
ro.media.dec.vid.wmv.enabled=1
ro.media.cam.preview.fps=0
ro.com.google.clientid=android-motorola
##ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html
##ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html
ro.config.vc_call_vol_steps=7
dalvik.vm.dexopt-flags=m=y
net.bt.name=Android
ro.config.sync=yes
dalvik.vm.stack-trace-file=/data/anr/traces.txt
ro.config.ringtone=Red_Beats.ogg
ro.com.google.gmsversion=2.1_r1
ro.com.google.clientidbase.am=android-vf-{country}
ro.com.google.clientidbase=android-hms-vf-{country}
ro.setupwizard.mode=OPTIONAL
ro.com.google.clientidbase.gmm=android-motorola
ro.com.google.clientidbase.yt=android-motorola 
ro.com.google.locationfeatures=1

 

The entries starting with ## have been commented out by me.

  • The commented ro.build.* entries contain information about the host on which the system was built (who cares?)
  • ro.url.safetylegal is an URL for some legal notice?
  • ro.media.enc.lprof.* are modified settings for video recording with low quality. (I only use high quality anyway.)
  • ro.url.legal und ro.url.legal.android_privacy again are URLs fore some safety/privacy policies?

And here is my modified /system/default.prop

ro.com.google.clientidbase.vs=android-motorola
ro.build.config.version=GAS_EMEA_USASHLS00VFDE_P035
ro.build.config.date=Mon Jul 12 20:51:05 -0500 2010
##ro.bidi.Hebrew=Off
ro.keyboard.type=qwertz
ro.bidi.enabled=false
##ro.bidi.Arabic=Off
persist.sys.timezone=Europe/Berlin
ro.fota.enable=1
sms.convert.char.for.latam=0
##ro.bidi.Russian=Off

bidi seems to stand for “bidirectional input”. Since ro.bidi.enabled is false, I assume that the other ro.bidi.* properties are irrelevant anyway.

After thinning out the property files, is have 245 properties after using WiFi, 3G-data and VPN. Two properties left in reserve 😉

Examples for properties that are created dynamically are:

[dhcp.tiwlan0.result]: [ok]
[init.svc.dhcpcd]: [running]
[dhcp.tiwlan0.pid]: [3986]
[dhcp.tiwlan0.reason]: [RENEW]
[dhcp.tiwlan0.dns1]: [192.168.1.6]
[dhcp.tiwlan0.dns2]: []
[dhcp.tiwlan0.dns3]: []
[dhcp.tiwlan0.dns4]: []
[dhcp.tiwlan0.ipaddress]: [192.168.1.61]
[dhcp.tiwlan0.gateway]: [192.168.1.6]
[dhcp.tiwlan0.mask]: [255.255.255.0]
[dhcp.tiwlan0.leasetime]: [14400]
[dhcp.tiwlan0.server]: [192.168.1.6]
[net.dns1]: [192.168.1.6]

 

If these properties can not be created when activating WiFi, WiFi does not work.