sudo apt-get install graphicsmagick mysql-server g++
# Android SDK also requires:
sudo apt-get install openjdk-7-jdk ant ia32-libs unzip
Mac OS X with brew:
brew install libtiff graphicsmagick mariadb
Installation
# Clone apk-factory-library
cd lib/ext && git clone https://github.com/mozilla/apk-factory-library.git
cd ../..
npm rebuild
# Create the database and an *apk* user with privileges on it.
mysql.server start
mysql -u root < docs/db/schema_up_000.sql
mysql -u root < docs/db/schema_up_001.sql
mysql -u root < docs/db/schema_up_002.sql
mysql -u root -e "CREATE USER 'apk'@'localhost' IDENTIFIED BY 'password';"
mysql -u root -e "GRANT ALL PRIVILEGES ON apk_factory.* TO 'apk'@'localhost';"
Install the Android SDK.
See Notes on Android SDK
for common setup instructions.
You’ll need to expose the SDK path with something like this:
Note: this project has been archived, as development has stalled, and it isn’t being actively maintained, nor used.
APK Factory Service
Web service which takes Open Web App manifests and produces Synthetic APKs.
This service depends on APK Factory Library.
Dependencies
APT-based Linux:
Mac OS X with brew:
Installation
Install the Android SDK. See Notes on Android SDK for common setup instructions. You’ll need to expose the SDK path with something like this:
You need to have API 19 (or maybe higher?). Check for
adt-bundle-mac/sdk/platforms/android-19/.Please read config/default.js which documents the various configuration paramters and allowable values.
Use
config/developer.jsto override any settings.Local development
One time install of development only modules
You’ll probably want to point your local generator to a local APK Signer. See
config/default.jsfor where to set its URL.After setting
ANDROID_HOME, fire up your local controller and generator servers like:If everything is configured you should be able to post a manifest to your controller and get a binary APK response. Try this:
You can generate manifests at testmanifest.com.
You can attach a debugger via two tabs in Chrome, if you do this instead of
npm startAnd then load in Chrome:
Logs will appear in var/log
Logs will appear in
var/log/apk-generator.logandvar/log/apk-controller.logTesting
Unit tests
Integration tests
or to target a different environment
To check if things are working, you can request an APK build from your local server like this:
Where the
manifestUrlis a valid link to an open web app manifest.Deployment
Production
Stage
Dev
Dev server is automatically deployed from master after a commit
https://apk-controller.dev.mozaws.net
OLD Dev Server
A former development server is available at http://dapk.net.
Some notes on how its process is started up:
Monitoring
Check out the monitoring documentation.