Drop scripts we don't need anymore
This commit is contained in:
parent
457bd794ff
commit
637523b8cf
6 changed files with 0 additions and 119 deletions
|
|
@ -1,27 +0,0 @@
|
||||||
#!/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 .)
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
#!/system/bin/sh
|
|
||||||
echo "Dummy iptables wrapper"
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
exec /bin/bash $@
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue