专栏首页程序猿的那点事adb shell读取设置手机ocd值以及ocd介绍

adb shell读取设置手机ocd值以及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 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.

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • Android 代码中对不同国家支持的信道的设置

    配置文件在: kernel/msm-4.4/net/wireless/db.txt

    用户7557625
  • Android 9.0 飞行模式下WiFi状态变化

    在Android 9.0 中,AirPlaneMode与WiFi的原生设定是这样的:

    用户7557625
  • Android中Wifi里Frameworks和Wpa_Supplicant交互的方式

    WifiNative–>com_android_server_wifi_WifiNative.cpp–>wifi.c–>wpa_supplicant.c

    用户7557625
  • 【7-9 有重复的数据I (20 分)】【此题卡输入,需要自己写个输入挂】

    _DIY
  • Qt中translate、tr关系 与中文问题

    如果你确实属于(2b),请做好心理准备,你可能还会遇到很多困难,请考虑Qt国际化(源码含中文时)的点滴分析 tr 是做什么的?下面二者的区别是什么?

    阳光岛主
  • java代码调用shell脚本

    神秘的寇先森
  • Android可自定义垂直循环滚动布局

    垂直滚动广告字幕什么的都是一行的,这个控件可以自定义布局,也就是Adapter 对于滚动多行item循环效果, 通过多个VerticalBannerView笨...

    砸漏
  • R语言网络数据抓取的又一个难题,终于攻破了!

    单纯从数据抓取的逻辑来讲(不谈那些工程上的可用框架),个人觉得R语言中现有的请求库中,RCurl和httr完全可以对标Python中的urllib和reuqes...

    数据小磨坊
  • Excel VBA解读(146): 使用隐式交集处理整列

    Excel有一个有趣且非常有效的技巧叫做隐式交集(Implicit Intersection),允许有效地使用大的命名区域和整列引用。

    fanjy
  • Python爬虫(十五)_案例:使用bs4的爬虫

    本章将从Python案例讲起:所使用bs4做一个简单的爬虫案例,更多内容请参考:Python学习指南 案例:使用BeautifulSoup的爬虫 我们已腾...

    用户1174963

扫码关注云+社区

领取腾讯云代金券