Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OTA survival script for AOSP keyboard swipe (LatinME)
#!/sbin/sh
#
# /system/addon.d/95-latinimegoogle.sh
# During an OS upgrade, this script backs up /system/lib/libjni_latinimegoogle.so,
# /system is formatted and reinstalled, then the file is restored.
#
. /tmp/backuptool.functions
list_files() {
cat <<EOF
lib/libjni_latinimegoogle.so
EOF
}
case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/"$FILE"
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
esac
@rugk

This comment has been minimized.

Copy link
Owner Author

rugk commented Dec 21, 2017

Installation instructions/more details: https://android.stackexchange.com/a/187686/158241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.