@livx.cc/appwrap 0.39.15 → 0.39.16
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 +5 -2
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -1891,8 +1891,11 @@ async function deployAndroid(cwd: string, flags: Record<string, string>): Promis
|
|
|
1891
1891
|
|
|
1892
1892
|
console.log(`▶ installing → ${device}`);
|
|
1893
1893
|
try {
|
|
1894
|
-
//
|
|
1895
|
-
|
|
1894
|
+
// `--user 0` (primary user) is the robust install target: on MIUI/Xiaomi a BARE `adb install` is
|
|
1895
|
+
// silently auto-denied ("user is restricted from installing apps" — no popup), but scoping it to
|
|
1896
|
+
// user 0 succeeds. On normal single-user devices it's a no-op (install already targets user 0).
|
|
1897
|
+
// Capture (not inherit) so we can still surface guidance if it fails for another reason.
|
|
1898
|
+
const out = execFileSync(adb, ['-s', device, 'install', '-r', '--user', '0', apk], { encoding: 'utf8', stdio: ['inherit', 'pipe', 'pipe'] });
|
|
1896
1899
|
process.stdout.write(out);
|
|
1897
1900
|
} catch (e: unknown) {
|
|
1898
1901
|
const log = execErrText(e);
|