Brillo: 初步了解: 获取设备信息

代码使用的是brillo-m8-release/brillo-m8-dev的分支

先forward emulator的80端口到host的8000端口:

$ adb forward tcp:8000 tcp:80

使用curl获取brilloemulator-x86的信息

$ curl -H "Authorization: Privet anonymous" http://localhost:8000/privet/info

可得到如下信息:

{
"authentication": {
"anonymousMaxScope": "viewer",
"crypto": [ "p224_spake2" ],
"mode": [ "anonymous", "pairing" ],
"pairing": [ "embeddedCode" ]
},
"basicModelManifest": {
"modelName": "Emulator",
"oemName": "Brillo",
"uiDeviceKind": "vendor"
},
"description": "X86 Emulator",
"endpoints": {
"httpPort": 80,
"httpUpdatesPort": 80,
"httpsPort": 443,
"httpsUpdatesPort": 443
},
"gcd": {
"id": "",
"status": "unconfigured"
},
"id": "3D0CC433-1219-4999-93E5-2C7B817A7F11",
"modelManifestId": "AAAAA",
"name": "Starter Board",
"services": [ "vendor" ],
"uptime": 136,
"version": "3.0",
"wifi": {
"capabilities": [ "2.4GHz" ],
"ssid": "",
"status": "online"
}
}

发表评论

电子邮件地址不会被公开。 必填项已用*标注