Skip to content

Commit

Permalink
add uninstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
2shrestha22 committed Mar 5, 2023
1 parent a661a35 commit 4a27557
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions recovery/META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,9 @@ find_block() {


ui_print "****************************"
ui_print "Lineage Dialer RRO installer"
ui_print "Lineage Dialer RRO"
ui_print "****************************"

ui_print "Extracting files"
TMP=/tmp
cd "$TMP" || exit 1
unzip -o "$ZIP"
rm -rf META-INF

ui_print "Mounting partitions"

# Ensure system is unmounted so mounting succeeds
Expand Down Expand Up @@ -151,7 +145,29 @@ if [ -n "$VENDOR_BLOCK" ]; then
fi
fi

# Enter inside Flashable system.
# Uninstaller
if echo "$3" | grep -q "uninstall"; then
ui_print "Uninstalling"
rm "${SYSTEM_OUT}/addon.d/20-lineage-dialer-rro.sh"
rm "${SYSTEM_OUT}/vendor/overlay/lineage-dialer-rro.apk"
if [ -n "$VENDOR_BLOCK" ]; then
rm "/vendor/overlay/lineage-dialer-rro.apk"
fi

ui_print "Done uninstalling!"
ui_print "Unmounting partitions"
umount -l "$SYSTEM_MNT"
umount -l /vendor || true
exit 0
fi

ui_print "Extracting files"
TMP=/tmp
cd "$TMP" || exit 1
unzip -o "$ZIP"
rm -rf META-INF

# Enter inside extracted files system.
cd system || exit 1

ui_print "Preparing files for copying"
Expand Down

0 comments on commit 4a27557

Please sign in to comment.