前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >adb shell读取设置手机ocd值以及ocd介绍

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

作者头像
用户7557625
发布2020-07-21 10:11:39
6760
发布2020-07-21 10:11:39
举报
文章被收录于专栏:程序猿的那点事

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

代码语言:javascript
复制
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 name

Significance

magic_number

This magic number represents the existence of a successfully programmed OEM configuration data

magic_number_factory

This 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

revision

OEM 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.

system

Reserved.

modem

Indicate which types of modem to be used. Zero means that ignore this item.

gps

Indicate which types of GPS to be used. Zero means that ignore this item.

module_sn

Module 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_sn

Board/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_sn

Product 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_ap

Wi-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_code

Wi-Fi Country Code. Example: TW , US , BE …

bt_mac

Bluetooth MAC address. Example: 003A856D7F90

barcode

Indicate which types of barcode to be used. Zero means that ignore this item.

wifi_mac_go

P2P group mac.

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020/07/17 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 读取与设置ocd值
  • ocd值含义
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档