@livx.cc/appwrap 0.39.14 → 0.39.15
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/package.json +1 -1
- package/src/cli.ts +12 -3
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -1891,11 +1891,20 @@ async function deployAndroid(cwd: string, flags: Record<string, string>): Promis
|
|
|
1891
1891
|
|
|
1892
1892
|
console.log(`▶ installing → ${device}`);
|
|
1893
1893
|
try {
|
|
1894
|
-
|
|
1894
|
+
// Capture (not inherit) so we can recognize the MIUI install-restriction and print guidance.
|
|
1895
|
+
const out = execFileSync(adb, ['-s', device, 'install', '-r', apk], { encoding: 'utf8', stdio: ['inherit', 'pipe', 'pipe'] });
|
|
1896
|
+
process.stdout.write(out);
|
|
1895
1897
|
} catch (e: unknown) {
|
|
1896
1898
|
const log = execErrText(e);
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
+
process.stderr.write(log);
|
|
1900
|
+
if (/INSTALL_FAILED_USER_RESTRICTED|user is restricted|canceled by user/i.test(log)) {
|
|
1901
|
+
console.error(
|
|
1902
|
+
'\n✖ Install blocked/canceled by the device (MIUI/Xiaomi restriction — NOT a build problem).\n' +
|
|
1903
|
+
' → Unlock the phone and watch for the "Install via USB?" prompt → tap OK/Install.\n' +
|
|
1904
|
+
' → Developer options: enable "Install via USB" AND "USB debugging (Security settings)".\n' +
|
|
1905
|
+
' (Toggling these pings Xiaomi servers — needs mobile data + a SIM, no VPN.)\n' +
|
|
1906
|
+
` The built APK is ready: ${apk}`
|
|
1907
|
+
);
|
|
1899
1908
|
}
|
|
1900
1909
|
process.exit(1);
|
|
1901
1910
|
}
|