们在调试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;
}