[Q] How to install adb on linux??? (ubuntu) - G1 Q&A, Help & Troubleshooting

Hey guys im pretty good with adb, not many problems at all but ive recently ditched windows for a real os Ubuntu but im not super familiar with the commands and how to do this and that. Can someone hep me with setting up adb in Linux the guide posted is really rough for noobs to linux.

well if you using linux then you will be using terminal to type out the adb commands. once you installed adb into linux you can type adb /? and it will give you the list of commands. In most cases you have to use sudo when running adb commands, at least using sudo when starting the adb server.

no i have no problem using adb at all, i was asking how to install it i cant get it to run in the first place ?

you have to follow the steps for linux, they are mostly meant for ubuntu afaik. Download the special linux SDK, Eclipse etc. One thing you should do to make adb work is add your sdk/tools directory to linux's $PATH.
It should go something like this...
$ echo $PATH (should return the directories associated with $PATH)
$ export PATH=$PATH:/home/user/sdk/tools (replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH (you should now see your tools directory added to the end of the $PATH variable)
$ adb devices (now adb should do something, if nothing else at least error, no devices)
Is this what you were looking for? or some other issue..

sonikamd said:
you have to follow the steps for linux, they are mostly meant for ubuntu afaik. Download the special linux SDK, Eclipse etc. One thing you should do to make adb work is add your sdk/tools directory to linux's $PATH.
It should go something like this...
$ echo $PATH (should return the directories associated with $PATH)
$ export PATH=$PATH:/home/user/sdk/tools (replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH (you should now see your tools directory added to the end of the $PATH variable)
$ adb devices (now adb should do something, if nothing else at least error, no devices)
Is this what you were looking for? or some other issue..
Click to expand...
Click to collapse
thank you you are officially great

jamizzal said:
thank you you are officially great
Click to expand...
Click to collapse
Just to expand on that a little, when you adb start-server you will need to sudo, IIRC on ubuntu root is only enable to connect to USB.
Eg
Code:
sudo adb start-server
adb devices
adb logcat

NPerry said:
Just to expand on that a little, when you adb start-server you will need to sudo, IIRC on ubuntu root is only enable to connect to USB.
Eg
Code:
sudo adb start-server
adb devices
adb logcat
Click to expand...
Click to collapse
thank you i was wondering why i could not find my device

sonikamd said:
you have to follow the steps for linux, they are mostly meant for ubuntu afaik. Download the special linux SDK, Eclipse etc. One thing you should do to make adb work is add your sdk/tools directory to linux's $PATH.
It should go something like this...
$ echo $PATH (should return the directories associated with $PATH)
$ export PATH=$PATH:/home/user/sdk/tools (replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH (you should now see your tools directory added to the end of the $PATH variable)
$ adb devices (now adb should do something, if nothing else at least error, no devices)
Is this what you were looking for? or some other issue..
Click to expand...
Click to collapse
Thank youu a lot! It's working with this but everytime I am rebooting Ubunutu 9.04 I have to type in these commands again to get adb...
what can I do?

you have to put this command in your .bashrc file
$ sudo gedit ~/.bashrc
then you need to enter your password
in the file you just need to add that command at the end :
PATH=$PATH:/SDK_PATH/tools/
export PATH
SDK_PATH.. you need to put your path .. something like ~/android-sdk-linux/
then you need to reboot to see if it works ;-)
enjoy !

how do you
install apps on the virtual device?????????

This is how I did it on my machine:
1. Download this zip file
2. Extract the file and copy both files to /usr/bin/
3. In the terminal type lsusb and copy first 4 ID symbols for High Tech Computer Corp
4. In the terminal type sudo gedit /etc/udev/rules.d/51-android.rules and paste the following SUBSYSTEM=="usb",ATTRS(idVendor)=="0bb4",SYMLINK+="android_adb",MODE="0666" where the bold symbols are taken from step #3.
5. Save and close everything. Unplug your device and plug it back again. ADB should now work as supposed.

Thanks for this easy instruction and for the files Karolis. Everything works fine on Ubuntu 10.10 x64

Karolis said:
4. In the terminal type sudo gedit /etc/udev/rules.d/51-android.rules and paste the following SUBSYSTEM=="usb",ATTRS(idVendor)=="0bb4",SYMLINK+="android_adb",MODE="0666" where the bold symbols are taken from step #3.
Click to expand...
Click to collapse
Just in case anyone else runs across this, in Suse 11.3 I needed to replace the brackets around idVendor with curly braces.
Code:
SUBSYSTEM=="usb",ATTRS{idVendor}=="04e8",SYMLINK+="android_adb",MODE="0666"
Even after that, I don't seem to get any devices in adb
Code:
# adb devices
List of devices attached
Here is /var/log/messages when plugging the device in
Code:
Apr 8 16:40:38 vaio kernel: [362518.911578] usb 2-1.1: new high speed USB device using ehci_hcd and address 9
Apr 8 16:40:38 vaio kernel: [362518.997898] usb 2-1.1: New USB device found, idVendor=04e8, idProduct=681c
Apr 8 16:40:38 vaio kernel: [362518.997905] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 8 16:40:38 vaio kernel: [362518.997910] usb 2-1.1: Product: SAMSUNG_Android
Apr 8 16:40:38 vaio kernel: [362518.997914] usb 2-1.1: Manufacturer: SAMSUNG
Apr 8 16:40:38 vaio kernel: [362518.997918] usb 2-1.1: SerialNumber: 3030610AA1A700EC
Apr 8 16:40:38 vaio kernel: [362519.007324] cdc_acm 2-1.1:1.0: This device cannot do calls on its own. It is not a modem.
Apr 8 16:40:38 vaio kernel: [362519.007426] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
Apr 8 16:40:38 vaio kernel: [362519.016244] scsi11 : usb-storage 2-1.1:1.2
Apr 8 16:40:38 vaio modem-manager: (ttyACM0) opening serial device...
Apr 8 16:40:38 vaio modem-manager: (ttyACM0): probe requested by plugin 'Generic'
Apr 8 16:40:39 vaio kernel: [362520.016848] scsi 11:0:0:0: Direct-Access Android UMS Composite 0001 PQ: 0 ANSI: 2
Apr 8 16:40:39 vaio kernel: [362520.017149] sd 11:0:0:0: Attached scsi generic sg2 type 0
Apr 8 16:40:39 vaio kernel: [362520.021880] scsi 11:0:0:1: Direct-Access Android UMS Composite 0001 PQ: 0 ANSI: 2
Apr 8 16:40:39 vaio kernel: [362520.022034] sd 11:0:0:1: Attached scsi generic sg3 type 0
Apr 8 16:40:39 vaio kernel: [362520.026214] sd 11:0:0:0: [sdc] Attached SCSI removable disk
Apr 8 16:40:39 vaio kernel: [362520.027091] sd 11:0:0:1: [sdd] Attached SCSI removable disk
Apr 8 16:40:42 vaio modem-manager: (ttyACM0) closing serial device...
Apr 8 16:40:42 vaio modem-manager: (Generic): GSM modem /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1 claimed port ttyACM0
Apr 8 16:40:42 vaio modem-manager: Added modem /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1
Apr 8 16:40:42 vaio modem-manager: Exported modem /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1 as /org/freedesktop/ModemManager/Modems/5
ls -al /dev/android_adb before plugging phone in
Code:
# ls -al /dev/android_adb
ls: cannot access /dev/android_adb: No such file or directory
and after
Code:
ls -al /dev/android_adb
lrwxrwxrwx 1 root root 15 2011-04-08 16:35 /dev/android_adb -> bus/usb/002/008
Am I doing something wrong?

i did all thing but it stiil dont show this first in terminal
Code:
$ echo $PATH (should return the directories associated with $PATH)
$ export PATH=$PATH:/home/user/sdk/tools (replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH (you should now see your tools directory added to the end of the $PATH variable)
thanks.

koala996 said:
you have to put this command in your .bashrc file
$ sudo gedit ~/.bashrc
then you need to enter your password
in the file you just need to add that command at the end :
PATH=$PATH:/SDK_PATH/tools/
export PATH
SDK_PATH.. you need to put your path .. something like ~/android-sdk-linux/
then you need to reboot to see if it works ;-)
enjoy !
Click to expand...
Click to collapse
Thanks bud, this helped me out.. Recently installed Ubuntu back on my machine and could not remember for the life of me how to do this lol. So, thanks again.

Hi My name is abbas, I followed the procedure to set the path in ubuntu for adb, however after setting the path: when I typed
$adb
the response was:
$ error while loading shared libraries: libncurses.so.5: wrong ELF class: CLASS64

Can someone help me, i'm using both Windows and Linux Ubuntu 11.10 OS, and i did manage to get adb to work on Windows, but now i prefer Linux and i can't manage adb to work. Downloaded sdk, proprietary platform etc. . . Exported path, installed lsusb-1.0.8, edited rules and inserted rules for Sony Ericsson etc. But when i type $ sudo adb start-server (then i type my password) it says that command is unknown. " sudo: adb: command not found " so my question is what the f**k i'm doing wrong?
EDIT: Changed location of sdk folder, eclipse. . . And it worked, tnx anyway. . .

sonikamd said:
you have to follow the steps for linux, they are mostly meant for ubuntu afaik. Download the special linux SDK, Eclipse etc. One thing you should do to make adb work is add your sdk/tools directory to linux's $PATH.
It should go something like this...
$ echo $PATH (should return the directories associated with $PATH)
$ export PATH=$PATH:/home/user/sdk/tools (replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH (you should now see your tools directory added to the end of the $PATH variable)
$ adb devices (now adb should do something, if nothing else at least error, no devices)
Is this what you were looking for? or some other issue..
Click to expand...
Click to collapse
Thanks alot!

Related

[GUIDE] ADB For Beginners (Setup, Use, and More!)

Hello All!
After much frustration with setting up ADB i finally got it working. Everyone said its simple and takes minimal knowledge but when things dont work, nothing really worked. Anyways after 2 hours of research trying to get ADB to work i finally got it all working and wanted to share my knowledge to anyone else that needed help.
This Guide is for windows only. If you are using Mac OS X please go here: ADB For Dummies
If you are using Linux please go here: [HOW-TO]Set up Android SDK/ADB/Fastboot on Ubuntu Linux
Like My Guide(s)? Donate
--------------------------------------------------------------------------
Things you need:
Android SDK - Download
Winrar - Download (32bit) Download (64bit)
Windows PC
USB Cable
A Rooted HTC Dream (Google G1)
--------------------------------------------------------------------------
Setting up the Android SDK
Download the file from above
Unzip to your desktop
Take the "android-sdk-windows" folder and move it to the root of your hard drive (C:\)
Right click on My Computer and click properties
Select the Advanced Tab or Advanced System Setting (Vista/Windows 7)
Select Environment Variables...
Press New
For Variable Name type: adb
For Variable Value type: C:\android-sdk-windows\tools
Now, [Get new sdk (1.5r3) to work]
1. Run SDK Setup.exe
2. If it gives you an error go to settings and click on "Force http//....."
3. Select all options and let it download and install
If you cant get the setup to work, Download the USB-DRIVERS folder - HERE (Windows XP/Vista/Windows 7)
--------------------------------------------------------------------------
Preparing your phone for ADB
Go to Settings on your phone
Select Applications
Select Development
Make sure 'USB Debugging' is checked
--------------------------------------------------------------------------
Installing Drivers
Plug in your phone through USB and DO NOT MOUNT IT!!!!!
Your computer should see a new device and try to install Android 1.0 driver (If it doesnt, scroll down to the "Im not getting a notification of Android ADB when i plug in my USB" section)
Let it load
Once it cant find them select "Install drivers from my pc"
The drivers you need are in the Android SDK 1.5r2 folder (C:\android-sdk-windows\usb_driver)
Depending on your OS pick x86 or amd64
You ADB Android Device should now be installed! Good Job
For Android SDK 1.5r3+
1. Run SDK Setup.exe
2. If it gives you an error go to settings and click on "Force http//....."
3. Select all options and let it download and install
If you cant get the setup to work, Download the USB-DRIVERS folder - HERE (Windows XP/Vista/Windows 7)
--------------------------------------------------------------------------
Check if your phone is detected by ADB
Open up Command Prompt (Go to run, type in cmd, press enter)
Type in
Code:
cd C:\android-sdk-windows\tools === Press Enter
adb devices === You should see your device listed
adb shell === you should see # in the next line
Now you are all set to run adb commands
Note: for a list of commands type in 'adb' in cmd
CONGRATS YOU NOW HAVE ADB FULLY RUNNING!
--------------------------------------------------------------------------
Droid Explorer by Camalot
Droid Explorer is a Windows software that will download, install, and setup the android SDK for you all in under a minute so you are ready to go. I use this on a daily basis. This amazing piece of software has tons of plugins and a built in file explorer for all your files on your phone! All you gotta do is download, install, and go!
Download Droid Explorer - Here
Install the program, and let it setup the SDK files for you
Connect your phone
Enjoy!
--------------------------------------------------------------------------
"Im not getting a notification of Android ADB when i plug in my USB"
Why: Your computer has detected your phone but as a protable device and as a storage device.
Fix: This took me a lot of research and time to figure out so this is what your are going to do.
First download USBDeview - Here
Unzip it
Run USBDeview.exe as Administrator
You will see all drivers being used on your computer
Highlight and Uninstall all drivers with the description have HTC Android (Should be 3 of them)
Right Click on the driver and press uninstall
Once done, Unplug your phone and plug it back in
You should now get the notification of the ADB device
Follow the steps above to install the drivers
--------------------------------------------------------------------------
When Typing just adb in cmd you will get whats called a "usage doc" which gives you a lits of commands that you can use:
Code:
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> <local> - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] <file> - push this package file to the device and instal
l it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb root - restarts adb with root permissions
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PDP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
--------------------------------------------------------------------------
Commands that you should know
adb push - Insert file to phone such as Stock.apk to /data/app_s
Code:
adb push <pathtofile.apk> <file system location> - Example: adb push c:\app.apk /data/app
adb pull - Remove file from phone such as Stock.apk from /data/app_s
Code:
adb pull <pathtofile.apk> - Example: adb pull /data/app_s/Stock.apk
adb install - Install app to phone
Code:
adb install <path to file> - Example: adb install c:/apps/apps2sd.apk
adb uninstall - Uninstall app from phone
Code:
adb uninstall <name of application> - Example: adb uninstall linda.apk
For more ADB Commands go - Here
--------------------------------------------------------------------------
Thats it for ADB! Congrats and if you have any questions please ask me or if anything is missing or not correct please tell me. I got all of this from research and personal experience.
-------bump------
Good guide, pretty simple... Ill bookmark this, so I can send people that needs help here.
i have attached a zip that has the files i use to get basic use like for doing root to stock to upgrading 2.1-2.2 and other small things.
extract to C:\fastboot
in C:\fastboot you will find a "cmd" batch file. just run it and it should be ready for you to type in adb commands or fastboot. just make sure your in debug mode by doing all in the first post for installing drivers and all that.
U seriously bumped this thread? Lmfao
help?
i was trying adb and i got!
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
K:\>adb devices
List of devices attached
HT07YHL02294 offline
HT07YHL02294 device
K:\>adb remount
error: more than one device and emulator
Click to expand...
Click to collapse
ADB
i have this message Permission Denied what should i do?
thank you D200P13 soo much. i got it working thanks to your files
X10 adb issues
Can't get it to work for my X10.
ADB does not see my X10 when connected, have tried all mentioned above several times, no luck.
USB drivers seem not to install.
Do i need something special for my X10 to connect via ADB ?
p2dewit said:
Can't get it to work for my X10.
ADB does not see my X10 when connected, have tried all mentioned above several times, no luck.
USB drivers seem not to install.
Do i need something special for my X10 to connect via ADB ?
Click to expand...
Click to collapse
Turn telephone i debug mode.
when i type adb it says that it's an unrecognized command.
That's because you haven't navigated to the folder where the adb file is located...
Sent from my Nexus One using XDA App
danger-rat said:
That's because you haven't navigated to the folder where the adb file is located...
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Isn't it in the android-sdk-windows folder?
EDIT
nvm found it. it's in another folder....thanks
when i run adb shell, it doesn't give me a # it gives me $. what do i do?
What are you trying to do?
Sent from my Nexus One using XDA App
Trying to flash a rom on my phone (x10) and was making sure adb is working properly before i do anything. When flashing the new rom there's some bugs that require adb to fix. From my understanding "$" means i don't have su access. Thanks for the help btw. Sorry for bothering you. Just taking proper precautions.
EDIT
Sorry again. Found my answer. I forgot to unlock my device to accept superuser permissions. Thanks for your help
to check ur phone is detected by adb....
i type "adb shell" in cmd,and according 2 u i should show #.....but it shows $ to me......why?
To check connection, type "adb devices"
"adb shell" will allow you to work remotely on your device. If the $ doesn't change to #, then you don't have root access.
Sent from my Nexus One using XDA App
If your just trying to set up adb to riot your device, I put this together to make things much easier...
http://www.nexusoneforum.net/forum/...mple-sdk-setup-manual-root-guide-windows.html
Sent from my Nexus One using XDA App
Where is the Mac Specific version. Everything you posted is for windows mate!

[Q] help w jb root

all is good until the last step whats going on?
[email protected]:/tmp/share$ tar xvf motoshare.tgz
adb
busybox
pwn
su
Superuser.apk
[email protected]:/tmp/share$ sudo chown root:root pwn
[email protected]:/tmp/share$ sudo chmod 6755 pwn
[email protected]:/tmp/share$ /tmp/share/adb shell /storage/rfs0/pwn
bash: /tmp/share/adb: No such file or directory
[email protected]:/tmp/share$
Please give me the response for the terminal command:
ls -l /tmp/share/adb
re jb root
[email protected]:/tmp/share$ ls -l /tmp/share/adb
-rwsr-sr-x 1 jody jody 204436 Feb 11 11:49 /tmp/share/adb
jodybgoode said:
[email protected]:/tmp/share$ ls -l /tmp/share/adb
-rwsr-sr-x 1 jody jody 204436 Feb 11 11:49 /tmp/share/adb
Click to expand...
Click to collapse
I will get back to you after I talk with Dan. Unless another set of eyes knows the solution.
Sent from my MB886 using xda app-developers app
Try running the last command as simply "adb shell /storage/rfs0/pwn"
(i.e. without the prefix /tmp/share/)
Help confused
djrbliss said:
As promised, this post describes how to root the Atrix HD Jelly Bean build. This should also work on other Motorola 4.1.2 builds (Razr/Razr Maxx, Razr HD, Razr M, etc.).
The exploit requires setting up a special Samba share and mounting this share on your phone using the File Manager app. I apologize that this process may seem involved for some of you, and request that members of this community help each other out if some of you are having problems completing the procedure. I'm not able to provide individual tech support to every user who wants to root this phone.
The following instructions require a working Linux installation. The following instructions are for Ubuntu. If you don't want to install Ubuntu permanently on your machine, I suggest using a LiveCD installation. Instructions on setting this up are described here:
https://help.ubuntu.com/community/LiveCD#How-To_LiveCD_Ubuntu
Once you're booted into Ubuntu, open a terminal. Create a new directory for your Samba share:
Code:
mkdir /tmp/share
Next, install the samba package:
Code:
sudo apt-get install samba
Edit the configuration file for samba:
Code:
sudo gedit /etc/samba/smb.conf
Add the following lines to the end of the configuration file and save your changes:
Code:
[share]
path = /tmp/share
available = yes
valid users = guest
read only = yes
browsable = yes
public = yes
Close the text editor once you've saved your changes.
Next, create a user for the Samba share by typing in the terminal:
Code:
sudo useradd guest -m -G users
Set a password for the new user. Remember this password:
Code:
sudo passwd guest
Provide a password here and press enter. You won't see the characters you're typing, so be careful.
Next, set a password on the share. Use the same password you just provided:
Code:
sudo smbpasswd -a guest
Type the password you created before and press enter.
Next, restart the Samba server:
Code:
sudo restart smbd
Finally, download and prepare the required files to the Samba share:
Code:
cd /tmp/share
wget [url]http://vulnfactory.org/public/motoshare.tgz[/url]
tar xvf motoshare.tgz
sudo chown root:root pwn
sudo chmod 6755 pwn
At this point, you'll need to know the IP address of your Linux host, which you can get by running "ifconfig" from your terminal (it should be of the form "192.168.x.x").
Next, move over to your Android device. Ensure you have enabled USB Debugging Mode (under Settings -> Development Settings). Ensure your device is connected via Wifi.
Open the "File Manager" app, and select "Remote storage". Click "Add storage", and fill in fields as follows:
Code:
Host IP address: [your Linux machine's IP address]
Domain name: WORKGROUP
Shared folder name: share
User: guest
Password: [the password you created above]
At this point, the phone will mount your Linux share. To complete the process, plug in your phone via USB to your Linux machine, and type the following in your Linux terminal:
Code:
sudo /tmp/share/adb kill-server
sudo /tmp/share/adb shell /storage/rfs0/pwn
If it's successful, this should print "[+] Rooting complete!".
Finally, install Supersu by typing the following in the terminal:
Code:
sudo /tmp/share/adb install /tmp/share/eu.chainfire.supersu.apk
Congratulations, enjoy your rooted device.
I can't stress this enough: I can't provide individualized tech support for everyone on this forum. Please help each other.
TTLayland has been successfully rooted using this technique and has volunteered to help. If you get stuck and can't find support on these forums, feel free to email him at ttlayland (at) gmail (dot) com.
Paypal:
http://goo.gl/zBGb0
Click to expand...
Click to collapse
Got this error:
[email protected]:/tmp/share$ sudo /tmp/share/adb shell /storage/rfs0/pwn
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
mount: Operation not permitted
sh: can't create /system/xbin/busybox: Read-only file system
Unable to chmod /system/xbin/busybox: No such file or directory
sh: busybox: not found
cp: /system/bin/su: Read-only file system
Unable to chown /system/bin/su: No such file or directory
Unable to chmod /system/bin/su: No such file or directory
link failed Read-only file system
[+] Rooting complete!
[email protected]:/tmp/share$
Then it says: "There is no SU binary installed, and SuperSU cannot install it. This is a problem!" when opening SuperSU
PLEASE HELP HERE OR MY EMAIL! : [email protected]
Thanks in advanced
progrockguy said:
Try running the last command as simply "adb shell /storage/rfs0/pwn"
(i.e. without the prefix /tmp/share/)
Click to expand...
Click to collapse
progrockguy said:
Try running the last command as simply "adb shell /storage/rfs0/pwn"
(i.e. without the prefix /tmp/share/)
Click to expand...
Click to collapse
that worked kinda. well it says rooting complete but when i update superuser or root checker says root fail
Please Help: error: device offline
I am getting the following error
[email protected]:/tmp/share$ sudo /tmp/share/adb kill-server
[email protected]:/tmp/share$ sudo /tmp/share/adb shell /storage/rfs0/pwn
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: device offline
[email protected]:/tmp/share$
I am running the LiveCD in VMware Workstation
Sorry for the duplicate posts
worked perfectly after i used a 32 bit live disk
jodybgoode said:
worked perfectly after i used a 32 bit live disk[/QUOTE
Did you use Ubuntu and which version?
do you have a link to the CD?
Did you boot a machine or you used VMware or Virtualbox?
Click to expand...
Click to collapse
Why would anyone even attempt to use a VM for this simple root method? You could've been rooted already if you had just followed the instructions.
Same problem here. I couldn't get past the adb kill-server command. It would tell me there is no such directory. If any one can get past this can someone please tell me what they did to get past it.
Black_halo said:
Same problem here. I couldn't get past the adb kill-server command. It would tell me there is no such directory. If any one can get past this can someone please tell me what they did to get past it.
Click to expand...
Click to collapse
I am stuck, I have tried so many machine to no luck
Please someone help
Start over and just copy and paste each single line and hit enter do not copy multiple code lines .
ATRIX HD running BATAKANG 1.10
sickkside13 said:
Start over and just copy and paste each single line and hit enter do not copy multiple code lines .
ATRIX HD running BATAKANG 1.10
Click to expand...
Click to collapse
I did, no luck
Dammz man idk what else to tell you yesterday i spend all day trying to root too but just when i was about to give up i got everything g working
ATRIX HD running BATAKANG 1.10
sickkside13 said:
Dammz man idk what else to tell you yesterday i spend all day trying to root too but just when i was about to give up i got everything g working
ATRIX HD running BATAKANG 1.10
Click to expand...
Click to collapse
hehehehe
Does the root method have anything to do with having android sdk and ndk on your system? Im thinking thats what it is now. Would i have to have linux sdk to run with terminal root or windows sdk?
Black_halo said:
Does the root method have anything to do with having android sdk and ndk on your system? Im thinking thats what it is now. Would i have to have linux sdk to run with terminal root or windows sdk?
Click to expand...
Click to collapse
No, you don't need the Android SDK/NDK, since I included a copy of ADB in the tarball file that you extracted to /tmp/share.
What's the output of "ls -l /tmp/share/adb" on your Linux machine?
I had to re-flash official JB firmware in RSD Lite before the exploit would work. Before that, the Exploit would return "Root Complete", but there was no root access (though I could su to # in adb). I run Ubuntu 12.04 x64 at work already with Windows in VirtualBox.
RSD Lite doesn't seem to want to complete a flash in the Windows VMs I run in VirtualBox at work, so I waited until I got home and used my Windows 8 Pro machine to RSD the phone with the official JB firmware. I run Ubuntu 12.04 in a VirtualBox on that machine already, so after the RSD flash, I ran the exploit from that VM - BINGO - worked on the first try.
Failing other options, you might want to try re-flashing JB in RSD Lite and running the exploit on a fresh device.
I used the firmware in this thread (To fix the issue the thread is about):
http://forum.xda-developers.com/showthread.php?t=2057078
If you decide to try that, Be SURE to get the firmware zip AND THE XML and replace the XML before flashing!!

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

How to set up Android SDK in Linux

*If you find this Guide Thread helpful, feel free to hit the "thanks" button below!
I'm doing this guide because when I switched to arch linux ,I found no guides to setup sdk in it.Arch is a beautiful OS, but for newcomers like me ,I took some time to get used to it.So,In this guide, we’ll take a look at how to set up a development environment for Android in Arch linux(or Arch based Linux Distros) so you can start working on your Projects.Most of the Arch Linux are pro linux users so there is really no need of this guide, but this guide is meant for those who are switching from ubuntu/mint/fedora/any other disto which are not based on Arch, to say it in short its meant for new users of Arch Linux. Anyway Let's set up.
First let's set see how to install Platform tools.
Setting up platform-tools in UBUNTU(or Ubuntu based distros/Linux Mint)
In ubuntu platform tools can be setup very easily.
1.Open terminal(Default shortcut is ctrl+alt+T)
2. Type "sudo apt-get install android-tools-adb" (this will install the adb)
3. Type "sudo apt-get install android-tools-fastboot"(this will install the fastboot)
Step 4: Check whether the above tools are working by typing an adb command. For e.g. "adb devices"
Now its time to install SDK in Ubuntu and set it up but before that let me tell you there is already a great thread by matt95.You can see the guide and thank him herehttp://forum.xda-developers.com/showthread.php?t=2302780
Fedora/CentOS/RedHat
First lets install Eclipse[You can also use Android Studio if you want]
Code:
sudo yum install eclipse-jdt
Now lets download the sdk from here. http://developer.android.com/sdk/index.html. Its about 500mb , Just wait and let it downlaod. Once the download is done extract it wherever you want.
For newcomers I recommend to extract it to 'home'.So the file is now extracted inside /home/user/AndroidSDK .
Now lets setup .bash_profile file so that we can access adb anywhere or else you have to type the whole location again use the adb command which is lot of work . So let's shorten it up.
Type "sudo vim .bash_profile"in terminal.
Code:
PATH=$PATH:$HOME/AndroidSDK:$HOME/AndroidSDK/tools
export PATH
# For SDK version r_08 and higher, also add this for adb:
PATH=$PATH:$HOME/AndroidSDK/platform-tools
export PATH
Now lets install android plugin for eclipse.
Open Eclipse and click on Help.Select Install New Software. Then click Add, at the top right of that window. Type in Android Plugin for the name and https://dl-ssl.google.com/android/eclipse/ for the address.
Once this is done, click on the Available Software Sites hyperlink below the Add button, then highlight the Android Plugin source and click on Reload. Now exit this window, and choose Android Plugin from the “Work with” dropdown menu. Choose the developer tools option that you see here and Proceed with the installation.
After the installation configure your Android virtual devices.
ARCH LINUX(or Arch based Distros)
Lets install android sdk
Open terminal and type
Code:
wget https://aur.archlinux.org/packages/an/android-sdk/android-sdk.tar.gz
Note:- If terminal shows wget is not found. Type this in the terminal
Code:
pacman -Suy && pacman -S wget
Once it fetches the tarball, lets extract it by typing
Code:
tar -xvzf android-sdk.tar.gz
wait for it to finish. Change the directory to android-sdk by using the command
Code:
cd android-sdk
.
Now lets make the package by using the command
Code:
makepkg -s
now lets install it by typing
Code:
sudo pacman -U *.pkg.tar.xz
Platform tools for Arch
Let's install platform-tools now.Just like above steps ,well get a package and install it.
1. Type
Code:
wget https://aur.archlinux.org/packages/an/android-sdk-platform-tools/android-sdk-platform-tools.tar.gz
2.Type
Code:
tar -xvzf android-sdk-platform-tools.tar.gz
3.Change directory.
Code:
cd android-sdk-platform-tools
4.
Code:
makepkg -s
5.Install it
Code:
sudo pacman -U *.pkg.tar.xz
All the files are installed in /opt/android-sdk/ . Just like we had .bash_profile in FEDORA, we use symbolic links in Arch linux to use commands from anywhere .
Code:
sudo ln -s /opt/android-sdk/platform-tools/adb /usr/bin/adb //this one's for adb
sudo ln -s /opt/android-sdk/platform-tools/fastboot /usr/bin/fastboot //This one's for Fastboot
sudo ln -s /opt/android-sdk/tools/ddms /usr/bin/ddms //This is for DDMS
sudo ln -s /opt/android-sdk/tools/android /usr/bin/android //This is for Android
Now run android by typing "android" in terminal. :good:
Simple as that. If you are yet to switch to Arch linux then I recommened you to use "BBQLinux " its an Arch linux for Android developers. It comes with most of the things needed for android development. You can download it from Here.
Thanks for reading this. Help me by giving me e-books.:angel:
PM me or post here if you have any doubts. :victory:
Install an aur wrapper like pacaur .
pacaur -S android-sdk android-studio android-udev android-platform-tools
Done
Sent from my Nexus 5
Pirateghost said:
Install an aur wrapper like pacaur .
pacaur -S android-sdk android-studio android-udev android-platform-tools
Done
Sent from my Nexus 5
Click to expand...
Click to collapse
Thanks for the reply, I havent tried pacaur repository though. Will give it a try soon.:good:
sorry, I made an error:
Code:
pacaur -S android-sdk android-sdk-platform-tools android-udev android-studio android-sdk-build-tools
you dont need both platform and build tools, it looks like build-tools is more recent. if you want eclipse instead of android studio, just use 'eclipse-android' instead of android-studio

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