mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-10-31 09:20:23 +00:00
various fixes and improvements regarding NanoDroid-Overlay
This commit is contained in:
parent
236e3e47bc
commit
2a9bb03d9c
11
CommonAddon
11
CommonAddon
@ -69,17 +69,6 @@ ui_print () {
|
||||
|
||||
backup_nlpconflicts () {
|
||||
for app in ${GOOGLE_APPS}; do
|
||||
if [ -d "/system/priv-app/${app}" -o -d "/system/app/${app}" ]; then
|
||||
ui_print " "
|
||||
ui_print " ++ Creating overlay for ${app}"
|
||||
ui_print " ++ it conflicts with microG/location backends"
|
||||
ui_print " "
|
||||
|
||||
if ! grep -q "^${app}" ${cfg_overlay}; then
|
||||
echo ${app} >> ${cfg_overlay}
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f /system/bin/nanodroid-overlay ]; then
|
||||
/system/bin/nanodroid-overlay --add ${app}
|
||||
else /system/xbin/nanodroid-overlay --add ${app}
|
||||
|
@ -257,23 +257,6 @@ detect_mode () {
|
||||
fi
|
||||
}
|
||||
|
||||
backup_nlpconflicts () {
|
||||
for app in ${GOOGLE_APPS}; do
|
||||
if [ -d "/system/priv-app/${app}" -o -d "/system/app/${app}" ]; then
|
||||
ui_print " "
|
||||
ui_print " ++ Creating overlay for ${app}"
|
||||
ui_print " ++ it conflicts with microG/location backends"
|
||||
ui_print " "
|
||||
|
||||
if ! grep -q "^${app}" ${cfg_overlay}; then
|
||||
echo ${app} >> ${cfg_overlay}
|
||||
fi
|
||||
fi
|
||||
|
||||
${INSTALLER}/system/xbin/nanodroid-overlay --add ${app}
|
||||
done
|
||||
}
|
||||
|
||||
unpack_zip () {
|
||||
TMPDIR=/dev/tmp
|
||||
TMP_LIBDIR=${TMPDIR}/nanodroid-lib
|
||||
@ -300,6 +283,7 @@ nanodroid_finalize () {
|
||||
else
|
||||
ui_print " << without /system applications override"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "${MODE}" = "MAGISK" ]; then
|
||||
@ -562,7 +546,12 @@ install_microg () {
|
||||
if [ "${nanodroid_microg}" -eq 1 -o "${MODID}" = "NanoDroid_microG" ]; then
|
||||
|
||||
# first get rid of conflicting packages
|
||||
backup_nlpconflicts
|
||||
for app in ${GOOGLE_APPS}; do
|
||||
if [ "${ROM_NO_XBIN}" -eq 1 ]; then
|
||||
${MODPATH}/system/bin/nanodroid-overlay --add ${app}
|
||||
else ${MODPATH}/system/xbin/nanodroid-overlay --add ${app}
|
||||
fi
|
||||
done
|
||||
|
||||
case ${nanodroid_nlpbackend} in
|
||||
0 ) NLPBACKEND=""
|
||||
|
@ -35,6 +35,7 @@ get_cfg_overlay
|
||||
detect_mode
|
||||
set_progress 0.3
|
||||
|
||||
install_nanodroidscripts
|
||||
install_microg
|
||||
install_mapsv1
|
||||
install_gsync
|
||||
@ -50,7 +51,6 @@ install_initd
|
||||
install_swipe
|
||||
install_bash
|
||||
install_nano
|
||||
install_nanodroidscripts
|
||||
install_shell_utils
|
||||
install_fonts
|
||||
set_progress 0.9
|
||||
|
@ -17,6 +17,27 @@ error () {
|
||||
exit 1
|
||||
}
|
||||
|
||||
show_help () {
|
||||
|
||||
echo "nanodroid-overlay
|
||||
|
||||
Magisk Mode: Manages Overlays (Pseudo Debloat feature)
|
||||
System Mode: Manages Moved-Outs (Force Debloat feature)
|
||||
|
||||
Options:
|
||||
-a | --add [appname] add override for app [appname]
|
||||
-r | --remove [appname] remove override for app [appname]
|
||||
-s | --show show non-overriden /system applications
|
||||
-l | --list show all overriden /system applications
|
||||
-x | --create create all overrides
|
||||
-u | --update update all overrides (= clear + create)
|
||||
-c | --clear remove all overrides
|
||||
-g | --genconfig (re-)create configuration from existing overrides
|
||||
"
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
[[ $(whoami) != "root" ]] && error "not running as root"
|
||||
|
||||
get_config () {
|
||||
@ -50,7 +71,7 @@ overrides_add_intern () {
|
||||
overrides_add () {
|
||||
for app in ${@}; do
|
||||
[[ -d /system/app/${app} ]] && overrides_add_intern app/${app}
|
||||
[[ -d /system/priv-app/${2} ]] && overrides_add_intern priv-app/${app}
|
||||
[[ -d /system/priv-app/${app} ]] && overrides_add_intern priv-app/${app}
|
||||
done
|
||||
}
|
||||
|
||||
@ -98,12 +119,12 @@ overrides_list () {
|
||||
done
|
||||
else
|
||||
echo "Moved-Out apps from /system/app:"
|
||||
for app in $(find "/sdcard/nanodroid_backups/app" -name "*.replace"); do
|
||||
for app in $(find "/sdcard/nanodroid_backups/app" -mindepth 1 -maxdepth 1 -type d); do
|
||||
echo " * $(basename $(dirname "${app}"))"
|
||||
done
|
||||
|
||||
echo "Moved-Out apps from /system/priv-app:"
|
||||
for app in $(find "/sdcard/nanodroid_backups/priv-app" -name "*.replace"); do
|
||||
for app in $(find "/sdcard/nanodroid_backups/priv-app" -mindepth 1 -maxdepth 1 -type d); do
|
||||
echo " * $(basename $(dirname "${app}"))"
|
||||
done
|
||||
fi
|
||||
@ -112,22 +133,22 @@ overrides_list () {
|
||||
overrides_list_non () {
|
||||
if [[ ${NO_MAGISK} -eq 0 ]]; then
|
||||
echo "non-overriden apps from /system/app:"
|
||||
for app in $(find "/system/app" -mindepth 1 -type d); do
|
||||
for app in $(find "/system/app" -mindepth 1 -maxdepth 1 -type d); do
|
||||
[[ ! -f ${OVERLAY_PATH}/${app}/.replace ]] && echo " * $(basename ${app})"
|
||||
done
|
||||
|
||||
echo "non-overriden apps from /system/priv-app:"
|
||||
for app in $(find "/system/priv-app" -mindepth 1 -type d); do
|
||||
for app in $(find "/system/priv-app" -mindepth 1 -maxdepth 1 -type d); do
|
||||
[[ ! -f ${OVERLAY_PATH}/${app}/.replace ]] && echo " * $(basename ${app})"
|
||||
done
|
||||
else
|
||||
echo "non-moved-out apps from /system/app:"
|
||||
for app in $(find "/system/app" -mindepth 1 -type d); do
|
||||
for app in $(find "/system/app" -mindepth 1 -maxdepth 1 -type d); do
|
||||
echo " * $(basename ${app})"
|
||||
done
|
||||
|
||||
echo "non-moved-out apps from /system/priv-app:"
|
||||
for app in $(find "/system/priv-app" -mindepth 1 -type d); do
|
||||
for app in $(find "/system/priv-app" -mindepth 1 -maxdepth 1 -type d); do
|
||||
echo " * $(basename ${app})"
|
||||
done
|
||||
fi
|
||||
@ -173,7 +194,7 @@ else overrides_genconfig
|
||||
fi
|
||||
|
||||
opt=${1}
|
||||
shift
|
||||
[[ -z ${opt} ]] && show_help || shift
|
||||
|
||||
case ${opt} in
|
||||
-l | --list ) overrides_list ;;
|
||||
@ -190,21 +211,5 @@ case ${opt} in
|
||||
;;
|
||||
|
||||
|
||||
* )
|
||||
echo "nanodroid-overlay
|
||||
|
||||
Magisk Mode: Manages Overlays (Pseudo Debloat feature)
|
||||
System Mode: Manages Moved-Outs (Force Debloat feature)
|
||||
|
||||
Options:
|
||||
-a | --add [appname] add override for app [appname]
|
||||
-r | --remove [appname] remove override for app [appname]
|
||||
-s | --show show non-overriden /system applications
|
||||
-l | --list show all overriden /system applications
|
||||
-x | --create create all overrides
|
||||
-u | --update update all overrides (= clear + create)
|
||||
-c | --clear remove all overrides
|
||||
-g | --genconfig (re-)create configuration from existing overrides
|
||||
"
|
||||
;;
|
||||
* ) show_help ;;
|
||||
esac
|
||||
|
@ -33,16 +33,16 @@ get_cfg_overlay
|
||||
detect_mode
|
||||
set_progress 0.2
|
||||
|
||||
install_nanodroidscripts
|
||||
install_microg
|
||||
set_progress 0.6
|
||||
|
||||
install_mapsv1
|
||||
install_store
|
||||
set_progress 0.6
|
||||
set_progress 0.75
|
||||
|
||||
install_gsync
|
||||
install_swipe
|
||||
set_progress 0.75
|
||||
|
||||
install_nanodroidscripts
|
||||
set_progress 0.9
|
||||
|
||||
nanodroid_finalize
|
||||
|
Loading…
Reference in New Issue
Block a user