{"id":15040928,"url":"https://github.com/bensadiku/genapkbuild","last_synced_at":"2025-04-14T19:33:46.993Z","repository":{"id":53538387,"uuid":"344280957","full_name":"bensadiku/genapkbuild","owner":"bensadiku","description":"Tool to generate Android build system files (Android.mk, Android.bp) from APK automatically.","archived":false,"fork":false,"pushed_at":"2021-11-01T21:08:03.000Z","size":6718,"stargazers_count":8,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T07:51:14.356Z","etag":null,"topics":["android","aosp","bsp","makefile","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bensadiku.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-03T22:27:24.000Z","updated_at":"2025-01-06T03:39:51.000Z","dependencies_parsed_at":"2022-09-11T12:20:31.752Z","dependency_job_id":null,"html_url":"https://github.com/bensadiku/genapkbuild","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensadiku%2Fgenapkbuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensadiku%2Fgenapkbuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensadiku%2Fgenapkbuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensadiku%2Fgenapkbuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bensadiku","download_url":"https://codeload.github.com/bensadiku/genapkbuild/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248946248,"owners_count":21187473,"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":["android","aosp","bsp","makefile","rust"],"created_at":"2024-09-24T20:45:17.702Z","updated_at":"2025-04-14T19:33:41.982Z","avatar_url":"https://github.com/bensadiku.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":" Generate AOSP build system files from APK\n=====\n\n⚠️ This library is a Work in Progress! ⚠️\n\nA command-line tool to automatically generate `Android.mk` or `Android.bp` from Android APK-s.\n\nThe genapkbuild tool will analyze APK for architectures, find NDK-generated libraries inside and generate makefile (`Android.mk`) or soong (`Android.bp`) for it. By default it will generate make files but it can be changed to generate soong files (Android.bp) by passing different flags.\n\n\nThis tool supports pre Kit-Kat style makefile generation too, by extracting .so libraries from the APK and linking them into the makefile automatically. \n\nSee [flags below for more information](#Flags). \n\nInspired from northbright's tool written [Go](https://github.com/northbright/genandroidmk), ported to Rust and built on top of it, not backwards compatible with that tool (for the most part).\n\n## Binaries\n\nIf you have Cargo installed, you can install this tool by running `cargo install genapkbuild`\nTo build from source, you need Rust compiler, clone this repo and run `cargo build --release`. A binary `genapkbuild` will generated in `target/release/`.\n\nIf you don't have the compiler installed, you can download the binary from the [release tab](https://github.com/bensadiku/genapkbuild/releases)\n\n\n## Flags\n\n### Input flag [Required]\n---\n\n`-i --input \u003capk path\u003e`\n\nThis flag is required, it supplies the path of the APK we want to generate the makefile or blueprint for.\n\n### Soong (Android.bp) flag\n---\n\n`-s --soong`\n\nThis flag will create `Android.bp` instead of `Android.mk`\n\n### Extract flag\n---\n\n`-e --extract`\n\nThis flag will create pre Android 5.0 style makefiles by extracting/copying native libraries outside of APK into `/lib/\u003cabi\u003e/lib\u003cname\u003e.so` and linking them to the makefile. Disabled by default.\n\n### Architecture (ABI) flag\n---\n\n`-a --arch \u003cABI\u003e`\n\nThis flag will allow you to set a default architecture for the APK you are bundling in BSP.\nThis is neccessaary when more than one architecture is found and the tool doesn't know which one to prefer.\nIf there's only one architecture supported, it will auto-pick that.\n\n\n### Privileged flag\n---\n\n`-p --privileged`\n\nThis flag will make the apk a privileged system app located in priv-app.\n\n\n### Dex Pre opt\n---\n`-d --dex \u003ctrue or false\u003e`\n\nPre-optimization can also be enabled or disabled on an individual app basis by specifying this flag.\n\n### Name flag\n---\n\n`-n --name \u003cAPK name\u003e`\n\nIf the apk name is different from the one supplied with the `-i --input` flag, you may change that with this flag. If not supplied, it will get whatever was passed in the input flag. \n\n### Verbose flag\n---\n\n`-v --verbose \u003cAPK name\u003e`\n\nEnable verbose debug logging, by default disabled.\n\n### Version flag\n---\n\n`-V --version`\n\nPrints version information.\n\n### Help flag\n---\n\n`-h --help`\n\nPrints usage information about the tool.\n\n\nLicense\n---\nLicensed under either of\n\n- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Licensing\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbensadiku%2Fgenapkbuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbensadiku%2Fgenapkbuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbensadiku%2Fgenapkbuild/lists"}