Skip to content

Commit 9d4bc68

Browse files
committed
Script that calls the actual usb rules. The rules.sh script is required to be run as root. Since im assuming most people are not running adb from the root /bin, but rather their user ~/bin, this script is called without root permissions to bea able to properly call adb that would be in ~/bin
0 parents  commit 9d4bc68

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

create_android_rules.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
4+
echo ""
5+
echo "*******************************************************"
6+
echo "Add device permisions to the udev rules by LinuxMotion"
7+
8+
sudo ./rules.sh
9+
10+
if [ -f /etc/udev/rules.d/51-android.rules ]
11+
then
12+
echo "Restarting udev to read the new rules"
13+
sudo service udev restart
14+
15+
echo
16+
echo "Killing the adb server"
17+
18+
adb kill-server
19+
20+
echo
21+
echo "*******************************************************"
22+
echo "Please unplug and replug any currently connected devices"
23+
echo "Press enter to continue"
24+
read pause
25+
26+
echo ""
27+
echo "*******************************************************"
28+
29+
adb devices
30+
31+
else
32+
33+
echo "Your files was not created, please run again with sudo"
34+
fi
35+

0 commit comments

Comments
 (0)