@aiot-toolkit/emulator 2.0.6-beta.24 → 2.0.6-beta.27

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.
@@ -15,7 +15,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
15
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
16
  class Vela5Instance extends _miwear.default {
17
17
  xmsInitedFlag = /booting completed|Boot completed/;
18
- static appStartedFlag = /Start main loop/;
18
+ static appStartedFlag = /Start main loop|reportActivityStatus called by .+? \[resumed\]/;
19
19
  imageType = (() => _Vvd.VelaImageType.VELA_WATCH_5)();
20
20
  appDir = '/data/app';
21
21
 
package/lib/vvd/index.js CHANGED
@@ -451,7 +451,7 @@ class VvdManager {
451
451
  length: 100
452
452
  }).map((_, i) => 10055 + i)
453
453
  }));
454
- let portMappingStr = `-network-user-mode-options hostfwd=tcp:127.0.0.1:${degbugProt}-10.0.2.15:101`;
454
+ let portMappingStr = '';
455
455
 
456
456
  // qemu 配置
457
457
  const HOST_9PFS_DIR = _path.default.join(vvdDir, 'share');
@@ -489,6 +489,12 @@ class VvdManager {
489
489
 
490
490
  await this.oldEmulatorMigrate(vvdName);
491
491
  const vvdInfo = this.getVvdInfo(vvdName);
492
+
493
+ // vela4 系列或未指定 imageType 时需要端口转发
494
+ const v4Types = [_Vvd.VelaImageType.REL, _Vvd.VelaImageType.PRE, _Vvd.VelaImageType.DEV];
495
+ if (!vvdInfo.imageType || v4Types.includes(vvdInfo.imageType)) {
496
+ portMappingStr = `-network-user-mode-options hostfwd=tcp:127.0.0.1:${degbugProt}-10.0.2.15:101`;
497
+ }
492
498
  if (vvdInfo.imageType === _Vvd.VelaImageType.OPENVELA_SMARTSPEAKER_5) {
493
499
  qemuOption = `-device virtio-snd,bus=virtio-mmio-bus.2 -allow-host-audio -semihosting -smp 4 -device virtio-gpu-device,xres=480,yres=800,bus=virtio-mmio-bus.5`;
494
500
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiot-toolkit/emulator",
3
- "version": "2.0.6-beta.24",
3
+ "version": "2.0.6-beta.27",
4
4
  "description": "vela emulator tool.",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -32,7 +32,7 @@
32
32
  "emulator"
33
33
  ],
34
34
  "dependencies": {
35
- "@aiot-toolkit/shared-utils": "2.0.6-beta.24",
35
+ "@aiot-toolkit/shared-utils": "2.0.6-beta.27",
36
36
  "@grpc/grpc-js": "^1.13.3",
37
37
  "@grpc/proto-loader": "^0.7.13",
38
38
  "@miwt/adb": "0.10.5",
@@ -50,5 +50,5 @@
50
50
  "@types/adm-zip": "^0.5.5",
51
51
  "@types/ini": "^4.1.1"
52
52
  },
53
- "gitHead": "1f581c8e2d25fd2bdc0cbf79970df196c8b38e26"
53
+ "gitHead": "1348e0b4f0fb3b43bc3adc4a4c5b2b0be29c680b"
54
54
  }