npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mozilla-apk-cli

v0.0.10

Published

A Command Line Inteface for generating Android native apps from open webapps

Downloads

11

Readme

APK CLI

A Command Line Interface for generating Android native apps from open webapps.

These are mainly for testing and not for distribution. Use the APK Factory Service for distributable .apk files.

Getting started

This tool requires NodeJS, zip, and unzip.

npm install mozilla-apk-cli

You will now have mozilla-apk-cli installed in node_modules/.bin.

(You can do npm install -g mozilla-apk-cli to install this command system wide)

Usage

Usage: ./node_modules/.bin/mozilla-apk-cli {OPTIONS} manifestOrPackagedApp testable.apk

Hosted App:             mozilla-apk-cli {OPTIONS} http://example.com/manifest.webapp testable.apk
Packaged App Zip:       mozilla-apk-cli {OPTIONS} package.zip testable.apk
Packaged App Dir:       mozilla-apk-cli {OPTIONS} ./www testable.apk

mozilla-apk-cli can accept either a manifest url, a zip file, or a directory which contains the source code for a packaged app.

Typical usage will not require any OPTIONS.

Options:
  --overrideManifest  Treat this manifest url as the canoncial url while
                  creating the apk                                          
  --endpoint          The URL for the APK Factory Service
                      [default: "https://controller-review.apk.firefox.com"]
  --help, -?          Display this message                                      
  --config-files      Comma seperate file paths

Note: Do not upload this .apk into the Google Play store. Do not distribute this as a released Android app through your own website. You're users will not be able to get updates to your app.

Installation problems?

If you are using Windows and get errors, check out these Windows notes.

Installing the .apk

Now that you have a .apk file, you need to install it on your Android device.

There are two main ways:

  1. Setup adb and install to your device

    adb install test.apk

If adb is setup correctly, the app should now appear in your list of installed apps. To push an updated .apk, you must un-install before running this command a second time.

  1. Request it from a web browser

    python -m SimpleHTTPServer

Figure out your IP Address and point your Android's browser at http://192.168.0.13:8000/test.apk or whatever

Relaunching the .apk

  1. Find out your package name

    adb lolcat

Kill you app and then make it run. Look for:

I/ActivityManager(  612): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.firefox.cli.apk.packagedozten.p3ea7a6153641373b9751d2e48430c43f/org.mozilla.android.synthapk.LauncherActivity} from pid 913 

From this we can wee the packag ename is com.firefox.cli.apk.packagedozten.p3ea7a6153641373b9751d2e48430c43f

$ adb shell
# am start -a android.intent.action.MAIN -n com.firefox.cli.apk.packagedozten.p3ea7a6153641373b9751d2e48430c43f/org.mozilla.android.synthapk.LauncherActivity

Which is

# am start -a android.intent.action.MAIN -n ${PACKAGE_NAME}/org.mozilla.android.synthapk.LauncherActivity