# rivten/rawandroid architecture

> Architecture diagram of the GitHub repository rivten/rawandroid, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rivten/rawandroid
- Repository: https://github.com/rivten/rawandroid

## Overview

Rawandroid is a small Android APK-building utility: a developer runs its Python driver with an Android SDK path, and the driver generates resources, compiles and packages the app, aligns and signs the APK. The Java activity is a minimal example app that logs a message. The README describes the intended build-and-install workflow; the graph follows the concrete build steps shown in build.py and does not include a device-installation stage.

Main entry points: [`build.py`](https://github.com/rivten/rawandroid/blob/main/build.py) (Build driver), [`src/java/com/rivten/rawandroid/StartActivity.java`](https://github.com/rivten/rawandroid/blob/main/src/java/com/rivten/rawandroid/StartActivity.java) (Example activity), [`src/AndroidManifest.xml`](https://github.com/rivten/rawandroid/blob/main/src/AndroidManifest.xml) (App manifest), [`resources/values/string.xml`](https://github.com/rivten/rawandroid/blob/main/resources/values/string.xml) (String resource)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["App inputs"]
  node_activity["Example activity<br/>[StartActivity.java]"]
  node_manifest["App manifest"]
  node_strings["String resource<br/>[string.xml]"]
end

subgraph group_build["APK build"]
  node_driver["Build driver<br/>[build.py]"]
  node_aapt["AAPT"]
  node_javac["Java compiler"]
  node_d8["D8 dexer"]
  node_zipalign["ZIP aligner"]
  node_keytool["Key generator"]
  node_apksigner["APK signer"]
  node_apk["Signed APK"]
end

node_developer(("Developer"))

node_developer -->|"runs"| node_driver
node_driver -->|"generates resources"| node_aapt
node_manifest -->|"configures"| node_aapt
node_strings -->|"packages resources"| node_aapt
node_driver -->|"invokes compile"| node_javac
node_activity -->|"compiled with"| node_javac
node_driver -->|"invokes dexing"| node_d8
node_driver -->|"invokes alignment"| node_zipalign
node_driver -->|"generates signing key"| node_keytool
node_driver -->|"invokes signing"| node_apksigner
node_driver -->|"produces"| node_apk
node_apksigner -->|"signs"| node_apk

click node_driver "https://github.com/rivten/rawandroid/blob/main/build.py"
click node_activity "https://github.com/rivten/rawandroid/blob/main/src/java/com/rivten/rawandroid/StartActivity.java"
click node_manifest "https://github.com/rivten/rawandroid/blob/main/src/AndroidManifest.xml"
click node_strings "https://github.com/rivten/rawandroid/blob/main/resources/values/string.xml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_activity,node_manifest,node_strings toneBlue
class node_driver,node_aapt,node_javac,node_d8,node_zipalign,node_keytool,node_apksigner,node_apk toneAmber
class node_developer toneIndigo
```

## Components

### App inputs

- [Example activity](https://github.com/rivten/rawandroid/blob/main/src/java/com/rivten/rawandroid/StartActivity.java): `src/java/com/rivten/rawandroid/StartActivity.java`
- [App manifest](https://github.com/rivten/rawandroid/blob/main/src/AndroidManifest.xml): `src/AndroidManifest.xml`
- [String resource](https://github.com/rivten/rawandroid/blob/main/resources/values/string.xml): `resources/values/string.xml`

### APK build

- [Build driver](https://github.com/rivten/rawandroid/blob/main/build.py): `build.py`
- **AAPT**
- **Java compiler**
- **D8 dexer**
- **ZIP aligner**
- **Key generator**
- **APK signer**
- **Signed APK**

### Other components

- **Developer**

## Connections

- Developer → Build driver: runs (evidence: `README.md`)
- Build driver → AAPT: generates resources (evidence: `build.py`)
- App manifest → AAPT: configures
- String resource → AAPT: packages resources
- Build driver → Java compiler: invokes compile (evidence: `build.py`)
- Example activity → Java compiler: compiled with
- Build driver → D8 dexer: invokes dexing (evidence: `build.py`)
- Build driver → ZIP aligner: invokes alignment (evidence: `build.py`)
- Build driver → Key generator: generates signing key (evidence: `build.py`)
- Build driver → APK signer: invokes signing (evidence: `build.py`)
- Build driver → Signed APK: produces (evidence: `build.py`)
- APK signer → Signed APK: signs
