1 Commits

Author SHA1 Message Date
oxmc 2f9943fc96 prebuilt: initial Lawnchair prebuilt setup and build infrastructure
Initial Lawnchair prebuilt APK integration for PawletOS:
- Add priv-app/Lawnchair install target with Android.bp
- Add QuickstepSwitcherOverlay to override AOSP launcher
- Wire lawnchair.mk into product makefiles
- Add build_prebuilt.sh for Gradle -> prebuilt APK workflow
- Iteratively update from Lawnchair 2.1-alpha through 12 Alpha 5,
  12.1 Alpha 3, and 15 Beta 1 as upstream releases landed
2026-06-11 08:59:29 -07:00
3 changed files with 79 additions and 1 deletions
+57
View File
@@ -0,0 +1,57 @@
#!/usr/bin/env bash
# Build a Lawnchair APK from source and place it here as a prebuilt.
#
# Usage:
# ./build_prebuilt.sh [path/to/apps_lawnchair]
#
# If no path is given, looks for apps_lawnchair as a sibling directory.
# After running this, the APK still needs to be platform-signed before it
# works as a privileged system app in a ROM build:
#
# apksigner sign \
# --key $ANDROID_BUILD_TOP/build/target/product/security/platform.pk8 \
# --cert $ANDROID_BUILD_TOP/build/target/product/security/platform.x509.pem \
# priv-app/Lawnchair/Lawnchair.apk
#
# If you're only testing on a rooted device you can push the unsigned APK
# directly and use pm to set it as the default launcher.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SRC_DIR="${1:-$(dirname "$SCRIPT_DIR")/Lawnchair}"
if [[ ! -f "$SRC_DIR/gradlew" ]]; then
echo "ERROR: Lawnchair source not found at: $SRC_DIR"
echo "Pass the path as the first argument: $0 /path/to/apps_lawnchair"
exit 1
fi
echo "==> Building Lawnchair from $SRC_DIR"
cd "$SRC_DIR"
./gradlew assembleLawnchairRelease --stacktrace
APK=$(find . -name "*.apk" -path "*/lawnchair/release/*" | grep -v unsigned | head -1)
if [[ -z "$APK" ]]; then
# Fallback: any release APK
APK=$(find . -name "*.apk" -path "*/release/*" | head -1)
fi
if [[ -z "$APK" ]]; then
echo "ERROR: No release APK found after Gradle build."
exit 1
fi
DEST="$SCRIPT_DIR/priv-app/Lawnchair/Lawnchair.apk"
cp "$APK" "$DEST"
echo ""
echo "==> APK copied to: $DEST"
echo ""
echo "Next steps for AOSP ROM integration:"
echo " 1. Sign with the platform key (see header comment in this script)"
echo " 2. Commit the signed APK: git -C '$SCRIPT_DIR' add priv-app/Lawnchair/Lawnchair.apk && git commit"
echo " 3. Switch the manifest to prebuilt mode (see android_local_manifest/pawletos.xml)"
echo ""
echo "For direct device testing (root required):"
echo " adb push $DEST /system/priv-app/Lawnchair/Lawnchair.apk"
echo " adb shell am force-stop app.lawnchair"
echo " adb reboot"
+22 -1
View File
@@ -16,4 +16,25 @@ android_app_import {
"androidx.window.extensions",
"androidx.window.sidecar",
],
}
}
// Include this alongside Lawnchair to also replace the QuickStep/recents
// launcher (Launcher3QuickStep). Both modules reference the same APK;
// the package manager deduplicates at install time.
android_app_import {
name: "LawnchairQuickStep",
apk: "Lawnchair.apk",
privileged: true,
certificate: "platform",
overrides: [
"Launcher3QuickStep",
],
required: [
"privapp-permissions-app.lawnchair.xml",
"app.lawnchair-hiddenapi-package-whitelist.xml",
],
optional_uses_libs: [
"androidx.window.extensions",
"androidx.window.sidecar",
],
}
Binary file not shown.