{"id":17063484,"url":"https://github.com/akavel/hellomello","last_synced_at":"2025-07-27T21:34:00.644Z","repository":{"id":65722142,"uuid":"185021603","full_name":"akavel/hellomello","owner":"akavel","description":"Experiments with writing Android apps in Nim","archived":false,"fork":false,"pushed_at":"2025-06-14T17:27:32.000Z","size":90,"stargazers_count":89,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-19T10:58:24.904Z","etag":null,"topics":["android","apk","dalvik","dex","hello-world","jni","minimal","nim","standalone"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/akavel.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,"zenodo":null}},"created_at":"2019-05-05T11:21:35.000Z","updated_at":"2025-05-30T21:45:55.000Z","dependencies_parsed_at":"2025-06-17T10:08:51.802Z","dependency_job_id":"ac179af1-7118-457a-a1dc-9f563d87ce5c","html_url":"https://github.com/akavel/hellomello","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akavel/hellomello","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akavel%2Fhellomello","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akavel%2Fhellomello/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akavel%2Fhellomello/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akavel%2Fhellomello/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akavel","download_url":"https://codeload.github.com/akavel/hellomello/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akavel%2Fhellomello/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267427506,"owners_count":24085567,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","apk","dalvik","dex","hello-world","jni","minimal","nim","standalone"],"created_at":"2024-10-14T10:52:08.789Z","updated_at":"2025-07-27T21:34:00.605Z","avatar_url":"https://github.com/akavel.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"HelloWorld.apk built with Nim and no Android Studio\n===================================================\n\n\n\u003cimg src=\"https://raw.githubusercontent.com/akavel/hellomello/master/exp/screenshot.png\" width=\"360\" height=\"640\"/\u003e\n\nTo build the project, you will currently need the following prerequisites:\n\n - [Nim compiler](https://nim-lang.org/install.html)\n - [Go compiler](https://golang.org/dl/) (TODO: remove this dependency —\n   at least provide prebuilt binaries of *apksigner*)\n - [Android NDK][ndk] (the elephant in the room...)\n    - *standalone* toolchain — just\n      [download][ndk] and unpack\n      somewhere, no installation required afterwards (still, ~2.5GB unpacked)\n - ...and: NO Java, NO JRE, NO Android Studio, NO Android SDK! 🎉\n\n[ndk]: https://developer.android.com/ndk/downloads\n\nBuild Steps\n-----------\n\n1. Compile the native JNI code, using Nim + Android NDK:\n\n       $ git clone https://github.com/akavel/hellomello\n         # Edit `nim.cfg`: change `--clang.path=...` to a correct path to clang in your Android NDK directory.\n         # Also: remove `.cmd` suffixes in `nim.cfg` if you are on Linux.\n       $ cd hellomello\n       $ nim c --app:lib --os:android --cpu=arm -d:noSignalHandler --hint[CC]:on hello.nim\n       $ mkdir lib\n       $ mkdir lib/armeabi-v7a\n       $ mv libhello.so lib/armeabi-v7a/libhello-mello.so\n       $ cd ..\n\n2. Assemble the Dalvik bytecode (required to wrap the JNI library), using [dali](https://github.com/akavel/dali):\n\n       $ git clone https://github.com/akavel/dali\n       $ cd dali\n       $ nim c jni_hello.nim\n       $ ./jni_hello \u003e ../hellomello/classes.dex\n       $ cd ..\n\n3. Compile the manifest file to binary format, using [marco](https://github.com/akavel/marco):\n\n       $ git clone https://github.com/akavel/marco\n       $ cd marco\n       $ nimble build\n       $ cd ../hellomello\n       $ ../marco/marco \u003c AndroidManifest0.xml \u003e AndroidManifest.xml\n\n4. Build an unsigned .apk, using OS-provided zip archiver:\n\n       $ zip -r unsigned.apk  classes.dex lib/ AndroidManifest.xml\n         adding: classes.dex (172 bytes security) (deflated 44%)\n         adding: lib/ (192 bytes security) (stored 0%)\n         adding: lib/armeabi-v7a/ (192 bytes security) (stored 0%)\n         adding: lib/armeabi-v7a/libhello-mello.so (172 bytes security) (deflated 60%)\n         adding: AndroidManifest.xml (172 bytes security) (stored 0%)\n       $ cd ..\n\n5. Sign the .apk, using [apksigner](https://github.com/akavel/apksigner) tool written in Go:\n\n       $ git clone https://github.com/akavel/apksigner\n       $ cd apksigner\n       $ go build\n       $ cd ../hellomello\n       $ ../apksigner/apksigner -i unsigned.apk -o hello.apk -k key.pk8 -c key.x509.pem\n       $ unzip -l hello.apk\n       Archive:  hello.apk\n         Length     Date   Time    Name\n        --------    ----   ----    ----\n             282  00-00-80 00:00   META-INF/MANIFEST.MF\n             335  00-00-80 00:00   META-INF/CERT.SF\n             436  00-00-80 00:00   META-INF/CERT.EC\n              14  06-05-19 22:30   AndroidManifest.xml\n            1060  06-05-19 22:29   classes.dex\n          149348  06-05-19 22:28   lib/armeabi-v7a/libhello-mello.so\n        --------                   -------\n          151475                   6 files\n\n6. ...aaand you should have a `hello.apk` file now, **ready to be installed**\n   on an ARM-based Android device. Worked For Me\u0026trade;... In case of problems\n   installing or opening the apk on your device, try running `adb logcat` (yep,\n   that requires Android Studio... or you could try\n   [python-adb](https://github.com/google/python-adb)).  I suggest searching for\n   \"InstallInstall\" and \"InstallFail\" messages, verifier/verification messages,\n   and Java-like exception stack traces.  You're welcome to post your problems as\n   issues on this repository, but I can't promise I will be able to help you in\n   any way. We can treat them as \"observations\" or \"reports\". Maybe someone else\n   will come by and suggest some steps for future experimenters.\n\n*[/Mateusz Czapliński.](http://akavel.com)*  \n*2019-05-06*\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakavel%2Fhellomello","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakavel%2Fhellomello","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakavel%2Fhellomello/lists"}