6 Commits

Author SHA1 Message Date
oxmc 2b07b045d6 prebuilt: split overrides into Lawnchair and LawnchairQuickStep
Lawnchair now overrides only the home-screen launcher (Launcher3,
PixelLauncher, Trebuchet).  A new LawnchairQuickStep module, using the
same APK, overrides Launcher3QuickStep so the QuickStep/recents stack
is also replaced when both are included in PRODUCT_PACKAGES.

This allows device makefiles to control each override independently:
include only Lawnchair for home-screen replacement, add LawnchairQuickStep
to also take over the recents/overview experience.
2026-06-08 01:09:00 -07:00
oxmc d9bc1451f2 prebuilt: override Launcher3QuickStep in addition to Launcher3
AOSP builds Launcher3QuickStep (not just Launcher3) as the actual
quickstep launcher module. Without overriding it, both Launcher3QuickStep
and Lawnchair end up on-device and the system defaults to Launcher3QuickStep
(com.android.launcher3). Adding it to overrides removes it from the image.
2026-06-06 23:09:27 -07:00
oxmc 02fa115417 Revert "build: add aconfig flags and launcher-aosp-tapl stub for prebuilt mode"
This reverts commit e8ca8eeb40.
2026-06-06 05:58:34 -07:00
oxmc e8ca8eeb40 build: add aconfig flags and launcher-aosp-tapl stub for prebuilt mode
When AOSP Launcher3 is removed from the manifest (prebuilt APK mode),
frameworks/base/services and platform_testing still depend on:
  - com_android_launcher3_flags_lib (via aconfig/Android.bp)
  - launcher-aosp-tapl (empty android_library stub in Android.bp)

Copy the aconfig declarations from apps_lawnchair so the Flags class is
generated correctly. The launcher-aosp-tapl stub satisfies the build
graph dependency without any test sources.
2026-06-06 05:57:11 -07:00
oxmc 2b59ccc7af Update: Switch from Lawnchair 12 to Lawnchair 15 Beta 3 2026-06-06 05:30:57 -07:00
oxmc b2fe6b6cb5 add build_prebuilt.sh: automates Gradle build → prebuilt APK workflow 2026-06-06 01:21:22 -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.