use /data/media/0 instead of /sdcard path

merge-requests/23/head
Christopher Roy Bratusek 5 years ago
parent 157fd16fc0
commit 37024fb447

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

@ -1124,7 +1124,7 @@ install_bromite_webview () {
esac
WEBVIEW_REPLACE=BromiteWebView
BACKUP_PATH="/sdcard/nanodroid_backups/$(grep_prop ro.build.flavor)_$(grep_prop ro.build.id)"
BACKUP_PATH="/data/media/0/nanodroid_backups/$(grep_prop ro.build.flavor)_$(grep_prop ro.build.id)"
for app in webview webviewstub WebViewStub Webview; do
if [ -d /system/app/${app} ]; then
@ -1493,7 +1493,7 @@ ui_print " "
##########################################################################################
# check for configuration files
config_locations="/sdcard /external_sd ${ZIPDIR} /data"
config_locations="/data/media/0 /external_sd ${ZIPDIR} /data"
get_config () {
config=""

@ -2,7 +2,7 @@
export SHELL=${BASH}
export HOME=/sdcard
export HOME=/data/media/0
export TMPDIR=${HOME}/.bash_tmp
export HISTFILE=${HOME}/.bash_history

@ -53,7 +53,7 @@ Options:
test "$(whoami)" != "root" && error "not running as root"
SYS_BACKUP_PATH="/sdcard/nanodroid_backups/$(grep_prop ro.build.flavor)_$(grep_prop ro.build.id)"
SYS_BACKUP_PATH="/data/media/0/nanodroid_backups/$(grep_prop ro.build.flavor)_$(grep_prop ro.build.id)"
get_config () {
config=""
@ -77,7 +77,7 @@ overrides_add_intern () {
touch "${OVERLAY_PATH}/system/${sysdir}/${app}/.replace"
else
mkdir -p "${SYS_BACKUP_PATH}/${sysdir}"
echo " moving to /sdcard/nanodroid_backups: ${app}"
echo " moving to /data/media/0/nanodroid_backups: ${app}"
rm -rf "${SYS_BACKUP_PATH}/${sysdir}/${app}"
mv "/system/${sysdir}/${app}" "${SYS_BACKUP_PATH}/${sysdir}/"
fi
@ -126,9 +126,9 @@ overrides_remove () {
[ -f ${OVERLAY_PATH}/system/priv-app/${app}/.replace ] && overrides_remove_intern priv-app ${app}
[ -f ${OVERLAY_PATH}/system/reserve/${app}/.replace ] && overrides_remove_intern reserve ${app}
else
[ -d /sdcard/nanodroid_backups/app/${app} ] && overrides_remove_intern app ${app}
[ -d /sdcard/nanodroid_backups/priv-app/${app} ] && overrides_remove_intern priv-app ${app}
[ -d /sdcard/nanodroid_backups/reserve/${app} ] && overrides_remove_intern reserve ${app}
[ -d /data/media/0/nanodroid_backups/app/${app} ] && overrides_remove_intern app ${app}
[ -d /data/media/0/nanodroid_backups/priv-app/${app} ] && overrides_remove_intern priv-app ${app}
[ -d /data/media/0/nanodroid_backups/reserve/${app} ] && overrides_remove_intern reserve ${app}
fi
done
@ -237,10 +237,10 @@ overrides_genconfig () {
}
# check for configuration files
config_locations="/sdcard /external_sd /data @ZIPDIR@ /dev/tmp/install"
config_locations="/data/media/0 /external_sd /data @ZIPDIR@ /dev/tmp/install"
get_config .nanodroid-overlay
[[ -f ${config} ]] && export config || config=/sdcard/.nanodroid-overlay
[[ -f ${config} ]] && export config || config=/data/media/0/.nanodroid-overlay
opt=${1}
[[ -z ${opt} ]] && show_help || shift

@ -223,7 +223,7 @@ NanoDroid includes
* disables applications systemless-ly
* pre-configured [> default settings](doc/NanoDroidOverlay.md)
* force-debloat feature (Sytem Mode)
* moves applications out of the way to /sdcard/nanodroid_backup/
* moves applications out of the way to /data/media/0/nanodroid_backup/
* pre-configured [> default settings](doc/NanoDroidOverlay.md)
* several Open Source applications
* include replacements for the pseudo-debloated applications
@ -296,7 +296,7 @@ Extra packages, flashing through TWRP required (flashing through Magisk Manager
* **NanoDroid-setupwizard**: includes
* **AROMA** based Setup Wizard to create the configuration files
* user can choose where to store the configuration files
* `/sdcard` (fallback)
* `/data/media/0` (fallback)
* `/external_sd`
* `/data`
* **NOTE:** AROMA only works on `arm` and `arm64`, if your device is `x86` or `x86_64`, it won't work
@ -307,7 +307,7 @@ Extra packages, flashing through TWRP required (flashing through Magisk Manager
* restores GApps and location services auto-removed during installation (System Mode)
* restores `services.jar` patched by NanoDroid-Patcher (System Mode)
* **NanoDroid-systest**: includes
* system testing script which will create the logfile `/sdcard/NanoDroid-SysTest.log`
* system testing script which will create the logfile `/data/media/0/NanoDroid-SysTest.log`
* the following data is collected:
* device profile (ROM, manufacturer, device, ABI, builddate, security patch date)
* detected LD_LIBRARY_PATH

@ -8,7 +8,7 @@ To alter the installation you can create the file
on your device, in one of the following directories
* `/sdcard` (internal storage)
* `/data/media/0` (internal storage)
* `/external_sd` (TWRP path to SD Card (if any))
* directory containing the zip file
* `/data` (fallback)

@ -46,7 +46,7 @@ You can control what applications to install using the file
on your device, in one of the following directories
* `/sdcard` (internal storage)
* `/data/media/0` (internal storage)
* `/external_sd` (TWRP path to SD Card (if any))
* directory containing the zip file
* `/data` (fallabck)

@ -13,7 +13,7 @@ Magisk allows for apps to be magically removed upon runtime, they don't get actu
### Force Debloat Feature
In System Mode apps can are moved to `/sdcard/nanodroid_backups/` or restored from there.
In System Mode apps can are moved to `/data/media/0/nanodroid_backups/` or restored from there.
## Default Settings
@ -48,7 +48,7 @@ You can pseudo-debloat applications by adding them to configuration file
on your device, in one of the following directories
* `/sdcard` (internal storage)
* `/data/media/0` (internal storage)
* `/external_sd` (TWRP path to SD Card (if any))
* directory containing the zip file
* `/data` (fallabck)

@ -539,11 +539,11 @@ patch_services () {
}
backup_services_jar () {
ui_print " << backing up services.jar to: /sdcard/nanodroid_backups"
ui_print " << backing up services.jar to: /data/media/0/nanodroid_backups"
services_name="services.jar_$(grep_prop ro.build.flavor)_$(grep_prop ro.build.id)"
mkdir -p /sdcard/nanodroid_backups
cp /system/framework/services.jar "/sdcard/nanodroid_backups/${services_name}" || \
mkdir -p /data/media/0/nanodroid_backups
cp /system/framework/services.jar "/data/media/0/nanodroid_backups/${services_name}" || \
error "failed to backup services.jar"
}

@ -36,7 +36,7 @@ selectbox(
"location.prop",
"Where to store configuration", "", 2, #-- Group 1. key = "selected.1"
"/sdcard", "Internal Storage (wipe-safe)", 1, #-- selected.1 = 1
"/data/media/0", "Internal Storage (wipe-safe)", 1, #-- selected.1 = 1
"/external_sd", "External SD Card (if any)", 0, #-- selected.1 = 2
"/data", "Data Storage (not wipe-safe) ", 0 #-- selected.1 = 3
);

@ -59,15 +59,15 @@ ui_print "******************************"
ui_print " "
if grep -q "selected.1=1" "${location_prop}"; then
ui_print " > saving configuration in: /sdcard"
configpath="/sdcard"
ui_print " > saving configuration in: /data/media/0"
configpath="/data/media/0"
elif grep -q "selected.1=2" "${location_prop}"; then
if -d /external_sd; then
ui_print " > saving configuration in: /external_sd"
configpath="/external_sd"
else
ui_print " > saving configuration in: /sdcard"
configpath="/sdcard"
ui_print " > saving configuration in: /data/media/0"
configpath="/data/media/0"
fi
elif grep -q "selected.1=3" "${location_prop}"; then
ui_print " > saving configuration in: /data"

@ -7,7 +7,7 @@
##########################################################################################
TMPDIR=/dev/tmp
LOGFILE=/sdcard/NanoDroid-SysTest.log
LOGFILE=/data/media/0/NanoDroid-SysTest.log
rm -f ${LOGFILE}
##########################################################################################

@ -205,13 +205,13 @@ mount_partitions () {
}
# check for configuration files
config_locations="/sdcard /external_sd /data $(dirname ${ZIP}))"
config_locations="/data/media/0 /external_sd /data $(dirname ${ZIP}))"
config_files=".nanodroid-setup .nanodroid-apps .nanodroid-overlay"
restore_apps () {
backup_path="/sdcard/nanodroid_backups/$(grep_prop ro.build.flavor)_$(grep_prop ro.build.id)"
backup_path="/data/media/0/nanodroid_backups/$(grep_prop ro.build.flavor)_$(grep_prop ro.build.id)"
for dir in /sdcard/nanodroid_backups ${backup_path}; do
for dir in /data/media/0/nanodroid_backups ${backup_path}; do
if [ -d ${dir}/app/ ]; then
for app in ${dir}/app/*; do
if [ -d /system/app/${app} ]; then
@ -276,13 +276,13 @@ patcher_uninstall () {
if [ -f /data/adb/.nanodroid-patcher -o -f /data/adb/NanoDroid_Patched ]; then
services_name="services.jar_$(grep_prop ro.build.flavor)_$(grep_prop ro.build.id)"
if [ -f /sdcard/nanodroid_backups/${services_name} ]; then
if [ -f /data/media/0/nanodroid_backups/${services_name} ]; then
ui_print " << restoring: unpatched services.jar"
mv "/sdcard/nanodroid_backups/${services_name}" /system/framework/services.jar
mv "/data/media/0/nanodroid_backups/${services_name}" /system/framework/services.jar
set_perm_data /system/framework/services.jar
elif [ -f /sdcard/nanodroid_backups/services.jar ]; then
elif [ -f /data/media/0/nanodroid_backups/services.jar ]; then
ui_print " << restoring: unpatched services.jar"
mv /sdcard/nanodroid_backups/services.jar /system/framework/services.jar
mv /data/media/0/nanodroid_backups/services.jar /system/framework/services.jar
set_perm_data /system/framework/services.jar
else ui_print " << can't restore unpatched services.jar"
fi

Loading…
Cancel
Save