cnlohr/rawdrawandroid logo

cnlohr/rawdrawandroid

Free

Build android apps without any java, entirely in C and Make

FreeFree tier
Type
Open Source

About cnlohr/rawdrawandroid

rawdrawandroid is an open-source framework for building Android applications entirely in C and Make, eliminating the need for Java or Kotlin. It leverages the rawdraw library to provide cross-platform C code that can run on Android, Linux, Windows, and even ESP8266. The framework includes support for OpenGL ES graphics, accelerometer and gyroscope input, multi-touch, on-screen keyboard input, asset management via AAssetManager, permissions handling, and direct USB device access. It produces minimal APKs (around 25 kB for API 26 and 45 kB for API 30) and can build, install, and run in about 2 seconds. It also works with OpenXR on Meta Quest. The project uses simple Makefiles for transparency and customization.

Key Features

Build Android apps using only C and Makefile, no Java required
OpenGL ES support for 2D/3D graphics rendering
Accelerometer and gyroscope input
Multi-touch input support
Android keyboard input integration
Asset management using AAssetManager to store files in APK
Permissions framework for accessing hardware like sound
Direct USB device access with included library
Works with OpenXR on Meta Quest headsets
Extremely small APK size (~25 kB for API 26, ~45 kB for API 30)

Pros & Cons

Pros
  • Eliminates Java dependency, allowing C developers to write Android apps
  • Extremely small APK size saves storage and download time
  • Very fast build and deploy cycle (~2 seconds) improves iteration speed
  • Direct access to Android hardware (USB, accelerometer, touch) without wrappers
  • Cross-platform code reuse through rawdraw library
  • Open-source with permissive license (MIT-style based on repository)
  • Transparent build process using Makefiles, easy to customize
  • Support for modern Android APIs (OpenGL ES, permissions, asset management)
Cons
  • No high-level UI framework; rawdraw provides only minimal drawing primitives
  • Not suitable for complex apps requiring Java ecosystem libraries or APIs
  • Author disclaims warranty and does not guarantee commercial app store usability
  • Requires Android NDK and C programming expertise
  • Limited community support (Discord not public; author requests direct message)
  • Some Android features (e.g., Java-only APIs) are inaccessible without bridging

Best For

Rapid prototyping of Android applications without JavaCreating minimal, lightweight APKs for embedded or single-purpose appsCross-platform C development for desktop and mobile with shared codebaseLow-level Android development with direct hardware access (USB, sensors, graphics)Building simple OpenGL demos or interactive visualizations on AndroidExperimenting with Android native development using NDK and Makefiles

FAQ

What programming languages are required to use rawdrawandroid?
Only C and Makefile. No Java, Kotlin, or other languages are needed.
What is the typical APK size?
Approximately 25 kB for API 26 and 45 kB for API 30 (ARM64+ARM32).
Can I access USB devices from a rawdrawandroid app?
Yes, the framework includes a library for direct USB device access, with examples available.
Does rawdrawandroid support graphics rendering?
Yes, it includes OpenGL ES support for creating windows with hardware-accelerated graphics.
Is rawdrawandroid compatible with Android R (API 30) and later?
Yes, but the APK size increases to about 45 kB for ARM64+ARM32 support.
Can I use rawdrawandroid to build apps for Meta Quest?
Yes, it works with OpenXR on Meta Quest headsets.