apk
Build an Android WebView app (APK) for a hosted website
- Command:
/go/apk - Category: Web
- Required option: None (no argument builds an app for every domain)
- Output: Progress messages from the build tools
- Last updated: 2026-11-20
On this page: Overview · Quick start · Syntax · Arguments · Output · Examples · Troubleshooting · Details · See also
Overview
/go/apk turns a website into an Android app that shows the site in a WebView. For each domain, it:
- downloads GoAdmio's app template and sets the app's name and address to the domain
- makes the app icon from
logo.png, taking a screenshot of the site if there is no logo - builds and signs the APK
- adds a download page at
https://<domain>/app - emails the download link to the account's email address
The result is a signed APK file for direct download. It is not ready to upload to Google Play. See Signing and publishing.
[!WARNING] The command leaves the signing key in the website's public
appfolder, and it uses a fixed, well-known password. Read Signing and publishing before you share the app.
Quick start
# Build the app for one domain
/go/apk example.com
Syntax
/go/apk [domain|all]
If you are not root, the command re-runs itself with sudo. It takes one optional argument and has no -- options.
Arguments
| Argument | Effect |
|---|---|
<domain> |
Builds the app for that domain only. |
all |
Builds an app for every hosted domain, one after the other. |
| (none) | The same as all. |
A domain is processed only when /home/<domain>/www exists. Building takes a while, so a run for all domains can take a long time.
Output
The command prints what the build tools print, plus a few messages of its own.
| Message | Meaning |
|---|---|
Building APK... |
The icons are ready and apktool is building the app. |
File /home/<domain>/www/app/logo.png not Exists. |
There was no logo and the screenshot failed. The app was not built. |
When it succeeds, the files are in /home/<domain>/www/app/, and the download link is emailed to the account.
Examples
# Build the app for one domain
/go/apk example.com
# Use your own icon: put a square PNG in place first, then build
cp mylogo.png /home/example.com/www/app/logo.png
/go/apk example.com
# Build apps for every hosted domain
/go/apk all
# Review the log of past runs
tail -n 20 /var/log/go/apk.log
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Apps are built for every domain | The command was run with no argument. | Pass a domain name. |
File .../logo.png not Exists. |
The site could not be captured, for example because it is down or wkhtmltoimage is missing. |
Put your own logo.png in /home/<domain>/www/app/, then run the command again. |
| The icon is a screenshot of the home page | No logo.png existed, so one was made from the site. |
Replace logo.png with your own square image, then run the command again. |
command not found for wkhtmltoimage, convert, keytool, jarsigner, or /go/apktool |
A tool the build needs is not installed. | Install it and run the command again. |
| No email was sent | The account has no email address containing @. |
Set the account's email, or share https://<domain>/app yourself. |
| The download link does not work | The site has no working HTTPS, or the build did not finish. | Check the site, run ssl, and look for app.apk in /home/<domain>/www/app/. |
| Android refuses to install the APK | The file is signed only with the old SHA-1 scheme and is not aligned. | Sign it again with apksigner. |
| Google Play will not accept the file | Google Play needs an app bundle and your own signing key. | Build and sign the app yourself for Play. |
Details
What it does for each domain
| # | Step |
|---|---|
| 1 | Check that /home/<domain>/www exists, and create /home/<domain>/www/app. |
| 2 | Download https://www.goadmio.com/app.tar.gz and unpack it. |
| 3 | Replace goadmio.com in the app code with the domain, and GoAdmio with the domain in the app name and the loading page. |
| 4 | If logo.png is missing, take a 1024 x 1024 screenshot of https://<domain> with wkhtmltoimage and use it as the logo. |
| 5 | Make the icons from logo.png. See the table below. |
| 6 | Build the app with /go/apktool b, and move the result to app.apk. |
| 7 | Create a keystore and sign app.apk with jarsigner. |
| 8 | Write index.php, which redirects to app.apk. |
| 9 | Email the link https://<domain>/app to the account's email address, when it has one. |
Each run downloads the template again and replaces any earlier app.apk. An existing logo.png is kept.
Icons
The icons are made from logo.png with ImageMagick, in each Android density folder.
| Folder | Launcher and round icon | Foreground icon |
|---|---|---|
mipmap-mdpi |
48 x 48 | 108 x 108 |
mipmap-hdpi |
72 x 72 | 162 x 162 |
mipmap-xhdpi |
96 x 96 | 216 x 216 |
mipmap-xxhdpi |
144 x 144 | 324 x 324 |
mipmap-xxxhdpi |
192 x 192 | 432 x 432 |
mipmap |
192 x 192 (launcher), 72 x 72 (round) | None |
A square image of at least 1024 x 1024 pixels works best.
Files in the app folder
| File | Content |
|---|---|
app.apk |
The signed app. |
index.php |
Redirects https://<domain>/app to app.apk. |
logo.png |
The icon source. Made from a screenshot when you did not provide one. |
keystore |
The signing key. |
Signing and publishing
The command creates a new keystore named keystore in the app folder, with the alias goadmio and a fixed password. It signs the APK with it.
| Item | Detail |
|---|---|
| Key password | The same fixed value on every server. |
| Key owner | A sample identity (CN=mqttserver.ibm.com, O=IBM) is written into the certificate. |
| Key location | /home/<domain>/www/app/keystore, inside the website's public folder. |
| Signature | SHA-1 with RSA, made with jarsigner. The APK is not aligned. |
[!WARNING] Anyone who can open
https://<domain>/app/keystorecan download the key, and the password is the same everywhere. Delete the file after the build, or block access to it, and do not rely on this key for an app you publish.
For Google Play, you need your own signing key and an app bundle, so use this APK for direct downloads and testing.
Requirements
| Tool | Used for |
|---|---|
wget, tar, sed |
Downloading and editing the template. |
wkhtmltoimage |
The logo screenshot. |
ImageMagick (convert) |
Resizing the icons. |
/go/apktool |
Building the APK. |
keytool and jarsigner (Java) |
Creating the key and signing the app. |
/go/sendmail |
Sending the link. |
The command does not check that these exist. The template download does not verify the server's certificate.
Logging
Every run appends its arguments with a timestamp to /var/log/go/apk.log.
What a run does
flowchart TD
A["apk [domain|all]"] --> B["For each domain with a www folder"]
B --> C["Download and unpack the template"]
C --> D["Set the app name and address"]
D --> E{"logo.png exists?"}
E -- "No" --> F["Screenshot the site as the logo"]
F --> G{"logo.png now exists?"}
E -- "Yes" --> H
G -- "No" --> X["Print: logo.png not Exists"]
G -- "Yes" --> H["Make icons, build and sign the APK"]
H --> I["Write index.php, email the link"]
See also
| Command | Description |
|---|---|
ssl |
Install an SSL certificate for a domain in GoAdmio |
create |
Create a GoAdmio account from the command line |
img |
Resize images on a GoAdmio server |