adb shell读取设置手机ocd值以及ocd介绍

本文详细介绍了OCD指标的各个枚举值及其在设备配置中的意义,包括魔数、工厂模式标志、版本号等,并提供了如何在ADB控制台和框架层获取与设置OCD值的方法。

每个ocd数据对应一个索引值。 您可以使用index获取ocd数据。 OCD指标值
枚举如下所示。

enum ocd_lockable_table
{
magic_number = 0, //ocd.index.0
magic_number_factory = 1, //ocd.index.1
revision = 2, //ocd.index.2 and so on...
system_ocd = 3,
modem = 4,
gps = 5,
module_sn = 6,
board_sn = 8,
product_sn = 10,
wifi_mac_ap = 12,
wifi_mac_sta = 13,
wifi_mac_p2p = 14,
wifi_cy_code = 15,
bt_mac = 16,
barcode = 17,
wifi_mac_go = 18,
ocd_last_stc, //Hold this in the last item
};

读取与设置ocd值

Get OCD in adb console terminal
getprop ro.ocd.index.5
Set OCD in adb console terminal (no need prefix ro.)
setprop ocd.index.5 123
Get OCD in framework layer
SystemProperties.get(“ro.ocd.index.5”, “0”)

ocd值含义

Member nameSignificance
magic_numberThis magic number represents the existence of a successfully programmed OEM configuration data
magic_number_factoryThis magic number indicate factory mode flag present or not. If this item equal 0x 5A12E7A5 then go to normal mode, otherwise go to factory mode
revisionOEM configuration data version If the table format changes or if add more member into structure, this version number can be incremented to keeptrack of the changes.
systemReserved.
modemIndicate which types of modem to be used. Zero means that ignore this item.
gpsIndicate which types of GPS to be used. Zero means that ignore this item.
module_snModule serial number. It is a one-dimensional array of characters which is terminated by a null character ‘\0’. Zero means that ignore this item.
board_snBoard/PCB serial number. It is a one-dimensional array of characters which is terminated by a null character ‘\0’. Zero means that ignore this item.
product_snProduct serial number. It is a one-dimensional array of characters which is terminated by a null character ‘\0’. Zero means that ignore this item.
wifi_mac_apWi-Fi MAC address for AP/STATION/P2P mode. It is a one-dimensional array of characters which is terminated by a null character ‘\0’. Zero means that ignore this item. Example: 001345B9860D
wifi_mac_sta同上
wifi_mac_p2p同上
wifi_cy_codeWi-Fi Country Code. Example: TW , US , BE …
bt_macBluetooth MAC address. Example: 003A856D7F90
barcodeIndicate which types of barcode to be used. Zero means that ignore this item.
wifi_mac_goP2P group mac.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值