diff --git a/README.md b/README.md
index 090a0f0..bb3fb15 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,9 @@ Steps:
1. Build
```docker build -t magiskupdate .```
2. Run
- ```docker run --env ADB_DEVICE= magiskupdate```
+ ```docker run --env ADB_DEVICE= magiskupdate``` \
+ or, if you're lazy do:
+ ```docker run magiskupdate```
## Bash
diff --git a/reinstall-magisk-on-lineageos b/reinstall-magisk-on-lineageos
index 6fc9576..085fc40 100755
--- a/reinstall-magisk-on-lineageos
+++ b/reinstall-magisk-on-lineageos
@@ -3,6 +3,9 @@
set -e
PHONE_ADB_SERIAL_NUMBER=${ADB_DEVICE} # The adb serial number can be found by running `adb devices`.
+if [$PHONE_ADB_SERIAL_NUMBER = '']; then
+ PHONE_ADB_SERIAL_NUMBER=$(echo $(adb devices) | sed -rn 's/(^|(.* ))([^ ]*) device(( .*)|$)/\3/; T; p; q')
+fi
print_message() {
printf "$1\n"