Android中/system/build.prop文件解读

 

Android中/system/build.prop文件解读

分类: Android 387人阅读 评论(0) 收藏 举报
在/system下的build.prop文件里,我们常看见以下语句。
ro.ril.hsdpa.category = 10
ro.ril.hsupa.category = 6
ro.ril.hsxpa = 2
ro.ril.enable.amr.wideband=1
wifi.supplicant_scan_interval=45
dalvik.vm.heapsize=24m       //OutOfMemoryError
ro.ril.def.agps.mode = 2

这几行主要是设置网络数据、定位、语音、内存等方面的优化。

======================================================
根据上面的参数代码,下面列出不同数值对应代表的意义
ro.ril.hsdpa.category : 
1 = 1.2 Mbit/s
2 = 1.2 Mbit/s
3 = 1.8 Mbit/s
4 = 1.8 Mbit/s
5 = 3.6 Mbit/s
6 = 3.6 Mbit/s
7 = 7.2 Mbit/s
8 = 7.2 Mbit/s
9 = 10.1 Mbit/s
10 = 14.0 Mbit/s
11 = 0.9 Mbit/s
12 = 1.8 Mbit/s
13 = 17.6 Mbit/s
14 = 21.1 Mbit/s
15 = 23.4 Mbit/s
16 = 27.9 Mbit/s
19 = 35.3 Mbit/s
20 = 42.2 Mbit/s
21 = 23.4 Mbit/s
22 = 27.9 Mbit/s
23 = 35.3 Mbit/s
24 = 42.2 Mbit/s
25 = 46.8 Mbit/s
26 = 55.9 Mbit/s
27 = 70.6 Mbit/s
28 = 84.4 Mbit/s
HSDPA(High Speed Downlink Packet Access):高速下行分组接入

ro.ril.hsupa.category : 
1 = 0.73 Mbit/s
2 = 1.46 Mbit/s
3 = 1.46 Mbit/s
4 = 2.93 Mbit/s
5 = 2.00 Mbit/s
6 = 5.76 Mbit/s
7 = 11.5 Mbit/s
HSUPA (high speed uplink packet access):高速上行链路分组接入

ro.ril.hsxpa : 3G数据标准选择
0 – UMTS r99
1 – HSDPA
2 – HSDPA/HSUPA

ro.ril.enable.amr.wideband:
0 – 关闭对AMR wideband /HD Audio的支持
1 – 打开对AMR wideband /HD Audio的支持
    AMR WideBand,语音带宽范围,全称为“Adaptive Multi-rate - Wideband”,即“自适应多速率宽带编码”,
采样频率为16kHz,是一种同时被国际标准化组织 ITU-T和3GPP采用的宽带语音编码标准,也称 为G722.2标准。
AMR-WB提供语音带宽范围达到50~7000Hz,用户可主观感受到话音比以前更加自 然、舒适和易于分辨。
AMR-WB应用于EDGE、3G可充分体现其优势。足够的传输带宽保证AMR-WB可采用从6.6kb/s到23.85kb/s共九种编码,语音质量超越PSTN固定电话 。
PS:这里需要注意的是有些版本的Radio不支持AMR wideband,那样就算设置为1也支持不了这功能

wifi.supplicant_scan_interval:
wifi无线局域网扫描间隔时间,单位为秒。
调大这个值可节约耗电。

dalvik.vm.heapsize=24m:
虚拟内存大小,单位为Mb,调大这个可以略微提高性能,对于某些FC问题确实有用。
在hdpi下,不设置成24m以上,就会导致系统无法启动。

ro.ril.def.agps.mode:AGPS模式选择
0 – 关闭AGPS服务支持。可以节约耗电和网络流量,不过会延长GPS定位时间。
1 – 
2 – 打开AGPS服务支持。
 
 
 

