@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.ts +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livx.cc/appwrap",
3
- "version": "0.39.15",
3
+ "version": "0.39.16",
4
4
  "description": "Wrap any PWA into a native app with native capabilities (appwrap runtime + @livx.cc/native-kit).",
5
5
  "license": "MIT",
6
6
  "author": "Elya Livshitz",
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
- // 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'] });
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);