[wip] more customizability for init scripts and shell utils

merge-requests/33/head
Christopher Roy Bratusek 4 years ago
parent bd273f1e3d
commit 54ecc2d463

@ -1137,6 +1137,7 @@ install_nanodroidscripts () {
nanodroid_install_file xbin/${script} bin
done
nanodroid_install_file xbin/column.${BIN_ARCH} bin
nanodroid_substitute xbin/nanodroid-overlay
if [ "${MODE}" = "MAGISK" ]; then
@ -1149,12 +1150,10 @@ install_nanodroidscripts () {
}
install_shell_utils () {
if [ "${nanodroid_utils}" -eq 1 ]; then
if [ -n "${nanodroid_utils}" ]; then
ui_print " << with Shell Utilities"
# architecture dependend stuff
for binary in column findfs findmnt hexdump lessecho \
lesskey lsblk lscpu lsipc lslocks lsns ncal whereis; do
for binary in ${nanodroid_utils}; do
nanodroid_install_file xbin/${binary}.${BIN_ARCH} bin
done
else ui_print " << without Shell Utilities"
@ -1162,7 +1161,7 @@ install_shell_utils () {
}
install_initd () {
if [ "${nanodroid_init}" -eq 1 ]; then
if [ -n "${nanodroid_init}" ]; then
ui_print " << with init scripts"
if [ "${MODE}" = "SYSTEM" ]; then
@ -1174,7 +1173,7 @@ install_initd () {
cp "${INSTALLER}/system/etc/init.d"/* "${INIT_BASE}/"
set_perm_bin "${INIT_BASE}"
for init in 10_sqlite 20_fstrim 30_logcat 40_external_sd 50_logscleaner; do
for init in ${nanodroid_init}; do
installinfo_add "/system/etc/init.d/${init}"
done
else ui_print " << without init scripts"

@ -274,6 +274,7 @@ where MODID is either
* NanoDroid_FDroid
* NanoDroid_BromiteWebView
* NanoDroid_OsmAnd
* NanoDroid_Google
and INSTALLDATE is the date of installation in %Y%m%D_%H.%M.%S format (eg: 20180709_20.34.14).
@ -480,6 +481,10 @@ Furthermore NanoDroid tells F-Droid to activate the following additional reposit
* BromiteWebView F-Droid repository [> Link](https://www.bromite.org/fdroid)
* official microG F-Droid repository [> Link](https://microg.org/fdroid.html)
### Google Sync/Swipe Libraries
Google Sync adapters and Swipe Libraries are optionally installable through the **NanoDroid-Google** package.
### Applications
NanoDroid includes a variety of OpenSource applications, check full [> list](doc/Applications.md)
@ -670,6 +675,8 @@ List of known issues and their respective fixes or workarounds.
### Unified Nlp
**Note:** unified Nlp has known issues on Android 10.
* unified Nlp is not registered in the system
* some ROMs with native signature spoofing don't look for `com.google.android.gms` as location provider
* tell the developer (or maintainer) of the ROM to fix this

@ -51,12 +51,8 @@ checkbox(
"Apps", "Install Apps (customized later)", 1,
"Overlay", "Debloat Apps (customized later)", 1,
"Maps API v1", "Install Google Maps API version 1", 1,
"Init Scripts", "Install init scripts", 1,
"Google Sync", "Install Google Contacts & Calendar Sync", 0,
"Swipe", "Install Swipe libraries", 0,
"Force System", "Force System Mode Installation", 0,
"GNU Bash", "Install GNU Bash Shell", 1,
"Shell Utils", "Install Shell Utils from bsdmainutils and util-linux", 1
"GNU Bash", "Install GNU Bash Shell", 1
);
selectbox(
@ -111,6 +107,52 @@ selectbox(
);
selectbox(
"Google Sync/Swipe",
"Google Sync/Swipe",
"@customize",
"gsync.prop",
"Select the Google Addons you want", "", 2, #-- Group 1. key = "selected.1"
"Google Sync", "Install Google Contacts & Calendar Sync", 0,
"Swipe", "Install Swipe libraries", 0
);
selectbox(
"Init Scripts",
"Init Scripts",
"@customize",
"initd.prop",
"Select the Init Scripts you want", "", 2, #-- Group 1. key = "selected.1"
"sqlite", "cleanup and compress sqlite databases on boot", 1,
"fstrim", "optmize/trim file systems on boot", 1,
"logcat", "auto record logcats in /data/adb/logcats", 1,
"external_sd", "link sdcard to /external_sd for easy adb access", 1,
"logscleaner", "cleanup log files on boot", 0
);
selectbox(
"Shell Utilities",
"Shell Utilities",
"@customize",
"shellutil.prop",
"Select the Shell utilities you want", "", 2, #-- Group 1. key = "selected.1"
"findfs", "---", 1,
"findmnt", "---", 1,
"hexdump", "---", 1,
"lessecho", "---", 1,
"lesskey", "---", 1,
"lsblk", "---", 1,
"lscpu", "---", 1,
"lsipc", "---", 1,
"lslocks", "---", 1,
"lsns", "---", 1,
"ncal", "---", 1,
"whereis", "---", 1
);
checkbox(
"App Setup",
"App Setup",

@ -51,6 +51,9 @@ location_prop="${aromapath}/location.prop"
nlp_prop="${aromapath}/nlp.prop"
ug_prop="${aromapath}/ug.prop"
fd_prop="${aromapath}/fd.prop"
sh_prop="${aromapath}/shellutil.prop"
init_prop="${aromapath}/initd.prop"
sync_prop="${aromapath}/gsync.prop"
ui_print " "
ui_print "****************************"
@ -103,12 +106,8 @@ ui_print " < Installer Configuration"
setup_add 1 nanodroid_apps
setup_add 2 nanodroid_overlay
setup_add 3 nanodroid_mapsv1
setup_add 4 nanodroid_init
setup_add 5 nanodroid_gsync
setup_add 6 nanodroid_swipe
setup_add 7 nanodroid_forcesystem
setup_add 8 nanodroid_bash
setup_add 9 nanodroid_utils
setup_add 4 nanodroid_forcesystem
setup_add 5 nanodroid_bash
if grep -q "selected.1=1" "${store_prop}"; then
ui_print " <>> setting property: nanodroid_play [None]"
@ -147,6 +146,7 @@ if grep -q "item.1.4=1" "${nlp_prop}"; then
else nlp_Radiocell=0
fi
ui_print " <<> nanodroid_nlpackend [Dejavu: ${nlp_Dejavu}|Ichnaea: ${nlp_Ichnaea}|Apple: ${nlp_Apple}|Radiocell: ${nlp_Radiocell}]"
echo "nanodroid_nlpbackend=${nlp_Dejavu}${nlp_Ichnaea}${nlp_Apple}${nlp_Radiocell}" >> "${nanodroid_setup}"
if grep -q "selected.1=1" "${ug_prop}"; then
@ -171,6 +171,49 @@ elif grep -q "selected.1=3" "${fd_prop}"; then
echo "nanodroid_fdroid=2" >> "${nanodroid_setup}"
fi
if grep -q "item.1.1=1" "${sync_prop}"; then
ui_print " <<> setting property: nanodroid_gsync=1"
echo "nanodroid_gsync=1" >> "${nanodroid_setup}"
else
ui_print " <<> setting property: nanodroid_gsync=0"
echo "nanodroid_gsync=0" >> "${nanodroid_setup}"
fi
if grep -q "item.1.2=1" "${sync_prop}"; then
ui_print " <<> setting property: nanodroid_swipe=1"
echo "nanodroid_swipe=1" >> "${nanodroid_setup}"
else
ui_print " <<> setting property: nanodroid_swipe=0"
echo "nanodroid_swipe=0" >> "${nanodroid_setup}"
fi
i_scripts=""
grep -q "item.1.1=1" "${init_prop}" && i_scripts="${i_scripts} 10_sqlite"
grep -q "item.1.2=1" "${init_prop}" && i_scripts="${i_scripts} 20_fstrim"
grep -q "item.1.3=1" "${init_prop}" && i_scripts="${i_scripts} 30_logcat"
grep -q "item.1.4=1" "${init_prop}" && i_scripts="${i_scripts} 40_external_sd"
grep -q "item.1.5=1" "${init_prop}" && i_scripts="${i_scripts} 50_logscleaner"
ui_print " <<> selected init scripts: ${i_scripts}"
echo "nanodroid_init=\"${i_scripts}\"" >> "${nanodroid_setup}"
s_utils=""
grep -q "item.1.1=1" "${sh_prop}" && s_utils="${s_utils} findfs"
grep -q "item.1.2=1" "${sh_prop}" && s_utils="${s_utils} findmnt"
grep -q "item.1.3=1" "${sh_prop}" && s_utils="${s_utils} hexdump"
grep -q "item.1.4=1" "${sh_prop}" && s_utils="${s_utils} lessecho"
grep -q "item.1.5=1" "${sh_prop}" && s_utils="${s_utils} lesskey"
grep -q "item.1.6=1" "${sh_prop}" && s_utils="${s_utils} lsblk"
grep -q "item.1.7=1" "${sh_prop}" && s_utils="${s_utils} lscpu"
grep -q "item.1.8=1" "${sh_prop}" && s_utils="${s_utils} lsipc"
grep -q "item.1.9=1" "${sh_prop}" && s_utils="${s_utils} lslocks"
grep -q "item.1.10=1" "${sh_prop}" && s_utils="${s_utils} lsns"
grep -q "item.1.11=1" "${sh_prop}" && s_utils="${s_utils} ncal"
grep -q "item.1.12=1" "${sh_prop}" && s_utils="${s_utils} whereis"
ui_print " <<> selected shell utils: ${s_utils}"
echo "nanodroid_utils=\"${s_utils}\"" >> "${nanodroid_setup}"
ui_print " "
ui_print " < Installed Applications"

@ -17,7 +17,9 @@ run_initscripts () {
# NanoDroid init scripts
for init in 10_sqlite 20_fstrim 30_logcat 40_external_sd 50_logscleaner; do
"${MODDIR}/init.d/${init}" | tee -a "${LOGDIR}/${init}.log.${CURDATE}" &
if [ -f "${MODDIR}/init.d/${init}" ]; then
"${MODDIR}/init.d/${init}" | tee -a "${LOGDIR}/${init}.log.${CURDATE}" &
fi
done
}

@ -4,10 +4,10 @@ nanodroid_apps=1
nanodroid_play=21
nanodroid_overlay=1
nanodroid_mapsv1=1
nanodroid_init=1
nanodroid_init="10_sqlite 20_fstrim 30_logcat 40_external_sd 50_logscleaner"
nanodroid_gsync=0
nanodroid_swipe=0
nanodroid_forcesystem=0
nanodroid_nlpbackend=1000
nanodroid_bash=1
nanodroid_utils=1
nanodroid_utils="findfs findmnt hexdump lessecho lesskey lsblk lscpu lsipc lslocks lsns ncal whereis"

@ -22,16 +22,12 @@ nanodroid_fdroid=1
nanodroid_apps=1
nanodroid_play=21
nanodroid_overlay=1
nanodroid_zelda=1
nanodroid_mapsv1=1
nanodroid_init=1
nanodroid_gsync=0
nanodroid_swipe=0
nanodroid_init="10_sqlite 20_fstrim 30_logcat 40_external_sd 50_logscleaner"
nanodroid_forcesystem=0
nanodroid_nlpbackend=1000
nanodroid_bash=1
nanodroid_nano=1
nanodroid_utils=1
nanodroid_utils="findfs findmnt hexdump lessecho lesskey lsblk lscpu lsipc lslocks lsns ncal whereis"
```
the **microG** package supports the following options (nanodroid_microg is always 1)
@ -40,18 +36,23 @@ the **microG** package supports the following options (nanodroid_microg is alway
nanodroid_play=21
nanodroid_overlay=0
nanodroid_mapsv1=1
nanodroid_gsync=0
nanodroid_swipe=0
nanodroid_forcesystem=0
nanodroid_nlpbackend=1000
```
the **F-Droid** (nanodroid_fdroid is always 1) and **Bromite WebView** pckage supports the following options
the **F-Droid** (nanodroid_fdroid is always 1) and **Bromite WebView** package supports the following options
```
nanodroid_forcesystem=0
```
the **Google** package supports the following options
```
nanodroid_gsync=0
nanodroid_swipe=0
```
where `1` means `on` and `0` means `off`. If no `.nanodroid-setup` is found, the [default settings](.nanodroid-setup) will be used (equals to the example above), if your `.nanodroid-setup` file exists, but is missing entries, those entries will be added, using the default values.
Alternatively you can also use the NanoDroid-SetupWizard package instead of manual creation of the configuration file.
@ -98,17 +99,13 @@ what app store to use:
whether to populate the overlay to pseudo-debloat `/system` applications (Magisk-only)
`nanodroid_zelda=[0|1]`
whether to provide The Legend of Zelda ringtones and sounds
`nanodroid_mapsv1=[0|1]`
whether to provide **microG** Maps API v1
`nanodroid_init=[0|1]`
`nanodroid_init="10_sqlite 20_fstrim 30_logcat 40_external_sd 50_logscleaner"`
whether to provide init scripts
whether to provide init scripts (the choosen ones, or "" for none)
`nanodroid_gsync=[0|1]`
@ -134,10 +131,6 @@ what location backends for microG to install
whether to install GNU Bash Shell
`nanoroid_nano=[0|1]`
whether to install GNU Nano Editor
`nanodroid_utils=[0|1]`
`nanodroid_utils="findfs findmnt hexdump lessecho lesskey lsblk lscpu lsipc lslocks lsns ncal whereis"`
whether to install Shell Utils from util-linux and bsdmainutils
whether to install Shell Utils from util-linux and bsdmainutils (the choosen ones, or "" for none)

Loading…
Cancel
Save