<?xml version="1.0" encoding="utf-8"?>
<!-- The terminal APK manifest (docs/specs/terminal/android.md): a pure
NativeActivity — no Java, no DEX (hasCode="false", NOD1). The framework's
android.app.NativeActivity loads lib/<abi>/libterminal.so; raylib's
PLATFORM_ANDROID backend inside it calls the terminal's main().
A template: nix/packages/android/terminal.nix substitutes @label@ and
renames the package (aapt2 rename-manifest-package) to the app id it was
asked for, so the plain terminal and the nix-on-droid app are one source.
targetSdk is 28 (NOD3, stamped by the builder): from API 29 an app
targeting it may not execve files in its own data dir, and nix-on-droid's
login runs proot-static from there.
windowSoftInputMode="adjustResize": the IME shrinks the content rect, and
the terminal lays its pane out in what remains (droid_terminal.d).
theme NoActionBar.Fullscreen: the default theme has an action bar. The
native surface draws over it, so it is never seen, but the content view
still sits below it and the content rect starts at its bottom — a
154 px strip above the first row on a 440 dpi phone. raylib runs the
window fullscreen anyway, so only the action bar changes.
extractNativeLibs="true": ndk-stack symbolization stays simple, and the
library is a plain file on disk.
usesCleartextTraffic="true": the bootstrap URL is the user's to choose, and
a local or LAN mirror is often plain http; the default for targetSdk 28
would refuse it. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.sparkles.terminal">
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<!-- The bootstrap download (NOD5), and whatever the session runs. -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- termux-wake-lock (NOD13): keep the CPU up for a long job. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- termux-setup-storage (NOD13): ~/storage links into shared storage.
Requested at run time, only when the tool asks. -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:label="@label@"
android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"
android:icon="@mipmap/ic_launcher"
android:hasCode="false"
android:allowBackup="false"
android:usesCleartextTraffic="true"
android:extractNativeLibs="true">
<activity
android:name="android.app.NativeActivity"
android:exported="true"
android:launchMode="singleTask"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboard|keyboardHidden|navigation|density|uiMode"
android:windowSoftInputMode="adjustResize|stateAlwaysHidden"
android:screenOrientation="fullUser">
<meta-data android:name="android.app.lib_name" android:value="terminal" />
<!-- The entry point (sparkles.android.main_thread): it wires the
main thread's looper, which the soft keyboard's text field
needs, then starts the app as ANativeActivity_onCreate. -->
<meta-data android:name="android.app.func_name" android:value="sparkles_onCreate" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>