File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ ln -s ./Android.png ./.DirIcon
3333cat >> ./AppRun << 'EOF '
3434#!/bin/bash
3535CURRENTDIR="$(readlink -f "$(dirname "$0")")"
36- UDEVNOTICE=$(echo "If you get errors it might be because you don't have the android udev rules for your device" )
36+ UDEVNOTICE=$(echo "If you get errors it might be because of missing android udev rules, use --getudev to install them" )
3737if [ "$1" = "adb" ]; then
3838 "$CURRENTDIR"/adb "${@:2}" || echo "$UDEVNOTICE"
3939 elif [ "$1" = "etc1tool" ]; then
@@ -48,6 +48,19 @@ if [ "$1" = "adb" ]; then
4848 "$CURRENTDIR"/mke2fs "${@:2}" || echo "$UDEVNOTICE"
4949 elif [ "$1" = "sqlite3" ]; then
5050 "$CURRENTDIR"/sqlite3 "${@:2}" || echo "$UDEVNOTICE"
51+ elif [ "$1" = "--getudev" ]; then
52+ if cat /etc/udev/rules.d/*droid.rules > /dev/null; then
53+ echo "udev rules already installed"
54+ echo “Errors persisting with installed udev rules may be due to specific phone missing from the rules or insufficient permissions on the phone”
55+ else
56+ UDEVREPO=https://github.com/M0Rf30/android-udev-rules.git
57+ git clone $UDEVREPO
58+ cd android-udev-rules
59+ chmod a+x ./install.sh
60+ echo "udev rules installer from $UDEVREPO"
61+ sudo ./install.sh
62+ cd .. && cat /etc/udev/rules.d/*droid.rules > /dev/null && rm -rf "./android-udev-rules"
63+ fi
5164else
5265 echo "Error: No command specified, try \"./*tools.AppImage adb shell\" for example"
5366 echo "You can also use aliases or wrapper scripts to not write ./*tools.AppImage every time"
You can’t perform that action at this time.
0 commit comments