全志H713芯片序列号的获取方法

芯片序列号可作为唯一识别ID使用,具有许多用途,本文简单介绍全志平台获取芯片序列号的方法。

1.结果演示

  • 演示最终获取芯片ID后,将字符串写入到一个属性中

console:/ # getprop persist.svt.chipnumber
388520d1010706200000520000000000

2.芯片信息获取

  • 可通过下面属性获取芯片ID
console:/ # 
console:/ # 
console:/ # 
console:/ # cat /sys/class/sunxi_info/sys_info
sunxi_platform    : sun50iw12
sunxi_secure      : normal
sunxi_serial      : 388520d1010706200000520000000000
sunxi_chiptype    : 00000043
sunxi_batchno     : 0x18600001
console:/ # 

3.通过shell命令获取芯片ID字符串

  • 切割演示
console:/ # cat /sys/class/sunxi_info/sys_info | busybox grep sunxi_serial | cut -d ':' -f2 |  cut -d ' ' -f2                   <
388520d1010706200000520000000000
console:/ # 

4.写入序列号

  • 先通过cut切割目标字符串
  • 后通过setprop persist.svt.chipnumber写入
cat /sys/class/sunxi_info/sys_info | busybox grep sunxi_serial | cut -d ':' -f2 |  cut -d ' ' -f2 |  xargs  setprop persist.svt.chipnumber

5.图文演示

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

阿迷创客

感谢!您的支持是我写作的动力~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值