2018-01-23 20:11:52 +00:00
|
|
|
#!/sbin/sh
|
|
|
|
|
|
|
|
OUTFD=2
|
|
|
|
|
|
|
|
ui_print() {
|
|
|
|
echo -n -e "ui_print $1\n" >> /proc/self/fd/$OUTFD
|
|
|
|
echo -n -e "ui_print\n" >> /proc/self/fd/$OUTFD
|
|
|
|
}
|
|
|
|
|
|
|
|
is_mounted() {
|
|
|
|
if [ ! -z "$2" ]; then
|
|
|
|
cat /proc/mounts | grep $1 | grep $2, >/dev/null
|
|
|
|
else
|
|
|
|
cat /proc/mounts | grep $1 >/dev/null
|
|
|
|
fi
|
|
|
|
return $?
|
|
|
|
}
|
|
|
|
|
|
|
|
setup_add () {
|
|
|
|
if grep -q "item.1.${1}=1" "${setup_prop}"; then
|
|
|
|
ui_print " <>> enable property: ${2}"
|
|
|
|
echo "${2}=1" >> "${nanodroid_setup}"
|
|
|
|
else
|
|
|
|
ui_print " <>> disable property: ${2}"
|
|
|
|
echo "${2}=0" >> "${nanodroid_setup}"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
apps_add () {
|
|
|
|
if grep -q "item.1.${1}=1" "${apps_prop}"; then
|
|
|
|
ui_print " <>> mark for installation: ${2}"
|
|
|
|
echo "${2}" >> "${nanodroid_apps}"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
overlay_add () {
|
|
|
|
if grep -q "item.1.${1}=1" "${debloat_prop}"; then
|
2018-04-24 18:30:31 +00:00
|
|
|
ui_print " <>> mark for debloating: ${2}"
|
2018-01-23 20:11:52 +00:00
|
|
|
echo "${2}" >> "${nanodroid_overlay}"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
aromapath="/tmp/aroma-data"
|
|
|
|
setup_prop="${aromapath}/setup.prop"
|
|
|
|
store_prop="${aromapath}/store.prop"
|
|
|
|
apps_prop="${aromapath}/apps.prop"
|
|
|
|
debloat_prop="${aromapath}/debloat.prop"
|
|
|
|
location_prop="${aromapath}/location.prop"
|
2018-03-15 16:07:11 +00:00
|
|
|
nlp_prop="${aromapath}/nlp.prop"
|
2018-11-07 16:34:29 +00:00
|
|
|
ug_prop="${aromapath}/ug.prop"
|
2018-11-20 17:13:26 +00:00
|
|
|
gmscore_prop="${aromapath}/gmscore.prop"
|
2018-01-23 20:11:52 +00:00
|
|
|
|
|
|
|
ui_print " "
|
|
|
|
ui_print "******************************"
|
2019-04-03 19:58:29 +00:00
|
|
|
ui_print " NanoDroid 20.7.91.99999999 "
|
2018-01-23 20:11:52 +00:00
|
|
|
ui_print " created by @Nanolx "
|
|
|
|
ui_print " Setup Wizard "
|
|
|
|
ui_print "******************************"
|
|
|
|
ui_print " "
|
|
|
|
|
|
|
|
if grep -q "selected.1=1" "${location_prop}"; then
|
|
|
|
ui_print " > saving configuration in: /sdcard"
|
|
|
|
configpath="/sdcard"
|
|
|
|
elif grep -q "selected.1=2" "${location_prop}"; then
|
2019-01-07 19:18:07 +00:00
|
|
|
if -d /external_sd; then
|
|
|
|
ui_print " > saving configuration in: /external_sd"
|
|
|
|
configpath="/external_sd"
|
|
|
|
else
|
|
|
|
ui_print " > saving configuration in: /sdcard"
|
|
|
|
configpath="/sdcard"
|
|
|
|
fi
|
2018-01-23 20:11:52 +00:00
|
|
|
elif grep -q "selected.1=3" "${location_prop}"; then
|
|
|
|
ui_print " > saving configuration in: /data"
|
|
|
|
configpath="/data"
|
|
|
|
if (is_mounted /data); then
|
|
|
|
mount -orw,remount /data >/dev/null
|
|
|
|
else mount -orw /data >/dev/null
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
nanodroid_apps="${configpath}/.nanodroid-apps"
|
|
|
|
nanodroid_overlay="${configpath}/.nanodroid-overlay"
|
|
|
|
nanodroid_setup="${configpath}/.nanodroid-setup"
|
|
|
|
|
|
|
|
for setupfile in ${nanodroid_apps} ${nanodroid_overlay} ${nanodroid_setup}; do
|
|
|
|
rm -f "${setupfile}"
|
|
|
|
done
|
|
|
|
|
|
|
|
ui_print " "
|
|
|
|
ui_print " < Installer Configuration"
|
|
|
|
|
2018-11-07 16:34:29 +00:00
|
|
|
setup_add 1 nanodroid_fdroid
|
|
|
|
setup_add 2 nanodroid_apps
|
|
|
|
setup_add 3 nanodroid_overlay
|
|
|
|
setup_add 4 nanodroid_zelda
|
|
|
|
setup_add 5 nanodroid_mapsv1
|
|
|
|
setup_add 6 nanodroid_init
|
|
|
|
setup_add 7 nanodroid_gsync
|
|
|
|
setup_add 8 nanodroid_swipe
|
|
|
|
setup_add 9 nanodroid_forcesystem
|
|
|
|
setup_add 10 nanodroid_bash
|
|
|
|
setup_add 11 nanodroid_nano
|
|
|
|
setup_add 12 nanodroid_utils
|
|
|
|
setup_add 13 nanodroid_fonts
|
|
|
|
setup_add 14 nanodroid_override
|
2018-01-23 20:11:52 +00:00
|
|
|
|
|
|
|
if grep -q "selected.1=1" "${store_prop}"; then
|
|
|
|
ui_print " <>> setting property: nanodroid_play [None]"
|
2018-11-27 19:21:53 +00:00
|
|
|
echo "nanodroid_play=00" >> "${nanodroid_setup}"
|
2018-01-23 20:11:52 +00:00
|
|
|
elif grep -q "selected.1=2" "${store_prop}"; then
|
|
|
|
ui_print " <>> setting property: nanodroid_play [Play Store]"
|
2018-11-27 19:21:53 +00:00
|
|
|
echo "nanodroid_play=10" >> "${nanodroid_setup}"
|
2018-01-23 20:11:52 +00:00
|
|
|
elif grep -q "selected.1=3" "${store_prop}"; then
|
|
|
|
ui_print " <>> setting property: nanodroid_play [Yalp Store]"
|
2018-11-27 19:21:53 +00:00
|
|
|
echo "nanodroid_play=20" >> "${nanodroid_setup}"
|
2018-04-02 17:44:48 +00:00
|
|
|
elif grep -q "selected.1=4" "${store_prop}"; then
|
2018-11-26 15:20:08 +00:00
|
|
|
ui_print " <>> setting property: nanodroid_play [Aurora Store]"
|
2018-11-27 19:21:53 +00:00
|
|
|
echo "nanodroid_play=30" >> "${nanodroid_setup}"
|
2018-08-18 16:36:44 +00:00
|
|
|
elif grep -q "selected.1=5" "${store_prop}"; then
|
2018-11-26 15:20:08 +00:00
|
|
|
ui_print " <>> setting property: nanodroid_play [Fake Store]"
|
2018-11-27 19:21:53 +00:00
|
|
|
echo "nanodroid_play=01" >> "${nanodroid_setup}"
|
2018-11-26 15:20:08 +00:00
|
|
|
elif grep -q "selected.1=6" "${store_prop}"; then
|
|
|
|
ui_print " <>> setting property: nanodroid_play [Yalp + Fake Store]"
|
2018-11-27 19:21:53 +00:00
|
|
|
echo "nanodroid_play=21" >> "${nanodroid_setup}"
|
2018-11-26 15:20:08 +00:00
|
|
|
elif grep -q "selected.1=7" "${store_prop}"; then
|
|
|
|
ui_print " <>> setting property: nanodroid_play [Aurora + Fake Store]"
|
2018-11-27 19:21:53 +00:00
|
|
|
echo "nanodroid_play=31" >> "${nanodroid_setup}"
|
2018-01-23 20:11:52 +00:00
|
|
|
fi
|
|
|
|
|
2018-11-27 18:28:58 +00:00
|
|
|
if grep -q "item.1.1=1" "${nlp_prop}"; then
|
|
|
|
nlp_Dejavu=1
|
|
|
|
else nlp_Dejavu=0
|
2018-01-23 20:11:52 +00:00
|
|
|
fi
|
|
|
|
|
2018-11-27 18:28:58 +00:00
|
|
|
if grep -q "item.1.2=1" "${nlp_prop}"; then
|
|
|
|
nlp_Ichnaea=1
|
|
|
|
else nlp_Ichnaea=0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if grep -q "item.1.3=1" "${nlp_prop}"; then
|
|
|
|
nlp_Apple=1
|
|
|
|
else nlp_Apple=0
|
|
|
|
fi
|
|
|
|
|
2019-01-07 19:18:07 +00:00
|
|
|
if grep -q "item.1.4=1" "${nlp_prop}"; then
|
|
|
|
nlp_Radiocell=1
|
|
|
|
else nlp_Radiocell=0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "nanodroid_nlpbackend=${nlp_Dejavu}${nlp_Ichnaea}${nlp_Apple}${nlp_Radiocell}" >> "${nanodroid_setup}"
|
2018-11-27 18:28:58 +00:00
|
|
|
|
2018-11-07 16:34:29 +00:00
|
|
|
if grep -q "selected.1=1" "${ug_prop}"; then
|
|
|
|
ui_print " <>> setting property: nanodroid_microg [None]"
|
|
|
|
echo "nanodroid_microg=0" >> "${nanodroid_setup}"
|
|
|
|
elif grep -q "selected.1=2" "${ug_prop}"; then
|
|
|
|
ui_print " <>> setting property: nanodroid_microg [Full]"
|
|
|
|
echo "nanodroid_microg=1" >> "${nanodroid_setup}"
|
|
|
|
elif grep -q "selected.1=3" "${ug_prop}"; then
|
|
|
|
ui_print " <>> setting property: nanodroid_microg [Minimal]"
|
|
|
|
echo "nanodroid_microg=2" >> "${nanodroid_setup}"
|
|
|
|
fi
|
|
|
|
|
2018-11-20 17:13:26 +00:00
|
|
|
if grep -q "selected.1=1" "${gmscore_prop}"; then
|
|
|
|
ui_print " <>> setting property: nanodroid_gmscore [custom]"
|
|
|
|
echo "nanodroid_gmscore=0" >> "${nanodroid_setup}"
|
|
|
|
elif grep -q "selected.1=2" "${gmscore_prop}"; then
|
|
|
|
ui_print " <>> setting property: nanodroid_gmscore [official]"
|
|
|
|
echo "nanodroid_gmscore=1" >> "${nanodroid_setup}"
|
|
|
|
fi
|
|
|
|
|
2018-01-23 20:11:52 +00:00
|
|
|
ui_print " "
|
|
|
|
ui_print " < Installed Applications"
|
|
|
|
|
2018-10-11 16:28:04 +00:00
|
|
|
apps_add 1 Blokada
|
2018-01-23 20:11:52 +00:00
|
|
|
apps_add 2 Amaze
|
|
|
|
apps_add 3 AnysoftKeyboard
|
|
|
|
apps_add 4 FaceSlim
|
|
|
|
apps_add 5 BeHeKeyboard
|
|
|
|
apps_add 6 K9Mail
|
2018-03-17 16:08:36 +00:00
|
|
|
apps_add 7 KeePassDX
|
2018-01-23 20:11:52 +00:00
|
|
|
apps_add 8 KernelAdiutor
|
|
|
|
apps_add 9 Lightning
|
|
|
|
apps_add 10 MPV
|
|
|
|
apps_add 11 NewPipe
|
|
|
|
apps_add 12 Oandbackup
|
|
|
|
apps_add 13 Odyssey
|
2018-10-22 19:51:44 +00:00
|
|
|
apps_add 14 OmniClock
|
|
|
|
apps_add 15 OmniJAWS
|
|
|
|
apps_add 16 OpenCamera
|
|
|
|
apps_add 17 OpenKeyChain
|
|
|
|
apps_add 18 OpenLauncher
|
|
|
|
apps_add 19 OpenWeatherMapProvider
|
|
|
|
apps_add 20 OpenVPN
|
|
|
|
apps_add 21 Orbot
|
|
|
|
apps_add 22 TorBrowser
|
|
|
|
apps_add 23 QKSMS
|
|
|
|
apps_add 24 SimpleCalendar
|
|
|
|
apps_add 25 SimpleGallery
|
|
|
|
apps_add 26 Substratum
|
|
|
|
apps_add 27 Termux
|
|
|
|
apps_add 28 Twidere
|
|
|
|
apps_add 29 XDALabs
|
|
|
|
apps_add 30 YahooWeatherProvider
|
2018-01-23 20:11:52 +00:00
|
|
|
|
|
|
|
ui_print " "
|
2018-04-24 18:30:31 +00:00
|
|
|
ui_print " < Debloated Applications"
|
2018-01-23 20:11:52 +00:00
|
|
|
|
|
|
|
overlay_add 1 BasicDreams
|
|
|
|
overlay_add 2 Browser
|
|
|
|
overlay_add 3 Calendar
|
|
|
|
overlay_add 4 Camera2
|
|
|
|
overlay_add 5 CMFileManager
|
2018-06-15 19:37:37 +00:00
|
|
|
overlay_add 6 DeskClock
|
|
|
|
overlay_add 7 Eleven
|
|
|
|
overlay_add 8 Email
|
|
|
|
overlay_add 9 Exchange2
|
|
|
|
overlay_add 10 FMRadio
|
|
|
|
overlay_add 11 Gallery2
|
|
|
|
overlay_add 12 Gello
|
|
|
|
overlay_add 13 Jelly
|
|
|
|
overlay_add 14 messaging
|
|
|
|
overlay_add 15 mGerrit
|
|
|
|
overlay_add 16 OmniSwitch
|
|
|
|
overlay_add 17 Phonograph
|
|
|
|
overlay_add 18 PhotoTable
|
|
|
|
overlay_add 19 Recorder
|
|
|
|
overlay_add 20 ResurrectionStats
|
|
|
|
overlay_add 21 Screencast
|
|
|
|
overlay_add 22 Slimperience
|
|
|
|
overlay_add 23 Snap
|
|
|
|
overlay_add 24 SnapdragonCamera
|
|
|
|
overlay_add 25 SoundRecorder
|
|
|
|
overlay_add 26 Stk
|
|
|
|
overlay_add 27 ViaBrowser
|
|
|
|
overlay_add 28 Wallpaper
|
|
|
|
overlay_add 29 WallpaperBackup
|
|
|
|
overlay_add 30 WallpaperPickerGoogle
|