Tweaks and cleanup

This commit is contained in:
Tad 2018-03-14 00:41:05 -04:00
parent 4053ad6082
commit e4435f9eac
9 changed files with 41 additions and 49 deletions

View File

@ -1,21 +0,0 @@
From 17d82df9831a6e5801203ffe3b0e1aba177f7b20 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Tue, 19 Jan 2016 19:24:47 -0500
Subject: [PATCH] mark as privileged app
---
Android.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/Android.mk b/Android.mk
index c6110a3..ce4e8cf 100644
--- a/Android.mk
+++ b/Android.mk
@@ -19,6 +19,7 @@ $(fdroid_root)/$(fdroid_dir)/$(fdroid_apk):
cd $(fdroid_root)/$(fdroid_dir) && gradle assembleRelease
LOCAL_CERTIFICATE := platform
+LOCAL_PRIVILEGED_MODULE := true
LOCAL_SRC_FILES := $(fdroid_dir)/$(fdroid_apk)
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)

View File

@ -1,21 +0,0 @@
From 17d82df9831a6e5801203ffe3b0e1aba177f7b20 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Tue, 19 Jan 2016 19:24:47 -0500
Subject: [PATCH] mark as privileged app
---
Android.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/Android.mk b/Android.mk
index c6110a3..ce4e8cf 100644
--- a/Android.mk
+++ b/Android.mk
@@ -19,6 +19,7 @@ $(fdroid_root)/$(fdroid_dir)/$(fdroid_apk):
cd $(fdroid_root)/$(fdroid_dir) && gradle assembleRelease
LOCAL_CERTIFICATE := platform
+LOCAL_PRIVILEGED_MODULE := true
LOCAL_SRC_FILES := $(fdroid_dir)/$(fdroid_apk)
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)

@ -1 +1 @@
Subproject commit df494cf7ca300cf448ce26c0f3eb33799f5dd913
Subproject commit 518f42b01375427783ac267e342f96b3804babce

View File

