Reputation: 7695
How do I test-install a packaged (zip) app on Fennec?
Device: Physical Android phone or Android emulator, I don't care.
Upvotes: 0
Views: 463
Reputation: 1110
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:
Upvotes: 4