How to install packaged app on Firefox for mobile?

烈酒焚心 提交于 2019-12-10 12:23:05

问题


How do I test-install a packaged (zip) app on Fennec?

Device: Physical Android phone or Android emulator, I don't care.


回答1:


Install mozilla-apk-cli using NPM:

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:

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.)

Install the APK on your Android device:

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, f.e. if the port is 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. Commence debugging!

Notes:

  • Use Nightly builds of Fennec for the best experience.
  • Bug 929382 tracks WebIDE (née App Manager) integration.
  • File bugs on problems you encounter!


来源:https://stackoverflow.com/questions/24368097/how-to-install-packaged-app-on-firefox-for-mobile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!