Make NanoDroid compatible with recoveries which has /sdcard1 mount path for SD Card. For example OrangeFox recovery.

merge-requests/23/head
Vladimir Filatov 5 years ago
parent 3587bb7e5e
commit 41ab998a93

@ -62,7 +62,7 @@ EOF
}
# check for configuration files
config_locations="/data/media/0 /external_sd /data"
config_locations="/data/media/0 /external_sd /sdcard1 /data"
get_config () {
config=""

@ -1418,7 +1418,7 @@ nanodroid_substitute () {
[ ! -f "${target}" ] && error "file: ${file} not found"
if grep -q @ZIPDIR@ "${target}"; then
if [[ "${ZIPDIR}" == "/external_sd" ]]; then
if [[ "${ZIPDIR}" == "/external_sd" ]] || [[ "${ZIPDIR}" == "/sdcard1" ]]; then
# /external_sd is already known by `nanodroid-overlay`
# no need to add it a second time
sed -e 's|@ZIPDIR@||' -i ${target}
@ -1528,7 +1528,7 @@ ui_print " "
##########################################################################################
# check for configuration files
config_locations="${STORAGE} /external_sd ${ZIPDIR} /data"
config_locations="${STORAGE} /external_sd /sdcard1 ${ZIPDIR} /data"
get_config () {
config=""

@ -247,7 +247,7 @@ overrides_genconfig () {
}
# check for configuration files
config_locations="/data/media/0 /external_sd /data @ZIPDIR@ /dev/tmp/install"
config_locations="/data/media/0 /external_sd /sdcard1 /data @ZIPDIR@ /dev/tmp/install"
get_config .nanodroid-overlay
[[ -f ${config} ]] && export config || config=${STORAGE}/.nanodroid-overlay

@ -74,6 +74,9 @@ elif grep -q "selected.1=2" "${location_prop}"; then
if -d /external_sd; then
ui_print " > saving configuration in: /external_sd"
configpath="/external_sd"
elif -d /sdcard1; then
ui_print " > saving configuration in: /sdcard1"
configpath="/sdcard1"
else
ui_print " > saving configuration in: /data/media/0"
configpath="/data/media/0"

@ -161,7 +161,7 @@ mount_partitions () {
}
# check for configuration files
config_locations="/data/media/0 /external_sd /data $(dirname ${ZIP}))"
config_locations="/data/media/0 /external_sd /sdcard1 /data $(dirname ${ZIP}))"
config_files=".nanodroid-setup .nanodroid-apps .nanodroid-overlay"
restore_apps () {

Loading…
Cancel
Save