大佬好,我想通过adb shell下的getprop获取 vendor.gsm.serial 应该怎么写
JY622_64:/ $ getprop vendor.gsm.serial
JY622F6W652 10P
getMac: function() {
var cpuInfo = 'getprop';
var temp = '',
cpuHardware;
var fileReader = plus.android.importClass("java.io.FileReader");
var bufferedReader = plus.android.importClass("java.io.BufferedReader");
var FileReader = new fileReader(cpuInfo);
var BufferedReader = new bufferedReader(FileReader, 8192);
while ((temp = BufferedReader.readLine()) != null) {
if (-1 != temp.indexOf('')) {
cpuHardware = temp.substr(parseInt(temp.indexOf("")) + 1);
console.log(cpuHardware);
}
}
},
通过这个不对。