wanqi@wanqi-System-Product-Name:~/huiye_Q9/msm7627-app$
wanqi@wanqi-System-Product-Name:~/huiye_Q9/msm7627-app$ adb push build.prop /system/
52 KB/s (2362 bytes in 0.044s)
wanqi@wanqi-System-Product-Name:~/huiye_Q9/msm7627-app$ adb shell getprop | grep heap
[dalvik.vm.heapsize]: [24m]
wanqi@wanqi-System-Product-Name:~/huiye_Q9/msm7627-app$ adb shell getprop | grep heap
[dalvik.vm.heapsize]: [48m]
wanqi@wanqi-System-Product-Name:~/huiye_Q9/msm7627-app$ adb shell getprop | grep heap
[dalvik.vm.heapsize]: [48m]
wanqi@wanqi-System-Product-Name:~/huiye_Q9/msm7627-app$ adb pull /system/build.prop .
29 KB/s (2362 bytes in 0.078s)
wanqi@wanqi-System-Product-Name:~/huiye_Q9/msm7627-app$ vim build.prop
wanqi@wanqi-System-Product-Name:~/huiye_Q9/msm7627-app$ adb push build.prop /system/
50 KB/s (2362 bytes in 0.045s)
wanqi@wanqi-System-Product-Name:~/huiye_Q9/msm7627-app$ adb shell getprop | grep heap
[dalvik.vm.heapsize]: [48m]
wanqi@wanqi-System-Product-Name:~/huiye_Q9/msm7627-app$

 

 

 

开机初始化会在对应的init.rc中增加如下一行:setprop dalvik.vm.heapsize 48m。

 

ActivityManager.java (android/frameworks/base/core/java/android/app):  String vmHeapSize = SystemProperties.get("dalvik.vm.heapsize", "16m");
AndroidRuntime.cpp (android/frameworks/base/core/jni):    property_get("dalvik.vm.heapsize", heapsizeOptsBuf+4, "16m");
Init.pxa910-based.rc (android/vendor/omap/tw50f/rootdir): setprop dalvik.vm.heapsize 32m
Init.pxa910-based.rc (android/vendor/omap/tw60f/rootdir): setprop dalvik.vm.heapsize 32m
Main.c (android/external/qemu/android):                   boot_property_add("dalvik.vm.heapsize",tmp);

 

 

 

build.prop 是一个属性文件,在Android系统中.prop文件很重要,记录了系统的设置和改变,类似於/etc中的文件。

# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=GRI40
ro.build.display.id=GRJ22
ro.build.version.incremental=eng.mur4ik.20110505.195322
ro.build.version.sdk=10 2.3ROM
ro.build.version.codename=REL 
ro.build.version.release=2.3.4 android版本
ro.build.date=三 12月 15 20:41:26 CST 2010 时区时间CST可以代表4个时区,这个百度一下
ro.build.date.utc=0
ro.build.type=user
ro.build.user=mur4ik
ro.build.host=mur4ik-VirtualBox
ro.build.tags=test-keys
ro.product.model=GT540 手机型号 
ro.product.brand=google
ro.product.name=swift
ro.product.device=swift
ro.product.board=swift 
ro.product.cpu.abi=armeabi-v6l
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=LGE
ro.product.locale.language=zh 刷机后默认语言
ro.product.locale.region=CN 刷机后启动的默认语言
ro.board.platform=msm7k
# ro.build.product is obsolete; use ro.product.device
ro.build.product=swift 
# Do not try to parse ro.build.description or .fingerprint
ro.build.description=soju-user 2.3.3 GRI40 102588 release-keys 内部版本号
ro.build.fingerprint=google/soju/crespo:2.3.3/GRI40/102588:user/release-keys
# end build properties

#
# system.prop for optimus
#

###RIL Config

rild.libpath=/system/lib/libril-qc-1.so
rild.libargs=-d /dev/smd0
persist.rild.nitz_plmn=
persist.rild.nitz_long_ons_0=
persist.rild.nitz_long_ons_1=
persist.rild.nitz_long_ons_2=
persist.rild.nitz_long_ons_3=
persist.rild.nitz_short_ons_0=
persist.rild.nitz_short_ons_1=
persist.rild.nitz_short_ons_2=
persist.rild.nitz_short_ons_3=
DEVICE_PROVISIONED=1

