Skip to content

Windows 上的安卓应用运行器:双击 APK 即装,应用以独立窗口与桌面图标运行,自持 QEMU 运行时

feat(brand): ARM 兼容模式 + 开发者品牌展示 + 外链系统浏览器

RoutineMiku2f981002b360
diff --git a/README.md b/README.md
index 61351dc..3e56cfe 100644
--- a/README.md
+++ b/README.md
@@ -129,7 +129,18 @@ Android 版本、freeform 支持、共享目录双向同步,加 `--apk 某应
- **不是从零实现的 hypervisor**:安卓内核、GPU 转译、ART 运行时是数年级别的工程,本项目选择站在 AOSP/QEMU/adb 的肩膀上,把工程量集中在「原生应用级体验」上——这正是应用宝电脑版、Google Play Games PC 版等产品共同的架构思路。
- **共享目录是同步而非挂载**:Windows 无 root 时无法在安卓侧挂载 NTFS 目录,采用秒级双向同步达到同等体验。
-- **ARM-only 应用**:若应用仅含 ARM 原生库,需要运行时支持 ARM 转译(Bliss/部分镜像可开启 libhoudini/NativeBridge),安装时 ApkStart 会给出提示。
+- **ARM-only 应用**:设置里开启「ARM 兼容模式」即可切换到 Google Play 镜像(内置 native bridge 翻译层),普通 ARM-only 应用可以安装运行;但**抖音/红果/番茄等字节系应用无法运行**——它们自带反调试 native hook,会触发 Google 官方翻译层(ndk_translation)的保护性断言(`DoBadTrampoline` SIGABRT),社区换 libhoudini 也存在同类崩溃。这是字节系与官方 x86_64 模拟器的根本冲突,MuMu 能跑是靠私有魔改翻译层。安装失败时 ApkStart 会给出中文说明。
+
+## 关于作者
+
+ApkStart 由 **RoutineMiku** 开发维护。
+
+- GitHub:<https://github.com/RoutineMiku/apkstart>
+- 微信公众号:扫码关注
+
+<p align="center"><img src="src/ui/assets/wechat-qr.jpg" alt="微信公众号二维码" width="180" /></p>
+
+<p align="center"><i>Powered by <b>RoutineMiku</b></i></p>
## 参与贡献
diff --git a/package.json b/package.json
index 47cfb1d..25715cb 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "apkstart",
"productName": "ApkStart",
- "version": "0.1.0",
+ "version": "0.2.0",
"description": "极致轻量的 Windows 安卓应用运行器:双击 APK 即装,应用以独立窗口与桌面图标运行",
"main": "src/main.js",
"author": "RoutineMiku",
diff --git a/src/core/adb.js b/src/core/adb.js
index b88ea10..c2cdab6 100644
--- a/src/core/adb.js
+++ b/src/core/adb.js
@@ -108,6 +108,9 @@ class AdbClient {
maxBuffer: 64 * 1024 * 1024,
encoding: binary ? 'buffer' : 'utf8',
windowsHide: true,
+ // 与运行时模拟器共用专用 adb server 端口(默认 5044),与 5037 上的
+ // WSA / 第三方模拟器 adb 隔离,避免注册被反复踢掉导致设备 offline
+ env: { ...process.env, ANDROID_ADB_SERVER_PORT: process.env.ANDROID_ADB_SERVER_PORT || '5044' },
}, (err, stdout, stderr) => {
if (err) {
return reject(new AdbError(
diff --git a/src/core/emulator.js b/src/core/emulator.js
index ebdd4cc..6ba3278 100644
--- a/src/core/emulator.js
+++ b/src/core/emulator.js
@@ -48,15 +48,32 @@ class EmulatorEngine {
*/
ensureAvd({ memoryMB = 4096, cores = 4, width = 1080, height = 1920, density = 420, gpu = 'swiftshader_indirect' } = {}) {
const p = this.provisioner.ensureDirs();
+ const s = this.settings;
const home = p.avdHome;
const avdDir = path.join(home, `${AVD_NAME}.avd`);
fs.mkdirSync(avdDir, { recursive: true });
+ // ARM 兼容模式:使用 Google Play 版镜像(内置 native bridge,可安装仅含 ARM 原生库的应用)
+ const compat = !!(s.runtime && s.runtime.compatImage) && this.provisioner.playImageInfo().ok;
+ const tag = compat ? 'google_apis_playstore' : p.sysTag;
+ const tagDisplay = compat ? 'Google Play (ARM 兼容)' : 'AOSP';
+
fs.writeFileSync(
path.join(home, `${AVD_NAME}.ini`),
`avd.ini.encoding=UTF-8\npath=${avdDir.replace(/\\/g, '/')}\ntarget=android-${p.sysApi}\n`,
);
+ // 切换镜像 tag(普通 ↔ ARM 兼容)时旧 userdata 不兼容(APEX 模块引导循环),
+ // 下次启动带上 -wipe-data 让模拟器重建干净的用户数据
+ const cfgPath = path.join(avdDir, 'config.ini');
+ this.wipePending = false;
+ if (fs.existsSync(cfgPath)) {
+ const prevTag = /tag\.id=(.+)$/m.exec(fs.readFileSync(cfgPath, 'utf8'));
+ if (prevTag && prevTag[1].trim() !== tag) {
+ this.wipePending = true;
+ }
+ }
+
// hw.cpu.arch 必须是 ABI 本身(x86_64 不能截成 x86),
// 否则模拟器会按 32 位启动却加载 64 位内核,报 "requires an x86-64 CPU, but only detected an i686 CPU"。
const cpuArch = p.sysAbi === 'arm64-v8a' ? 'arm64'
@@ -72,9 +89,9 @@ class EmulatorEngine {
`hw.cpu.ncore=${cores}`,
`hw.ramSize=${memoryMB}`,
'vm.heapSize=512',
- `image.sysdir.1=system-images/android-${p.sysApi}/${p.sysTag}/${p.sysAbi}/`,
- `tag.id=${p.sysTag}`,
- 'tag.display=AOSP',
+ `image.sysdir.1=system-images/android-${p.sysApi}/${tag}/${p.sysAbi}/`,
+ `tag.id=${tag}`,
+ `tag.display=${tagDisplay}`,
'disk.dataPartition.size=16G',
'hw.gpu.enabled=yes',
`hw.gpu.mode=${gpu}`,
@@ -84,7 +101,7 @@ class EmulatorEngine {
`hw.lcd.density=${density}`,
'hw.mainKeys=no',
'ShowDeviceFrame=no',
- 'PlayStore.enabled=false',
+ `PlayStore.enabled=${compat}`,
'fastboot.forceColdBoot=yes',
'hw.sdCard=no',
'hw.audioInput=none',
@@ -106,6 +123,9 @@ class EmulatorEngine {
ANDROID_HOME: root,
ANDROID_AVD_HOME: path.join(root, 'avd'),
ANDROID_EMULATOR_HOME: path.join(root, 'avd'),
+ // 专用 adb server 端口:避免与 WSA / 其他模拟器的 adb(5037)互相踢掉注册,
+ // 否则设备会一直显示 offline(实测问题)
+ ANDROID_ADB_SERVER_PORT: process.env.ANDROID_ADB_SERVER_PORT || '5044',
// 不弹 metrics 询问、不写用户级配置
ANDROID_EMULATOR_USE_SYSTEM_LIBS: '',
};
@@ -148,7 +168,9 @@ class EmulatorEngine {
const accelInfo = await this.provisioner.emulatorAccel();
const accel = accelInfo.ok ? 'auto' : 'off';
- const args = this.buildArgs({ headless, accel, port, wipe });
+ // 镜像 tag 切换后旧 userdata 不兼容,用 -wipe-data 重建
+ const args = this.buildArgs({ headless, accel, port, wipe: wipe || !!this.wipePending });
+ this.wipePending = false;
const env = this.env(loc.root);
// 没有硬件加速时必须显式授权 TCG,否则 emulator 直接拒绝启动
diff --git a/src/core/provision.js b/src/core/provision.js
index 4c0ca2d..4335b50 100644
--- a/src/core/provision.js
+++ b/src/core/provision.js
@@ -32,6 +32,9 @@ const SOURCES = {
// 兜底:索引不可用时直接用的已知版本
emulatorFallback: 'https://dl.google.com/android/repository/emulator-windows_x64-16847572.zip',
sysimgFallback: 'https://dl.google.com/android/repository/sys-img/android/x86_64-30_r11.zip',
+ // ARM 兼容镜像(Google Play 版,内置 native bridge)
+ playImgIndex: 'https://dl.google.com/android/repository/sys-img/google_apis_playstore/sys-img2-3.xml',
+ playImgFallback: 'https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86_64-30_r09.zip',
// Android-x86 9.0-r2(x86_64):仅在用户已自备 ISO 时使用
iso: [
'https://master.dl.sourceforge.net/project/android-x86/Release%209.0/android-x86_64-9.0-r2.iso?viasf=1',
@@ -65,6 +68,8 @@ function absUrl(u, base = REPO_BASE) {
/** 想默认使用的系统镜像(API 级别 + 渠道)。AOSP 版体积小、无 GMS 授权问题。 */
const DEFAULT_SYSIMG = { api: '30', tag: 'default', abi: 'x86_64' };
+// ARM 兼容镜像:Google Play 版自带 native bridge(ARM 翻译层),可安装仅含 ARM 原生库的应用
+const PLAY_SYSIMG = { api: '30', tag: 'google_apis_playstore', abi: 'x86_64' };
const MIN_SIZE = {
adb: 5 * 1024 * 1024,
@@ -254,6 +259,7 @@ class Provisioner {
required: false,
note: sysimg.ok ? `Android ${sysimg.api}(${(sysimg.size / 1073741824).toFixed(2)} GB)` : (sysimg.note || '未下载'),
},
+ playImage: this.playImageInfo(),
accel,
qemu: { ...qemu, required: false },
iso: {
@@ -586,6 +592,75 @@ class Provisioner {
return info;
}
+ /** ARM 兼容镜像(Google Play 版)是否已就位 */
+ playImageInfo() {
+ const p = this.paths();
+ const dir = path.join(p.sysImgRoot, `android-${PLAY_SYSIMG.api}`, PLAY_SYSIMG.tag, PLAY_SYSIMG.abi);
+ const size = fileSize(path.join(dir, 'system.img'));
+ if (size > MIN_SIZE.sysimg && fs.existsSync(path.join(dir, 'kernel-ranchu'))) {
+ return { ok: true, dir, size, api: PLAY_SYSIMG.api, tag: PLAY_SYSIMG.tag };
+ }
+ return { ok: false, dir, size, note: size ? '镜像不完整' : '未下载' };
+ }
+
+ /** 解析 Google Play 版镜像地址(<url> 相对索引文件所在目录) */
+ async resolvePlayUrl() {
+ if (this._cache.playUrl) return this._cache.playUrl;
+ try {
+ const xml = await this._fetchText(SOURCES.playImgIndex);
+ const want = `system-images;android-${PLAY_SYSIMG.api};${PLAY_SYSIMG.tag};${PLAY_SYSIMG.abi}`;
+ const block = new RegExp(`<remotePackage path="${want}"[\\s\\S]*?</remotePackage>`).exec(xml);
+ if (block) {
+ const base = baseOf(SOURCES.playImgIndex);
+ const urls = [...block[0].matchAll(/<url>([^<]+)<\/url>/g)].map((m) => absUrl(m[1], base))
+ .filter((u) => /x86_64.*\.zip$/i.test(u));
+ if (urls.length) {
+ this._cache.playUrl = urls[urls.length - 1];
+ return this._cache.playUrl;
+ }
+ }
+ } catch (_) { /* 落兜底 */ }
+ this._cache.playUrl = SOURCES.playImgFallback;
+ return this._cache.playUrl;
+ }
+
+ /** 下载并安装 ARM 兼容镜像(Google Play 版,约 1.3GB) */
+ async installPlayImage(onProgress = () => {}) {
+ const p = this.ensureDirs();
+ const url = await this.resolvePlayUrl();
+ const zip = path.join(p.tmp, 'play-sysimg.zip');
+ onProgress({ stage: 'download', message: '下载 ARM 兼容镜像(约 1.3GB)…', percent: 1 });
+ await downloadAnyParallel([url], zip, {
+ connections: 8,
+ minChunk: 4 * 1024 * 1024,
+ onProgress: (pr) => onProgress({
+ stage: 'download',
+ message: `下载兼容镜像 ${(pr.got / 1048576).toFixed(0)}MB / ${(pr.total / 1048576).toFixed(0)}MB`
+ + (pr.speed ? `(${(pr.speed / 1048576).toFixed(1)} MB/s)` : ''),
+ percent: Math.round(pr.percent * 0.8),
+ canResume: true,
+ }),
+ });
+ if (fileSize(zip) < MIN_SIZE.sysimg) throw new Error('兼容镜像下载不完整,可重试续传');
+
+ const dest = path.join(p.sysImgRoot, `android-${PLAY_SYSIMG.api}`, PLAY_SYSIMG.tag);
+ fs.mkdirSync(dest, { recursive: true });
+ onProgress({ stage: 'extract', message: '解压兼容镜像(3GB,需十余秒)…', percent: 82 });
+ await this.extractZip(zip, dest, {
+ onEntry: (_n, i, total) => onProgress({
+ stage: 'extract',
+ message: `解压兼容镜像 ${i}/${total}`,
+ percent: 82 + Math.round((i / Math.max(1, total)) * 15),
+ }),
+ });
+ fs.rmSync(zip, { force: true });
+
+ const info = this.playImageInfo();
+ if (!info.ok) throw new Error('兼容镜像解压后校验失败');
+ onProgress({ stage: 'done', message: 'ARM 兼容镜像就绪,重新启动运行时即可生效', percent: 100 });
+ return info;
+ }
+
/** 下载 AEHD 驱动(小文件);安装需要管理员权限,交给引导流程 */
async installAehd(onProgress = () => {}) {
const p = this.ensureDirs();
diff --git a/src/core/store.js b/src/core/store.js
index f9ec28d..00e5b43 100644
--- a/src/core/store.js
+++ b/src/core/store.js
@@ -39,6 +39,7 @@ const DEFAULT_SETTINGS = {
installMode: 'guided', // guided(引导手动安装) | auto(实验性自动安装)
emulatorUrl: '', // 手动指定 emulator 包地址(空 = 自动从 SDK 索引解析最新版)
sysimgUrl: '', // 手动指定系统镜像包地址
+ compatImage: false, // ARM 兼容模式:改用 Google Play 镜像(内置 native bridge,可装 ARM-only 应用)
},
sharedDir: path.join(os.homedir(), 'ApkStartShared'),
deviceSharedDir: '/sdcard/ApkStartShared',
diff --git a/src/main.js b/src/main.js
index af1fe1c..5d412f2 100644
--- a/src/main.js
+++ b/src/main.js
@@ -16,8 +16,13 @@ const { drawAppIcon } = require('./core/png');
const { pngToIco } = require('./core/shortcut');
const assoc = require('./core/assoc');
+// Windows 下窗口被遮挡时 capturePage 会拿到旧帧,自动化截图需要禁用遮挡计算
+app.commandLine.appendSwitch('disable-features', 'CalculateNativeWinOcclusion');
+
const APP_ROOT = path.join(__dirname, '..');
const IS_DEV = process.argv.includes('--dev');
+// 冒烟截图等自动化场景下跳过注册表探测(避免依赖 reg.exe)
+const NO_SHELL_PROBE = process.argv.includes('--smoke') || process.env.APKSTART_NO_SHELL_PROBE === '1';
const ICON_PNG = drawAppIcon(256);
let mainWindow = null;
@@ -74,6 +79,17 @@ function createWindow({ show = true } = {}) {
mainWindow.loadFile(path.join(__dirname, 'ui', 'index.html'));
if (show) mainWindow.once('ready-to-show', () => mainWindow.show());
+ // 外链一律交给系统浏览器(公众号/GitHub 等),绝不把应用窗口导航走
+ mainWindow.webContents.setWindowOpenHandler(({ url }) => {
+ if (/^https?:\/\//i.test(url)) shell.openExternal(url);
+ return { action: 'deny' };
+ });
+ mainWindow.webContents.on('will-navigate', (e, url) => {
+ if (url.startsWith('file://')) return;
+ e.preventDefault();
+ if (/^https?:\/\//i.test(url)) shell.openExternal(url);
+ });
+
mainWindow.on('close', (e) => {
if (quitting) return;
e.preventDefault();
@@ -293,6 +309,17 @@ function registerIpc() {
}
});
+ ipcMain.handle('provision:installPlayImage', async () => {
+ try {
+ const r = await runtime.provisioner.installPlayImage(
+ (p) => send('provision:progress', { ...p, component: 'playimg' }),
+ );
+ return { ok: true, ...r };
+ } catch (e) {
+ return { ok: false, error: e.message };
+ }
+ });
+
ipcMain.handle('provision:installAehd', async () => {
try {
const r = await runtime.provisioner.installAehd(
@@ -426,6 +453,8 @@ function registerIpc() {
});
ipcMain.handle('assoc:status', () => {
+ // 冒烟/无 shell 环境:不探测注册表(reg.exe 可能被策略拦截)
+ if (NO_SHELL_PROBE) return { registered: false, skipped: true };
const { execFileSync } = require('child_process');
try {
const out = execFileSync('reg', ['query', 'HKCU\\Software\\Classes\\.apk', '/ve'], { windowsHide: true, encoding: 'utf8' });
@@ -520,8 +549,41 @@ if (!gotLock) {
);
await new Promise((r) => setTimeout(r, 2500));
}
- const img = await mainWindow.webContents.capturePage();
- fs.writeFileSync(out, img.toPNG());
+ if (process.argv.includes('--settings')) {
+ const opened = await mainWindow.webContents.executeJavaScript(`
+ (async () => {
+ document.getElementById('btnSettings').click();
+ for (let i = 0; i < 50; i++) {
+ await new Promise((r) => setTimeout(r, 100));
+ if (document.getElementById('settingsMask').classList.contains('on')) return true;
+ }
+ return false;
+ })()
+ `);
+ console.log('[smoke] settings opened =', opened);
+ await new Promise((r) => setTimeout(r, 600));
+ const dbg = await mainWindow.webContents.executeJavaScript(
+ "JSON.stringify({ on: document.getElementById('settingsMask').classList.contains('on'), qr: !!document.querySelector('#aboutGroup img'), qrH: (document.querySelector('#aboutGroup img')||{}).naturalHeight, ver: (document.getElementById('aboutVer')||{}).textContent })",
+ );
+ console.log('[smoke] dom =', dbg);
+ }
+ // 窗口可能被遮挡导致拿到旧帧:强制重绘 + 连拍两帧取后一帧
+ const snap = async (file) => {
+ mainWindow.webContents.invalidate();
+ await mainWindow.webContents.capturePage().catch(() => null);
+ await new Promise((r) => setTimeout(r, 400));
+ const im = await mainWindow.webContents.capturePage();
+ fs.writeFileSync(file, im.toPNG());
+ console.log('[smoke] saved', file);
+ };
+ await snap(out);
+ if (process.argv.includes('--settings')) {
+ // 再拍一张「关于」区(二维码 / GitHub / Powered by)
+ await mainWindow.webContents.executeJavaScript(
+ "document.getElementById('aboutGroup').scrollIntoView({ block: 'center' }); true;",
+ );
+ await snap(out.replace(/\.png$/i, '-about.png'));
+ }
} catch (e) {
console.error('[smoke] 截图失败', e);
}
diff --git a/src/preload.js b/src/preload.js
index e533f43..60cf333 100644
--- a/src/preload.js
+++ b/src/preload.js
@@ -35,6 +35,7 @@ contextBridge.exposeInMainWorld('apkstart', {
installQemu: () => invoke('provision:installQemu'),
installEmulator: () => invoke('provision:installEmulator'),
installSysimg: () => invoke('provision:installSysimg'),
+ installPlayImage: () => invoke('provision:installPlayImage'),
installAehd: () => invoke('provision:installAehd'),
enableAccel: () => invoke('provision:enableAccel'),
downloadIso: () => invoke('provision:downloadIso'),
diff --git a/src/ui/app.js b/src/ui/app.js
index e79f91b..218bfb9 100644
--- a/src/ui/app.js
+++ b/src/ui/app.js
@@ -616,6 +616,7 @@ function fillSettings(s) {
$('setMemory').value = s.engine.memoryMB;
$('setCores').value = s.engine.cores;
$('setIdle').value = s.engine.idleShutdownMinutes;
+ $('setCompat').checked = !!(s.runtime && s.runtime.compatImage);
$('setAutoShortcut').checked = !!s.createShortcutOnInstall;
$('setFreeform').checked = !!s.freeform;
$('setHideAfterLaunch').checked = !!s.hideAfterLaunch;
@@ -629,6 +630,8 @@ async function openSettings() {
fillSettings(state.settings);
const info = await api.info();
$('setDataDir').value = info.dataDir;
+ const verEl = document.getElementById('aboutVer');
+ if (verEl && info.version) verEl.textContent = `v${info.version}`;
const assoc = await api.assocStatus();
const btn = $('btnAssoc');
btn.textContent = assoc.registered ? '已关联 · 点击取消' : '未关联 · 点击开启';
@@ -655,6 +658,15 @@ function bindSettings() {
$('setMemory').addEventListener('change', (e) => save({ engine: { memoryMB: Number(e.target.value) || 4096 } }));
$('setCores').addEventListener('change', (e) => save({ engine: { cores: Number(e.target.value) || 4 } }));
$('setIdle').addEventListener('change', (e) => save({ engine: { idleShutdownMinutes: Number(e.target.value) || 0 } }));
+ $('setCompat').addEventListener('change', async (e) => {
+ const on = e.target.checked;
+ await save({ runtime: { compatImage: on } });
+ const env = ((state.status = await api.runtimeStatus()).env) || {};
+ const ok = env.playImage && env.playImage.ok;
+ $('compatInstallField').hidden = !on || !!ok;
+ if (on && !ok) toast({ title: 'ARM 兼容模式已开启', body: '还需要下载 Google Play 兼容镜像(约 1.3GB),点击下方按钮开始', type: 'info' });
+ else if (on) toast({ title: 'ARM 兼容模式已开启', body: '重启运行时后生效', type: 'info' });
+ });
$('setAutoShortcut').addEventListener('change', (e) => save({ createShortcutOnInstall: e.target.checked }));
$('setFreeform').addEventListener('change', (e) => save({ freeform: e.target.checked }));
$('setHideAfterLaunch').addEventListener('change', (e) => save({ hideAfterLaunch: e.target.checked }));
@@ -663,6 +675,49 @@ function bindSettings() {
$('setDeviceSharedDir').addEventListener('change', (e) => save({ deviceSharedDir: e.target.value.trim() }));
$('btnOpenShared').addEventListener('click', () => api.openSharedDir());
+
+ // ARM 兼容镜像下载(带进度 toast)
+ $('btnInstallPlay').addEventListener('click', async () => {
+ const btn = $('btnInstallPlay');
+ btn.disabled = true;
+ const t = toast({ title: '开始下载 ARM 兼容镜像', body: '准备中…', sticky: true, spinner: true, progress: 3 });
+ const un = api.on('provision:progress', (p) => {
+ if (p.component !== 'playimg') return;
+ t.update({ title: '下载 ARM 兼容镜像', body: p.message || '', progress: p.percent });
+ });
+ try {
+ const r = await api.installPlayImage();
+ if (r && r.ok) {
+ t.update({ title: 'ARM 兼容镜像就绪', body: '重启运行时后生效', progress: 100 });
+ setTimeout(() => t.dismiss(), 3000);
+ $('compatInstallField').hidden = true;
+ refreshStatus();
+ } else {
+ t.update({ title: '兼容镜像下载失败', body: (r && r.error) || '未知错误', progress: null });
+ t.dismiss();
+ toast({ title: '兼容镜像下载失败', body: (r && r.error) || '未知错误', type: 'error' });
+ }
+ } catch (e) {
+ t.dismiss();
+ toast({ title: '兼容镜像下载失败', body: e.message, type: 'error' });
+ } finally {
+ un();
+ btn.disabled = false;
+ }
+ });
+
+ // 兼容镜像状态显示
+ (async () => {
+ const env = ((state.status = await api.runtimeStatus()).env) || {};
+ const s = state.settings;
+ const on = !!(s && s.runtime && s.runtime.compatImage);
+ const ok = env.playImage && env.playImage.ok;
+ $('compatInstallField').hidden = !on || !!ok;
+ if (env.playImage) {
+ $('compatImgStatus').textContent = ok
+ ? `已就绪(${(env.playImage.size / 1073741824).toFixed(2)} GB)` : '未下载';
+ }
+ })();
$('btnOpenData').addEventListener('click', async () => {
const info = await api.info();
window.open(`file:///${info.dataDir.replace(/\\/g, '/')}`);
@@ -715,6 +770,14 @@ function bindSettings() {
/* ---------------- 事件绑定 ---------------- */
function bindEvents() {
+ // 链接统一走系统浏览器
+ document.addEventListener('click', (e) => {
+ const a = e.target.closest && e.target.closest('a[href^="http"]');
+ if (!a) return;
+ e.preventDefault();
+ api.openExternal(a.getAttribute('href'));
+ });
+
$('btnSettings').addEventListener('click', openSettings);
$('btnCloseSettings').addEventListener('click', closeSettings);
$('btnDoneSettings').addEventListener('click', closeSettings);
diff --git a/src/ui/assets/wechat-qr.jpg b/src/ui/assets/wechat-qr.jpg
new file mode 100644
index 0000000..2cd9eeb
Binary files /dev/null and b/src/ui/assets/wechat-qr.jpg differ
diff --git a/src/ui/index.html b/src/ui/index.html
index 7aaaaf6..2792a35 100644
--- a/src/ui/index.html
+++ b/src/ui/index.html
@@ -109,6 +109,8 @@
<span class="status-item" id="statusDevice"></span>
<span class="sep"></span>
<span class="status-item" id="statusStats"></span>
+ <span class="sep"></span>
+ <a class="status-item powered-link" href="https://github.com/RoutineMiku/apkstart" target="_blank" rel="noopener">Powered by RoutineMiku</a>
</div>
</footer>
</main>
@@ -176,6 +178,20 @@
<label>空闲回收(分钟,0 = 不回收)</label>
<input id="setIdle" type="number" min="0" step="1" />
</div>
+ <div class="field switch-field">
+ <div>
+ <label>ARM 兼容模式(Google Play 镜像)</label>
+ <span class="sub">改用内置 ARM 翻译层的 Google Play 镜像,可安装仅含 ARM 原生库的应用(约 1.3GB)。注意:抖音/红果等字节系应用因自带反调试 hook,在任何官方模拟器上都无法运行。</span>
+ </div>
+ <input type="checkbox" id="setCompat" class="switch" />
+ </div>
+ <div class="field" id="compatInstallField" hidden>
+ <label>兼容镜像</label>
+ <div class="row">
+ <span class="inline-note" id="compatImgStatus">未下载</span>
+ <button class="btn ghost sm" id="btnInstallPlay">下载兼容镜像</button>
+ </div>
+ </div>
<div class="runtime-actions">
<button class="btn ghost sm" id="btnRuntimeStart">启动运行时</button>
<button class="btn ghost sm" id="btnRuntimeStop">停止内置虚拟机</button>
@@ -245,6 +261,23 @@
</div>
</div>
</div>
+ <div class="group" id="aboutGroup">
+ <div class="group-title">关于</div>
+ <div class="about-box">
+ <div class="about-qr">
+ <img src="assets/wechat-qr.jpg" alt="微信公众号二维码" width="112" height="112" />
+ <span class="about-qr-tip">扫码关注公众号</span>
+ </div>
+ <div class="about-info">
+ <div class="about-name">ApkStart <span class="about-ver" id="aboutVer"></span></div>
+ <p class="note">双击即装的 Windows 安卓应用启动器:APK 安装、桌面快捷方式、独立窗口运行、文件双向互通。</p>
+ <div class="about-links">
+ <a href="https://github.com/RoutineMiku/apkstart" target="_blank" rel="noopener">GitHub · RoutineMiku/apkstart</a>
+ <span class="powered">Powered by <b>RoutineMiku</b></span>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
<footer class="modal-foot">
<span class="inline-note">设置修改后立即生效</span>
diff --git a/src/ui/style.css b/src/ui/style.css
index 867d708..79ba4fe 100644
--- a/src/ui/style.css
+++ b/src/ui/style.css
@@ -597,3 +597,62 @@ kbd {
line-height: 1.75;
}
.guide-foot { display: flex; gap: 10px; margin-top: 14px; }
+
+/* ---- 关于 / 品牌信息 ---- */
+.about-box {
+ display: flex;
+ gap: 16px;
+ align-items: flex-start;
+}
+.about-qr {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 6px;
+ flex: none;
+}
+.about-qr img {
+ border-radius: 10px;
+ border: 1px solid var(--line);
+ display: block;
+}
+.about-qr-tip {
+ font-size: 10.5px;
+ color: var(--muted);
+}
+.about-info { flex: 1; min-width: 0; }
+.about-name {
+ font-size: 14px;
+ font-weight: 600;
+ margin-bottom: 4px;
+}
+.about-ver {
+ font-size: 11px;
+ font-weight: 500;
+ color: var(--muted);
+ margin-left: 6px;
+}
+.about-links {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+ margin-top: 10px;
+ font-size: 12px;
+}
+.about-links a {
+ color: #2f6fed;
+ text-decoration: none;
+ word-break: break-all;
+}
+.about-links a:hover { text-decoration: underline; }
+.powered {
+ font-size: 11.5px;
+ color: var(--muted);
+}
+.powered b { color: var(--text); }
+.powered-link {
+ color: var(--muted);
+ text-decoration: none;
+ font-size: 11px;
+}
+.powered-link:hover { color: var(--text); text-decoration: underline; }