Ai
2 Star 2 Fork 3

anbox/anbox-headless

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
anbox-shell.sh 972 Bytes
一键复制 编辑 原始数据 按行查看 历史
Xiaofeng 提交于 2020-04-24 10:56 +08:00 . Added gbm/kms platform
#!/bin/sh
if [ "$(id -u)" -ne 0 ]; then
echo "ERROR: You need to run this script as root!"
exit 1
fi
CONTAINER_PATH="$SNAP_COMMON/containers"
CONTAINER_NAME=default
if [ -z "$SNAP" ] ; then
CONTAINER_PATH=/var/lib/anbox/containers
fi
state=$(lxc-info -P "$CONTAINER_PATH" -n "$CONTAINER_NAME" -s | cut -d':' -f 2 | tr -d '[:space:]')
if [ "$state" != "RUNNING" ] ; then
echo "ERROR: Cannot attach to container as it is not running"
exit 1
fi
echo "NOTE: This shell will give you full root access inside the Android"
echo " container. Be careful with what you're doing!"
echo
exec lxc-attach \
-q \
--clear-env \
-P "$CONTAINER_PATH" \
-n "$CONTAINER_NAME" \
-v PATH=/sbin:/system/bin:/system/sbin:/system/xbin \
-v ANDROID_ASSETS=/assets \
-v ANDROID_DATA=/data \
-v ANDROID_ROOT=/system \
-v ANDROID_STORAGE=/storage \
-v ASEC_MOUNTPOINT=/mnt/asec \
-v EXTERNAL_STORAGE=/sdcard -- /system/bin/sh
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/anbox/anbox-headless.git
git@gitee.com:anbox/anbox-headless.git
anbox
anbox-headless
anbox-headless
master

搜索帮助