1
0
mirror of https://github.com/stucki/docker-lineageos synced 2025-01-09 17:39:47 -05:00

Merge pull request #11 from MichalCz/feature/privileged-usb-version

usb privileged version
This commit is contained in:
Michael Stucki 2016-04-04 20:16:27 +02:00
commit cab01da63c
4 changed files with 27 additions and 1 deletions

0
Dockerfile Normal file → Executable file
View File

View File

@ -22,6 +22,11 @@ cd docker-cyanogenmod
./run.sh
```
The `run.sh` script accepts the following switches:
* -u|--enable-usb - runs the container in privileged mode (this way you can use usb debugging right from the container)
* -r|--rebuild - force rebuild the image from scratch
The container uses "screen" to run the shell. This means that you will be able to open additional shells using [screen keyboard shortcuts][Screen_Shortcuts].
### How to build CyanogenMod for your device

22
run.sh
View File

@ -9,6 +9,26 @@ CONTAINER=cyanogenmod
REPOSITORY=stucki/cyanogenmod
TAG=cm-13.0
FORCE_BUILD=0
PRIVILEGED=
while [[ $# > 0 ]]
do
key="$1"
case $key in
-r|--rebuild)
FORCE_BUILD=1
;;
-u|--enable-usb)
PRIVILEGED="--privileged -v /dev/bus/usb:/dev/bus/usb"
;;
*)
shift # past argument or value
;;
esac
shift
done
# Create shared folders
mkdir -p $SOURCE
@ -42,7 +62,7 @@ if [[ $IS_RUNNING == "true" ]]; then
elif [[ $IS_RUNNING == "false" ]]; then
docker start -i $CONTAINER
else
docker run -v $SOURCE:$CONTAINER_HOME/android -v $CCACHE:/srv/ccache -i -t --name $CONTAINER $REPOSITORY:$TAG
docker run $PRIVILEGED -v $SOURCE:$CONTAINER_HOME/android -v $CCACHE:/srv/ccache -i -t --name $CONTAINER $REPOSITORY:$TAG
fi
exit $?

View File

@ -9,4 +9,5 @@ fi
export USER="cmbuild"
# Launch screen session
#/bin/bash --login
screen -s /bin/bash