--- /dev/null
+#!/sbin/sh
+#
+# ADDOND_VERSION=2
+#
+# /system/addon.d/99-perso-pioneer.sh
+#
+
+# we partially use the script at install, if so, $SYSTEM is allready defined
+if [ -z $SYSTEM ]; then
+ . /tmp/backuptool.functions
+else
+ S=$SYSTEM
+fi
+if [ -z $backuptool_ab ]; then
+ SYS=$S
+ TMP="/tmp"
+else
+ SYS="/postinstall/$S"
+ TMP="/postinstall/tmp"
+fi
+
+# path is needed when running from recovery (at install)
+export PATH="${PATH}:$S/bin:$S/xbin"
+
+case "$1" in
+ backup)
+ # Stub
+ ;;
+ restore)
+ # Stub
+ ;;
+ pre-backup)
+ # Stub
+ ;;
+ post-backup)
+ # Stub
+ ;;
+ pre-restore)
+ # Stub
+ ;;
+ post-restore)
+ # ensure there is a new line before appending our config
+ echo "" >> $SYS/build.prop
+ echo "ro.sf.lcd_density=361" >> $SYS/build.prop
+ ;;
+esac
--- /dev/null
+#!/sbin/sh
+
+set -e
+
+# $SYSTEM set by the caller
+
+cd "$(dirname $0)"
+
+export PATH="${PATH}:${SYSTEM}/bin:${SYSTEM}/xbin"
+
+# install restore script
+echo "Installing restore script"
+cp cm-data/99-perso-pioneer.sh.addon ${SYSTEM}/addon.d/99-perso-pioneer.sh
+chown root:root ${SYSTEM}/addon.d/99-perso-pioneer.sh
+chmod 755 ${SYSTEM}/addon.d/99-perso-pioneer.sh
+
+# call restore script post to run
+export SYSTEM
+${SYSTEM}/addon.d/99-perso-pioneer.sh post-restore
+
+echo "Done"
+