@aiot-toolkit/emulator 2.0.5-beta.9 → 2.0.5-widget-provider-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +173 -140
- package/lib/emulatorutil/constants.js +24 -24
- package/lib/emulatorutil/running.js +5 -5
- package/lib/instance/common.d.ts +3 -1
- package/lib/instance/common.js +9 -8
- package/lib/instance/dev.js +6 -6
- package/lib/instance/index.js +6 -6
- package/lib/instance/minisound.js +6 -6
- package/lib/instance/miwear.d.ts +1 -0
- package/lib/instance/miwear.js +25 -10
- package/lib/instance/pre.js +6 -6
- package/lib/instance/vela5.js +3 -3
- package/lib/shared/index.js +3 -3
- package/lib/static/advancedFeatures.ini +1 -1
- package/lib/static/avdConfigIni.json +39 -39
- package/lib/static/debugger_ip.cfg +1 -1
- package/lib/static/proto/README.MD +2 -0
- package/lib/static/proto/emulator_controller.proto +1321 -0
- package/lib/static/proto/rtc_service.proto +117 -0
- package/lib/typing/Instance.js +3 -3
- package/lib/utils/index.js +19 -19
- package/lib/vvd/grpc/grpcError.d.ts +1 -0
- package/lib/vvd/grpc/grpcError.js +10 -0
- package/lib/vvd/grpc/index.d.ts +27 -0
- package/lib/vvd/grpc/index.js +117 -0
- package/lib/vvd/grpc/types/GrpcClient.d.ts +4 -0
- package/lib/vvd/grpc/types/GrpcClient.js +5 -0
- package/lib/vvd/grpc/types/KeyEvent.d.ts +19 -0
- package/lib/vvd/grpc/types/KeyEvent.js +20 -0
- package/lib/vvd/grpc/types/MouseEvent.d.ts +30 -0
- package/lib/vvd/grpc/types/MouseEvent.js +5 -0
- package/lib/vvd/index.d.ts +2 -0
- package/lib/vvd/index.js +43 -36
- package/lib/vvd/logcat.js +3 -0
- package/package.json +6 -4
package/lib/instance/pre.js
CHANGED
|
@@ -10,8 +10,8 @@ var _common = _interopRequireDefault(require("./common"));
|
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
-
/**
|
|
14
|
-
* 不带 miwear 的 4.0 镜像
|
|
13
|
+
/**
|
|
14
|
+
* 不带 miwear 的 4.0 镜像
|
|
15
15
|
*/
|
|
16
16
|
class PreInstance extends _common.default {
|
|
17
17
|
imageType = (() => _Vvd.VelaImageType.PRE)();
|
|
@@ -36,10 +36,10 @@ class PreInstance extends _common.default {
|
|
|
36
36
|
await adbMiwt.execAdbCmdAsync(mkdirCmd);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
/**
|
|
40
|
-
* 在模拟器中启动快应用
|
|
41
|
-
* 通过vapp命令启动,调试时需额外配置--jsdebugger参数
|
|
42
|
-
* @param options
|
|
39
|
+
/**
|
|
40
|
+
* 在模拟器中启动快应用
|
|
41
|
+
* 通过vapp命令启动,调试时需额外配置--jsdebugger参数
|
|
42
|
+
* @param options
|
|
43
43
|
*/
|
|
44
44
|
async startApp(packageName) {
|
|
45
45
|
let debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
package/lib/instance/vela5.js
CHANGED
|
@@ -17,9 +17,9 @@ class Vela5Instance extends _miwear.default {
|
|
|
17
17
|
imageType = (() => _Vvd.VelaImageType.VELA_WATCH_5)();
|
|
18
18
|
appDir = '/data/app';
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* 使用 pm 安装快应用
|
|
22
|
-
* @param targeRpk 快应用的rpk文件路径
|
|
20
|
+
/**
|
|
21
|
+
* 使用 pm 安装快应用
|
|
22
|
+
* @param targeRpk 快应用的rpk文件路径
|
|
23
23
|
*/
|
|
24
24
|
async install(targeRpk) {
|
|
25
25
|
const installCmd = `adb -s ${this.sn} shell pm install ${targeRpk}`;
|
package/lib/shared/index.js
CHANGED
|
@@ -7,9 +7,9 @@ exports.getDefaultImage = getDefaultImage;
|
|
|
7
7
|
exports.isMiwearImageType = isMiwearImageType;
|
|
8
8
|
exports.isVelaImageType = isVelaImageType;
|
|
9
9
|
var _Vvd = require("../typing/Vvd");
|
|
10
|
-
/**
|
|
11
|
-
* 本文件用于导出一些同构内容,请勿引用非同构内容,例如 nodejs 特性内容,或者 browser 特性内容
|
|
12
|
-
* @TODO 项目转为 ESM 模块后,可以删除
|
|
10
|
+
/**
|
|
11
|
+
* 本文件用于导出一些同构内容,请勿引用非同构内容,例如 nodejs 特性内容,或者 browser 特性内容
|
|
12
|
+
* @TODO 项目转为 ESM 模块后,可以删除
|
|
13
13
|
* */
|
|
14
14
|
|
|
15
15
|
function isVelaImageType(value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
ModemSimulator = on
|
|
1
|
+
ModemSimulator = on
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"AvdId": "Vela_Virtual_Device",
|
|
3
|
-
"abi.type": "armeabi-v7a",
|
|
4
|
-
"avd.ini.displayname": "Vela_Virtual_Device",
|
|
5
|
-
"avd.ini.encoding": "UTF-8",
|
|
6
|
-
"fastboot.forceChosenSnapshotBoot": "no",
|
|
7
|
-
"fastboot.forceColdBoot": "yes",
|
|
8
|
-
"fastboot.forceFastBoot": "no",
|
|
9
|
-
"hw.accelerometer": "yes",
|
|
10
|
-
"hw.arc": false,
|
|
11
|
-
"hw.audioInput": "yes",
|
|
12
|
-
"hw.battery": "yes",
|
|
13
|
-
"hw.camera.back": "None",
|
|
14
|
-
"hw.camera.front": "None",
|
|
15
|
-
"hw.cpu.arch": "arm",
|
|
16
|
-
"hw.cpu.ncore": 4,
|
|
17
|
-
"hw.dPad": "no",
|
|
18
|
-
"hw.gps": "yes",
|
|
19
|
-
"hw.gpu.enabled": "no",
|
|
20
|
-
"hw.gpu.mode": "host",
|
|
21
|
-
"hw.initialOrientation": "Portrait",
|
|
22
|
-
"hw.keyboard": "yes",
|
|
23
|
-
"hw.lcd.density": 420,
|
|
24
|
-
"hw.lcd.height": 466,
|
|
25
|
-
"hw.lcd.width": 466,
|
|
26
|
-
"hw.mainKeys": "no",
|
|
27
|
-
"hw.ramSize": 512,
|
|
28
|
-
"hw.sdCard": "no",
|
|
29
|
-
"hw.sensors.orientation": "yes",
|
|
30
|
-
"hw.sensors.proximity": "yes",
|
|
31
|
-
"hw.trackBall": "no",
|
|
32
|
-
"image.sysdir.2": "",
|
|
33
|
-
"runtime.network.latency": "none",
|
|
34
|
-
"runtime.network.speed": "full",
|
|
35
|
-
"showDeviceFrame": "yes",
|
|
36
|
-
"skin.dynamic": "no",
|
|
37
|
-
"skin.name": "",
|
|
38
|
-
"skin.path": ""
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"AvdId": "Vela_Virtual_Device",
|
|
3
|
+
"abi.type": "armeabi-v7a",
|
|
4
|
+
"avd.ini.displayname": "Vela_Virtual_Device",
|
|
5
|
+
"avd.ini.encoding": "UTF-8",
|
|
6
|
+
"fastboot.forceChosenSnapshotBoot": "no",
|
|
7
|
+
"fastboot.forceColdBoot": "yes",
|
|
8
|
+
"fastboot.forceFastBoot": "no",
|
|
9
|
+
"hw.accelerometer": "yes",
|
|
10
|
+
"hw.arc": false,
|
|
11
|
+
"hw.audioInput": "yes",
|
|
12
|
+
"hw.battery": "yes",
|
|
13
|
+
"hw.camera.back": "None",
|
|
14
|
+
"hw.camera.front": "None",
|
|
15
|
+
"hw.cpu.arch": "arm",
|
|
16
|
+
"hw.cpu.ncore": 4,
|
|
17
|
+
"hw.dPad": "no",
|
|
18
|
+
"hw.gps": "yes",
|
|
19
|
+
"hw.gpu.enabled": "no",
|
|
20
|
+
"hw.gpu.mode": "host",
|
|
21
|
+
"hw.initialOrientation": "Portrait",
|
|
22
|
+
"hw.keyboard": "yes",
|
|
23
|
+
"hw.lcd.density": 420,
|
|
24
|
+
"hw.lcd.height": 466,
|
|
25
|
+
"hw.lcd.width": 466,
|
|
26
|
+
"hw.mainKeys": "no",
|
|
27
|
+
"hw.ramSize": 512,
|
|
28
|
+
"hw.sdCard": "no",
|
|
29
|
+
"hw.sensors.orientation": "yes",
|
|
30
|
+
"hw.sensors.proximity": "yes",
|
|
31
|
+
"hw.trackBall": "no",
|
|
32
|
+
"image.sysdir.2": "",
|
|
33
|
+
"runtime.network.latency": "none",
|
|
34
|
+
"runtime.network.speed": "full",
|
|
35
|
+
"showDeviceFrame": "yes",
|
|
36
|
+
"skin.dynamic": "no",
|
|
37
|
+
"skin.name": "",
|
|
38
|
+
"skin.path": ""
|
|
39
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
10.0.2.15:101
|
|
1
|
+
10.0.2.15:101
|