简体   繁体   English

如何在Firefox移动版上安装打包的应用程序?

[英]How to install packaged app on Firefox for mobile?

How do I test-install a packaged (zip) app on Fennec? 如何在Fennec上测试安装打包(zip)应用程序?

Device: Physical Android phone or Android emulator, I don't care. 设备:物理Android手机或Android模拟器,我不在乎。

Install mozilla-apk-cli using NPM: 使用NPM安装mozilla-apk-cli

npm install -g mozilla-apk-cli

Use it to generate a "debuggable" APK for your app from either a source directory or a URL to the mini-manifest: 使用它可以从源目录或迷你清单的URL为您的应用生成“可调试的” APK:

mozilla-apk-cli /path/to/source/dir/ arbitrary-name.apk
mozilla-apk-cli http://example.com/path/to/mini/manifest.webapp arbitrary-name.apk

(Context-click > Inspect Element on the "Free" button in Marketplace to discover the mini-manifest URL for an app in the Marketplace.) (在Marketplace中的“免费”按钮上,右键单击>检查元素以发现Marketplace中应用程序的最小清单URL。)

Install the APK on your Android device: 在您的Android设备上安装APK:

adb install -r arbitrary-name.apk

Launch the app on the device. 在设备上启动应用程序。 Look to the notification area for a notification about which port the remote debugger server is listening on. 在通知区域中查找有关远程调试器服务器正在侦听哪个端口的通知。 Forward that port on your desktop, fe if the port is 12345: 将端口转发到桌面上,如果端口为12345,则转发:

adb forward tcp:12345 tcp:12345

Go to Web Developer > Connect… in Firefox on your desktop and connect to localhost at the forwarded port. 在桌面上的Firefox中,转到Web开发人员>连接…,然后在转发端口连接到localhost。 Commence debugging! 开始调试!

Notes: 笔记:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM