{"id":20502723,"url":"https://github.com/vlang/vab","last_synced_at":"2025-05-16T05:06:04.290Z","repository":{"id":37006021,"uuid":"325292375","full_name":"vlang/vab","owner":"vlang","description":"V Android Bootstrapper","archived":false,"fork":false,"pushed_at":"2025-03-08T15:32:30.000Z","size":1499,"stargazers_count":329,"open_issues_count":8,"forks_count":29,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-08T15:07:54.439Z","etag":null,"topics":["aab","android","apk","bootstrap","compiler","java","ndk","sdk","v","vlang"],"latest_commit_sha":null,"homepage":"","language":"V","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vlang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-29T13:21:07.000Z","updated_at":"2025-04-08T05:55:47.000Z","dependencies_parsed_at":"2023-02-16T06:01:19.630Z","dependency_job_id":"3c4f15ff-e497-4e6f-bfb7-0f456c616788","html_url":"https://github.com/vlang/vab","commit_stats":{"total_commits":472,"total_committers":19,"mean_commits":"24.842105263157894","dds":0.538135593220339,"last_synced_commit":"11544d4b035210d00a2629db84f267fe5f64fcfe"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fvab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fvab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fvab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlang%2Fvab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vlang","download_url":"https://codeload.github.com/vlang/vab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471061,"owners_count":22076585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aab","android","apk","bootstrap","compiler","java","ndk","sdk","v","vlang"],"created_at":"2024-11-15T19:27:14.747Z","updated_at":"2025-05-16T05:06:02.503Z","avatar_url":"https://github.com/vlang.png","language":"V","readme":"# V Android Bootstrapper\n\n[Home](https://github.com/vlang/vab) • [Docs](docs/docs.md) • [FAQ](docs/FAQ.md)\n\nV Android Bootstrapper is the currently supported way\nto compile, package, sign and deploy V graphical apps on Android\nbased devices. It can be used as a V module (`import vab`) and also\nprovides a standalone executable (`vab`) for building apps from the command-line.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/768942/107622846-c13f3900-6c58-11eb-8a66-55db12979b73.png\"\u003e\n\n# Install\n\nLinux, macOS and Windows build hosts are supported.\n\n### Unix (Linux, macOS)\n```bash\nv install vab\nv ~/.vmodules/vab\n```\n\n### Windows\n```bash\nv install vab\nv %USERPROFILE%\\.vmodules\\vab\n```\n\n## Symlink (optional)\nYou can symlink `vab` to your `$PATH` so it works as a global shell command.\n\n```bash\nsudo ln -s /path/to/vab /usr/local/bin/vab\n```\n\n## Shell tab completion (optional)\nYou can install tab completions for your shell by [following the instructions\nhere](https://github.com/vlang/vab/blob/3091ade4c9792c6a37596ccfa9299fb269d3160e/cmd/complete.v#L11-L38).\n\n# Usage\n\n`vab` can be used both from the command line and as a module in V code.\nIn either case the following dependencies is required before `vab` will work\nas intented.\n\n## Runtime dependencies\n * V\n * Java (JDK) \u003e= 8 (\u003e= 9 on Windows)\n * Android SDK\n * Android NDK\n\n(Android Studio is **NOT** required)\n\nIf `vab` fail to detect your environment you can set ENV variables\nto help it:\n```bash\nJAVA_HOME=/path/to/java-jdk\nSDKMANAGER=/path/to/sdkmanager\nANDROID_SDK_ROOT=/path/to/android_sdk_linux\nANDROID_NDK_ROOT=/path/to/android_ndk_linux\nVEXE=/path/to/custom/v/binary\n```\n\n## Development (debug builds)\n\nThe fast way from V source to an APK is:\n```bash\nvab /path/to/v/source/file/or/dir\n```\n... yes, that's it. Your APK should now reside in the current directory.\n\nThe fast way from source to a run on the device\n(build, package, deploy and launch app on device) is:\n```bash\nvab run --device auto --archs 'armeabi-v7a' /path/to/v/source/file/or/dir\n```\nThe `--archs` flag control what architectures your app is built for.\nYou can specify multiple archs with `--archs 'armeabi-v7a, arm64-v8a'`.\nBy default `vab` will build for all 4 supported\nCPU architectures (`arm64-v8a`, `armeabi-v7a`, `x86` and `x86_64`).\n\n## Release\n\nYou can build an Android app ready for the Play Store with the following command:\n```bash\nexport KEYSTORE_PASSWORD=\"pass\"\nexport KEYSTORE_ALIAS_PASSWORD=\"word\"\nvab -prod --name \"V App\" --package-id \"com.example.app.id\" --icon-mipmaps --icon /path/to/file.png  --version-code \u003cint\u003e --keystore /path/to/sign.keystore --keystore-alias \"example\" /path/to/v/source/file/or/dir\n```\nDo not submit apps using default values.\nPlease make sure to adhere to all [guidelines](https://developer.android.com/studio/publish) of the app store you're publishing to.\n\n## AAB package format\n\n`vab` supports outputting [Android App Bundles](https://developer.android.com/guide/app-bundle) (AAB).\nTo output an `.aab` file you can specify the package format with the `--package` flag:\n\n```bash\nvab --package aab /path/to/v/source/file/or/dir\n```\n\nAlternatively it will be inferred if you use the `--output`/`-o` flag:\n```bash\nvab -o /tmp/ma_app.aab /path/to/v/source/file/or/dir\n```\n\n# Environment variables\n\nIf `vab` should fail to detect a tool or location on your build host\nyou can use the following ENV variables to help `vab` understand your\nAndroid development setup.\n\n**Complete list of env variables recognized**\n```bash\nVEXE                     # Absolute path to the V executable to use\nJAVA_HOME                # Absolute path to the Java install to use\nSDKMANAGER               # Absolute path to the sdkmanager to use\nANDROID_SERIAL           # ID of the device to deploy to\nANDROID_SDK_ROOT         # Absolute path to the Android SDK\nANDROID_NDK_ROOT         # Absolute path to the Android NDK\nKEYSTORE_PASSWORD        # Password for keystore\nKEYSTORE_ALIAS_PASSWORD  # Password for keystore alias\nBUNDLETOOL               # Absolute path to the bundletool to use\nAAPT2                    # Absolute path to the aapt2 to use\nADB                      # Absolute path to the adb to use\nAVDMANAGER               # Absolute path to the avdmanager to use\nEMULATOR                 # Absolute path to the emulator to use\n```\n\n```bash\nVAB_EXE                  # Absolute path to a vab executable (Used in tests and sub-cmd execution)\nVAB_FLAGS                # Used to pass flags to vab. Command-line flags overwrites any flags/values set via VAB_FLAGS.\nVAB_KILL_ADB             # Set to let vab kill adb after use. This is useful on some hosts.\n```\n\n## `VAB_FLAGS` example:\n`VAB_FLAGS=\"-v 3 --name 'V App' --api 30 --build-tools 29.0.0\" vab /path/to/v/source/file/or/dir`\n\nSee all options:\n```bash\nvab -h\n```\n\n# Setup\n\n`vab` has support for downloading it's dependencies automatically, except the Java JDK.\n\nIf you have nerves to let it try and figure things out automatically simply do:\n`vab install auto`\n\n## Java\n\n### Windows\n\nOpenJDK can be installed via [https://adoptium.net/](https://adoptium.net/).\n\n### macOS\n\nInstalling Java JDK using homebrew\n\n```bash\nbrew tap adoptopenjdk/openjdk\nbrew cask install adoptopenjdk\n```\n\n### Linux\n\nYou should be able to find a way to install Java JDK \u003e= 8 with your package manager of choice.\n\n```bash\nsudo apt install openjdk-\u003cversion\u003e-jdk\n```\n\nE.g.: `sudo apt install openjdk-8-jdk`\n\n### termux (experimental)\n\n**NOTE** Currently only tested for `arm64` on Android 9 and above.\n\nYou must install Java 17 and few more things:\n\n```bash\npkg install openjdk-17 aapt apksigner dx ecj\n```\n\nDownload, unzip and set enviroment variables to the SDK and NDK from:\n\n[https://github.com/Lzhiyong/termux-ndk/releases](https://github.com/Lzhiyong/termux-ndk/releases).\n\nYou may have to set the SDK version to be compatible with the NDK\n(`sdkmanager install/uninstall platform-version`).\n\nEnjoy using vab on `termux`!\n\n[@MatejMagat305](https://github.com/MatejMagat305) has made a video of the process you can watch here:\n\n[https://www.youtube.com/watch?v=7aUh39w_-2Q](https://www.youtube.com/watch?v=7aUh39w_-2Q).\n\nThe accompaning script used in the video can be found here:\n\n[https://github.com/MatejMagat305/vab-termux](https://github.com/MatejMagat305/vab-termux).\n\n# Examples\n\nSee [*\"Where is the `examples` folder?\"*](docs/FAQ.md#where-is-the-examples-folder)\nin the [FAQ](docs/FAQ.md).\n\n# Tests\n\n`vab`, like many other V modules, can be tested with `v test .`.\n\nNote that `vab` has *runtime* tests that requires all [runtime dependencies](#runtime-dependencies)\nto be installed in order for the tests to run correctly.\nRuntime tests can be run with `vab test-runtime` (also part of `vab test-all`).\n\n# Extending `vab`\n\nThe `vab` command-line tool can be extended with custom user commands.\nSee the \"[Extending `vab`](docs/docs.md#extending-vab)\" section\nin the [documentation](docs/docs.md).\n\n# Notes\n\n`vab` targets as low an API level as possible by default for maximum\ncompatibility, you can however tell it to target newer Android versions\nby using the `--api` flag. Example: `vab --api 30 \u003c...\u003e`.\n\nInstalled API levels can be listed with `vab --list-apis`.\n\n# Troubleshooting\n\nAndroid is a complex ecosystem that has differences between\nbuild hosts and tool versions - consult our [FAQ](docs/FAQ.md)\nfor answers to frequently asked questions.\n","funding_links":[],"categories":["Recently Updated","Applications"],"sub_categories":["[Feb 28, 2025](/content/2025/02/28/README.md)","Build Systems"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlang%2Fvab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvlang%2Fvab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlang%2Fvab/lists"}