mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-05-02 06:26:20 -04:00
Tweaks and cleanup
This commit is contained in:
parent
4053ad6082
commit
e4435f9eac
9 changed files with 41 additions and 49 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue