commit 9344e608f68dcd48332d11d507717cac454397c5 Author: oxmc7769 Date: Sat Mar 21 19:08:46 2026 -0700 Initial commit: PawletOS vendor tree Adds the full vendor/pawlet tree for PawletOS on Raspberry Pi 4/5: - build/: envsetup.sh helpers (breakfast/brunch/mka), bacon OTA target, Soong namespace, build core hook - config/: common.mk, version.mk, BoardConfigPawlet.mk, BoardConfigSoong.mk, privapp-permissions, me.pawlet.android feature XML - hal/boot_control/rpi/: AIDL boot_control HAL for RPi A/B slot switching - apps/Updater/: A/B OTA updater (download, verify, install, reboot) - apps/PawletPlatform/: platform resource APK (device icons, strings) - overlay/frameworks/base/core/res/: framework config overrides - prebuilt/, vars/: init rc, aosp_target_release diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4e69d4d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +# Normalize line endings to LF for all text files (Android build system requires LF) +* text=auto eol=lf + +# Binaries — no line ending conversion +*.png binary +*.jpg binary +*.jar binary +*.zip binary +*.so binary diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..969ef57 --- /dev/null +++ b/Android.mk @@ -0,0 +1,10 @@ +# +# Copyright (C) 2025 oxmc / PawletOS +# +# SPDX-License-Identifier: Apache-2.0 +# + +LOCAL_PATH := $(call my-dir) + +# Pull in every Android.mk under this vendor tree. +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..490c02d --- /dev/null +++ b/NOTICE @@ -0,0 +1,65 @@ +PawletOS vendor tree — Third-party notices +========================================== + +All files in this repository are licensed under the Apache License, Version 2.0 +unless stated otherwise. You may obtain a copy of the License at: + + https://www.apache.org/licenses/LICENSE-2.0 + +The following third-party works are incorporated, adapted, or used as the basis +for code in this repository. Each is also licensed under the Apache License, +Version 2.0, and their original copyright notices are retained in the +respective source files. + + +1. The LineageOS Project / The CyanogenMod Project +--------------------------------------------------- +Files adapted from android_vendor_lineage: + - build/envsetup.sh (breakfast, brunch, mka, cmka, cout, + aospremote, repopick, reposync, repodiff) + - build/tasks/bacon.mk (bacon OTA package target) + - config/version.mk (buildtype filtering, version string structure) + +Files in the Updater application whose architecture is derived from +android_packages_apps_Updater (packages/apps/Updater): + - apps/Updater/src/.../ABUpdateInstaller.kt + - apps/Updater/src/.../controller/UpdaterController.kt + - apps/Updater/src/.../DownloadClient.kt + - apps/Updater/src/.../OTAUtils.kt + - apps/Updater/src/.../UpdaterReceiver.kt + - apps/Updater/src/.../UpdaterService.kt + - apps/Updater/src/.../UpdatesActivity.kt + - apps/Updater/src/.../model/Update.kt + - apps/Updater/src/.../model/UpdateEntry.kt + - apps/Updater/res/ + +The update server JSON API is compatible with the LineageOS update server +API format as documented at: + https://github.com/LineageOS/android_packages_apps_Updater + +Copyright (C) 2012 The CyanogenMod Project +Copyright (C) 2017 The LineageOS Project + +Licensed under the Apache License, Version 2.0. + + +2. The Android Open Source Project (AOSP) +------------------------------------------ +The boot control HAL in hal/boot_control/rpi/ implements the AOSP AIDL +interface android.hardware.boot (hardware/interfaces/boot/), and its +structure follows the AOSP reference implementation. + + - hal/boot_control/rpi/BootControl.h + - hal/boot_control/rpi/BootControl.cpp + - hal/boot_control/rpi/service.cpp + - hal/boot_control/rpi/misc_rpi.h + - hal/boot_control/rpi/Android.bp + - hal/boot_control/rpi/android.hardware.boot-service.pawlet_rpi.rc + - hal/boot_control/rpi/android.hardware.boot-service.pawlet_rpi.xml + +Build system hook files (build/core/config.mk, Android.mk files, soong +Android.bp files) follow AOSP vendor integration conventions. + +Copyright (C) The Android Open Source Project + +Licensed under the Apache License, Version 2.0. diff --git a/apps/PawletPlatform/Android.bp b/apps/PawletPlatform/Android.bp new file mode 100644 index 0000000..397e25e --- /dev/null +++ b/apps/PawletPlatform/Android.bp @@ -0,0 +1,27 @@ +// Copyright (C) 2025 oxmc / PawletOS +// +// SPDX-License-Identifier: Apache-2.0 +// +// PawletOS platform resource package. +// +// exports_package_resources: true means any app can access these resources via: +// context.createPackageContext("me.pawlet.android", 0).getResources() +// or directly in XML via the package prefix: +// @me.pawlet.android:string/pawlet_device_name_rpi4 +// @me.pawlet.android:drawable/ic_pawlet_device_rpi5 + +android_app { + name: "PawletPlatform", + + srcs: [], // resource-only APK — no Java/Kotlin sources + resource_dirs: ["res"], + manifest: "AndroidManifest.xml", + + // Make resources publicly addressable by other apps + export_package_resources: true, + + platform_apis: true, + certificate: "platform", + privileged: false, // No privileged permissions needed — resources only + product_specific: true, +} diff --git a/apps/PawletPlatform/AndroidManifest.xml b/apps/PawletPlatform/AndroidManifest.xml new file mode 100644 index 0000000..43bbc6a --- /dev/null +++ b/apps/PawletPlatform/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/apps/PawletPlatform/res/drawable/ic_pawlet_device_rpi4.xml b/apps/PawletPlatform/res/drawable/ic_pawlet_device_rpi4.xml new file mode 100644 index 0000000..d24a2b3 --- /dev/null +++ b/apps/PawletPlatform/res/drawable/ic_pawlet_device_rpi4.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/PawletPlatform/res/drawable/ic_pawlet_device_rpi400.xml b/apps/PawletPlatform/res/drawable/ic_pawlet_device_rpi400.xml new file mode 100644 index 0000000..cbcf288 --- /dev/null +++ b/apps/PawletPlatform/res/drawable/ic_pawlet_device_rpi400.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + diff --git a/apps/PawletPlatform/res/drawable/ic_pawlet_device_rpi5.xml b/apps/PawletPlatform/res/drawable/ic_pawlet_device_rpi5.xml new file mode 100644 index 0000000..3cb3f02 --- /dev/null +++ b/apps/PawletPlatform/res/drawable/ic_pawlet_device_rpi5.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/PawletPlatform/res/drawable/ic_pawlet_device_unknown.xml b/apps/PawletPlatform/res/drawable/ic_pawlet_device_unknown.xml new file mode 100644 index 0000000..6206940 --- /dev/null +++ b/apps/PawletPlatform/res/drawable/ic_pawlet_device_unknown.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + diff --git a/apps/PawletPlatform/res/values/devices.xml b/apps/PawletPlatform/res/values/devices.xml new file mode 100644 index 0000000..c392f37 --- /dev/null +++ b/apps/PawletPlatform/res/values/devices.xml @@ -0,0 +1,65 @@ + + + + + + Raspberry Pi 4 + Raspberry Pi 4 Model B + Raspberry Pi 400 + Raspberry Pi 5 + + + Raspberry Pi (unknown model) + + + Release + Nightly + Snapshot + Experimental + Unofficial + + + PawletOS + oxmc + + + + rpi4 + rpi4b + rpi400 + rpi5 + + + + + Raspberry Pi 4 + Raspberry Pi 4 Model B + Raspberry Pi 400 + Raspberry Pi 5 + + + diff --git a/apps/Updater/Android.bp b/apps/Updater/Android.bp new file mode 100644 index 0000000..24a8d5d --- /dev/null +++ b/apps/Updater/Android.bp @@ -0,0 +1,18 @@ +// Copyright (C) 2025 oxmc / PawletOS +// +// SPDX-License-Identifier: Apache-2.0 + +android_app { + name: "PawletUpdater", + srcs: ["src/main/java/**/*.kt"], + resource_dirs: ["res"], + manifest: "AndroidManifest.xml", + + // System app — needs access to UpdateEngine, PowerManager.reboot, etc. + platform_apis: true, + certificate: "platform", + privileged: true, + system_ext_specific: true, + + kotlincflags: ["-Xjvm-default=all"], +} diff --git a/apps/Updater/AndroidManifest.xml b/apps/Updater/AndroidManifest.xml new file mode 100644 index 0000000..47535e6 --- /dev/null +++ b/apps/Updater/AndroidManifest.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/Updater/res/layout/activity_updates.xml b/apps/Updater/res/layout/activity_updates.xml new file mode 100644 index 0000000..97d9226 --- /dev/null +++ b/apps/Updater/res/layout/activity_updates.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +