Fix syswrite

This commit is contained in:
Mathieu Maret 2023-10-03 11:53:44 +02:00
parent 6083380b89
commit 19a652233d

View File

@ -235,7 +235,7 @@ croot ()
syswrite () syswrite ()
{ {
adb wait-for-device && adb root || return 1; 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"; echo "rebooting";
adb reboot && adb wait-for-device && adb root || return 1; adb reboot && adb wait-for-device && adb root || return 1;
fi; fi;
@ -289,8 +289,8 @@ sdocker (){
img=$(echo ${details} | awk '{print $1}') img=$(echo ${details} | awk '{print $1}')
img_name=$(echo ${details} | awk '{print $2}') img_name=$(echo ${details} | awk '{print $2}')
if [ -z $img ]; then if [ -z $img ]; then
echo "Running a new container with image $img_name" 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/ --user="$(id -u):$(id -g)" $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 else
echo "Starting $img|$img_name" echo "Starting $img|$img_name"
docker start -i -a $img docker start -i -a $img