RK 方案adb 命令无作用。

们在调试RK方案的时候,发现ADB无法连接上,查不出什么原因》

adb devices 命令无list 列表。

这种原因是因为没有写sn,修改代码如下

c 复制代码
diff --git a/drmservice/drmservice.c b/drmservice/drmservice.c
index 86c8e32..d87b58f 100644
--- a/drmservice/drmservice.c
+++ b/drmservice/drmservice.c
@@ -81,7 +81,7 @@ typedef		unsigned char	    uint8;
 
 #define DEBUG_LOG 0   //open debug info
 
-#define SERIALNO_FROM_IDB 0  //if 1 read sn from idb3;  if 0 generate sn auto
+#define SERIALNO_FROM_IDB 1  //if 1 read sn from idb3;  if 0 generate sn auto
 
 #define SET_IFACE_DELAY                 300000
 #define SET_IFACE_POLLING_LOOP          20
@@ -331,8 +331,10 @@ int rknand_sys_storage_test_sn(void)
     uint32 i;
     int ret;
     uint16 len;
+    char initsn[32] = "RKdrm";
     RKNAND_SYS_STORGAE sysData;
     memset(sn_buf_idb,0,sizeof(sn_buf_idb));
+/*
     int sys_fd = open("/dev/rknand_sys_storage",O_RDWR,0);
     if(sys_fd < 0){
         SLOGE("rknand_sys_storage open fail\n");
@@ -358,8 +360,11 @@ int rknand_sys_storage_test_sn(void)
     {
 	len =0;
     }
+
     memcpy(sn_buf_idb,(sysData.data)+2,len);
-    //property_set("sys.serialno",sn_buf_idb);
+*/
+    memcpy(sn_buf_idb,initsn,30);
+    property_set("sys.serialno",sn_buf_idb);
     return 0;
 }
 
相关推荐
orion5715 小时前
Missing Semester Class1:course overview and introduction of shell
linux
apocelipes18 小时前
常用编程语言和库的正则表达式性能对比
c语言·c++·python·性能优化·golang·开发工具和环境
用户1204872216121 小时前
Linux驱动编译与加载
linux·嵌入式
用户805533698031 天前
Input 子系统架构:Core、Handler、Driver 三层是怎么协作的
linux·嵌入式
用户805533698031 天前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式
七歌杜金房2 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
郝学胜_神的一滴2 天前
CMake 034:生成器表达式:解耦构建时序、精简分支逻辑的终极利器
c++·cmake
tntxia3 天前
linux curl命令详解_curl详解
linux
扛枪的书生3 天前
Linux 网络管理器用法速查
linux
见过夏天3 天前
C++ 基础入门完全指南
c++