From 85c0ef6c139c577f1f9ef665363b28d13f8511a9 Mon Sep 17 00:00:00 2001 From: Francois B Date: Tue, 5 Jun 2018 09:00:21 +0200 Subject: [PATCH] android udev updated --- repo_functions_ub1604.sh | 78 ++++++++++++++++++++-------------------- repo_functions_ub1804.sh | 78 ++++++++++++++++++++-------------------- 2 files changed, 80 insertions(+), 76 deletions(-) diff --git a/repo_functions_ub1604.sh b/repo_functions_ub1604.sh index 49819cf..ac09ddd 100644 --- a/repo_functions_ub1604.sh +++ b/repo_functions_ub1604.sh @@ -1262,44 +1262,46 @@ function nodejs8lts_PostTrtFct () { function android_PostTrtFct () { printf "[CMD] Adding Android devices UDEV rules " - sudo sh -c "echo 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0502\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Acer\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0b05\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Asus\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"413c\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Dell\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0489\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Foxconn\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04c5\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Fujitsu\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04c5\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Fujitsu-Toshiba\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"091e\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Garmin-Asus\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Google-Nexus\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"201E\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Haier\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"109b\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Hisense\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0bb4\", MODE=\"0666\", OWNER=\""$myHomedir"\" # HTC\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"12d1\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Huawei\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"8087\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Intel\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"24e3\", MODE=\"0666\", OWNER=\""$myHomedir"\" # K-Touch\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2116\", MODE=\"0666\", OWNER=\""$myHomedir"\" # KT Tech\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0482\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Kyocera\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"17ef\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Lenovo\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1004\", MODE=\"0666\", OWNER=\""$myHomedir"\" # LG\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"22b8\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Motorola\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0e8d\", MODE=\"0666\", OWNER=\""$myHomedir"\" # MTK\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0409\", MODE=\"0666\", OWNER=\""$myHomedir"\" # NEC\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2080\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Nook\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0955\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Nvidia\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2257\", MODE=\"0666\", OWNER=\""$myHomedir"\" # OTGV\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"10a9\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Pantech\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1d4d\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Pegatron\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0471\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Philips\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04da\", MODE=\"0666\", OWNER=\""$myHomedir"\" # PMC-Sierra\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"05c6\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Qualcomm\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1f53\", MODE=\"0666\", OWNER=\""$myHomedir"\" # SK Telesys\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04e8\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Samsung\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04dd\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sharp\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"054c\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sony\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0fce\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sony Ericsson\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0fce\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sony Mobile Communications\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2340\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Teleepoch\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0930\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Toshiba\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"19d2\", MODE=\"0666\", OWNER=\""$myHomedir"\" # ZTE' > /etc/udev/rules.d/99-android.rules" +cat << EOF | sudo tee /etc/udev/rules.d/99-android.rules +SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", OWNER="$myHomedir" # Acer +SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", OWNER="$myHomedir" # Asus +SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666", OWNER="$myHomedir" # Dell +SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", OWNER="$myHomedir" # Foxconn +SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", OWNER="$myHomedir" # Fujitsu +SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", OWNER="$myHomedir" # Fujitsu-Toshiba +SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", OWNER="$myHomedir" # Garmin-Asus +SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", OWNER="$myHomedir" # Google-Nexus +SUBSYSTEM=="usb", ATTR{idVendor}=="201E", MODE="0666", OWNER="$myHomedir" # Haier +SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0666", OWNER="$myHomedir" # Hisense +SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", OWNER="$myHomedir" # HTC +SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", OWNER="$myHomedir" # Huawei +SUBSYSTEM=="usb", ATTR{idVendor}=="8087", MODE="0666", OWNER="$myHomedir" # Intel +SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666", OWNER="$myHomedir" # K-Touch +SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666", OWNER="$myHomedir" # KT Tech +SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666", OWNER="$myHomedir" # Kyocera +SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0666", OWNER="$myHomedir" # Lenovo +SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", OWNER="$myHomedir" # LG +SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", OWNER="$myHomedir" # Motorola +SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0666", OWNER="$myHomedir" # MTK +SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666", OWNER="$myHomedir" # NEC +SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666", OWNER="$myHomedir" # Nook +SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666", OWNER="$myHomedir" # Nvidia +SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666", OWNER="$myHomedir" # OTGV +SUBSYSTEM=="usb", ATTR{idVendor}=="10a9", MODE="0666", OWNER="$myHomedir" # Pantech +SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0666", OWNER="$myHomedir" # Pegatron +SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666", OWNER="$myHomedir" # Philips +SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666", OWNER="$myHomedir" # PMC-Sierra +SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", OWNER="$myHomedir" # Qualcomm +SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666", OWNER="$myHomedir" # SK Telesys +SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", OWNER="$myHomedir" # Samsung +SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666", OWNER="$myHomedir" # Sharp +SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", OWNER="$myHomedir" # Sony +SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", OWNER="$myHomedir" # Sony Ericsson +SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", OWNER="$myHomedir" # Sony Mobile Communications +SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0666", OWNER="$myHomedir" # Teleepoch +SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666", OWNER="$myHomedir" # Toshiba +SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", OWNER="$myHomedir" # ZTE +EOF ret_code=$? retCode $ret_code diff --git a/repo_functions_ub1804.sh b/repo_functions_ub1804.sh index afd6e55..cf2fb20 100644 --- a/repo_functions_ub1804.sh +++ b/repo_functions_ub1804.sh @@ -1066,44 +1066,46 @@ function nodejs8lts_PostTrtFct () { function android_PostTrtFct () { printf "[CMD] Adding Android devices UDEV rules " - sudo sh -c "echo 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0502\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Acer\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0b05\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Asus\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"413c\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Dell\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0489\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Foxconn\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04c5\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Fujitsu\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04c5\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Fujitsu-Toshiba\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"091e\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Garmin-Asus\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Google-Nexus\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"201E\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Haier\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"109b\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Hisense\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0bb4\", MODE=\"0666\", OWNER=\""$myHomedir"\" # HTC\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"12d1\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Huawei\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"8087\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Intel\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"24e3\", MODE=\"0666\", OWNER=\""$myHomedir"\" # K-Touch\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2116\", MODE=\"0666\", OWNER=\""$myHomedir"\" # KT Tech\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0482\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Kyocera\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"17ef\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Lenovo\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1004\", MODE=\"0666\", OWNER=\""$myHomedir"\" # LG\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"22b8\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Motorola\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0e8d\", MODE=\"0666\", OWNER=\""$myHomedir"\" # MTK\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0409\", MODE=\"0666\", OWNER=\""$myHomedir"\" # NEC\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2080\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Nook\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0955\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Nvidia\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2257\", MODE=\"0666\", OWNER=\""$myHomedir"\" # OTGV\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"10a9\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Pantech\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1d4d\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Pegatron\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0471\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Philips\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04da\", MODE=\"0666\", OWNER=\""$myHomedir"\" # PMC-Sierra\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"05c6\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Qualcomm\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1f53\", MODE=\"0666\", OWNER=\""$myHomedir"\" # SK Telesys\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04e8\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Samsung\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04dd\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sharp\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"054c\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sony\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0fce\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sony Ericsson\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0fce\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Sony Mobile Communications\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"2340\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Teleepoch\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0930\", MODE=\"0666\", OWNER=\""$myHomedir"\" # Toshiba\n\ -SUBSYSTEM==\"usb\", ATTR{idVendor}==\"19d2\", MODE=\"0666\", OWNER=\""$myHomedir"\" # ZTE' > /etc/udev/rules.d/99-android.rules" +cat << EOF | sudo tee /etc/udev/rules.d/99-android.rules +SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", OWNER="$myHomedir" # Acer +SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", OWNER="$myHomedir" # Asus +SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666", OWNER="$myHomedir" # Dell +SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", OWNER="$myHomedir" # Foxconn +SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", OWNER="$myHomedir" # Fujitsu +SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", OWNER="$myHomedir" # Fujitsu-Toshiba +SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", OWNER="$myHomedir" # Garmin-Asus +SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", OWNER="$myHomedir" # Google-Nexus +SUBSYSTEM=="usb", ATTR{idVendor}=="201E", MODE="0666", OWNER="$myHomedir" # Haier +SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0666", OWNER="$myHomedir" # Hisense +SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", OWNER="$myHomedir" # HTC +SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", OWNER="$myHomedir" # Huawei +SUBSYSTEM=="usb", ATTR{idVendor}=="8087", MODE="0666", OWNER="$myHomedir" # Intel +SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666", OWNER="$myHomedir" # K-Touch +SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666", OWNER="$myHomedir" # KT Tech +SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666", OWNER="$myHomedir" # Kyocera +SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0666", OWNER="$myHomedir" # Lenovo +SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", OWNER="$myHomedir" # LG +SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", OWNER="$myHomedir" # Motorola +SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0666", OWNER="$myHomedir" # MTK +SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666", OWNER="$myHomedir" # NEC +SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666", OWNER="$myHomedir" # Nook +SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666", OWNER="$myHomedir" # Nvidia +SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666", OWNER="$myHomedir" # OTGV +SUBSYSTEM=="usb", ATTR{idVendor}=="10a9", MODE="0666", OWNER="$myHomedir" # Pantech +SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0666", OWNER="$myHomedir" # Pegatron +SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666", OWNER="$myHomedir" # Philips +SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666", OWNER="$myHomedir" # PMC-Sierra +SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", OWNER="$myHomedir" # Qualcomm +SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666", OWNER="$myHomedir" # SK Telesys +SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", OWNER="$myHomedir" # Samsung +SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666", OWNER="$myHomedir" # Sharp +SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", OWNER="$myHomedir" # Sony +SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", OWNER="$myHomedir" # Sony Ericsson +SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", OWNER="$myHomedir" # Sony Mobile Communications +SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0666", OWNER="$myHomedir" # Teleepoch +SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666", OWNER="$myHomedir" # Toshiba +SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", OWNER="$myHomedir" # ZTE +EOF ret_code=$? retCode $ret_code