Change the dirty-update mark file to /data/.mmg

The detection for the old mark shall be removed in a few releases.
gf-arm64
FriendlyNeighborhoodShane 3 years ago
parent 37ae2fe499
commit 052934d953

@ -172,14 +172,15 @@ post_install_actions() {
addon_install;
initscript_install;
touch "$root/$mark_file";
touch "$mark_file";
return 0;
}
pre_uninstall_actions() {
[ "$magisk" = "no" ] && stuff_uninstall="$stuff_uninstall $mark_file $addond_file $init_file";
[ "$magisk" = "no" ] && stuff_uninstall="$stuff_uninstall $addond_file $init_file";
rm -f "$mark_file";
return 0;
}
@ -190,6 +191,6 @@ post_uninstall_actions() {
}
mark_file="/system/etc/.mmg";
mark_file="/data/.mmg";
addond_file="/system/addon.d/10-$modname.sh";
init_file="/system/etc/init.d/10-$modname";

@ -172,14 +172,15 @@ post_install_actions() {
addon_install;
initscript_install;
touch "$root/$mark_file";
touch "$mark_file";
return 0;
}
pre_uninstall_actions() {
[ "$magisk" = "no" ] && stuff_uninstall="$stuff_uninstall $mark_file $addond_file $init_file";
[ "$magisk" = "no" ] && stuff_uninstall="$stuff_uninstall $addond_file $init_file";
rm -f "$mark_file";
return 0;
}
@ -190,6 +191,6 @@ post_uninstall_actions() {
}
mark_file="/system/etc/.mmg";
mark_file="/data/.mmg";
addond_file="/system/addon.d/10-$modname.sh";
init_file="/system/etc/init.d/10-$modname";

@ -181,14 +181,15 @@ post_install_actions() {
addon_install;
initscript_install;
touch "$root/$mark_file";
touch "$mark_file";
return 0;
}
pre_uninstall_actions() {
[ "$magisk" = "no" ] && stuff_uninstall="$stuff_uninstall $mark_file $addond_file $init_file";
[ "$magisk" = "no" ] && stuff_uninstall="$stuff_uninstall $addond_file $init_file";
rm -f "$mark_file";
return 0;
}
@ -199,6 +200,6 @@ post_uninstall_actions() {
}
mark_file="/system/etc/.mmg";
mark_file="/data/.mmg";
addond_file="/system/addon.d/10-$modname.sh";
init_file="/system/etc/init.d/10-$modname";

@ -187,14 +187,15 @@ post_install_actions() {
addon_install;
initscript_install;
touch "$root/$mark_file";
touch "$mark_file";
return 0;
}
pre_uninstall_actions() {
[ "$magisk" = "no" ] && stuff_uninstall="$stuff_uninstall $mark_file $addond_file $init_file";
[ "$magisk" = "no" ] && stuff_uninstall="$stuff_uninstall $addond_file $init_file";
rm -f "$mark_file";
return 0;
}
@ -205,6 +206,6 @@ post_uninstall_actions() {
}
mark_file="/system/etc/.mmg";
mark_file="/data/.mmg";
addond_file="/system/addon.d/10-$modname.sh";
init_file="/system/etc/init.d/10-$modname";

@ -155,14 +155,15 @@ post_install_actions() {
addon_install;
initscript_install;
touch "$root/$mark_file";
touch "$mark_file";
return 0;
}
pre_uninstall_actions() {
[ "$magisk" = "no" ] && stuff_uninstall="$stuff_uninstall $mark_file $addond_file $init_file";
[ "$magisk" = "no" ] && stuff_uninstall="$stuff_uninstall $addond_file $init_file";
rm -f "$mark_file";
return 0;
}
@ -173,6 +174,6 @@ post_uninstall_actions() {
}
mark_file="/system/etc/.mmg";
mark_file="/data/.mmg";
addond_file="/system/addon.d/10-$modname.sh";
init_file="/system/etc/init.d/10-$modname";

@ -58,8 +58,12 @@ microg_cleanup() {
[ -e "$file" ] && { log "PREPPER: Removing $file"; rm -rf "$file"; }
done;
done;
if [ ! -f "$root/$mark_file" ]; then
log "Doing the clean install treatment";
if [ -f "$mark_file" ]; then
log "PREPPER: This is an update flash";
elif [ -f "$root/system/etc/.mmg" ]; then
log "PREPPER: This is an update flash";
else
log "PREPPER: Doing the clean install treatment";
for app in $cleanup_packages; do
for file in "/data/data/$app" "/data/user/*/$app" "/data/user_de/*/$app" "/data/app/$app"-* "/mnt/asec/$app"-* "/data/media/0/Android/data/$app"; do
[ -e "$file" ] && { log "PREPPER: Removing $file"; rm -rf "$file"; }
@ -75,8 +79,6 @@ microg_cleanup() {
sed -i "s/.*${app}.*//g" /data/system/packages.list;
fi;
done;
else
log "PREPPER: This is a clean flash";
fi;
if [ "$(which sqlite3)" ]; then
find /data/system* -type f -name "accounts*db" 2>/dev/null | while read -r database; do

Loading…
Cancel
Save