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:
commit
cab01da63c
0
Dockerfile
Normal file → Executable file
0
Dockerfile
Normal file → Executable file
@ -22,6 +22,11 @@ cd docker-cyanogenmod
|
|||||||
./run.sh
|
./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].
|
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
|
### How to build CyanogenMod for your device
|
||||||
|
22
run.sh
22
run.sh
@ -9,6 +9,26 @@ CONTAINER=cyanogenmod
|
|||||||
REPOSITORY=stucki/cyanogenmod
|
REPOSITORY=stucki/cyanogenmod
|
||||||
TAG=cm-13.0
|
TAG=cm-13.0
|
||||||
FORCE_BUILD=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
|
# Create shared folders
|
||||||
mkdir -p $SOURCE
|
mkdir -p $SOURCE
|
||||||
@ -42,7 +62,7 @@ if [[ $IS_RUNNING == "true" ]]; then
|
|||||||
elif [[ $IS_RUNNING == "false" ]]; then
|
elif [[ $IS_RUNNING == "false" ]]; then
|
||||||
docker start -i $CONTAINER
|
docker start -i $CONTAINER
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
|
@ -9,4 +9,5 @@ fi
|
|||||||
export USER="cmbuild"
|
export USER="cmbuild"
|
||||||
|
|
||||||
# Launch screen session
|
# Launch screen session
|
||||||
|
#/bin/bash --login
|
||||||
screen -s /bin/bash
|
screen -s /bin/bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user