Fix syswrite

This commit is contained in:
Mathieu Maret 2023-10-03 11:53:44 +02:00
parent 6083380b89
commit 19a652233d
1 changed files with 3 additions and 3 deletions

View File

@ -235,7 +235,7 @@ croot ()
syswrite ()
{
adb wait-for-device && adb root || return 1;
if [[ -n $(adb disable-verity | grep "reboot") ]]; then
if [[ -n $(adb disable-verity | grep -i "reboot") ]]; then
echo "rebooting";
adb reboot && adb wait-for-device && adb root || return 1;
fi;
@ -289,8 +289,8 @@ sdocker (){
img=$(echo ${details} | awk '{print $1}')
img_name=$(echo ${details} | awk '{print $2}')
if [ -z $img ]; then
echo "Running a new container with image $img_name"
docker run ${AOSP_ARGS} ${=SSH_AUTH_ARGS} -h $(hostname) -e DISPLAY=${DISPLAY} --privileged -v /dev/bus/usb:/dev/bus/usb -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v ${AOSP_IMAGE}:/aosp/Project -v $HOME/Sources/:/aosp/Sources/ -v /local/:/local/ --user="$(id -u):$(id -g)" $1
echo "Running a new container with image $1"
docker run ${AOSP_ARGS} ${=SSH_AUTH_ARGS} -h $(hostname) -e DISPLAY=${DISPLAY} --privileged -v /dev/bus/usb:/dev/bus/usb -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v ${AOSP_IMAGE}:/aosp/Project -v $HOME/Sources/:/aosp/Sources/ -v /local/:/local/ --net host $1
else
echo "Starting $img|$img_name"
docker start -i -a $img