All Projects → akavel → Hellomello

akavel / Hellomello

Licence: apache-2.0
Experiments with writing Android apps in Nim

Programming Languages

nim
578 projects

Projects that are alternatives of or similar to Hellomello

Apk Changer
Command line program for modifying apk files
Stars: ✭ 122 (+159.57%)
Mutual labels:  apk, dex
NinjaDroid
Ninja Reverse Engineering on Android APK packages
Stars: ✭ 224 (+376.6%)
Mutual labels:  apk, dex
Android Crack Tool
🐞Android crack tool For Mac
Stars: ✭ 2,666 (+5572.34%)
Mutual labels:  apk, dex
Fastdex
🚀 加快 apk 的编译速度 🚀
Stars: ✭ 1,457 (+3000%)
Mutual labels:  apk, dex
Adhrit
Android Security Suite for in-depth reconnaissance and static bytecode analysis based on Ghera benchmarks.
Stars: ✭ 399 (+748.94%)
Mutual labels:  apk, dex
Easyincrementalupdate
Android差分补丁库,通过native层合并APK,实现增量更新升级,让你更新的APK更小。
Stars: ✭ 233 (+395.74%)
Mutual labels:  apk, jni
dalvikgate
Lightweight dex / odex / apk to jar converter
Stars: ✭ 32 (-31.91%)
Mutual labels:  apk, dex
dali
Indie assembler/linker for Dalvik VM .dex & .apk files (Work In Progress)
Stars: ✭ 55 (+17.02%)
Mutual labels:  standalone, dex
Dex65536
Solve the issue with dalvik compiler limitation on 65536 methods (Unable to execute dex: method ID not in [0, 0xffff]: 65536)
Stars: ✭ 352 (+648.94%)
Mutual labels:  apk, dex
RocketXPlugin
🔥🔥 android 端编译加速插件🚀 自动识别未改动 module 并在编译流程中替换为 aar ,只编译改动模块,加速 Android apk 的编译速度。
Stars: ✭ 408 (+768.09%)
Mutual labels:  apk, dex
Fakerandroid
A tool translate a apk file to stantard android project include so hook api and il2cpp c++ scaffolding when apk is a unity il2cpp game. Write code on a apk file elegantly.
Stars: ✭ 695 (+1378.72%)
Mutual labels:  apk, dex
Dexcalibur
[Official] Android reverse engineering tool focused on dynamic instrumentation automation. Powered by Frida. It disassembles dex, analyzes it statically, generates hooks, discovers reflected methods, stores intercepted data and does new things from it. Its aim is to be an all-in-one Android reverse engineering platform.
Stars: ✭ 512 (+989.36%)
Mutual labels:  apk, dex
Android Classyshark
Android and Java bytecode viewer
Stars: ✭ 6,930 (+14644.68%)
Mutual labels:  apk, dex
Rucaja
Calling the JVM from Rust via JNI
Stars: ✭ 35 (-25.53%)
Mutual labels:  jni
Jnativehook
Global keyboard and mouse listeners for Java.
Stars: ✭ 1,015 (+2059.57%)
Mutual labels:  jni
Anyndk
🔥 Android native library, make your development faster and easier. Android各种native库,让你的开发更快更简单
Stars: ✭ 35 (-25.53%)
Mutual labels:  jni
Femto
A toy text editor with no dependencies written in Ruby
Stars: ✭ 34 (-27.66%)
Mutual labels:  minimal
Apkupdater
APKUpdater is an open source tool that simplifies the process of finding updates for your installed apps.
Stars: ✭ 1,028 (+2087.23%)
Mutual labels:  apk
Minimal
Minimal Linux Live (MLL) is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core environment with just the Linux kernel, GNU C library, and Busybox userland utilities.
Stars: ✭ 1,014 (+2057.45%)
Mutual labels:  minimal
Weatherapp
Cute weather app built in Electron
Stars: ✭ 32 (-31.91%)
Mutual labels:  minimal

HelloWorld.apk built with Nim and no Android Studio

To build the project, you will currently need the following prerequisites:

  • Nim compiler
  • Go compiler (TODO: remove this dependency — at least provide prebuilt binaries of apksigner)
  • Android NDK (the elephant in the room...)
    • standalone toolchain — just download and unpack somewhere, no installation required afterwards (still, ~2.5GB unpacked)
  • ...and: NO Java, NO JRE, NO Android Studio, NO Android SDK! 🎉

Build Steps

  1. Compile the native JNI code, using Nim + Android NDK:

    $ git clone https://github.com/akavel/hellomello
      # Edit `nim.cfg`: change `--clang.path=...` to a correct path to clang in your Android NDK directory.
      # Also: remove `.cmd` suffixes in `nim.cfg` if you are on Linux.
    $ cd hellomello
    $ nim c --app:lib --os:android --cpu=arm -d:noSignalHandler --hint[CC]:on hello.nim
    $ mkdir lib
    $ mkdir lib/armeabi-v7a
    $ mv libhello.so lib/armeabi-v7a/libhello-mello.so
    $ cd ..
    
  2. Assemble the Dalvik bytecode (required to wrap the JNI library), using dali:

    $ git clone https://github.com/akavel/dali
    $ cd dali
    $ nim c jni_hello.nim
    $ ./jni_hello > ../hellomello/classes.dex
    $ cd ..
    
  3. Compile the manifest file to binary format, using marco:

    $ git clone https://github.com/akavel/marco
    $ cd marco
    $ nimble build
    $ cd ../hellomello
    $ ../marco/marco < AndroidManifest0.xml > AndroidManifest.xml
    
  4. Build an unsigned .apk, using OS-provided zip archiver:

    $ zip -r unsigned.apk  classes.dex lib/ AndroidManifest.xml
      adding: classes.dex (172 bytes security) (deflated 44%)
      adding: lib/ (192 bytes security) (stored 0%)
      adding: lib/armeabi-v7a/ (192 bytes security) (stored 0%)
      adding: lib/armeabi-v7a/libhello-mello.so (172 bytes security) (deflated 60%)
      adding: AndroidManifest.xml (172 bytes security) (stored 0%)
    $ cd ..
    
  5. Sign the .apk, using apksigner tool written in Go:

    $ git clone https://github.com/akavel/apksigner
    $ cd apksigner
    $ go build
    $ cd ../hellomello
    $ ../apksigner/apksigner -i unsigned.apk -o hello.apk -k key.pk8 -c key.x509.pem
    $ unzip -l hello.apk
    Archive:  hello.apk
      Length     Date   Time    Name
     --------    ----   ----    ----
          282  00-00-80 00:00   META-INF/MANIFEST.MF
          335  00-00-80 00:00   META-INF/CERT.SF
          436  00-00-80 00:00   META-INF/CERT.EC
           14  06-05-19 22:30   AndroidManifest.xml
         1060  06-05-19 22:29   classes.dex
       149348  06-05-19 22:28   lib/armeabi-v7a/libhello-mello.so
     --------                   -------
       151475                   6 files
    
  6. ...aaand you should have a hello.apk file now, ready to be installed on an ARM-based Android device. Worked For Me™... In case of problems installing or opening the apk on your device, try running adb logcat (yep, that requires Android Studio... or you could try python-adb). I suggest searching for "InstallInstall" and "InstallFail" messages, verifier/verification messages, and Java-like exception stack traces. You're welcome to post your problems as issues on this repository, but I can't promise I will be able to help you in any way. We can treat them as "observations" or "reports". Maybe someone else will come by and suggest some steps for future experimenters.

/Mateusz Czapliński.
2019-05-06

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].