[solved] adb devices = ??????? no permissions - Nexus One Q&A, Help & Troubleshooting

exactly as the title states, whenever i attempt to view the devices connected i get that output. I've searched, and the proposed solution is to start adb as root, but whenever i use sudo before adb start-server, the output is = sudo: adb: command not found
i don't understand what's going on, is it a problem with my drivers?
edit: solved it by using this as my /etc/udev/rules.d/51-android.rules:
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
the id vendor was wrong in all the tutorials i read.

THANKS!!!! This worked for me, Ubuntu 10.04.

hmm.. interesting... when i changed the ID it started to work on Nexus S and on HTC magic...
If you have ubuntu 10.10 it SHOULD work without udev rules..

Related

[Q] How to get ADB running on Fedora 8 talking to a Colour Nook

I have read hundreds of postings all over the web, while trying to get adb to talk to my
autonooted Colour Nook, without success.
1/ I have the SDK installed
2/ I have the PATH adjusted
3/ I have the /etc/udev/rules.d/51-android.rules file containing
SUBSYSTEM=="usb", SYSFS{idVendor}=="2080", MODE="0666"
Note I extracted the 2080 from the ID in /var/log/messages when I pluged the Nook in
4/ I have tried ATTRS instead of SYSFS too
Yes, I restarted udevd on every attempt.
5/ Whenever I execute: 'adb devices', it always returns an empty list.
6/ Sniffing the USB connector with Wireshark, shows two mass storage devices and a 'network' capability reported.
7/ I have the 'Development -> USB debugging' option enabled in the 'nookcolor tools'.
8/ udev tracing shows only mass storage activity
What can I try next?
TIA
Fulko
try:
adb kill-server
sudo adb devices
sorry, tried that too, I just forgot to mention it.
First, F8? Really?? F12 went EOL a few weeks ago... Yikes.
Anywho.. This is what I have.
Code:
# more /etc/udev/rules.d/50-android.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", MODE="0666", OWNER="youruser"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2080", MODE="0666", OWNER="youruser"
AND read here
http://nookdevs.com/NookColor_USB_ADB

Nexus 4 and Linux users

A discussion thread for all my linux friends out there!
----
I'm using ArchLinux with my Nexus 4.
Found a new mtp mounting tool http://research.jacquette.com/jmtpfs-exchanging-files-between-android-devices-and-linux/ . Might give it a shot.
Also I would recommend checking out https://wiki.archlinux.org/index.php/Android . Has some good information relevant to all distributions.
---
jmtpfs is definitely one of the best tools for mounting the Nexus 4 to your filesystem.
Code:
mkdir /tmp/nexus && jmtpfs /tmp/nexus
# Unmount / cleanup
fusermount -u /tmp/nexus && rm -r /tmp/nexus
tim.smart said:
A discussion thread for all my linux friends out there!
----
I'm using ArchLinux with my Nexus 4.
Click to expand...
Click to collapse
Are you refering to only users that are using Linux on their Nexus 4's or any user that uses Linux also?
I'm on OpenBSD (not some Linux) but this should still be relevant. Hate using MTP, and it's terribly supported. I installed an sshd server (DropBear SSH Sever II on the play store) which I enable each time I need to transfer files, and then just use scp. This also lets me shell into the phone without relying on adb or typing in a terminal emulator on my phone.
Unfortunately, I haven't been able to install the android SDK on OpenBSD, so that means no fastboot and adb. Thankfully almost everything can be done from the recovery, but in the rare case where I do need to use fastboot, I have to boot to Windows.
Every android device runs Linux
Sent from my SPH-D710 using Tapatalk 2
donec said:
Are you refering to only users that are using Linux on their Nexus 4's or any user that uses Linux also?
Click to expand...
Click to collapse
People who use Linux computers to interact with their Nexus 4.
Does jmptfs use Java for operation? Otherwise a great tool, would be cool to automate.
Sent from my Nexus 4 using xda app-developers app
Then that's me.
Anyone know if the Nexus4 can connect to Ubuntu 12.10 out of the box via USB?
castlefox said:
Anyone know if the Nexus4 can connect to Ubuntu 12.10 out of the box via USB?
Click to expand...
Click to collapse
Yes it will.
Though on Linux Mint, I have had no luck with the 51-android.rules file
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Samsung - Nexus 7 & 10
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
Click to expand...
Click to collapse
I still have to use sudo for adb/fastboot
I just start a FTP server app on the phone and then transfer files with Filezilla. Easy enough.
If you use Linux you can use QtADB:
http://qtadb.wordpress.com/
Also, if you install an SSH server on your phone you can use sshfs:
sshfs -p 22 [email protected]:/ /mnt/nexus4
I believe it uses SFTP, so you need to make sure your SSH server supports SFTP. I gave up on MTP, it only gives you access to /sdcard and writing files has never worked for me.
rootdisk said:
If you use Linux you can use QtADB:
http://qtadb.wordpress.com/
Also, if you install an SSH server on your phone you can use sshfs:
sshfs -p 22 [email protected]:/ /mnt/nexus4
I believe it uses SFTP, so you need to make sure your SSH server supports SFTP. I gave up on MTP, it only gives you access to /sdcard and writing files has never worked for me.
Click to expand...
Click to collapse
sshfs has saved my ass on more than one occasion. Will have to give it a shot later on.
What kind of transfer speeds are you getting with it?
rootdisk said:
Though on Linux Mint, I have had no luck with the 51-android.rules file
Click to expand...
Click to collapse
In one of those rules you are using SYSFS not ATTR. Not sure if it makes a difference - I haven't read any of the udev documentation.
You will also need to add a user group to identify the id with. My Nexus 4 rule:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE=="0666", GROUP=="users"
Replace "users" with a user group you are in. `groups` command lets you know what groups are associated with your user.
Using Ubuntu 13.04 (I know alpha, but already far better than 12.10 for me and my graphics).
For MTP, i'm doing this: http://www.webupd8.org/2012/12/how-to-mount-android-40-ubuntu-go-mtpfs.html
Follow the steps:
Code:
sudo add-apt-repository ppa:webupd8team/unstable
sudo apt-get update
sudo apt-get install go-mtpfs go-mtpfs-unity
Then go into Dash Home, type in Mount Android Device. Click and drag the icon to your launcher. It's not auto-mount, but works well on any Android device i've tried so far. When you plug in your Android device (tested on Galaxy Nexus, Nexus 4, and Nexus 7), unlock it, then, right click on the Android icon, and select Mount Android Device (not the bold text, normal text). Instantly there in Nautilus. When done, make sure unlocked, then right click / unmount. Easy.
Haven't had any issues at all with adb setup either, very easy. Only things I had to do were:
Install Java;
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Then Install SDK (I extracted to /home/%user%/Android) and add in platform tools.
Then edit bashrc;
Code:
sudo gedit ~/.bashrc
Add to end of file:
Code:
# Android tools
export PATH=${PATH}:~/Android/tools
export PATH=${PATH}:~/Android/platform-tools
Save/close.
Then log out/in or just reboot;
Code:
sudo reboot
adb devices = works straight away, no udev rules required.
Haven't had to test fastboot yet, but will check that out sometime soon.
Automount MTP (source: http://www.tuxtrix.com/2012/12/how-to-automount-nexus-4-and-nexus-7-in.html):
Config fuse
Code:
sudo chmod a+r /etc/fuse.conf
sudo gedit /etc/fuse.conf
remove the hash from infront of:
#user_allow_other
to be
user_allow_other
save and close. now download/install go-mtpfs:
Code:
sudo add-apt-repository ppa:webupd8team/unstable
sudo apt-get update
sudo apt-get install go-mtpfs
Now setup mount directories:
Code:
sudo mkdir /media/nexus4
sudo chmod 777 /media/Nexus4
sudo mkdir /media/nexus7
sudo chmod 777 /media/Nexus7
Add udev rules:
Code:
sudo gedit /etc/udev/rules.d/99-android.rules
Add in the following (change "yourloginid" to your Ubuntu username):
Code:
# Google Nexus 7 MTP mode : automatic mount when plugged (all android versions)
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4e41", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/nexus7"
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4e42", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/nexus7"
ENV{ID_MODEL}=="Nexus_7", ENV{ID_MODEL_ID}=="4e41", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/nexus7"
ENV{ID_MODEL}=="Nexus_7", ENV{ID_MODEL_ID}=="4e42", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/nexus7"
# Google Nexus 7 MTP mode : automatic unmount when unplugged (all android versions)
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4e41", ACTION=="remove", RUN+="/bin/umount /media/nexus7"
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4ee2", ACTION=="remove", RUN+="/bin/umount /media/nexus7"
ENV{ID_MODEL}=="Nexus_7", ENV{ID_MODEL_ID}=="4e41", ACTION=="remove", RUN+="/bin/umount /media/nexus7"
ENV{ID_MODEL}=="Nexus_7", ENV{ID_MODEL_ID}=="4e42", ACTION=="remove", RUN+="/bin/umount /media/nexus7"
# Google Nexus 4 MTP mode : automatic mount when plugged (all android versions)
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4ee1", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/Nexus4"
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4ee2", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/Nexus4"
ENV{ID_MODEL}=="Nexus_4", ENV{ID_MODEL_ID}=="4ee1", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/Nexus4"
ENV{ID_MODEL}=="Nexus_4", ENV{ID_MODEL_ID}=="4ee2", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/Nexus4"
# Google Nexus 4 MTP mode : automatic unmount when unplugged (all android versions)
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4ee1", ACTION=="remove", RUN+="/bin/umount /media/Nexus4"
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4ee2", ACTION=="remove", RUN+="/bin/umount /media/Nexus4"
ENV{ID_MODEL}=="Nexus_4", ENV{ID_MODEL_ID}=="4ee1", ACTION=="remove", RUN+="/bin/umount /media/Nexus4"
ENV{ID_MODEL}=="Nexus_4", ENV{ID_MODEL_ID}=="4ee2", ACTION=="remove", RUN+="/bin/umount /media/Nexus4"
Restart udev:
Code:
sudo service udev restart
Add rules to fstab to allow easy mount/unmount without root:
Code:
sudo gedit /etc/fstab
Add in this to the end of the file:
Code:
DeviceFs(Nexus\0407) /media/nexus7 fuse.DeviceFs(Nexus\0407) allow_other,rw,user,noauto 0 0
DeviceFs(Nexus\0404) /media/Nexus4 fuse.DeviceFs(Nexus\0404) allow_other,rw,user,noauto 0 0
Remount all drives:
Code:
sudo mount -a
Done.
But I prefer the other method (manual mount/unmount) with the icon up top of this post, so not using this method anymore.
tim.smart said:
sshfs has saved my ass on more than one occasion. Will have to give it a shot later on.
What kind of transfer speeds are you getting with it?
Click to expand...
Click to collapse
Here is a breakdown of read & write for SSHFS, ADB & MTP. One thing to note, I gave up on MTPFS because it was very slow connecting to my Nexus 4. These tests use Simple-MTPFS:
https://github.com/phatina/simple-mtpfs
I used the source RPM found here to build an RPM for Fedora 16:
http://arm.koji.fedoraproject.org/koji/packageinfo?packageID=14698
There are also some other alternatives as described here:
https://wiki.archlinux.org/index.php/MTP
Write speed for SSHFS:
sshfs -p22000 [email protected]:/ /mnt/nexus4
[email protected]'s password:
dd of=/mnt/nexus4/sdcard/testfile if=/dev/zero bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB) copied, 85.9756 s, 1.2 MB/s
Read speed for SSHFS:
dd if=/mnt/nexus4/sdcard/testfile of=/dev/null
200000+0 records in
200000+0 records out
102400000 bytes (102 MB) copied, 81.5803 s, 1.3 MB/s
Read speed for ADB:
adb pull /sdcard/testfile /dev/null
4533 KB/s (102400000 bytes in 22.060s)
Write speed for ADB:
adb push testfile /sdcard/testfile
3755 KB/s (102400000 bytes in 26.624s)
Write speed for MTP using Simple-MTPFS:
time dd of=/mnt/nexus4/testfile if=/dev/zero bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB) copied, 3.64969 s, 28.1 MB/s
real 0m17.138s
user 0m0.074s
sys 0m1.418s
Read speed for MTP using Simple-MTPFS:
time dd if=/mnt/nexus4/testfile of=/dev/null
200000+0 records in
200000+0 records out
102400000 bytes (102 MB) copied, 0.100472 s, 1.0 GB/s
real 0m5.779s
user 0m0.019s
sys 0m0.083s
One thing to note is that when using MTP, dd returned rather fast results but didn't seem quite accurate. So using time shows a more accurate result. With SSHFS & ADB, there was no real difference between time vs dd.
Cannot mount on Ubuntu 12.10 64bit
[update]: Installed gmtp and it works... that looks like easier way to access my device..
I did all the steps described in another thread to mount my nexus 4 to ubuntu 12.10 64bit. I get the below message. Any help in pointing what's wrong will be great.
Code:
Listing raw device(s)
Device 0 (VID=18d1 and PID=4ee2) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Found 1 device(s):
18d1:4ee2 @ bus 1, dev 5
Attempting to connect device
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
Android device detected, assigning default bug flags
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Listing File Information on Device with name: (NULL)
chroot arch on the nexus 4
Hey, fellow linuxers! I've been looking around the forum and I haven't found any tutorials about how to run Arch Linux on the Nexus 4. So, I'm thinking on making my own. Any pointers to people doing something similar?
I'm going to open the thread in a minute, but I'll fill it out as I figure stuff up. Cuz, I've been messing with linux for a long time now, but this is my first project in Android. All help is welcomed.
Does Ubuntu work on Toshiba satellite laptops,?
Sent from my Nexus 4 using Tapatalk 2
I've always used the USB camera mode for transferring files to Android devices (several Nexus 4's, several Nexus 7's, a Galaxy S3 and Note 2). Always worked for me even when I was on Linux Mint Lisa (I'm now running Nadia). It limits me to the DCIM folder, which is not a problem as I use file manager and choose multi-files to move them to their proper destination.
Since only 2 Nexus 4's and 7's are mine and my wife's, I tell the other people to use file manager to move the files around and no one has had problems, either. The move function in file manager takes only a few seconds to complete even when the files are gigabytes in size. This works on non-rooted stock devices.
I do have a VMplayer WinXP that I've used for rooting and installing custom rom's our Nexus devices. MTP mode works fine inside the VM.
I use android terminal for md5sum-checking critical files (ie new ROM version).

[GUIDE] Setup Android Development Environment on Ubuntu 13.04+

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hi guys and future devs here you will find a very helpful guide on how to setup the android development so that you can basically do anything you want!
I'll suggest you many useful programs that are needed in this field
In this guide I'll be using Ubuntu 13.04 but probably this will also work on 12.04-12.10 and future releases!
Ok now let's begin with the real stuff :good:
INSTALL UBUNTU
The first thing you'll need to do is obviously the ubuntu installation, unfortunately i won't cover this part of the guide cause I think that everyone who is looking at this guide knows how to install an OS on a Desktop (hope so)
Download
SETUP ANDROID DEVELOPMENT ENVIRONMENT
WHAT WE NEED
1- JDK 6(Java Development Kit) NOTE: you will need to sign in the oracle site for this version of java unfortunately )
2- GNU Make (Optional)
3- Python 2.7
4- Git 1.7
5- Android SDK
6- Some more packages
INSTALLATION
JDK
Installing the JDK is pretty tricky and stressful every time
First, download the JDK 6, which you can download here. Download the .bin file! (in this case my JDK has been downloaded in the ~/Download folder and my file is named jdk-6u45-linux-x64.bin)
Open up your terminal and type
Code:
$ sudo mkdir /usr/lib/jvm
$ cd ~/Downloads/
$ chmod +x jdk-6u45-linux-x64.bin
$ ./jdk-6u45-linux-x64.bin
$ sudo mv jdk1.6.0_45 /usr/lib/jvm/
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
$ java -version
Ok, if you did everything fine you should now have the JDK installed correctly ​
GIT
This is the easiest one
Code:
$ sudo apt-get install git
$ y
PYTHON
Download the 2.7.5 version or newer here
Code:
$ cd ~/Downloads/
$ tar -xzvf Python-2.7.5.tgz
$ cd Python-2.7.5/
$ ./configure
$ make
$ sudo make altinstall
GNU
You don't need this step, do this just if you want the latest version of GNU Make
Download the latest version here
Code:
$ cd ~/Downloads/
$ tar -zxvf make-3.82.tar.gz
$ cd make-3.82
$ ./configure
$ make
$ sudo make install
OTHER PACKAGES
These packages are needed to run many many android commands such as ADB and FASTBOOT (only 64-bit needs this)
Code:
$ sudo apt-get install ia32-libs
$ y
This will take about 20 mins especially if you have a slow processor or internet connection so relax and have a coffee :good:
If you're using Ubuntu 14.04 this won't work because that package isn't available anymore, so you just want to do these steps here
Code:
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
ANDROID SDK
This will be your best friend from now on
Download it here > download for other platforms > download the sdk tools only
Ok now i always create a Development folder where i put all the android development stuff (you can do whatever you think here)
Code:
$ mkdir ~/development
$ cd ~/Downloads
$ tar -zxvf android-sdk_r22.0.1-linux.tgz
$ mv ~/Downloads/android-sdk-linux ~/development/
Now you're ready to run the Android SDK ​
SETUP ADB/FASTBOOT
Open up the Android SDK by running this command
Code:
$ cd ~/development/android-sdk-linux/tools
$ ./android
At this point the SDK should come up and you will need to download at least all the tools and all the extras files, so select them and install'em.
When it finishes downloading everything you have to run this commands in another terminal
Code:
$ sudo gedit .bashrc
And you need to add at the end of it your SDK paths
Code:
#Android PATHS
export PATH=$PATH:~/development/android-sdk-linux/tools
export PATH=$PATH:~/development/android-sdk-linux/platform-tools
If you followed everything now adb and fastboot should work!
to check this you need to close all the terminals opened, reopen one and simply type
Code:
$ adb
$ fastboot
You should get a long list of possible commands if so you're done!​
FIXING NO PERMISSIONS ERROR
Probably, if you run
Code:
$ adb devices
or
$ fastboot devices
right now you'll get a strange output, something like this
Code:
???????? No permissions
In order to avoid this message we have to create a simple file
Code:
$ cd /tmp/
$ touch android.rules
$ nano android.rules
Now you have to paste this lines in that file and save it
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="17ef", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666"
Now you have to set the right permissions to this file, just type
Code:
$ sudo cp /tmp/android.rules /etc/udev/rules.d/51-android.rules
$ sudo chmod 644 /etc/udev/rules.d/51-android.rules
$ sudo chown root. /etc/udev/rules.d/51-android.rules
$ sudo service udev restart
$ sudo killall adb
​
SUGGESTED PROGRAMS
ECLIPSE
In the Android world you don't want to miss the Eclipse IDE which is the most used! This tool will help you develop android apps
You can download it here (download the classic one)
Code:
$ cd ~/Downloads
$ tar -zxvf eclipse-SDK-4.2.2-linux-gtk-x86_64.tar.gz
$ mv ~/Downloads/eclipse ~/development/
SETUP INFO
NOTE: If you download the entire ADT bundle provided by google you will get the SDK and Eclipse IDE together ​
ANDROID STUDIO (Recommended)
This is the new development IDE made in Google, personally i love it! We are now on version 8.6 BETA and I have to say that it's a really really good looking and powerful IDE. I would recommend to use this IDE because, over time, it will be the main Android IDE (rumors say that Google will stop developing ADT bundles so Eclipse won't be supported anymore and this will force you to switch to Android Studio).
You can download it from here
It has a lot of new features that Eclipse doesn't have and it could be useful in some cases
Code:
$ cd ~/Downloads
$ tar -zxvf android-studio-bundle-130.687321-linux.tgz
$ mv ~/Downloads/android-studio ~/development/
To run it you just need to navigate to its bin folder and type
Code:
$ ./studio.sh
If you don't want to type this everytime you can just create a shortcut for it by opening Android Studio and going into Configure > Create desktop entry That's it!​
hey nice guide !
I personally am a ubuntu 13.04 user
just one suggestion , you can add in your thread alternate way of downloading the whole ADT bundle and setting it up; so that separate installation of sdk eclipse adt plugin etc is not required
Sent from my GT-S5670 using xda premium
soham jambhekar said:
hey nice guide !
I personally am a ubuntu 13.04 user
just one suggestion , you can add in your thread alternate way of downloading the whole ADT bundle and setting it up; so that separate installation of sdk eclipse adt plugin etc is not required
Sent from my GT-S5670 using xda premium
Click to expand...
Click to collapse
that's right i'll add this later!
Was looking for something like this, good work:thumbup:
Sent from my C6603 using xda app-developers app
shoey63 said:
Was looking for something like this, good work:thumbup:
Sent from my C6603 using xda app-developers app
Click to expand...
Click to collapse
glad it helped let me know if everything works correctly
matt95 said:
glad it helped let me know if everything works correctly
Click to expand...
Click to collapse
Hi matt, thanks a ton for this great tutorial. I have followed all the steps mentioned here and i think adb and fastbook has been installed on my system Running the ./adb and ./fastboot commands bring up a list of command on the terminal.
Nw i have been trying to connect my phone to flash a boot.img, after i run "./adb devices" to check if the phone is connected it shows me this :
List of devices attached
???????????? no permissions
not sure if the device is connected do u knw what is causing this error ?
Being you have a path setup (per this guide) try typing either just
adb devices
or
fastboot devices
skip the ./ and see if it will work
I have got my device now connected in fastboot mode. Thanks again for this great tutorial. I am not a rom builder but a crazy flasher I skipped a few steps from the above tutorial to get fastboot and adb working on Ubuntu 13.04.
To install JDK:
Start by removing the openJDK if it exists already
Code:
sudo apt-get purge openjdk*
To install Java 8, do this
Add the PPA:
Code:
sudo add-apt-repository ppa:webupd8team/java
Update the repo index:
Code:
sudo apt-get update
Install Java 8:
Code:
sudo apt-get install oracle-java8-installer
Install GIT from the OP tutorial
Skip Python install
Skip GNU install
Skip ia32-libs install if you are using 32bit OS
Download the Android SDK from OP and install it as mentioned there.
Setup ADB/Fastboot as mentioned in the OP
Skip Suggested programs :cyclops:
Now connect your device in fastboot mode and type in terminal fastboot to check if your device is recognised, if you get
"fastboot not installed error"
Try
Code:
sudo apt-get install android-tools-adb android-tools-fastboot
connect device in fastboot and try :
Code:
sudo fastboot devices
Done
8yt3c0d3 said:
Hi matt, thanks a ton for this great tutorial. I have followed all the steps mentioned here and i think adb and fastbook has been installed on my system Running the ./adb and ./fastboot commands bring up a list of command on the terminal.
Nw i have been trying to connect my phone to flash a boot.img, after i run "./adb devices" to check if the phone is connected it shows me this :
List of devices attached
???????????? no permissions
not sure if the device is connected do u knw what is causing this error ?
Click to expand...
Click to collapse
actually i should write more to avoid that message :/ stay tuned! tonight i'll write how to solve that... sorry for making you wait
8yt3c0d3 said:
I have got my device now connected in fastboot mode. Thanks again for this great tutorial. I am not a rom builder but a crazy flasher I skipped a few steps from the above tutorial to get fastboot and adb working on Ubuntu 13.04.
To install JDK:
Start by removing the openJDK if it exists already
Code:
sudo apt-get purge openjdk*
To install Java 8, do this
Add the PPA:
Code:
sudo add-apt-repository ppa:webupd8team/java
Update the repo index:
Code:
sudo apt-get update
Install Java 8:
Code:
sudo apt-get install oracle-java8-installer
Install GIT from the OP tutorial
Skip Python install
Skip GNU install
Skip ia32-libs install if you are using 32bit OS
Download the Android SDK from OP and install it as mentioned there.
Setup ADB/Fastboot as mentioned in the OP
Skip Suggested programs :cyclops:
Now connect your device in fastboot mode and type in terminal fastboot to check if your device is recognised, if you get
"fastboot not installed error"
Try
Code:
sudo apt-get install android-tools-adb android-tools-fastboot
connect device in fastboot and try :
Code:
sudo fastboot devices
Done
Click to expand...
Click to collapse
yeah that works too but sometimes you may have some problem with that command and probably it won't work on every distro, while the manual installation always works
8yt3c0d3 said:
Hi matt, thanks a ton for this great tutorial. I have followed all the steps mentioned here and i think adb and fastbook has been installed on my system Running the ./adb and ./fastboot commands bring up a list of command on the terminal.
Nw i have been trying to connect my phone to flash a boot.img, after i run "./adb devices" to check if the phone is connected it shows me this :
List of devices attached
???????????? no permissions
not sure if the device is connected do u knw what is causing this error ?
Click to expand...
Click to collapse
you should run adb with root user
Code:
sudo adb devices
that should do the trick
Thanks!
Just registered on xda, starting with android development, this guide helped me a lot!! I am using Ubuntu 12.04.2 LTS though.
Thanks a lot!
vaibhav_vc said:
Just registered on xda, starting with android development, this guide helped me a lot!! I am using Ubuntu 12.04.2 LTS though.
Thanks a lot!
Click to expand...
Click to collapse
glad it helped if you get any issue ask here :good:
Hello and greetings to Verona. I love your region, very nice there!
Very good guide, sir! Used this to set up my first Linux/Ubuntu/Android environment! :good:
Some points/questions i have (as a long time windows user ):
matt95 said:
OTHER PACKAGES
These packages are needed to run many many android commands such as ADB and FASTBOOT
Code:
$ sudo apt-get install ia32-libs
$ y
Click to expand...
Click to collapse
These packages are only for 64bit i think?
Code:
$ cd ~/Downloads
$ tar -zxvf eclipse-SDK-4.2.2-linux-gtk-x86_64.tar.gz
[B][COLOR="Red"]$ mv ~/Downloads/ ~/development/[/COLOR][/B]
Click to expand...
Click to collapse
Is the red line correct, cause it moves the complete download folder to development?
And the most important thing for me as windows user:
I have now all importent things for development in ~/development/ folder.
Every time i have to go with terminal to the specific folder and execute the program:
Code:
cd ~/development/kitchen
./menu
cd ~/development/eclipse
./eclipse
cd ~/development/android-studio/bin
./studio.sh
cd ~/development/android-sdk-linux/tools
./android
Is it possible to make these programs executable like adb and fastboot?
What i mean is, open terminal, write ./menu and kitchen starts, without moving to the kitchen folder (like adb).
If yes, a step-by-step guide would be very appreciated!
Or any other way to start those programs on a easy way, like linked into Cairo Dock?
Thanks in advance and keep on rockin'!
old.splatterhand said:
Hello and greetings to Verona. I love your region, very nice there!
Very good guide, sir! Used this to set up my first Linux/Ubuntu/Android environment! :good:
Some points/questions i have (as a long time windows user ):
These packages are only for 64bit i think?
Is the red line correct, cause it moves the complete download folder to development?
And the most important thing for me as windows user:
I have now all importent things for development in ~/development/ folder.
Every time i have to go with terminal to the specific folder and execute the program:
Code:
cd ~/development/kitchen
./menu
cd ~/development/eclipse
./eclipse
cd ~/development/android-studio/bin
./studio.sh
cd ~/development/android-sdk-linux/tools
./android
Is it possible to make these programs executable like adb and fastboot?
What i mean is, open terminal, write ./menu and kitchen starts, without moving to the kitchen folder (like adb).
If yes, a step-by-step guide would be very appreciated!
Or any other way to start those programs on a easy way, like linked into Cairo Dock?
Thanks in advance and keep on rockin'!
Click to expand...
Click to collapse
Yes those packages are for the x64 desktops, i should have said that! :good:
The red highlighted command was wrong, now i've corrected it! thanks for reporting that
And last thing, if you want to run that commands as adb and fastboot you only have to add those commands' directories to the .bashrc
so open up the terminal and type
Code:
$ gedit .bashrc
and then you have to write down the directories
example (the menu command is in the ~/development/kitchen directory) you should write
Code:
#Personal PATHS(you can write what you want after the #)
export PATH=$PATH:~/development/kitchen
then hit save and that's all close all the terminals that are open and now you can launch the kitchen just by typing menu (you don't have to type ./ before it).
if you need help again just ask
Excellent guide
awesome :good: very good guide thanks a lot
bliizzz said:
awesome :good: very good guide thanks a lot
Click to expand...
Click to collapse
glad to help :highfive:
matt95 said:
And last thing, if you want to run that commands as adb and fastboot you only have to add those commands' directories to the .bashrc
so open up the terminal and type
Code:
$ gedit .bashrc
and then you have to write down the directories
example (the menu command is in the ~/development/kitchen directory) you should write
Code:
#Personal PATHS(you can write what you want after the #)
export PATH=$PATH:~/development/kitchen
then hit save and that's all close all the terminals that are open and now you can launch the kitchen just by typing menu (you don't have to type ./ before it).
Click to expand...
Click to collapse
First, thank you for your super-quick reply! :good:
Yes, i thought about that, adding those lines to ".bashrc". :laugh:
I did it already yesterday, but maybe i did something wrong, cause i tried to open kitchen in terminal with ./menu and it did not work. But maybe its because of ./
The .bashrc file don't need to be "updated" after saving (like for example grub, when editing the OS that starts first on dual boot)?
Anyway, i will have a look and post the result.
old.splatterhand said:
First, thank you for your super-quick reply! :good:
Yes, i thought about that, adding those lines to ".bashrc". :laugh:
I did it already yesterday, but maybe i did something wrong, cause i tried to open kitchen in terminal with ./menu and it did not work. But maybe its because of ./
The .bashrc file don't need to be "updated" after saving (like for example grub, when editing the OS that starts first on dual boot)?
Anyway, i will have a look and post the result.
Click to expand...
Click to collapse
when you add something to the .bashrc you do not have to type the ./ before the command and yes, it doesn't need to be updated, just save it and that's it
Ok, will take a look, when i booted it again.

Install ADB on Windows & ubuntu 12.04 or 12.10

If you need to flash ROM even using fastboot for Smartphone or Tablet in which they use Android OS! Then Ubuntu OS is needed!
This is a guide I made for ubuntu users and included a guide for windows users to setup Android SDK which contains ADB.
Android Debug Bridge (ADB) provides a terminal interface on your PC to interact with your device's file system. This can be useful for many things like installing & uninstalling apps, logcat, backup & restore, and hacking your device just to name a few.
ubuntu 12.04 & 12.10 Guide
1. Go here and download android-sdk (not the adt-bundle)....
https://hotfile.com/dl/241406263/5e6a306/android-sdk_r22.0.5-linux.tgz.html
2. Place the downloaded file in your home folder and then extract it and you should get a folder named android-sdk-linux (do not rename it).
3. If you’re on a 64bit machine run these commands in terminal to make sdk compatible with 64bit (if you’re on 32bit machine then skip this step)....
sudo apt-get update
sudo apt-get install ia32-libs-multiarch
4. Run this command in terminal to install jdk if you don’t have it already....
sudo apt-get install openjdk-6-jdk
5. Navigate to the home folder where you extracted android-sdk-linux and open the folder then open the folder named tools
6. Inside the tools folder there will be a file named android... double click it and select run then android sdk manager will open.
7. In the center pane deselect everything... Now only select the following....
Android SDK Tools
Android SDK Platform-tools
Android Support Library
8. Once selections have been made click on install packages and wait till finished.
9. Upon completion of step 8 in terminal run this command....
sudo gedit ~/.bashrc
When the file opens, go to the very bottom and copy/paste the following 3 lines (make sure they’re each on separate lines)....
# Android tools
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools
10. Now reboot your computer.
11. Set your phone to usb debugging then plug it to your pc after pc is done booting
12. Open a terminal on your pc and enter....
adb devices
If all went well, you should see your phone’s serial number and you’ll be ready to go.
~~~~~Important~~~~~
You can use steps 5 & 6 to open Android SDK Manager & update your ADB/SDK installation. Only select your installed packages then update.
Also if you only need the fastboot/adbtools:
sudo add-apt-repository -y ppa: phablet-team/tools
Note: delete the space after"-y ppa:" -xda creates smileys like ppa
sudo apt-get update
sudo apt-get install -y phablet-tools
Sent from my Nexus 4 using xda app-developers app
Thank...
gazhead said:
Also if you only need the fastboot/adbtools:
sudo add-apt-repository -y ppa: phablet-team/tools
Note: delete the space after"-y ppa:" -xda creates smileys like ppa
sudo apt-get update
sudo apt-get install -y phablet-tools
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Thanks man! It's also good way!
Followed this guide (thank you for posting) but couldn't connect. Scratched around and found I needed to create a new file in /etc/udev/rules.d with:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="<4-char_verndorID>", ATTR{idProduct}=="4-char_productID", MODE="0666", OWNER="username"
Followed by:
Code:
sudo restart udev
Then plugged device in and it worked!
qtoon said:
Followed this guide (thank you for posting) but couldn't connect. Scratched around and found I needed to create a new file in /etc/udev/rules.d with:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="<4-char_verndorID>", ATTR{idProduct}=="4-char_productID", MODE="0666", OWNER="username"
Followed by:
Code:
sudo restart udev
Then plugged device in and it worked!
Click to expand...
Click to collapse
What did you name the new file you created? Or did you add this string to another existing file from the rules.d directory? I'm not sure what I've done wrong, but I get
Code:
[email protected]:~$ adb devices
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'zdb' from package 'zfs-fuse' (universe)
Command 'kdb' from package 'elektra-bin' (universe)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'jdb' from package 'openjdk-7-jdk' (universe)
Command 'ab' from package 'apache2-utils' (main)
Command 'ad' from package 'netatalk' (universe)
adb: command not found
[email protected]:~$
This is after following each step, adding the three lines to the end of .bashrc and rebooting.
atmu5fear said:
What did you name the new file you created? Or did you add this string to another existing file from the rules.d directory? I'm not sure what I've done wrong, but I get
Code:
[email protected]:~$ adb devices
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'zdb' from package 'zfs-fuse' (universe)
Command 'kdb' from package 'elektra-bin' (universe)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'jdb' from package 'openjdk-7-jdk' (universe)
Command 'ab' from package 'apache2-utils' (main)
Command 'ad' from package 'netatalk' (universe)
adb: command not found
[email protected]:~$
This is after following each step, adding the three lines to the end of .bashrc and rebooting.
Click to expand...
Click to collapse
@atmu5fear, inferring that you're new to Linux (a common background for all), some notes:
Unlike wlth Win-d'oh-s, there is a worldwide development community that's always working toward improvement of every aspect of the system, including echoed messages and documentation. You may have to shake off the tendency to ignore Windudz messages, which are frequently unhelpful. Linux command echoes are much more on-target. Also, look for files such as README in rules.d and read it!
Now before creating a new config file (which may not be necessary on your system), see the top feedback line: "No command 'adb' found." First, see that the adb binary is present and that it has exec permission. (Since it's a small file and functions alone, I prefer to copy it to the folder I'm working from.)
If it then runs but won't connect, read on...
Directory (or "folder") names with a trailing '.d' are special: They configure, control, or provide executables for daemons (programs which run continuously, providing a service).
Within service-config.d folders, if the service steps through the files sequentially (as in this case), then it does so based on each filename. (True except for the special case of rc.d, iIRC, in which order is set by the special program rcorder).
So in this case, for example, since the existing files are named 70-whatever, your newly-created file could be 80-atmu5fears-phone to load after the others.
Should connect.
qtoon said:
@atmu5fear, inferring that you're new to Linux (a common background for all), some notes:
Unlike wlth Win-d'oh-s, there is a worldwide development community that's always working toward improvement of every aspect of the system, including echoed messages and documentation. You may have to shake off the tendency to ignore Windudz messages, which are frequently unhelpful. Linux command echoes are much more on-target. Also, look for files such as README in rules.d and read it!
Now before creating a new config file (which may not be necessary on your system), see the top feedback line: "No command 'adb' found." First, see that the adb binary is present and that it has exec permission. (Since it's a small file and functions alone, I prefer to copy it to the folder I'm working from.)
If it then runs but won't connect, read on...
Directory (or "folder") names with a trailing '.d' are special: They configure, control, or provide executables for daemons (programs which run continuously, providing a service).
Within service-config.d folders, if the service steps through the files sequentially (as in this case), then it does so based on each filename. (True except for the special case of rc.d, iIRC, in which order is set by the special program rcorder).
So in this case, for example, since the existing files are named 70-whatever, your newly-created file could be 80-atmu5fears-phone to load after the others.
Should connect.
Click to expand...
Click to collapse
Thanks @qtoon for the reply. I'm not really new to Ubuntu, albeit, it's been a while. First started using it just prior to the realease of Hardy Heron 8.04 LTS. That being said I am certainly no expert, but am somewhat familiar and comfortable with the command line. I did read the README file before posting, but since I'm not all that familiar with configuration files and the like, I figured maybe I should ask.
As per your suggestion i moved the ADB binary to my home folder, not necessarily my working folder, but to test to see if the adb command would be recognized in terminal.
Code:
mv ~/ADB/android-sdk-linux/platform-tools/adb ~/
Still got same result so I moved it back, then went on to make a new file and add the suggested string
Code:
sudo > /etc/udev/rules.d/80-atmu5fear-adb
sudo gedit /etc/udev/rules.d/80-atmu5fear-adb
After saving and restarting udev I still get the same "adb command not found" error.
I then changed the string to read OWNER"atmu5fear" instead of "username", still nothing
Any more suggestions?
Thanks
atmu5fear
Sorted it out
instead of:
adb devices
i needed to input:
./adb devices
It's listed, and in order to use the adb shell:
./adb shell
once in the shell all adb commands work
I get this error...
[email protected]:~$ sudo > /etc/udev/rules.d/80-sjy-phone
bash: /etc/udev/rules.d/80-sjy-phone: Permission denied
ok....... didn't need to add a file, changed phone usb mode to media device and all is ok.
thanks
atmu5fear said:
Sorted it out
instead of:
adb devices
i needed to input:
./adb devices
It's listed, and in order to use the adb shell:
./adb shell
once in the shell all adb commands work
Click to expand...
Click to collapse
Didn't think to mention that, apologies.
Quick 'why' on the ./ here.
Glad you got it running.
Just tried on 14.4 and worked like a charm.
Note: No need to reboot the computer, just reload the bash config with
Code:
source ~/.bashrc
Thanks
A good step by step guide
i will try it and see if it works
Thanks again
Hello, can someone help me ? - I m having problems connecting my device with adb (I ve connected several other devices before with no problems).
I ve got an Allwinner A20 tv box, it worked fine for a few months then one day, after being on (but idle) for a few hours, I noticed the screen was blank but the light on the front was blue (indicating it was on, red is standby). It would not respond to the remote control or to anything, so I unplugged it and since then it will not boot and the screen is blank, the red light will light up but that is it. I ve eliminated the remote controller not working, but I cant boot the device.
So I ve tried connecting via ADB (with Ubuntu) but I cant get the device to show up after typing "adb devices".
Using this guide:
http://androidonlinux.wordpress.com/2013/05/12/setting-up-adb-on-linux/
I can get the vendor id and device id and I ve added it and the manufacturer to udev/modeswitch devices, but when I type "sudo usb_modeswitch -v 0x1f3a -p 0xefe8 -S -R -W"
I get the following error:
~/Android/sdk/platform-tools$ sudo usb_modeswitch -v 0x1f3a -p 0xefe8 -S -R -W
Take all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.1.1 (C) Josua Dietze 2014
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x1f3a
DefaultProduct= 0xefe8
SierraMode=1
NeedResponse=0
Look for default devices ...
found USB ID 048d:1336
found USB ID 1d6b:0002
found USB ID 19a8:2036
found USB ID 1f3a:efe8
vendor ID matched
product ID matched
found USB ID 1d6b:0001
found USB ID 062a:0102
found USB ID 1d6b:0001
Found devices in default mode (1)
Access device 004 on bus 003
Current configuration number is 1
Use interface number 0
USB description data (for identification)
-------------------------
Manufacturer: not provided
Product: not provided
Serial No.: not provided
-------------------------
Send Sierra control message
Error: Sierra control message failed (error -7). Abort
I ve searched Google for the error code but I cannot find anything.
The device was rooted and USB debugging was on.
Any help would really be appreciated.
Thanks

GUIDE: connect OP3 with MTP on Linux (ubuntu)

I got my OP3 today and my laptop, running ElementaryOS (ubuntu based) didn't recognize the OP3 as MTP,
Here is a guide how to fix this, I based this guide on this guide for the OP2.
steps:
Do NOT connect your OP3 to your pc
run the command "lsusb" from your terminal
Connect your OP3 to your pc with original cable
run the command "lsusb" again
You will see a new device, my OP3 is called " Bus 001 Device 012: ID 05c6:900e Qualcomm, Inc. "
You see that it has an ID, in my case "05c6:900e".
the first value is the vendor-id, the second the product-id, you need those so write them down!
so in my case it's :
vendor id: 05c6
product id: 900e
Install the MTP drivers: "sudo apt-get install libmtp-dev mtpfs"
edit the following file with the command: "sudo gedit /lib/udev/rules.d/69-libmtp.rules"
if you don't have gedit installed use the command: "sudo nano /lib/udev/rules.d/69-libmtp.rules"
Add the following line to the file:
Code:
ATTR{idVendor}=="[COLOR="Blue"]vendor-id[/COLOR]", ATTR{idProduct}=="[COLOR="blue"]product-id[/COLOR]", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
make sure you change the blue values to your own values found in the step above.
safe the file
restart the service: "sudo service udev restart"
If you did it correct you will see a popup on your OP3, select "File Transfers (MTP)", select that and now you can transfer files between your OP3 and linux
I don't know if the vendor-id and/or product-id are always the same, if some people can confirm that then I will edit the post.
Hey, I got the same vendor id and product id as you did.
However, even after following the procedure step-by-step, I am unable to transfer files between my OP3 and my laptop running Ubuntu 12.04 LTS.
The OnePlus drivers folder gets loaded as a CD(though I'm connecting the phone using USB) when I change the "Use USB for" setting to "File Transfer(MTP)," and the file named "adb_config_Linux_OSX.sh" doesn't do anything when run in terminal either.
Could you help me out with this?
I run Ubuntu 16.04 and needed to install any drivers. simply connect op and I was able to access it.
Sent from my ONEPLUS A3003 using XDA-Developers mobile app
krankyvampire25 said:
Hey, I got the same vendor id and product id as you did.
However, even after following the procedure step-by-step, I am unable to transfer files between my OP3 and my laptop running Ubuntu 12.04 LTS.
The OnePlus drivers folder gets loaded as a CD(though I'm connecting the phone using USB) when I change the "Use USB for" setting to "File Transfer(MTP)," and the file named "adb_config_Linux_OSX.sh" doesn't do anything when run in terminal either.
Could you help me out with this?
Click to expand...
Click to collapse
update: In "设置" -"其他设置" - "内部设备和USB" - "USB计算机连接", select -- "File Transfers (MTP)", everything is ok.
14.04 can't transfer file. a folder cant write anything(not cd image folder).
hi....... i have a other problem with the same OS (Ubuntu 16.04)
MTP works
fastboot works
ADB DON'T !!!
do you know why ?????
ADB and fastboot are working at the same device with Win 10
OK, thanks, forget it, i found a file named "adb_config_Linux_OSX.sh" on the phone and run it...... now it works
ty, it worked after two reboots and a system update. btw, i have the OP3 soft gold with ID 2a70:f003
cheers!
washichi said:
I got my OP3 today and my laptop, running ElementaryOS (ubuntu based) didn't recognize the OP3 as MTP,
Here is a guide how to fix this, I based this guide on this guide for the OP2.
steps:
Do NOT connect your OP3 to your pc
run the command "lsusb" from your terminal
Connect your OP3 to your pc with original cable
run the command "lsusb" again
You will see a new device, my OP3 is called " Bus 001 Device 012: ID 05c6:900e Qualcomm, Inc. "
You see that it has an ID, in my case "05c6:900e".
the first value is the vendor-id, the second the product-id, you need those so write them down!
so in my case it's :
vendor id: 05c6
product id: 900e
Install the MTP drivers: "sudo apt-get install libmtp-dev mtpfs"
edit the following file with the command: "sudo gedit /lib/udev/rules.d/69-libmtp.rules"
if you don't have gedit installed use the command: "sudo nano /lib/udev/rules.d/69-libmtp.rules"
Add the following line to the file:
Code:
ATTR{idVendor}=="[COLOR="Blue"]vendor-id[/COLOR]", ATTR{idProduct}=="[COLOR="blue"]product-id[/COLOR]", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
make sure you change the blue values to your own values found in the step above.
safe the file
restart the service: "sudo service udev restart"
If you did it correct you will see a popup on your OP3, select "File Transfers (MTP)", select that and now you can transfer files between your OP3 and linux
I don't know if the vendor-id and/or product-id are always the same, if some people can confirm that then I will edit the post.
Click to expand...
Click to collapse
I just now happened upon this forum because my OP3 wasn't connecting for file transfers over USB. This worked like a charm for me; the vendor and product IDs were different (as I'm sure others have commented already), thank you for putting this out there, I definitely hit that 'thanks' button!!!!!!!
It's also possible to use this script (Vendor & Product id can differ).
Code:
#!/bin/sh
# adb configuration script
PATH=$PATH:/bin:/sbin:/usr/sbin
ANDROID_HOME=~/.android
ANDROID_CONFIG=~/.android/adb_usb.ini
CUST_VID="0x2a70"
if [ -e $ANDROID_HOME ] ; then
echo "android home is exist!"
else
echo "creat android home!"
mkdir $ANDROID_HOME
fi
grep $CUST_VID $ANDROID_CONFIG 2>/dev/null
if [ $? -eq 0 ] ; then
echo VID $CUST_VID is already configured..
echo "adb should be OK!"
exit 0
else
echo config adb ...
echo $CUST_VID >> $ANDROID_CONFIG
fi
adb kill-server
if [ $? -eq 0 ] ; then
echo "OK! You can use adb now!"
exit 0
else
echo "try sudo exec adb.."
sudo adb kill-server
if [ $? -eq 0 ] ; then
echo "OK! You can use adb now!"
exit 0
else
echo "Please do command \"adb kill-server\""
fi
fi
exit 0
Useful link: https://wiki.archlinux.org/index.php/android#Android_Debug_Bridge_.28ADB.29
Thanks a lot washichi It worked liked a charm on my OnePlus3T. Thanks a ton

Categories

Resources