# LGE_CHANGE_S, [jeongmini.park@lge.com], 2010-05-03, < Enabed EONS feature >
persist.cust.tel.eons=1
# LGE_CHANGE_E, [jeongmini.park@lge.com], 2010-05-03, < Enabed EONS feature >

## QC RIL doesn't replay call rings
ro.telephony.call_ring.multiple=false
ro.telephony.call_ring.delay=3000 响铃延迟,单位为毫秒。(怪盗补充)

# Default network type. 默认网络类型
# 0 => WCDMA preferred.
ro.telephony.default_network=0 
ro.ril.baseband=AMSS53404003
ro.ril.ecclist=112,911,101,102,103
ro.ril.gprsclass=12 
ro.ril.hsxpa=2 3G数据标准选择 0 – UMTS r99 1 – HSDPA 2 – HSDPA/HSUPA

# Touch Key, hopemini@lge.com, 2009-12-10
# SEARCH, BACK, HOME, MENU, CALL, END
ro.lge.touchkey=MENU|BACK
# Vibrator amp default value
ro.lge.vibrator_amp=125

## wifi
wifi.interface=wlan0
wifi.supplicant_scan_interval=120 WIFI扫描时间单位为秒 调大这个值可节约耗电
ro.wifi.channels=14 

## opengles 2.0 LINUX下针对多媒体的一些功能
ro.opengles.version=131072
# Uncomment below to enable using MDP for composition
# Change to 1 for enable using GPU for composition
debug.sf.hw=1 硬件加速设定 0是关闭, 1是开启
video.accelerate.hw=1

ro.media.dec.aud.wma.enabled=1
ro.media.dec.vid.wmv.enabled=1
ro.media.dec.aud.flac.enabled=1
ro.media.dec.aud.ape.enabled=1
ro.media.dec.vid.avi.enabled=1
ro.media.dec.vid.flv.enabled=1
ro.media.dec.vid.qt.enabled=1
ro.media.dec.vid.rm.enabled=1

media.stagefright.enable-player=true 
media.stagefright.enable-meta=false
media.stagefright.enable-scan=false
media.stagefright.enable-http=false

ro.config.sync=yes

#increase dalvik heap size, yongchan.jeong@lge.com, 20100719
dalvik.vm.dexopt-flags=m=y
dalvik.vm.heapsize=24m 虚拟内存范围由12M-48M, 默认是24M
dalvik.vm.execution-mode=int:jit 
dalvik.vm.lockprof.threshold=500
windowsmsg.max_events_per_sec=260

persist.service.mount.playsnd=0
ro.com.google.locationfeatures=1
ro.setupwizard.enable_bypass=1

## BEGIN: yongmin.jung@lge.com 2010-05-18
## ADD : set lcd density to 160
ro.sf.lcd_density=160 DPI
ro.sf.hw_lcd_density=160
## END: yongmin.jung@lge.com 2010-05-18

#
# ADDITIONAL_BUILD_PROPERTIES
#
keyguard.no_require_sim=true
ro.product.model=LG-GT540
ro.rommanager.developerid=cyanogenmod
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.com.google.clientidbase=android-google
ro.com.android.wifi-watchlist=GoogleGuest
ro.setupwizard.enterprise_mode=1
ro.com.android.dateformat=MM-dd-yyyy
ro.com.android.dataroaming=false
ro.config.ringtone=Playa.ogg 默认来电铃声
ro.config.notification_sound=regulus.ogg 默认通知铃声
ro.config.alarm_alert=Alarm_Beep_03.ogg 默认闹钟铃声
ro.modversion=CyanogenMod-7.0.3-GT540-MUR4IK MOD版本号
ro.setupwizard.mode=DISABLED 开机出现的帐号设置向导,ENABLED为显示,DISABLED为禁用,OPTIONAL为可选

net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt
posted @ 2011-11-25 15:47  wanqi  阅读(24862)  评论(0编辑  收藏  举报