提交 637523b8 编写于 作者: S Simon Fels

Drop scripts we don't need anymore

上级 457bd794
#!/bin/sh
set -e
set -x
if [ ! -e android-rootfs.tar ] ; then
echo "ERROR: Missing Android rootfs package!"
exit 1
fi
./cross-compile-chroot.sh -a armhf -d vivid
if [ -e click ] ; then
rm -rf click
fi
mkdir click
cp data/manifest.json click/
cp data/apparmor.json click/
cp data/anbox.desktop click/
(cd click ; tar xf ../android-rootfs.tar ; mv rootfs android-rootfs)
cp build-armhf-vivid/src/anbox click/
cp build-armhf-vivid/src/anbox-container click/
(cd click ; click build .)
#!/bin/bash
$SNAP/bin/lxc-attach \
--lxcpath=$SNAP_COMMON/var/lib/anbox/containers \
--name default \
--clear-env \
--set-var PATH=/system/bin:/system/sbin:/system/xbin \
--set-var ANDROID_DATA=/data \
--set-var ANDROID_ROOT=/system \
-- \
/system/bin/sh
#!/system/bin/sh
echo "Dummy iptables wrapper"
#!/bin/bash
set -e
set -x
basepath=/home/phablet/android-box
rootfs=$basepath/rootfs
rootfs_overrides=$basepath/overrides
ramdisk=$basepath/ramdisk.img
systemdisk=$basepath/system.img
init_cmd="/init"
if [ "$1" = "shell" ] ; then
init_cmd=/system/bin/sh
fi
if [ -d $rootfs ] ; then
sudo umount --recursive $rootfs || true
rm -rf $rootfs
fi
mkdir -p $rootfs
sudo mount -t tmpfs none $rootfs
(cd $rootfs ; cat $ramdisk | gzip -d | cpio -i)
mkdir -p $rootfs/dev/pts
sudo mount -o ro,loop $systemdisk $rootfs/system
if [ -d "$rootfs_overrides" ] ; then
for f in `ls $rootfs_overrides` ; do
if [ "$f" = "system" ] ; then
for f2 in `find $rootfs_overrides/system -type f` ; do
real_path=`echo $f2 | sed -e s:$rootfs_overrides::g`
sudo mount -o bind $f2 $rootfs/$real_path
done
else
cp $rootfs_overrides/$f $rootfs
fi
done
fi
/home/phablet/bwrap \
--ro-bind $rootfs / \
--bind /home/phablet/android-box/iptables-wrapper /system/bin/iptables \
--bind /home/phablet/android-box/iptables-wrapper /system/bin/ip6tables \
--dev /dev \
--proc /proc \
--tmpfs /data \
--unshare-user \
--unshare-ipc \
--unshare-pid \
--unshare-net \
--unshare-uts \
--uid 0 \
--gid 0 \
--setenv PATH /system/bin:/system/sbin:/system/xbin \
--chdir / \
$init_cmd
sudo umount --recursive $rootfs
rm -rf $rootfs
#!/bin/bash
# We need to put the rootfs somewhere where we can modify some
# parts of the content on first boot (namely file permissions).
# Other than that nothing should ever modify the content of the
# rootfs.
ROOTFS_PATH=$SNAP_COMMON/var/lib/anbox/rootfs
if [ -d $ROOTFS_PATH ] ; then
rm -rf $ROOTFS_PATH
fi
echo "Copying rootfs into $ROOTFS_PATH .."
mkdir -p $ROOTFS_PATH
tar xf $SNAP/android-rootfs.tar -C $ROOTFS_PATH/ --strip-components=1
#!/bin/bash
exec /bin/bash $@
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册