Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f9943fc96 |
@@ -1,22 +1,11 @@
|
||||
# Lawnchair AOSP based build system
|
||||
# Lawnchair Prebuilt
|
||||
|
||||
## Disclaimer
|
||||
- All credits go to the Lawnchair team.
|
||||
- Quickstep enablement is done with the help of QuickSwitch Magisk module made by [Skittles9823](https://github.com/skittles9823).
|
||||
- This repository is based on [arter97's android_vendor_lawnchair](https://github.com/arter97/android_vendor_lawnchair).
|
||||
It has been adapted from the original Android.mk format to the Android.bp build system.
|
||||
|
||||
## Getting started
|
||||
**1. Add this repository to your AOSP build root's `vendor/lawnchair`**
|
||||
## Usage
|
||||
- Simply add the Lawnchair package to your `PRODUCT_PACKAGES`.
|
||||
|
||||
**2. Import vendor/lawnchair/lawnchair.mk**
|
||||
|
||||
In case of Paranoid Android, this can be done by appending the following at `vendor/pa/config/common.mk`:
|
||||
|
||||
`$(call inherit-product-if-exists, vendor/lawnchair/lawnchair.mk)`
|
||||
|
||||
**3. Remove existing launcher from the build**
|
||||
|
||||
`ParanoidQuickStep`, `Launcher3QuickStep`, `PixelLauncher` and `TrebuchetQuickStep` packages are overriden from `priv-app/Lawnchair/Android.mk`.
|
||||
|
||||
If your existing launcher uses a different name, either remove it from the build manually or post a pull-request.
|
||||
|
||||
**4. Build Android**
|
||||
## Note
|
||||
- There is a QuickstepSwitcherOverlay still, but the current version of lawnchair does not support being the Quickstep launcher, it is kept for future use.
|
||||
@@ -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"
|
||||
@@ -0,0 +1,15 @@
|
||||
prebuilt_etc {
|
||||
name: "privapp-permissions-app.lawnchair.xml",
|
||||
src: "permissions/privapp-permissions-app.lawnchair.xml",
|
||||
sub_dir: "permissions",
|
||||
filename_from_src: true,
|
||||
installable: true,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "app.lawnchair-hiddenapi-package-whitelist.xml",
|
||||
src: "sysconfig/app.lawnchair-hiddenapi-package-whitelist.xml",
|
||||
sub_dir: "sysconfig",
|
||||
filename_from_src: true,
|
||||
installable: true,
|
||||
}
|
||||
@@ -34,5 +34,9 @@
|
||||
<permission name="app.lawnchair.permission.READ_SETTINGS"/>
|
||||
<permission name="app.lawnchair.permission.WRITE_SETTINGS"/>
|
||||
<permission name="app.lawnchair.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"/>
|
||||
<permission name="android.permission.MANAGE_USERS"/>
|
||||
<permission name="android.permission.ACCESS_HIDDEN_PROFILES_FULL"/>
|
||||
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
|
||||
<permission name="android.permission.FORCE_STOP_PACKAGES"/>
|
||||
</privapp-permissions>
|
||||
</permissions>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
include $(call first-makefiles-under,$(LOCAL_PATH))
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/lawnchair/etc/permissions/privapp-permissions-app.lawnchair.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-app.lawnchair.xml \
|
||||
vendor/lawnchair/etc/sysconfig/app.lawnchair-hiddenapi-package-whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/app.lawnchair-hiddenapi-package-whitelist.xml \
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
QuickstepSwitcherOverlay \
|
||||
Lawnchair
|
||||
@@ -0,0 +1,40 @@
|
||||
android_app_import {
|
||||
name: "Lawnchair",
|
||||
apk: "Lawnchair.apk",
|
||||
privileged: true,
|
||||
certificate: "platform",
|
||||
overrides: [
|
||||
"Launcher3",
|
||||
"PixelLauncher",
|
||||
"Trebuchet",
|
||||
],
|
||||
required: [
|
||||
"privapp-permissions-app.lawnchair.xml",
|
||||
"app.lawnchair-hiddenapi-package-whitelist.xml",
|
||||
],
|
||||
optional_uses_libs: [
|
||||
"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",
|
||||
],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := Lawnchair
|
||||
LOCAL_MODULE_STEM := Lawnchair.apk
|
||||
LOCAL_SRC_FILES := Lawnchair.apk
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)/priv-app/Lawnchair
|
||||
LOCAL_OVERRIDES_PACKAGES := ParanoidQuickStep Launcher3QuickStep PixelLauncher TrebuchetQuickStep
|
||||
|
||||
include $(BUILD_PREBUILT)
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
runtime_resource_overlay {
|
||||
name: "Lawnchair-QuickstepSwitcherOverlay",
|
||||
resource_dirs: ["res"],
|
||||
sdk_version: "current",
|
||||
product_specific: true,
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_RRO_THEME := QuickstepSwitcher
|
||||
|
||||
LOCAL_PRODUCT_MODULE := true
|
||||
|
||||
LOCAL_SRC_FILES := $(call all-subdir-java-files)
|
||||
|
||||
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
|
||||
|
||||
LOCAL_PACKAGE_NAME := QuickstepSwitcherOverlay
|
||||
LOCAL_SDK_VERSION := current
|
||||
|
||||
include $(BUILD_RRO_PACKAGE)
|
||||
Reference in New Issue
Block a user