@ -99,7 +99,7 @@ export -f patchWorkspace;
enableDexPreOpt() {
cd $base$1;
if [ $1 != "device/amazon/thor" ] && [ $1 != "device/samsung/i9100" ] && [ $1 != "device/lge/h850" ]; then #Some devices won't compile, or have too small of a /system partition
if [ $1 != "device/amazon/thor" ] && [ $1 != "device/samsung/i9100" ] && [ $1 != "device/lge/h850" ] && [ $1 != "device/lge/mako" ]; then #Some devices won't compile, or have too small of a /system partition
if [ -f BoardConfig.mk ]; then
echo "WITH_DEXPREOPT := true" >> BoardConfig.mk;
echo "WITH_DEXPREOPT_PIC := true" >> BoardConfig.mk;
@ -112,13 +112,33 @@ enableDexPreOpt() {
export -f enableDexPreOpt;
enableDexPreOptFull() {
cd $base$1;
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;
cd $base;
}
export -f enableDexPreOptFull;
disableDexPreOpt() {
cd $base$1;
if [ -f BoardConfig.mk ]; then
sed -i "s/WITH_DEXPREOPT := true/WITH_DEXPREOPT := false/" BoardConfig.mk;
echo "Disabled dexpreopt";
fi;
cd $base;
}
export -f disableDexPreOpt;
compressRamdisks() {
if [ -f BoardConfig.mk ]; then
echo "LZMA_RAMDISK_TARGETS := boot,recovery" >> BoardConfig.mk;
echo "Enabled ramdisk compression";
fi;
}
export -f compressRamdisks;
enhanceLocation() {
cd $base$1;
#Enable GLONASS

View File

@ -110,10 +110,10 @@ sed -i 's/ln -s /ln -sf /' Android.mk;
sed -i 's/ext.androidBuildVersionTools = "24.0.3"/ext.androidBuildVersionTools = "25.0.3"/' build.gradle;
enterAndClear "packages/apps/FDroid"
patch -p1 < $patches"android_packages_apps_FDroid/0001.patch" #Mark as privileged
cp $patches"android_packages_apps_FDroid/default_repos.xml" app/src/main/res/values/default_repos.xml; #Add extra repos
sed -i 's|gradle|./gradlew|' Android.mk; #Gradle 4.0 fix
sed -i 's|/$(fdroid_dir) \&\&| \&\&|' Android.mk; #One line wouldn't work... no matter what I tried.
#TODO: Change the package ID until https://gitlab.com/fdroid/fdroidclient/issues/843 is implemented
enterAndClear "packages/apps/FDroidPrivilegedExtension"
patch -p1 < $patches"android_packages_apps_FDroidPrivilegedExtension/0002-Release_Key.patch" #Change to release key
@ -216,6 +216,8 @@ find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableForcedEncrypt
find "kernel" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'hardenDefconfig "$0"' {} \;
cd $base
#Fixes
disableDexPreOpt device/lge/mako
#Fix broken options enabled by hardenDefconfig()
sed -i "s/CONFIG_STRICT_MEMORY_RWX=y/# CONFIG_STRICT_MEMORY_RWX is not set/" kernel/lge/msm8996/arch/arm64/configs/lineageos_*_defconfig; #Breaks on compile
#

View File

@ -41,7 +41,7 @@ sed -i 's|>LineageOS|>DivestOS|' res/values*/strings.xml
enter "vendor/cm"
sed -i 's|https://lineageos.org/legal|https://divestos.xyz/pages/about.html|' config/common.mk;
#sed -i '/.*ZIPFILE=/s/lineage/divestos/' build/envsetup.sh
sed -i '/.*ZIPFILE=/s/lineage/divestos/' build/envsetup.sh
rm -rf bootanimation #TODO: Create a boot animation
cd $base

View File

@ -91,7 +91,7 @@ export -f patchWorkspace;
enableDexPreOpt() {
cd $base$1;
if [ $1 != "device/amazon/thor" ] && [ $1 != "device/samsung/i9100" ] && [ $1 != "device/lge/h850" ]; then #Some devices won't compile, or have too small of a /system partition
if [ $1 != "device/amazon/thor" ] && [ $1 != "device/samsung/i9100" ] && [ $1 != "device/lge/h850" ] && [ $1 != "device/lge/mako" ]; then #Some devices won't compile, or have too small of a /system partition
if [ -f BoardConfig.mk ]; then
echo "WITH_DEXPREOPT := true" >> BoardConfig.mk;
echo "WITH_DEXPREOPT_PIC := true" >> BoardConfig.mk;
@ -104,13 +104,25 @@ enableDexPreOpt() {
export -f enableDexPreOpt;
enableDexPreOptFull() {
cd $base$1;
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;
cd $base;
}
export -f enableDexPreOptFull;
disableDexPreOpt() {
cd $base$1;
if [ -f BoardConfig.mk ]; then
sed -i "s/WITH_DEXPREOPT := true/WITH_DEXPREOPT := false/" BoardConfig.mk;
echo "Disabled dexpreopt";
fi;
cd $base;
}
export -f disableDexPreOpt;
compressRamdisks() {
if [ -f BoardConfig.mk ]; then
echo "LZMA_RAMDISK_TARGETS := boot,recovery" >> BoardConfig.mk;

View File

@ -101,10 +101,10 @@ sed -i 's/ln -s /ln -sf /' Android.mk;
sed -i 's/ext.androidBuildVersionTools = "24.0.3"/ext.androidBuildVersionTools = "25.0.3"/' build.gradle;
enterAndClear "packages/apps/FDroid"
patch -p1 < $patches"android_packages_apps_FDroid/0001.patch" #Mark as privileged
cp $patches"android_packages_apps_FDroid/default_repos.xml" app/src/main/res/values/default_repos.xml; #Add extra repos
sed -i 's|gradle|./gradlew|' Android.mk; #Gradle 4.0 fix
sed -i 's|/$(fdroid_dir) \&\&| \&\&|' Android.mk; #One line wouldn't work... no matter what I tried.
#TODO: Change the package ID until https://gitlab.com/fdroid/fdroidclient/issues/843 is implemented
enterAndClear "packages/apps/FDroidPrivilegedExtension"
patch -p1 < $patches"android_packages_apps_FDroidPrivilegedExtension/0002-Release_Key.patch" #Change to release key

View File

@ -41,7 +41,7 @@ sed -i 's|>LineageOS|>DivestOS|' res/values*/strings.xml
enter "vendor/lineage"
sed -i 's|https://lineageos.org/legal|https://divestos.xyz/pages/about.html|' config/common.mk;
#sed -i '/.*ZIPFILE=/s/lineage/divestos/' build/envsetup.sh
sed -i '/.*ZIPFILE=/s/lineage/divestos/' build/envsetup.sh
rm -rf bootanimation #TODO: Create a boot animation
cd $base