android-gif-drawable is a mature Android library for rendering animated GIFs in Views and OpenGL surfaces. It decodes GIF frames using a bundled GIFLib via JNI, providing a high-performance, battery-friendly alternative to WebView or the deprecated Movie class. The library offers a rich set of components: GifDrawable (an Animatable Drawable with full media control), GifImageView, GifImageButton, GifTextView, GifTextureView, and GifTexImage2D for OpenGL ES 2.0+. It supports multiple input sources (files, streams, byte arrays, URIs, etc.), subsampling, loop control, animation listeners, and saved state restoration. The architecture is cleanly separated into Java/Kotlin public API, native C code (with optimized ARM assembly for memset), and a sample app demonstrating various features. The codebase is well-maintained, with recent releases and active dependency updates.
The repository implements Trime, a fully functional Android input method (IME) based on the Rime input engine. It provides a highly customizable keyboard with YAML-based themes, color schemes, key layouts, and gesture support. The core architecture is a Kotlin/JNI bridge to the native librime library, with a service-based IME lifecycle (`TrimeInputMethodService`), a daemon for Rime session management, and a rich UI layer for candidate display, clipboard, popups, and liquid keyboards. The application also includes a settings interface for schema management, user dictionaries, sync via Storage Access Framework, and clipboard history. The codebase is modular, with clear separation between Rime interaction, theme management, UI delegates, and data persistence, using modern Android patterns (Room, Paging, WorkManager, Coroutines, Kodein DI). It is actively maintained with frequent commits and extensive test coverage for core components. The YAML theme system is particularly sophisticated, featuring typed color resolution with fallback chains and a custom parser that handles anchors and aliases.
DexKit is a high-performance C++ library for runtime parsing and querying of Android DEX bytecode, primarily used by Xposed module developers to locate obfuscated classes, methods, and fields. It provides a rich DSL in Kotlin/Java for constructing structural queries based on annotations, opcodes, string usage, field/method references, and more. The core engine parses DEX files from APK archives, builds in-memory indexes, and uses algorithms like Aho-Corasick for substring matching and the Hungarian algorithm for unordered set matching. Communication between the native C++ layer and JVM is handled via FlatBuffers serialization. The library also includes an optional caching layer (`DexKitCacheBridge`) for persisting query results across app restarts. It is distributed as an Android AAR via Maven Central and includes a demo app and unit tests.
JavaCPP is a mature, annotation-driven library that provides efficient Java-to-C++ interoperability via JNI. It is not an application but a core infrastructure library used by hundreds of downstream projects (e.g., OpenCV, FFmpeg, TensorFlow bindings) to bridge Java and native C++ code. The system consists of a code generation pipeline (Parser, Generator, Builder) that reads Java annotations and C++ headers to produce JNI wrapper classes, a runtime layer (Loader, Pointer hierarchy) that manages native memory and library loading, and a multidimensional data access layer (Indexer package) optimized for scientific computing. The architecture is modular: build-time code generation (Maven plugin and CLI), runtime library loading with caching and platform detection, and a uniform pointer API with automatic deallocation via PhantomReferences. Key entry points are the Builder class (for build-time code generation) and the Loader class (for runtime library loading). The codebase is largely well-crafted, with reusable patterns like the Indexer factory pattern, PointerScope for deterministic resource management, and annotation-driven configuration. Some core components (Generator, Parser) are acknowledged as complex and messy, reflecting organic growth to handle real-world C++ headers. The repository maintains an extensive test suite and supports a wide range of platforms (Linux, macOS, Windows, Android, iOS, FreeBSD, embedded architectures).
hyperscan-java provides Java bindings for Vectorscan, a high-performance multiple regex matching library (fork of Intel's Hyperscan). It allows simultaneous matching of thousands of regular expressions against input streams with exceptional throughput. The library offers two usage modes: a direct Vectorscan API for maximum performance (with limited regex syntax) and a PatternFilter utility that combines Vectorscan pre-filtering with Java's full regex engine for complete PCRE support. Key features include UTF-8 handling with byte-to-character mapping, database serialization for avoiding recompilation, callback-based scanning for efficient match processing, and support for both string and byte-oriented scanning. The architecture is a clean wrapper around the native library via JavaCPP, with well-separated concerns: Expression (pattern definition), Database (compiled pattern set), Scanner (matching engine), and utility classes. The codebase demonstrates strong engineering practices with comprehensive test coverage, including regression tests for upstream bugs and a JMH benchmark. It is actively maintained with recent releases and CI across Linux and macOS (x86_64 and arm64).
Termux is an Android terminal emulator and Linux environment app that provides a full command-line experience on Android devices. It combines a VT100/xterm-compatible terminal emulator (written in Java with JNI for PTY creation) with a bootstrap Linux environment containing common command-line tools (bash, ssh, compilers, etc.). The architecture is modular: a core terminal-emulator library handles escape sequences, Unicode, sixel graphics, and session management; a terminal-view module provides the Android View widget for rendering; a termux-shared library contains reusable utilities for file I/O, IPC, preferences, error handling, and shell execution; and the app module ties everything together with activities, services, and a plugin ecosystem (API, Float, Tasker, Widget, etc.). Key entry points include TermuxActivity (main UI), TermuxService (foreground service managing sessions), RunCommandService (plugin command execution), and TermuxInstaller (bootstrap setup). External dependencies include Android SDK (target 28, compile 36), Gradle, NDK for native code, and libraries like Apache Commons IO, Guava, and Markwon for markdown rendering.
junixsocket is a Java/JNI library providing Unix domain socket (AF_UNIX) support and other advanced socket families (AF_TIPC, AF_VSOCK, AF_SYSTEM) to Java applications. It extends standard Java Socket and NIO APIs with features like ancillary data (file descriptor passing), peer credentials, abstract namespace, SSL/TLS, RMI, and shared memory. The architecture is modular with core modules (junixsocket-common, junixsocket-native) and protocol-specific extensions. Key entry points include factory methods in AFUNIXSocket/AFUNIXServerSocket, SSLContextBuilder, and AFUNIXNaming. Data flows involve JNI-mediated socket operations for IPC, with advanced features using native ancillary messaging. External dependencies include optional integrations (MySQL Connector/J, Jetty, Netty) and platform-specific toolchains for native builds.
This is a mature, cross-platform Java library that provides thread-to-CPU-core binding (affinity) to reduce context switching and improve cache locality for low-latency and high-performance applications. It primarily uses JNA to invoke OS-specific system calls (sched_setaffinity on Linux, SetThreadAffinityMask on Windows, etc.) and offers a fallback to a no-op implementation. The library includes CPU topology detection via /proc/cpuinfo parsing, a file-based inter-process lock mechanism (AffinityLock) to reserve cores across JVMs, a high-resolution timer based on the RDTSC instruction via JNI, and a ThreadFactory for automatic affinity assignment. The architecture is a classic Java library with a clean public API (Affinity, AffinityLock, AffinityThreadFactory) and a set of platform-specific implementations hidden behind the IAffinity interface. The codebase is well-structured, extensively tested (including multi-process and OSGi tests), and actively maintained by the OpenHFT/Chronicle Software team. It is not a data_research project.
BatteryRecorder is an Android application for precise battery power recording and battery life prediction. It consists of a main app module with Jetpack Compose UI and a native server daemon that reads battery data directly from sysfs and dumpsys via JNI. The architecture follows a multi-module structure (app, server, shared) with AIDL-based IPC between the app and the privileged background server. The app provides real-time monitoring, historical charts, per-app and per-scenario battery endurance predictions, calibration settings, and export/import capabilities. It is a sophisticated tool aimed at power users and developers, but it relies on device-specific sysfs paths and hidden Android APIs, making it fragile across different devices and Android versions. The codebase demonstrates solid use of modern Android patterns (ViewModel, StateFlow, UseCase, Repository) and custom Compose components, though it lacks automated tests and has mixed-language documentation.
This repository is an Android library for GPU-accelerated real-time image and video processing, named 'android-gpuimage-plus' (CGE engine). It provides a comprehensive set of OpenGL ES shader-based filters (brightness, contrast, hue, saturation, vignette, sketch, liquify, color mapping, LUT, etc.) and a filter chain pipeline for applying multiple effects. The library supports camera preview with live filters, video playback with effects, and video recording to MP4 using an optional FFmpeg backend. It includes a demo application (cgeDemo) showcasing all features, including image editing, camera capture, video player, and face tracking (stub). The architecture is a Java/Kotlin API layer with JNI wrappers to a native C++ core that manages OpenGL ES contexts, shader programs, and frame buffer objects. External dependencies include OpenGL ES 2.0/3.0, optional FFmpeg (version 3.4.8), and Android Camera1/CameraX APIs. The library is published as an AAR artifact with variants for different page sizes (4KB and 16KB) and optional video module.