Skip to content

Commit

Permalink
chore: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wtto00 committed Sep 21, 2023
1 parent 2be2287 commit cc1c425
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 12 deletions.
32 changes: 28 additions & 4 deletions README-ZH_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ Andorid Options

```js
android
.start('android-avd-name')
.start(
avd: 'android-avd-name',
verbose: true
// ...
)
.then((res) => {
console.log(`emulatorId: ${res.id}`);
})
Expand All @@ -49,9 +53,29 @@ android
});
```

| field | type | required | default | note |
| ------- | ------ | -------- | ------- | ---------- |
| avdName | string | true | - | 模拟器名称 |
| field | type | required | default | note |
| -------------------- | ------------------------------------------------------------------------------ | -------- | ------- | ------------------------------------------------------------------ |
| avd | string | true | - | 使用特定的android虚拟设备 |
| verbose | boolean | true | - | 启用特定的调试消息 |
| noWindow | boolean | false | - | 禁用图形窗口显示 |
| noSnapshot | boolean | false | - | 执行完全引导,不自动保存,但qemu vmload和vmsave在snapstorage上操作 |
| noSnapstorage | boolean | false | - | 不要装载快照存储文件(这将禁用所有快照功能) |
| noSnapshotUpdateTime | boolean | false | - | 在还原时不要尝试更正快照时间 |
| noSnapshotSave | boolean | false | - | 退出时不自动保存到快照:放弃已更改的状态 |
| noSnapshotLoad | boolean | false | - | 不要从快照自动启动:执行完全启动 |
| cameraBack | "emulated","virtualscene","videoplayback","none","webcam<N>" | false | - | 为背面的相机设置模拟模式 |
| cameraFront | 'emulated','webcam<N>','none' | false | - | 为前置摄像头设置模拟模式 |
| gpu | 'auto','auto-no-window','host','swiftshader_indirect','angle_indirect','guest' | false | 'auto' | 设置硬件OpenGLES仿真模式 |
| nocache | boolean | false | - | 禁用缓存分区 |
| noaudio | boolean | false | - | 禁用音频支持 |
| noBootAnim | boolean | false | - | 禁用动画以加快启动速度 |
| lowram | boolean | false | - | 该设备是一种低ram设备 |
| restartWhenStalled | boolean | false | - | 允许在来宾停止时重新启动。 |
| waitForDebugger | boolean | false | - | 启动时暂停,等待调试器进程附加后再继续 |
| httpProxy | string | false | - | 通过HTTP/HTTPS代理进行TCP连接 |
| cores | number | false | - | 将CPU核心数设置为模拟器 |
| wipeData | boolean | false | - | 重置用户数据映像(从initdata复制) |
| noPassiveGps | boolean | false | - | 禁用被动gps更新 |

### waitForDevice

Expand Down
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ Start the emulator using the AVD supplied through with `avdName`.

```js
android
.start('android-avd-name')
.start({
avd: 'android-avd-name',
verbose: true
// ...
})
.then((res) => {
console.log(`emulatorId: ${res.id}`);
})
Expand All @@ -49,9 +53,29 @@ android
});
```

| field | type | required | default | note |
| ------- | ------ | -------- | ------- | ----------- |
| avdName | string | true | - | Name of AVD |
| field | type | required | default | note |
| -------------------- | ------------------------------------------------------------------------------ | -------- | ------- | ------------------------------------------------------------------------------------------- |
| avd | string | true | - | use a specific android virtual device |
| verbose | boolean | true | - | enable specific debug messages |
| noWindow | boolean | false | - | disable graphical window display |
| noSnapshot | boolean | false | - | perform a full boot and do not auto-save, but qemu vmload and vmsave operate on snapstorage |
| noSnapstorage | boolean | false | - | do not mount a snapshot storage file (this disables all snapshot functionality) |
| noSnapshotUpdateTime | boolean | false | - | do not try to correct snapshot time on restore |
| noSnapshotSave | boolean | false | - | do not auto-save to snapshot on exit: abandon changed state |
| noSnapshotLoad | boolean | false | - | do not auto-start from snapshot: perform a full boot |
| cameraBack | "emulated","virtualscene","videoplayback","none","webcam<N>" | false | - | set emulation mode for a camera facing back |
| cameraFront | 'emulated','webcam<N>','none' | false | - | set emulation mode for a camera facing front |
| gpu | 'auto','auto-no-window','host','swiftshader_indirect','angle_indirect','guest' | false | 'auto' | set hardware OpenGLES emulation mode |
| nocache | boolean | false | - | disable the cache partition |
| noaudio | boolean | false | - | disable audio support |
| noBootAnim | boolean | false | - | disable animation for faster boot |
| lowram | boolean | false | - | device is a low ram device |
| restartWhenStalled | boolean | false | - | Allows restarting guest when it is stalled. |
| waitForDebugger | boolean | false | - | Pause on launch and wait for a debugger process to attach before resuming |
| httpProxy | string | false | - | make TCP connections through a HTTP/HTTPS proxy |
| cores | number | false | - | Set number of CPU cores to emulator |
| wipeData | boolean | false | - | reset the user data image (copy it from initdata) |
| noPassiveGps | boolean | false | - | disable passive gps updates |

### waitForDevice

Expand Down
8 changes: 4 additions & 4 deletions src/emulator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
export interface EmulatorOptions {
/** use a specific android virtual device */
avd?: string;
/** enable specific debug messages */
verbose?: boolean;
/** disable graphical window display */
noWindow?: boolean;
/** perform a full boot and do not auto-save, but qemu vmload and vmsave operate on snapstorage */
Expand Down Expand Up @@ -37,10 +41,6 @@ export interface EmulatorOptions {
wipeData?: boolean;
/** disable passive gps updates */
noPassiveGps?: boolean;
/** use a specific android virtual device */
avd?: string;
/** enable specific debug messages */
verbose?: boolean;
}

/**
Expand Down

0 comments on commit cc1c425

Please sign in to comment.