|
Still no serial number in Android 7.1
Posted at 12/19/2017 21:14:01
View:5338
|
Replies:3
Print
[Copy Link]
1#
The device tries a lot of things in the file system/core/drmservice/drmservice.c to get a serial number but they all fail.
One example is the line:
#define USB_SERIAL_PATH "/sys/class/android_usb/android0/iSerial"
which does no good since the path doesn't exist.
#define USB_SERIAL_PATH1 "/config/usb_gadget/g1/strings/0x409/serialnumber" is a nice try, but that place is normally empty.
Here's how you can see what's happening:
$ adb logcat -b system | grep DrmService
12-19 12:39:43.582 243 243 E DrmService: ----------------running drmservice---------------
12-19 12:39:43.582 243 243 E DrmService: get prop_board_platform,prop_board_platform = rk3399 , diff=0
12-19 12:39:43.582 243 243 E DrmService: rknand_sys_storage open fail
12-19 12:39:43.582 243 243 E DrmService: Get HID data:
12-19 12:39:43.593 243 243 E DrmService: vendor read:
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 1 ff966e28
12-19 12:39:43.593 243 243 E DrmService: ff966d40 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 e3ebfde 36f60485 5
12-19 12:39:43.593 243 243 E DrmService: ff966e28 ff966d60 5 f026b251
12-19 12:39:43.593 243 243 E DrmService: 1 73726570 2e747369 2e737973
12-19 12:39:43.593 243 243 E DrmService: 646968 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 5 100000
12-19 12:39:43.593 243 243 E DrmService: 642f0001 732f7665 656b636f 72702f74
12-19 12:39:43.593 243 243 E DrmService: 7265706f 735f7974 69767265 6563
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 0
12-19 12:39:43.593 243 243 E DrmService: 0 0 0 ff960000
12-19 12:39:43.593 243 243 E DrmService: 36f60485 36f60485 ff966ec0 b52ab030
12-19 12:39:43.593 243 243 E DrmService: vendor read error
12-19 12:39:43.594 243 243 E DrmService: Unable to open path (/sys/class/android_usb/android0/iSerial),error is(No such file or directory)
12-19 12:39:43.594 243 243 E DrmService: try /config/usb_gadget/g1/strings/0x409/serialnumber
12-19 12:39:43.594 243 243 E DrmService: get serialno from idb,serialno =
And that's the last we ever hear from the DrmService. The workaround is to adb shell 'echo MYNUMBER > /config/usb_gadget/g1/strings/0x409/serialnumber' but it doesn't take effect until you have pulled out and inserted the USB cable, which sucks. Android Studio will not play unless the board has a serial number.
|
|