-
Notifications
You must be signed in to change notification settings - Fork 947
Expand file tree
/
Copy pathinit-sandbox.sh
More file actions
28 lines (21 loc) · 903 Bytes
/
init-sandbox.sh
File metadata and controls
28 lines (21 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
export LD_LIBRARY_PATH=$PREFIX
export PROOT_TMP_DIR=$PREFIX/tmp
if [ -f "$NATIVE_DIR/libproot.so" ]; then
export PROOT_LOADER="$NATIVE_DIR/libproot.so"
fi
if [ -f "$NATIVE_DIR/libproot32.so" ]; then
export PROOT_LOADER32="$NATIVE_DIR/libproot32.so"
fi
mkdir -p "$PREFIX/tmp"
if [ "$FDROID" = "true" ]; then
export PROOT="$PREFIX/libproot-xed.so"
chmod +x $PROOT
chmod +x $PREFIX/libtalloc.so.2
else
if [ -e "$PREFIX/libtalloc.so.2" ] || [ -L "$PREFIX/libtalloc.so.2" ]; then
rm "$PREFIX/libtalloc.so.2"
fi
ln -s "$NATIVE_DIR/libtalloc.so" "$PREFIX/libtalloc.so.2"
export PROOT="$NATIVE_DIR/libproot-xed.so"
fi
$PROOT --link2symlink -L --sysvipc --kill-on-exit -b $PREFIX:$PREFIX -b /data:/data -b /system:/system -b /vendor:/vendor -b /sdcard:/sdcard -b /storage:/storage -b $PREFIX/public:/public -S $PREFIX/alpine /bin/sh $PREFIX/init-alpine.sh "$@"