Depending on linux distribution, first install the ADB tools for linux
On your Android Phone, go to Settings > Applications > Development and in there enable USB Debugging. Plug it into your PC and throw this command in the terminal:
lsusb
You will get an output similar to this:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 003: ID 19d2:fffe ZTE WCDMA Technologies MSM Bus 006 Device 005: ID 2207:0010 Bus 001 Device 004: ID 1c9e:9e08 OMEGA TECHNOLOGY
Depending on ADB package, config file location and udev version you will have different syntax: Example:
First create a file if not exists : # cat /etc/udev/rules.d/51-android.rules SUBSYSTEM=="usb", SYSFS{idVendor}=="0e79", SYSFS{idProduct}=="1433", MODE="0666", OWNER="username"
# cat /usr/lib/udev/rules.d/51-android.rules SUBSYSTEM=="usb", ATTRS{idVendor}=="2207", MODE="0666"
The text file in which you will have to input some details, Put it in this format:
#x-x-x-x-x-x SUBSYSTEM==“usb”, ATTR{idVendor}==“xxxx”, ATTR{idProduct}==“xxxx”, MODE=“0666”, GROUP=“adbandy”
The Format Explained
#x-x-x-x-x-x = Replace the “x-x-x-x-x-x” with the name of your manufacturer. For example, for Samsung it’s “#Samsung”
ATTR{idVendor}==”xxxx” = Replace the “xxxx” with your Manufacturer ID, which in my case is 1c9e
ATTR{idProduct}==”xxxx” = Replace the “xxxx” with your Product ID, which in my case is 9e08.
GROUP=”adbandy“ = I set up a group called adbandy and included myself in it, you don’t have to do it. You can replace adbandy with “plugdev”
Change the file permissions:
# chmod 754 /etc/udev/rules.d/51-android.rules
Make the rule known to udev with the following command:
# udevadm control --reload-rules (or udevcontrol reload_rules on older systems) or # /etc/init.d/udev restart
Download the adb (Android Development http://developer.android.com/sdk/index.html
Extract the files and put the content (folders sdk and eclipse) into your home directory, for example into ~/Android/
Then run the program called android: ~/Android/sdk/tools/android
Add Archos vendor ID (0x0e79) to adb_usb.ini in .android folder in your home directory:
Windows: echo 0x0e79 >> "%USERPROFILE%\.android\adb_usb.ini" Macos: echo "0x0e79" >> ~/.android/adb_usb.ini Linux: echo "0x0e79" >> ~/.android/adb_usb.ini
http://androidonlinux.wordpress.com/2013/05/12/setting-up-adb-on-linux/
adb devices
How to Edit the Hosts File on Android (and Block Web Sites)
Once the command prompt opens run the following command to see what devices are attached to your PC.
adb devices
Next you need to download the host file from your device so you can edit it.
adb pull /system/etc/hosts F:\hosts
Modify your file using an editor.
Finally you will need ADB to push the file back to your device.
adb push F:\hosts /system/etc/
USB Vendor IDs
This table provides a reference to the vendor IDs needed in order to add USB device support on Linux. The USB Vendor ID is the value given to the ATTR{idVendor} property in the rules file, as described above.
Company USB Vendor ID Acer 0502 ASUS 0b05 Dell 413c Foxconn 0489 Fujitsu 04c5 Fujitsu Toshiba 04c5 Garmin-Asus 091e Google 18d1 Haier 201E Hisense 109b HTC 0bb4 Huawei 12d1 K-Touch 24e3 KT Tech 2116 Kyocera 0482 Lenovo 17ef LG 1004 Motorola 22b8 MTK 0e8d NEC 0409 Nook 2080 Nvidia 0955 OTGV 2257 Pantech 10a9 Pegatron 1d4d Philips 0471 PMC-Sierra 04da Qualcomm 05c6 SK Telesys 1f53 Samsung 04e8 Sharp 04dd Sony 054c Sony Ericsson 0fce Teleepoch 2340 Toshiba 0930 ZTE 19d2
I to am an android user who feels it is important to maintain control of where files are placed on my system, otherwise I would have an ipad.
The solution requires you to be rooted. Set your file explorer to access root. I use xplore, but others prefer es explorer.
Go to: /system/etc/permissions
Find file: platform.xml
Edit the file in the text editor in xplore.
Find the line <permission name=“android . permission.WRITE_EXTERNAL_STORAGE”>
Under where it says: <group gid=“sdcard_rw” />
Add this: <group gid=“media_rw” />
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" > <group gid="sdcard_r" /> <group gid="sdcard_rw" /> <group gid="media_rw" /> </permission> <permission name="android.permission.WRITE_MEDIA_STORAGE" > <group gid="sdcard_rw" /> <group gid="media_rw" /> </permission>
Reboot
After your tablet reboot, you should be able to copy/move files back and forth between internal and external sd cards.
manu@lap-manu-linux:~> adb devices * daemon not running. starting it now on port 5037 * * daemon started successfully * List of devices attached 20110301 device manu@lap-manu-linux:~> adb pull /system/etc/permissions/platform.xml . 108 KB/s (9159 bytes in 0.082s) manu@lap-manu-linux:~> ll total 34116 ... -rw-r--r-- 1 manu users 9159 Jan 3 22:46 platform.xml .... manu@lap-manu-linux:~> vi platform.xml manu@lap-manu-linux:~> adb root restarting adbd as root manu@lap-manu-linux:~> adb push platform.xml /system/etc/permissions 202 KB/s (9192 bytes in 0.044s)
Unlock root:
manu@lap-manu-linux:~/Downloads/android> unzip motochopper.zip Archive: motochopper.zip creating: motochopper/ inflating: motochopper/pwn inflating: motochopper/su inflating: motochopper/adb.exe inflating: motochopper/adb.osx inflating: motochopper/AdbWinUsbApi.dll inflating: motochopper/AdbWinApi.dll inflating: motochopper/run.sh inflating: motochopper/busybox inflating: motochopper/run.bat inflating: motochopper/Superuser.apk inflating: motochopper/adb.linux manu@lap-manu-linux:~/Downloads/android> cd motochopper/ manu@lap-manu-linux:~/Downloads/android/motochopper> ll total 8372 -rwxr-xr-x 1 manu users 815104 Apr 26 2013 adb.exe -rwxr-xr-x 1 manu users 1226659 Apr 9 2013 adb.linux -rwxr-xr-x 1 manu users 1256228 Apr 26 2013 adb.osx -rw-rw-r-- 1 manu users 96256 Apr 9 2013 AdbWinApi.dll -rw-rw-r-- 1 manu users 60928 Apr 9 2013 AdbWinUsbApi.dll -rwxr-xr-x 1 manu users 1867568 Apr 9 2013 busybox -rwxrwxr-x 1 manu users 1283460 Apr 9 2013 pwn -rwxr-xr-x 1 manu users 1921 Apr 15 2013 run.bat -rwxr-xr-x 1 manu users 2091 Apr 15 2013 run.sh -rw-rw-r-- 1 manu users 366952 Apr 9 2013 su -rw-rw-r-- 1 manu users 1578585 Apr 9 2013 Superuser.apk manu@lap-manu-linux:~/Downloads/android/motochopper> ad adb addftinfo addr2line adinrec adintool manu@lap-manu-linux:~/Downloads/android/motochopper> ad adb addftinfo addr2line adinrec adintool manu@lap-manu-linux:~/Downloads/android/motochopper> adb devices List of devices attached 20110301 device manu@lap-manu-linux:~/Downloads/android/motochopper> ./run.sh [*] [*] Motochopper: Android root exploit (Linux/OS X version) [*] v1.1 [*] by Dan Rosenberg (@djrbliss) [*] [*] Tested on the Motorola Razr HD, Razr M, Razr Maxx HD, and Atrix HD. [*] Supports lots of other devices as well. ;-) [*] [*] Before continuing, ensure that USB debugging is enabled and that [*] your phone is connected via USB. [*] [*] WARNING: This will likely void the warranty on your device. I am [*] not responsible for any damage to your phone as a result using this [*] tool. [*] [*] Press enter to root your phone... [*] [*] Waiting for device... * daemon not running. starting it now on port 5037 * * daemon started successfully * [*] Device found. [*] Pushing exploit... 4413 KB/s (1283460 bytes in 0.283s) [*] Pushing root tools... 4449 KB/s (366952 bytes in 0.080s) 4392 KB/s (1867568 bytes in 0.415s) 4371 KB/s (1578585 bytes in 0.352s) pkg: /data/local/tmp/Superuser.apk pkg----5------: pkg----6------: Success [*] Rooting phone... [+] This may take a few minutes. [+] Success! [*] Cleaning up... [*] Exploit complete. Press enter to reboot and exit.