Skip to content

Commit 0dc800d

Browse files
fix proot-fixes
1 parent 37c354e commit 0dc800d

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

udroid/src/proot-utils/proot-fixes.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ fs=${root_fs_path}
2525

2626
# /proc/version
2727
PROG_PRINT "writing fake /proc/version"
28-
cat << EOF > ${fs}/.version
28+
cat << EOF > ${fs}/proc/.version
2929
Linux version 5.19.0-76051900-faked ([email protected]) #202207312230~1660780566~22.04~9d60db1 SMP PREEMPT_DYNAMIC Thu A
3030
EOF
3131

3232
# /proc/uptime
3333
PROG_PRINT "writing fake /proc/uptime"
34-
cat << EOF > ${fs}/.uptime
34+
cat << EOF > ${fs}/proc/.uptime
3535
7857.09 54258.46
3636
EOF
3737

3838
# /dev/shm
39-
mkdir -p /dev/shm
39+
mkdir -p ${root_fs_path}/dev/shm
4040

4141
# /etc/hosts
4242
PROG_PRINT "writing /etc/hosts for connectivity"
@@ -61,17 +61,16 @@ EOF
6161

6262
# /etc/resolv.conf
6363
PROG_PRINT "writing /etc/resolv.conf for connectivity"
64-
[[ ! -f ${fs}/etc/resolv.conf ]] && {
65-
touch ${fs}/etc/resolv.conf
66-
}
64+
rm -rf ${fs}/etc/resolv.conf
65+
touch ${fs}/etc/resolv.conf
6766
cat << EOF > ${fs}/etc/.resolv.conf
6867
nameserver 1.1.1.1
6968
nameserver 8.8.8.8
7069
EOF
7170

7271
# /proc/vmstat
7372
PROG_PRINT "writing fake /proc/vmstat"
74-
cat << EOF > ${fs}/.vmstat
73+
cat << EOF > ${fs}/proc/.vmstat
7574
nr_free_pages 797479
7675
nr_zone_inactive_anon 1350842
7776
nr_zone_active_anon 5792

udroid/src/udroid.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ install() {
200200
msg_extract "$path/$name"
201201
p_extract --file "$path/$name.tar.$ext" --path "$path/$name"
202202

203-
gum_spin minidot "Applying proot fixes" bash proot-utils/proot-fixes.sh "$path/$name"
203+
# apply proot-fixes
204+
echo -e "Applying proot fixes"
205+
bash proot-utils/proot-fixes.sh "$path/$name"
204206
fi
205207

206208
echo -e "[\xE2\x9C\x94] $name installed."

0 commit comments

Comments
 (0)