Skip to content

Commit ebd2ed7

Browse files
Merge pull request #49 from RandomCoderOrg/option-to-reinstall-fixes
add options to reinstall fixes
2 parents 8f5765d + 8680f0e commit ebd2ed7

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

udroid/src/help_udroid.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ help_login() {
2020
echo " --isolated: Creates an isolated environment for the filesystem."
2121
echo " --ashmem-memfd | --memfd enable support for memfd emulation through ashmem ( experimental )"
2222
echo " --fix-low-ports: Fixes low ports for the filesystem."
23+
echo " --reinstall-fixes: reinstall proot fixes before login"
2324
echo " --no-shared-tmp: Disables shared tmp for the filesystem."
2425
echo " --no-link2symlink: Disables link2symlink for the filesystem."
2526
echo " --no-sysvipc: Disables sysvipc for the filesystem."

udroid/src/udroid.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ login() {
369369
local login_user="root"
370370
local run_script=""
371371
local is_custom_distro=false
372+
local reinstall_fixes=false
372373
local custom_distro_name=""
373374
local -a custom_fs_bindings
374375
local path=$DEFAULT_FS_INSTALL_DIR
@@ -467,6 +468,9 @@ login() {
467468
is_custom_distro=true;
468469
custom_distro_name=$2; shift 2
469470
;;
471+
--reinstall-fixes)
472+
reinstall_fixes=true; shift
473+
;;
470474
-*)
471475
echo "Unknown option: $1"
472476
exit 1
@@ -510,6 +514,10 @@ login() {
510514
[[ -z $distro ]] && echo "ERROR: distro not specified" && exit 1
511515

512516
if [ -d $path/$distro ]; then
517+
# reinstall fixes
518+
if $reinstall_fixes; then
519+
bash proot-utils/proot-fixes.sh "$root_fs_path"
520+
fi
513521
# set PROOT_L2S_DIR
514522
if [ -d "${root_fs_path}/.l2s" ]; then
515523
export PROOT_L2S_DIR="${root_fs_path}/.l2s"

0 commit comments

Comments
 (0)