Many changes

- Recovery: Squash menus
- dexpreopt boot of all devices
- Update device todo list
This commit is contained in:
Tad 2018-01-20 07:36:08 -05:00
parent 4b5717b6b7
commit ed6b73793b
4 changed files with 121 additions and 14 deletions

View File

@ -0,0 +1,95 @@
From 7664f3dd48cd8a0af6b3dd88169699f5a0465189 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Sat, 20 Jan 2018 07:34:05 -0500
Subject: [PATCH] Squash menus
Change-Id: I683fd133498fc3317796a037567cdab46350431c
---
device.cpp | 52 +++++++++++-----------------------------------------
1 file changed, 11 insertions(+), 41 deletions(-)
diff --git a/device.cpp b/device.cpp
index aed7211..a962c72 100644
--- a/device.cpp
+++ b/device.cpp
@@ -38,32 +38,14 @@ struct menu_entry {
const menu_action action;
};
-static const char* WIPE_MENU_NAMES[] = {
-#ifndef RELEASE_BUILD
+static const char* MAIN_MENU_NAMES[] = {
+ "Reboot system now",
+ "Apply update",
"Wipe data (keep media)",
-#endif
"Full factory reset",
#ifndef AB_OTA_UPDATER
"Wipe cache partition",
#endif // !AB_OTA_UPDATER
- nullptr
-};
-static const menu_entry WIPE_MENU_ENTRIES[] = {
-#ifndef RELEASE_BUILD
- { ACTION_INVOKE, { .action = Device::WIPE_DATA } },
-#endif
- { ACTION_INVOKE, { .action = Device::WIPE_FULL } },
-#ifndef AB_OTA_UPDATER
- { ACTION_INVOKE, { .action = Device::WIPE_CACHE } },
-#endif // !AB_OTA_UPDATER
- { ACTION_NONE, { .action = Device::NO_ACTION } }
-};
-static const menu WIPE_MENU = {
- WIPE_MENU_NAMES,
- WIPE_MENU_ENTRIES
-};
-
-static const char* ADVANCED_MENU_NAMES[] = {
"Reboot recovery",
#ifdef DOWNLOAD_MODE
"Reboot to download mode",
@@ -79,7 +61,14 @@ static const char* ADVANCED_MENU_NAMES[] = {
"Power off",
nullptr
};
-static const menu_entry ADVANCED_MENU_ENTRIES[] = {
+static const menu_entry MAIN_MENU_ENTRIES[] = {
+ { ACTION_INVOKE, { .action = Device::REBOOT } },
+ { ACTION_INVOKE, { .action = Device::APPLY_UPDATE } },
+ { ACTION_INVOKE, { .action = Device::WIPE_DATA } },
+ { ACTION_INVOKE, { .action = Device::WIPE_FULL } },
+#ifndef AB_OTA_UPDATER
+ { ACTION_INVOKE, { .action = Device::WIPE_CACHE } },
+#endif // !AB_OTA_UPDATER
{ ACTION_INVOKE, { .action = Device::REBOOT_RECOVERY } },
#ifdef DOWNLOAD_MODE
{ ACTION_INVOKE, { .action = Device::REBOOT_BOOTLOADER } },
@@ -95,25 +84,6 @@ static const menu_entry ADVANCED_MENU_ENTRIES[] = {
{ ACTION_INVOKE, { .action = Device::SHUTDOWN } },
{ ACTION_NONE, { .action = Device::NO_ACTION } }
};
-static const menu ADVANCED_MENU = {
- ADVANCED_MENU_NAMES,
- ADVANCED_MENU_ENTRIES
-};
-
-static const char* MAIN_MENU_NAMES[] = {
- "Reboot system now",
- "Apply update",
- "Factory reset",
- "Advanced",
- nullptr
-};
-static const menu_entry MAIN_MENU_ENTRIES[] = {
- { ACTION_INVOKE, { .action = Device::REBOOT } },
- { ACTION_INVOKE, { .action = Device::APPLY_UPDATE } },
- { ACTION_SUBMENU, { .submenu = &WIPE_MENU } },
- { ACTION_SUBMENU, { .submenu = &ADVANCED_MENU } },
- { ACTION_NONE, { .action = Device::NO_ACTION } }
-};
static const menu MAIN_MENU = {
MAIN_MENU_NAMES,
MAIN_MENU_ENTRIES
--
2.16.0

View File

@ -42,3 +42,8 @@ export JACK_SERVER_VM_ARGUMENTS="${ANDROID_JACK_VM_ARGS}"
export GRADLE_OPTS=-Xmx2048m
source $scripts"/Functions.sh"
unalias cp
unalias mv
unalias rm
unalias ln

View File

@ -63,18 +63,24 @@ patchWorkspace() {
export -f patchWorkspace;
enableDexPreOpt() {
echo "WITH_DEXPREOPT := true" >> BoardConfig.mk;
echo "WITH_DEXPREOPT_PIC := true" >> BoardConfig.mk;
echo "Enabled dexpreopt";
cd $base$1;
if [ -f BoardConfig.mk ]; then
echo "WITH_DEXPREOPT := true" >> BoardConfig.mk;
echo "WITH_DEXPREOPT_PIC := true" >> BoardConfig.mk;
echo "WITH_DEXPREOPT_BOOT_IMG_ONLY := true" >> BoardConfig.mk;
echo "Enabled dexpreopt for $1";
fi;
cd $base;
}
export -f enableDexPreOpt;
disableDexPreOpt() {
sed -i 's/WITH_DEXPREOPT := true/WITH_DEXPREOPT := false/' BoardConfig.mk;
sed -i 's/WITH_DEXPREOPT_PIC := true/WITH_DEXPREOPT_PIC := false/' BoardConfig.mk;
echo "Disabled dexpreopt";
enableDexPreOptFull() {
if [ -f BoardConfig.mk ]; then
sed -i "s/WITH_DEXPREOPT_BOOT_IMG_ONLY := true/WITH_DEXPREOPT_BOOT_IMG_ONLY := false/" BoardConfig.mk;
echo "Enabled full dexpreopt";
fi;
}
export -f disableDexPreOpt;
export -f enableDexPreOptFull;
enhanceLocation() {
cd $base$1;

View File

@ -31,7 +31,7 @@
# lineage_herolte-user - missing libprotobuf-cpp-full.so
# lineage_h815-user - drivers/input/touchscreen/DS5/RefCode_CustomerImplementation.c:147:1: warning: the frame size of 2064 bytes is larger than 2048 bytes [-Wframe-larger-than=]
# lineage_h850-user - arch/arm64/mm/mmu.c:134:31: error: 'prot_sect_kernel' undeclared (first use in this function)
#TODO: Add victara, griffin, athene, us997, us996
#TODO: Add victara, griffin, athene, us997, us996, pme, t0lte, hlte
#Select devices are userdebug due to SELinux policy issues
#Generate an incremental
@ -63,6 +63,9 @@ echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/a
#top dir
cp -r $patches"Fennec_DOS-Shim" $base"packages/apps/"; #Add a shim to install Fennec DOS without actually including the large APK
enterAndClear "bootable/recovery"
patch -p1 < $patches"android_bootable_recovery/0001-Squash_Menus.patch"; #What's a back button?
enterAndClear "build"
patch -p1 < $patches"android_build/0001-Automated_Build_Signing.patch" #Automated build signing. Disclaimer: From CopperheadOS 13.0
patch -p1 < $patches"android_build/JustArchis_Optimizations-Rebased.patch" #JustArchi's Compiler Flags
@ -160,7 +163,7 @@ cp -r $dosWallpapers"Thumbs/." res/drawable-nodpi/;
cp $dosWallpapers"wallpapers.xml" res/values-nodpi/wallpapers.xml;
sed -i 's/req.touchEnabled = touchEnabled;/req.touchEnabled = true;/' src/com/android/wallpaperpicker/WallpaperCropActivity.java; #Allow scrolling
sed -i 's/mCropView.setTouchEnabled(req.touchEnabled);/mCropView.setTouchEnabled(true);/' src/com/android/wallpaperpicker/WallpaperCropActivity.java;
sed -i 's/WallpaperUtils.EXTRA_WALLPAPER_OFFSET, 0);/WallpaperUtils.EXTRA_WALLPAPER_OFFSET, 0.5f);/' src/com/android/wallpaperpicker/WallpaperPickerActivity.java; #CenterAndClear aligned by default
sed -i 's/WallpaperUtils.EXTRA_WALLPAPER_OFFSET, 0);/WallpaperUtils.EXTRA_WALLPAPER_OFFSET, 0.5f);/' src/com/android/wallpaperpicker/WallpaperPickerActivity.java; #Center aligned by default
enterAndClear "packages/inputmethods/LatinIME"
patch -p1 < $patches"android_packages_inputmethods_LatinIME/0001-Voice.patch" #Remove voice input key
@ -200,11 +203,9 @@ sed -i 's/shouldUseOptimizations(weight)/true/' cm/lib/main/java/org/cyanogenmod
#START OF DEVICE CHANGES
#
enterAndClear "device/motorola/clark"
#enableDexPreOpt
patch -p1 < $patches"android_device_motorola_clark/0001-Tri_State_Torch.patch" #Tri-state torch
enterAndClear "device/oneplus/bacon"
enableDexPreOpt
sed -i "s/TZ.BF.2.0-2.0.0134/TZ.BF.2.0-2.0.0134|TZ.BF.2.0-2.0.0137/" board-info.txt; #Suport new TZ firmware https://review.lineageos.org/#/c/178999/
#enterAndClear "kernel/lge/g3"
@ -213,13 +214,13 @@ sed -i "s/TZ.BF.2.0-2.0.0134/TZ.BF.2.0-2.0.0134|TZ.BF.2.0-2.0.0137/" board-info.
enterAndClear "device/lge/g4-common"
rm -rf consumerir #Fixes: device/lge/g4-common/consumerir: MODULE.TARGET.SHARED_LIBRARIES.consumerir.msm8992 already defined by device/lge/common/consumerir
enterAndClear "device/lge/mako"
disableDexPreOpt #bootloops
#enterAndClear "device/lge/mako"
#patch -p1 < $patches"android_device_lge_mako/0001-Enable_LTE.patch" #Enable LTE support (Requires LTE hybrid modem to be flashed) XXX: Doesn't seem to work on 7+
#Make changes to all devices
cd $base
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enhanceLocation "$0"' {} \;
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableDexPreOpt "$0"' {} \;
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableForcedEncryption "$0"' {} \;
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableStrongEncryption "$0"' {} \;
find "kernel" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'hardenDefconfig "$0"' {} \;