From 8578392ac3a4e8852a1ec7a0602765ad520a74e4 Mon Sep 17 00:00:00 2001 From: Tad Date: Mon, 25 Sep 2017 13:42:09 -0400 Subject: [PATCH] Cherry picks and add a Firejail profile for building in --- Misc/aosp.profile | 42 ++++++++++++++++++++++++++++++++++++ Scripts/LAOS-14.1_Patches.sh | 3 +-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 Misc/aosp.profile diff --git a/Misc/aosp.profile b/Misc/aosp.profile new file mode 100644 index 00000000..8872ac55 --- /dev/null +++ b/Misc/aosp.profile @@ -0,0 +1,42 @@ +# Firejail profile for aosp +# This file is overwritten after every install/update +# Persistent local customizations +include /etc/firejail/aosp.local +# Persistent global definitions +include /etc/firejail/globals.local + +noblacklist ${HOME}/.android +noblacklist ${HOME}/.gitconfig +noblacklist ${HOME}/.gradle +#noblacklist ${HOME}/.jack-server +#noblacklist ${HOME}/.jack-settings +noblacklist ${HOME}/.java +#noblacklist ${HOME}/.repo_.gitconfig.json +#noblacklist ${HOME}/.repoconfig +noblacklist ${HOME}/.ssh +noblacklist ${HOME}/.tooling + +include /etc/firejail/disable-common.inc +include /etc/firejail/disable-passwdmgr.inc +include /etc/firejail/disable-programs.inc + +caps.drop all +ipc-namespace +netfilter +no3d +nodvd +nogroups +nonewprivs +noroot +nosound +notv +novideo +protocol unix,inet,inet6 +seccomp +shell none + +private-dev +private-tmp + +#noexec ${HOME} +#noexec /tmp diff --git a/Scripts/LAOS-14.1_Patches.sh b/Scripts/LAOS-14.1_Patches.sh index caa41cf6..5758e241 100755 --- a/Scripts/LAOS-14.1_Patches.sh +++ b/Scripts/LAOS-14.1_Patches.sh @@ -87,8 +87,7 @@ patch -p1 < $patches"android_external_svox/94d2ddb.diff" #Fix garbled output See enter "frameworks/base" git revert 0326bb5e41219cf502727c3aa44ebf2daa19a5b3 #re-enable doze on devices without gms -git fetch https://review.lineageos.org/LineageOS/android_frameworks_base refs/changes/75/151975/36 && git cherry-pick FETCH_HEAD #network traffic -git fetch https://review.lineageos.org/LineageOS/android_frameworks_base refs/changes/53/184653/16 && git cherry-pick FETCH_HEAD #profiles tile +git fetch https://review.lineageos.org/LineageOS/android_frameworks_base refs/changes/75/151975/37 && git cherry-pick FETCH_HEAD #network traffic sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox sed -i '0,/wifi,cell,battery/s/wifi,cell,battery,dnd,flashlight,rotation,bt,airplane/wifi,cell,bt,dnd,flashlight,rotation,battery,profiles,location,airplane,saver,hotspot,nfc/' packages/SystemUI/res/values/config.xml; sed -i 's/ScaleSetting = 1.0f;/ScaleSetting = 0.5f;/' services/core/java/com/android/server/wm/WindowManagerService.java; #Speedup animation scale