customize default density

This commit is contained in:
Guillaume Castagnino 2019-09-08 20:45:54 +02:00
parent 3008edea03
commit 4c0c349f2e
2 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,46 @@
#!/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

22
dist-pioneer/cm.sh Executable file
View File

@ -0,0 +1,22 @@
#!/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"