The layers

LayerOn AndroidHereStrategyStatus
DEX bytecodeART's interpreter, JIT and dex2oatsrc/android/dex/ to JVM classes, HotSpot's JITTranslateDone
ART internals apps touch (dalvik.system.*, hidden VMRuntime calls)libartSmall Java shims. The app's loader is a PathClassLoader, whose findLibrary gives the app's native library folder. A loader of another DEX path finds no classes of its own, as the runtime translates only the APKHLEAs apps reach them
libcore (java.*, javax.*)ART's OpenJDK forkOpenJDK's java.baseMapWorks; Android-only members go to a remap table in the translator when an app reaches one
Framework (android.*)framework.jarOur own subset, src/android/framework/Implement where subclassed, else HLE or OffIn progress
Process start (zygote, ActivityThread, LoadedApk)zygote and ActivityThread.mainsnx.android.Main reads the manifest and starts the components in handleBindApplication's orderAbstractDone: the factory, the Application, the providers, the launcher activity
System services (ActivityManager, PackageManager, WindowManager, ...) in system_serverBinder IPC to another processPlain objects in the process, called directly (snx.android.app.SystemServices)HLEThe ones the baseline app asks for
Binder (android.os.Binder, Parcel)/dev/binder, libbinderLocal binders only; Parcel a Java byte buffer for the apps that marshal through itHLEPlanned
libandroid_runtime (the JNI of the framework)C++ in the frameworkNatives that the runtime registers (android_jvm_register)HLEXML parser, assets, text, SQLite done
libandroidfw (resources, binary XML, assets)AssetManager2, ResXMLParsersrc/android/res/ (C): binary XML, resource table, configuration matchHLEDone: binary XML, resources.arsc, themes, style resolution
libhwui (Canvas, RenderNode, HardwareRenderer, Paint, Path)Skia over Vulkan or GLES, a RenderThreadDisplay lists that the Java side records in a byte format, drawn with Vulkan by ScarletNX's renderer (HWUI)HLEShapes, paths, strokes, text, bitmaps and nine-patches drawn, images decoded with FFmpeg; gradients and layers next
minikin (text measure and shaping)minikin and HarfBuzzHarfBuzz behind snx.android.hwui.Text (src/android/hwui/text.c), which Paint and Canvas callHLEShaping and metrics done
Fonts (/system/fonts, fonts.xml)System font filesNoto Sans JP (the subset the Switch runtime already uses), which the build and an install put beside the program in android-fonts/AbstractDone, one family for every typeface
SurfaceFlinger, BufferQueue, gralloc, HWCComposer process and buffer allocatorA window's surface is an SDL window's Vulkan swapchain, or an image of its own without a displayAbstractDone
Input (InputDispatcher, InputChannel)system_server and a socket per windowSDL events made into MotionEvent and KeyEvent on the window's thread: the left mouse button as a finger, a US keyboard. A touch goes to the top window whose frame holds it or that is touch-modal, a key to the top window that takes focus, as InputDispatcher picks them (snx.android.ui.Host)AbstractFirst version
Native Looper (epoll)libutilsThe main MessageQueue waits in steps of 4 ms and reads SDL's event queue between themHLEDone
Choreographer vsyncDisplayEventReceiver from SurfaceFlingerA 60 Hz timer; the swapchain's FIFO present holds the main thread to the displayAbstractDone
SQLite (android.database.sqlite)libsqlite and its JNIJava classes over SQLite's amalgamation, a pinned package (src/android/db/sqlite_jni.c)HLEDone
SharedPreferences, files, databases folders/data/data/<package>A folder of the app in the data folder (snx.android.data, or android/<package> in ScarletNX's data folder), with Android's XML format for preferencesAbstractDone
Settings provider (Settings.Global, Secure, System)A content provider in system_serverA table of defaultsHLEPlanned
Accessibility, autofill, content capture, input methodsServices in system_serverManagers that report the service is off; text input from the keyboard as key eventsOffPlanned
Network (java.net, the guest's sockets)The kernel's socketsScarletNX's Network setting (network in settings.txt, 0 by default), from the launcher's settings.ini. Java's name resolver (snx.android.net.OfflineResolver) answers the names of Android's /etc/hosts as a device does (localhost is 127.0.0.1 alone). Offline, it answers no other name, its proxy selector refuses other hosts, ConnectivityManager has no network, and the guest's connect, sendto and name lookups reach loopback onlyAbstractDone
Connectivity, power, alarms, jobs (JobScheduler, AlarmManager)system_serverReport a connected network and no power saving; jobs run on the main looper, a full battery on power is the sticky broadcastHLEEnough for WorkManager
Telephony, location, sensors, camera, Bluetooth, NFC, biometrics, Wi-Fi, USB, vibrator, microphoneHALsReport none present: no camera, location turned off, no Bluetooth or NFC adapter (their managers are null, as on a device without the feature), no fingerprint hardware, Wi-Fi off with the wired host networkOffDone for the members apps reference
Accounts, credentials, ad services, printing, downloads, wallpaper, device policy, app widgetssystem_serverNo accounts or credentials, ad services unavailable (each call reports an error), a download fails at once, no wallpaper, an unmanaged deviceOffDone for the members apps reference
Media codecs (MediaCodec, ImageDecoder)codec2, libstagefrightBitmapFactory and ImageDecoder read PNG, JPEG, WebP, GIF and BMP, and Bitmap.compress writes PNG and JPEG, through FFmpeg (src/android/hwui/image.c). MediaPlayer and SoundPool play audio: FFmpeg decodes MP3, Ogg Vorbis, FLAC, AAC, WAV PCM and ADPCM from memory to 48 kHz stereo, and one SDL audio stream mixes the voices (src/android/runtime/audio.c; a --headless run mixes on SDL's dummy driver at real time). A sound decodes whole when it loads, a player's stream as it plays. MediaCodec creates no codec, MediaPlayer draws no picture, and AudioTrack plays silence in real timeHLEImages, MediaPlayer's and SoundPool's audio done. Planned: MediaCodec on FFmpeg, and AudioTrack on the same mixer

Made from docs/platforms/android-apps/interfaces.md at 69237645142c. GPL-3.0-or-later.