Now works on 32bit and 64bit Linux
Just a quick guide on how to configure Linux for file transfers using MTP. I wrote the instructions and config for Ubuntu Natty 32bit and 64bit, though the same process will work on other platforms - the only real difference being the package manager commands and possibly the config file locations.
The attached files are for the Galaxy Tab 10.1v but should work for the 10.1g / 10.1 as well. See the end of the post to learn how to modify this config to work for other devices.
How to configure for gMTP and other Media Sync tools
1) Install aptitude
Code:
sudo apt-get install aptitude
2) Install mtp-tools and mtpfs
Code:
sudo aptitude install mtpfs mtp-tools
3) Download the attached file ( View attachment 98-gtab.zip for 32bit Linux or View attachment 98-gtab.rules-AMD64.zip for 64bit Linux ) to your desktop.
4) Extract the 98-gtab.rules file to your desktop
5) Copy the rules file to /etc/udev/rules.d/
Code:
sudo cp ~/Desktop/98-gtab.rules /etc/udev/rules.d
6) Reboot
7) Connect your Tab
8) Run the following command to confirm it is working:
Code:
ls /dev | grep gtab
...which should return "gtab" if successful. If not, follow the "Modifying" guide below.
9) Download / install gMTP
Code:
sudo apt-get install gmtp
10) Open gMTP and select "connect" from the menu
11) Hit the thanks button
12) Go nuts!
Setting up for Automount (Optional, but recommended)
***You must have completed Steps 1-8 above before proceeding***
1) Edit your fstab file to add your gtab:
Code:
sudo gedit /etc/fstab
2) Add this to the end of the file:
Code:
#gtab
mtpfs /media/gtab fuse user,noauto,allow_other 0 0
3) Save and exit
4) Open fuse.conf for editing:
Code:
sudo gedit /etc/fuse.conf
5) Find the following line and remove the #
Code:
#user_allow_other
6) Save and exit
7) Open and edit the groups file:
Code:
sudo gedit /etc/group
8) Find the details for the group 'fuse' and append your username to the end of the line eg.
Code:
fuse:x:104:<YOUR USER NAME>
9) Save and exit
10) Create the folder to mount your Tab:
Code:
sudo mkdir /media/gtab
11) Take ownership of the folder:
Code:
sudo chown <YOUR USER NAME>:users /media/gtab
12) Reboot
13) Plug in your Tab.
14) Click on the Places menu and click gtab.
15) You're in business!
Modifying for other devices
If the above doesn't work immediately on the 10.1g / 10.1 (I have only tested on the 10.1v), you can easily edit the rules file to support your device.
1) Install lsusb
Code:
sudo apt-get install lsusb
2) Run lsusb
Code:
lsusb
3) Check the output of this command to find your device. The 10.1v is shown like this:
Code:
Bus 001 Device 010: ID 04e8:6860 Samsung Electronics Co., Ltd
4) Make a note of the Vendor and Product IDs. In the example above, the vendor ID is 04e8 and device ID is 6860 (note 04e8:6860 in the output).
5) Open the rules file for editing (if it's not already in /etc/udev/rules.d, copy it there now)
Code:
sudo gedit /etc/udev/rules.d/98-gtab.rules
6) Find this line:
Code:
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0666" SYMLINK+="gtab"
7) Replace the Vendor ID (04e8) and Product ID (6860) with the ones that you got from step 3 above.
8) Save and exit
9) Reboot
10) Follow step 7 onward in the first guide above
11) Hit the thanks button
If you modify it for a particular device, please post the contents of your new 'rules' file here.
32bit RULES FILE:
Code:
ACTION!="add", GOTO="gtab_rules_end"
SUBSYSTEM!="usb|usb_device", GOTO="gtab_usb_end"
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0666" SYMLINK+="gtab"
LABEL="gtab_usb_end"
LABEL="gtab_rules_end"
64bit RULES FILE:
Code:
ACTION!="add", GOTO="gtab_rules_end"
SUBSYSTEM!="usb|usb_device", GOTO="gtab_usb_end"
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0777" SYMLINK+="gtab"
LABEL="gtab_usb_end"
LABEL="gtab_rules_end"
Tested, walked through the steps to my friend (Skype ). Works 100% on Linux Mint too
Everything worked for me up to the GMTP part - I can grep through /dev and I can see the "gtab" device there. But GMTP insists "Detect: No raw devices found."
I'm still running Maverick, but I added the maverick-backports repo, which has gmtp, so I would think it would work.
This is a Samsung Galaxy Tab 10.1v (from Google I/O). Any ideas?
EDIT: I also tried the automounting option with FUSE. Attempts to cd into it with bash or open it from the Places menu in GNOME both give the message "Transport endpoint is not connected".
EDIT again:
OK, I disabled USB Debugging and now have a different set of problems. mtp-detect sees the device now, but the message upon running it is:
Code:
libmtp version: 1.0.3
Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Found 1 device(s):
04e8:6860 @ bus 2, dev 26
Attempting to connect device(s)
ignoring usb_claim_interface = -16ignoring usb_claim_interface = -22PTP_ERROR_IO: Trying again after re-initializing USB interface
inep: usb_get_endpoint_status(): Device or resource busy
outep: usb_get_endpoint_status(): Device or resource busy
usb_clear_halt() on IN endpoint: Device or resource busy
usb_clear_halt() on OUT endpoint: Device or resource busy
usb_clear_halt() on INTERRUPT endpoint: Device or resource busy
LIBMTP PANIC: Could not open session! (Return code 767)
Try to reset the device.
Unable to open raw device 0
OK.
Konklone said:
Everything worked for me up to the GMTP part - I can grep through /dev and I can see the "gtab" device there. But GMTP insists "Detect: No raw devices found."
I'm still running Maverick, but I added the maverick-backports repo, which has gmtp, so I would think it would work.
This is a Samsung Galaxy Tab 10.1v (from Google I/O). Any ideas?
EDIT: I also tried the automounting option with FUSE. Attempts to cd into it with bash or open it from the Places menu in GNOME both give the message "Transport endpoint is not connected".
Click to expand...
Click to collapse
Can you post the output from 'lsusb' ?
re the "Transport endpoint is not connected" - I just got this same error on 64bit Natty. Will try and see if I can find out why..
Ah, just saw your reply. I edited my post up above, but the gist is - you can't do this while USB Debugging is enabled. The Tab has to be running its "MTP Application".
Now I'm getting the stranger errors above. I'm going to try mounting it with FUSE now to see if that helps for some reason.
EDIT: For the record, I'm using the correct vendor and product IDs in my rules file:
Code:
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0666" SYMLINK+="gtab"
Konklone said:
I edited my post up above, but the gist is - you can't do this while USB Debugging is enabled.
Click to expand...
Click to collapse
You may be right. When I wrote this guide, I was using a VM. It is possible that the fact that I was using both MTP and ADB at the same time has something to do with how VMWare presents the devices to the guest OS.
Now I am using 'bare metal' Natty 64 bit and have the same problem as you.
I have to go out for a while but will look at it again when I get back.
EDIT: Just tried mtp-detect and it is finding the device. I suspect USB Debug is not the issue, but I'll leave it in your capable hands - really got to go now
EDIT2: See here http://www.usb.org/developers/devclass_docs/MTP_1.0.zip OK - Im really REALLY going now. Back online in a few hours
I couldn't get anywhere until I turned off USB debugging. When USB debugging is enabled, I *can* use adb to get into the shell, see files, install apps, etc. I can even transfer files over adb, through the command line! Can you get MTP to detect it with USB debugging enabled?
With USB debugging off, I have once in a great while (only twice in all my attempts) while gotten mtp-detect to connect to the device and print sane output describing the device. Even when those happened, running the command immediately again didn't connect correctly, and gave me the same error messages I was getting before. Both times I got it to connect, it was soon after plugging in the cable, but it doesn't happen every time.
Intermittent heisenbugs are the worst, yet I don't think I have a busted cable, given that adb works perfectly consistently.
Maybe I should try this again after updating to Natty...I'd been meaning to do it anyhow...
EDIT: One thing I notice is that on the Tab, when the "MTP Application" is running after plugging in, the 5-dot "in progress" animation is extremely choppy, as if the device were very very busy. If the device were very very busy for some reason, this could explain why a successful connection can happen only once in a great while. I'll try rebooting the device, I guess.
EDIT2: I rebooted the device, and I removed the USB extension cord I was using, but neither helped, still getting the same intermittent success. (I got mtp-detect to connect to it a few more times - all soon after plugging in the cable, and none were repeatable without unplugging and replugging it in.) The animation actually wasn't choppy before, that's just how it looks - 5 discrete animation frames, one for each dot.
Something interesting though: this time I had the Tab resting on my knee, and I felt a haptic buzz after running mtp-detect on one occasion. I looked down and saw the MTP Application restart itself. Then I ran mtp-detect again and I felt 3 haptic buzzes in quick succession, followed by a successful detection and output. But when running mtp-detect *again*, no dice.
This is messed up.
Messed up indeed.
Konklone said:
Can you get MTP to detect it with USB debugging enabled?
Click to expand...
Click to collapse
Yes, both work simultaneously on 32bit Natty
Note that you have to unmount the gtab for mtp-detect to work. I compared the output from mtp-detect on the 32bit working VM and the 64bit non-working 'bare metal' machine and the output was identical. I suspect this means that mtpfs is not where the problem is
Re the strange problem with haptic feedback - I have had mine power off all by itself when testing some different parameters in the rules file.
[64bit working]
OK. Problem solved... kind of. There seems to be some kind of bug in fuse which requires the filesystem to mount with higher permissions to run properly (at least on Natty AMD64)
If you use the new 64bit rules file I have attached, it should work. Basically it uses 777 permissions instead of 666. Not great, but working nonetheless.
New rules file for 64bit:
Code:
ACTION!="add", GOTO="gtab_rules_end"
SUBSYSTEM!="usb|usb_device", GOTO="gtab_usb_end"
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0777" SYMLINK+="gtab"
LABEL="gtab_usb_end"
LABEL="gtab_rules_end"
EDIT: If someone wants to experiment with lesser permissions and see what the minimum is and post back, that would be helpful for all.
Sigh, thank you for taking so much time to help me so far, but I wonder if I'm a lost cause.
I spent a bunch of today finishing my upgrade to Natty, including a full wipe and reinstall. (I have a 32-bit machine, btw.) Now I can't even get it to detect my MTP device at all (mtp-detect says "No raw devices found."), with or without debugging enabled.
One possibly important topic - it's really surprising to me that yours works either way, because lsusb shows that a different product ID is exposed to the host, depending on whether debugging is on or not. With debugging disabled, it's 6860, like your example. With debugging enabled, it's 685e. When I run lsusb, only one of those will show up, never both. So if yours is the same device, I have no idea how your rules file could be agnostic to debugging being enabled. If yours is not, then that might explain our different experiences.
Anyway, I've Thanks'd all your posts in this thread, solved or not. I appreciate your help.
Konklone said:
With debugging enabled, it's 685e. When I run lsusb, only one of those will show up, never both
Click to expand...
Click to collapse
You're more than welcome.
I noticed that in Windows, both devices appear in device manager. That is a very strange problem you have discovered.
I just posted instructions and files to give you root access! Might take your mind off the MTP issues for a while
Who knows... the problem might just go away
Konklone said:
One possibly important topic - it's really surprising to me that yours works either way, because lsusb shows that a different product ID is exposed to the host, depending on whether debugging is on or not. With debugging disabled, it's 6860, like your example. With debugging enabled, it's 685e. help.
Click to expand...
Click to collapse
Are you sure? On my device its the other way around. Without debugging its 685e and with debugging its 6860?
ajvogel said:
Are you sure? On my device its the other way around. Without debugging its 685e and with debugging its 6860?
Click to expand...
Click to collapse
Ok I got it working on my device, I switched on usb debugging in settings. lsusb now returns 6860 and I am able to mount the galaxy tab using the process outlined above.
This is craziness. Is my Galaxy Tab a rare mutant piece of hardware who had its USB numbers switched?
Also - I noticed that Ubuntu somehow automounts my tablet and can read/write to its disk, through a Nautilus plugin. But I still get nothing with mtp-detect. I don't understand how the world works.
I've also got an I/O tablet (updated to 3.1) and I followed this tutorial, so thanks for the help you provided! I managed to copy some files to the device but it ended up freezing my computer (running Ubuntu 10.10).
So I unplugged the tablet, and saw that effectively those few pictures and pdf files had been copied to the device successfully. Pictures are in the Gallery, pdf can be read with Aldiko... but the funny thing is that when I mounted again the tablet -using Ubuntu again- it shows all folders as empty!
That is, 0 files in all tablet folders.
I tried "showing all hidden files" with Nautilus. No luck, nothing is shown. Went to the folder using command line, did an ls -la (just in case who knows! maybe it would show something!). No luck either, directories are apparently empty and have "1 January 1970" as modification date... if it helps.
I can see the files inside the folders using ADB but it's obviously not ideal, specially compared with simply using Nautilus.
Does it happen to you too?
Anyone get this working? I'm having the same exact issues as Konklone. I'm on Maverick and tried the different udev rules and it still doesn't work. I'm gonna be pissed if I have to buy the stupid Samsung USB adapter just to get USB mass storage.
[ASK]Noobs need solution
gMTP tells me that there is no device. Any ideas?
I'm having the same issue. First try I was able to plug in and mount to my netbook. Tried to plug into my mac and it didn't work. Hasn't worked since then, i'm considering doing a factory reset.
I'm running Ubuntu 10.10 64-bit. Note that you do have to enable backports to install gmtp.
Edit /etc/apt/sources.list, uncomment the lines with:
Code:
deb (http-url) maverick-backports main restricted universe multiverse
deb-src (http-url) maverick-backports main restricted universe multiverse
Run
Code:
sudo apt-get update && sudo apt-get install gmtp
I had to unplug the device and replug it back in a couple of times before gmtp would connect to it properly. It seems to be pretty flaky.
Wow...........
This is nonsense ..... is there a way to enable USB Mass Storage or are we completely hosed with MTP?
Related
I updated my laptop to Ubuntu 10.10 the other day. Tonight, I plugged my phone into my laptop, and nothing happened. I disabled USB debugging, nothing. Played with each USB setting on the phone, and still nothing. ADB will not detect the phone, nor will Ubuntu.
This kinda needs to work, so please help me.
EDIT: It actually detects that its been plugged in, but no matter what it wont mount it as a file system or detect it on ADB. And its running Cognition 2.2 Beta 4.
I am using the same ubuntu and no problems connecting, except I cant make adb work. I plug my phone in with usb settings set to ask on connection, after plugged in I tell it connect as mass storage no problem. cant figure out adb so if you figure it out please let me know.
halo45121 said:
I updated my laptop to Ubuntu 10.10 the other day. Tonight, I plugged my phone into my laptop, and nothing happened. I disabled USB debugging, nothing. Played with each USB setting on the phone, and still nothing. ADB will not detect the phone, nor will Ubuntu.
This kinda needs to work, so please help me.
EDIT: It actually detects that its been plugged in, but no matter what it wont mount it as a file system or detect it on ADB. And its running Cognition 2.2 Beta 4.
Click to expand...
Click to collapse
try this
gksudo gedit /etc/udev/rules.d/90-android.rules
then
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
then Save the file and run the following command:
gksudo service udev restart
in your terminal
i know it doesnt look like much but it worked for me
here is a link https://help.ubuntu.com/community/AndroidScreenshots
pgill34 said:
try this
gksudo gedit /etc/udev/rules.d/90-android.rules
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
Click to expand...
Click to collapse
That's specifically for htc devices, as "0bb4" is an HTC Vendor ID
And in meerkat (ubuntu 10.10) it needs more than just those instances.
when the device is plugged in, type in terminal
Code:
usb-devices
and find the vendor ID Associated with whatever says "Samsung Inc" or "samsung Industries" or whatever in the name.
This is the section for my HTC Hero:
Code:
T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0bb4 ProdID=0c9a Rev=01.00
S: Manufacturer=HTC
S: Product=Android Phone
S: SerialNumber=HT02HXXXXXXX
C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=256mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
Notice next to "vendor" after the line that starts with "P:" it shows 0bb4.
Simply replace whatever shows up next to the Samsung instance of this with the "0bb4" next to ATTRS{idVendor}==
In addition, try this line instead of the one provided above, as the one above doesn't really work in ubuntu 10.10 as far as I've seen.
should look something like this, replace XXXX with your devices Vendor Idea found with usb-devices in terminal
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="XXXX", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
and furthermore, I've noticed that instead of
Code:
/etc/udev/rules.d/90-android.rules
this one works just fine as well:
Code:
/etc/udev/rules.d/51-android
Hopefully this helps someone...
If something doesn't work here let me know and I'll add it and make corrections. I will gladly accept recommendations and input from anyone. Also Mac and Linux users please post your info and I'll gladly add your pieces to my guide as well.
Step 1:
Some files are needed such as the SDK and USB driver. Note: Some devices require Windows drivers provided by the manufacturer we will have to play around and see what works with Adam...
System Requirements
USB Drivers
Android SDK
- Download the zip file
Step 2:
Extract the zip and run the exe to install. It should check for JAVA dependencies and get you all setup.
Copy the SDK folder to the root of your C: drive or where ever you want. Plug in the device (Adam in this case), DO NOT MOUNT ANYTHING, and when prompted install the USB driver. NOTE: I'm not sure yet if the drivers in the link will work with Adam or not so play around and see what works. You can always go into Device Manager and remove the driver.
Step 3:
Create environment variables for ADB by right-clicking on "My Computer" and select Properties. Then go to Advanced tab (or Advanced Settings in Vista) and select Environment Variables. Add the following:
Variable name: adb
Variable value: C:\android-sdk-windows\tools
Note: that variable value may change if you do not run the sdk from the root of your C: drive and depending on the name of your SDK folder...
Step 4:
Code:
adb [COMMAND]
If you replace "[COMMAND]" with an adb command, the above should work for you. Go here for a listing of ADB commands...
A simple command to test with is:
Code:
adb shell
"adb shell" should return one of two values, "$" or "#". And this should be the shell prompt from the device, not your local terminal window.
If that code didn't work, put in your full SDK folder path and try again. If it works that way, look into the environment variable and make sure its the same as the path to your SDK folder.
References:
The first is the sweet guide from XDA member VanillaTbone and is widely used here at XDA.
The second is one I wrote over at NotionInkHacks. This one is only for Windows at the time being, but once people with other OSs leave feedback I will update to include those other OSs as well.
Thanks for the links!
They were helpful to me and I am sure they will be to others.
Thank you, stickied! This is useful to people unfamiliar with ADB.
Updated the OP so this is now a full guide. I also updated the title to reflect tutorial.
webs05 said:
Updated the OP so this is now a full guide. I also updated the title to reflect tutorial.
Click to expand...
Click to collapse
Excellent work. This will help all the first time Androiders here!
How to get your Adam detected in Windows
After following this.. you can follow this next to now make sure windows detects your Adam.
http://forum.xda-developers.com/showthread.php?p=12022670#post12022670
it would be more uniform if people installed the .exe and have 2 paths for step 3 depending on 64 bit or 32 bit
for 64 bit when installing the exe the path is
C:\Program Files (x86)\Android\android-sdk-windows\platform-tools
and for 32 bit I believe its (not sure on this one because I have 64 bit)
C:\Program Files\Android\android-sdk-windows\platform-tools
Also might be wise to mention that if you do not define a push or pull path way when you start up the command prompt it will look in C:\users\"UserName"
edit: fixed: http://developer.nvidia.com/tegra/forum/after-installing-froyo-adb-cant-see-device
thanks for your help
howdy,
I have previously installed the adb driver for my sgs and sgs2. When I plug in my adam, the mass storage components come up, but nothing shows up with regards to android devices which will allow me to update the driver for.
Debugging is enabled on my adam (it is a PixelQi/Wifi version running beast+clemsync v3) and shows up in the notifications. USB Mass storage works fine.
ADB also works fine for my SGS2 when I plug it in and run adb shell/devices. When I plug my adam in, adb does not see anything related to it.
Where should I go from here to get windows to like this thing?
edit:
When I plug it in I can see these things:
If the nvidia harmony device shows up in the device manager I don't know where
Click to expand...
Click to collapse
You are unable to just plug in your Nexus 4 in Linux but it is very easy to mount and unmount to move data to/from your sdcard. This is one option that will allow you to utilize Nautilis (or any other file browser) to copy files to/from your Nexus 4. This is written for Ubuntu, but should work the same for other Linux systems. Also, this should work for Nexus 7 and 10.
1. Enable Developer options and enable USB debugging.
2. Install necessary modules to your computer:
sudo apt-get install mtp-tools mtpfs
3. Configure 51-android.rules:
sudo gedit /etc/udev/rules.d/51-android.rules
paste the following at the end of the file (if the file does not exist then just paste):
#LG - Nexus 4
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Samsung - Nexus 7 & 10
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
Save and exit.
4. Make the file executable:
sudo chmod +x /etc/udev/rules.d/51-android.rules
5. Restart udev
sudo service udev restart
6. Create mount point and permissions (will need to do this for other Nexus' if using for the 7 or 10)
sudo mkdir /media/nexus4
chmod 755 /media/nexus4
7. Plug in the Nexus 4 and make sure MTP is enabled.
8. Mount with the following command:
sudo mtpfs -o allow_other /media/nexus4
9. When you have completed your work you must unmount:
sudo umount /media/nexus4
Now each time you need to copy from/to your Nexus 4 to your Linux computer you only need to plug in and run 8, then 9 when you have completed your work.
Good info! I'll try it out on my Ubuntu laptop later.
Thanks!
Awesome. Thanks
sent from my straight out of limbo 2 Nexus 4 using XDA-premium
This isn't so much a Nexus 4 guide as a general Linux mounting guide, but still cool. Thanks!
First, thanks to the OP! Just wanted to add another way for linux.
Just install and run gMTP plug your phone in and click connect. It is in the Ubuntu software center or for other versions of linux at http://gmtp.sourceforge.net/
I prefer adb+qtadb. Better speed and stability compared to mtp i think.
Sent from my Blade using xda app-developers app
Thanks for that write up. On my gentoo box my galaxy nexus worked flawlessly but the nexus 4 did not. Hopefully this will do it!
Sent from my Nexus 4 using Tapatalk 2
Kaar3l said:
I prefer adb+qtadb. Better speed and stability compared to mtp i think.
Sent from my Blade using xda app-developers app
Click to expand...
Click to collapse
Yes QtADB works very nicely also. It requires a little more setup than gMTP, but you are correct that it is a little faster and stable.
Kaar3l said:
I prefer adb+qtadb. Better speed and stability compared to mtp i think.
Sent from my Blade using xda app-developers app
Click to expand...
Click to collapse
the3dman said:
Yes QtADB works very nicely also. It requires a little more setup than gMTP, but you are correct that it is a little faster and stable.
Click to expand...
Click to collapse
Never heard of that. What is it?
Generating random authentication keys
---------- Post added at 07:48 AM ---------- Previous post was at 07:47 AM ----------
Konsyst said:
This isn't so much a Nexus 4 guide as a general Linux mounting guide, but still cool. Thanks!
Click to expand...
Click to collapse
Haven't gotten my N4 yet but I'm gonna try this on my sIII.
Generating random authentication keys
Thanks for your work! very useful..!
Konsyst said:
This isn't so much a Nexus 4 guide as a general Linux mounting guide, but still cool. Thanks!
Click to expand...
Click to collapse
Not such a general Linux guide as a Debian-derivative guide.
Helpful nonetheless marty331 for the correct udev strings, thanks!
I personally think using sshfs and sshdroid is a much more stable solution. MTP support on Linux is... shoddy to say the least.
Thanks given anyway though.
It seems that mtpfs 1.1 is broken. I downgraded to 1.0 and it worked. However, there is usually lag for some reason whenever the screen is off.
I had MTP/PTP crash several sdcards of mine which required me to format them (no write permissions had no way to get that back.)
Ever since that I just use ADB (Android Debugging Bridge) there are several GUI front-ends available in the default deb/rpm repositories, or if you are comfortable with the terminal (and with ADB it's really really simple to master) you can just get the binary and put it in your bin folder and transfer it via that. Highly reliable, speed is about 2-3mb/s -- but it works.
I gave up on this on Debian Testing. My Galaxy Nexus would not mount no matter what udev rules I used and mtpfs is not a solution. Instead, I just use a ftp server on the phone and ftp things to it or push things using adb. I've also tried airdroid a few times. I would not mind trying the sshfs alternative either. Gonna check that one out.
jamcar said:
Never heard of that. What is it?
Click to expand...
Click to collapse
QtADB is just a GUI for ADB and it works very well. Search QtADB on Google and you will find the download page with instructions.
Sent from my Nexus 4 using xda app-developers app
OP's use of udev inspired me to come up with this solution using ADB.
I'll assume you have ADB installed. There's plenty of indepth guides for that elsewhere.
This tutorial will have you playing around in system directories on your Linux install. I tried to make this guide user friendly but you should have at least SOME knowledge of Unix like OSes before you even try this.
Not for the faint of heart.
Get http://https://play.google.com/store/apps/details?id=berserker.android.apps.sshdroid&hl=en from the play store. Enable USB debugging in the developer options on your phone.
Open SSHDroid on your phone and set your port to something other than 22. I use 2222.
Open a terminal window on your computer and elevate yourself to root (Preferably using su -. Otherwise use sudo su -.).
Now that we got that done, try logging into your phone to make sure everything works. It'll be something like
Code:
ssh -p2222 [email protected][yourPhone'sIP]
. If you get asked a password it probably works. Just hit ^C (Ctrl+C) to exit that password prompt since we don't need to go further yet.
Next you'll need to create a passwordless SSH login. Run
Code:
ssh-keygen -t rsa
. Just hit enter to use the defaults on all the questions, we don't need anything more.
Now run
Code:
scp -P2222 ~/.ssh/id_rsa.pub [email protected][yourPhone'sIP]:/emulated/storage/legacy/
. When it asks for the password just type "admin", though it should tell you that anyway.
If the file copied over successfully you should no be able to type
Code:
ssh -p2222 [email protected][yourPhone'sIP]
again and not be prompted with a password at all. Cool!
At this point it's recommended you go into the SSHDroid settings on your phone and untick the "Enable Password" box, though it's not required, especially if you want to ssh to your phone from other devices/computers.
Run lsusb and look for the line that says Google in it. You want to look out for something like
Code:
Bus 001 Device 070: ID 18d1:4ee2 Google Inc.
Copy the two alphanumeric codes before "Google Inc.". The first is your vendor ID and the second is your device ID. You might want to label them so you remember which is which.
Here's the scary part of the tutorial. Use your favorite text editor (preferably command line based) and create a new file at "/etc/udev/rules.d/85-android_mount.rules". Copy and paste this and edit to fit the IDs you got in the previous command.
Code:
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee2", RUN+="/usr/local/sbin/phone-mount -m" SYMLINK+="Nexus_4"
SUBSYSTEMS=="usb", ACTION=="remove", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee2", RUN+="/usr/local/sbin/phone-mount -u" SYMLINK+="Nexus_4"
It should be obvious where you need to put your Vendor and Device IDs now.
Save it and run these commands.
Code:
chmod +x /etc/udev/rules.d/85-android_mount.rules
chmod 775 /etc/udev/rules.d/85-android_mount.rules
chown root:root /etc/udev/rules.d/85-android_mount.rules
Now we need to create another file at "/usr/local/sbin/phone-mount" and paste this inside.
Code:
#!/bin/bash
export PATH=/opt/android-sdk-update-manager/platform-tools/:$PATH
case "$1" in
-m )
adb wait-for-device
adb forward tcp:2222 tcp:2222
# If you have SSHDroid Pro you just need to add "pro" to the "sshdroid".
adb shell am broadcast -a berserker.android.apps.sshdroid.command.START
sshfs -p2222 -o allow_other,idmap=user [email protected]:/storage/emulated/legacy/ /media/nexus4
exit 0
;;
-u )
umount /media/nexus4
exit 0
;;
esac
We need to modify the permissions for this file too.
Code:
chmod +x /usr/local/sbin/phone-mount
chmod 775 /usr/local/sbin/phone-mount
chown root:root /usr/local/sbin/phone-mount
Almost done. If you don't already have sshfs installed on your Linux install then do so now. You'll also need to enable the "allow_other" option. For my distro it's as simple as editing "/etc/fuse.conf" and uncommenting the "user_allow_other" line. Your results may vary.
Now finally we need to create the actual folder you'll be mounting your Nexus 4 at. If you blindly followed my guide that'll be /media/nexus4.
Code:
mkdir /media/nexus4
chown root:users /media/nexus4
chmod 775 /media/nexus4
Now all we need to do is restart udev. Right now you'll want to make sure the phone is unplugged, then restart your udev daemon. For Debian based distros like Mint, Ubuntu, Debian, Crunchbang, etc. you'd run.
Code:
service udev restart
After it's done restarting you can plug your phone in, wait a few seconds, and hopefully have your phone automount to /media/nexus4 .
You may have to improvise in a few spots because all distros are not the same, especially when you compare something like Gentoo to Debian. If you're having problems with sshfs chances are your answer is on Google. You'll honestly get better help there than having me trying to guess your system.
Also note this is a pretty hacky and dirty way to do things. Don't go yanking your phone's USB cord out without unmounting "/media/nexus4" first. You shouldn't have any problems if you're not reading or writing anything, but there is the potential for data loss and crashing udev.
i got this error at the last step
Code:
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
Listing File Information on Device with name: (NULL)
fuse: bad mount point `/media/nexus4': Transport endpoint is not connected
i dont have a nexus 4 and im not on linux. but dermann made a script for this i think.
http://forum.xda-developers.com/showthread.php?p=33499930#post33499930
I've been using AirDroid. Works great for transferring files.
Hey everyone! I put together some information on how to do a few things on your new Ouya! This info is by no means my own original contributions, but rather just a compilation of several different sources that I discovered through my quest to explore my Ouya. All credit goes to the original authors/brave experimenters.
SDK SETUP:
1. Install the Android SDK
2. Open SDK Manager and install the following packages:
- Tools: Including both Android SDK and Android SDK
- Android 4.1 (API 16): SDK Platform
- Android 4.0 (API 14): SDK Platform
- Extras: Android Support Library, Google USB Driver
3. Navigate to /android-sdk/extras/google/usb_driver
4. Open android_winusb.inf in an editor (I use Notepad++)
5. Add the following lines beneath [Google.NTx86]:
Code:
;OUYA Console
%SingleAdbInterface% = USB_Install, USB\VID_2836&PID_0010
%CompositeAdbInterface% = USB_Install, USB\VID_2836&PID_0010&MI_01
6. Connect your Ouya via micro USB to your computer and turn it on (it needs to be on for adb to work)
7. Open a command window in /android-sdk/platform-tools and run the following commands:
Code:
adb kill-server
echo 0x2836 >> "%USERPROFILE%\.android\adb_usb.ini"
adb start-server
adb devices
8. After 'adb devices' you should see a number, which signifies your connected console
9. You are now ready to use adb to sideload apps
=============================================================================================================
SIDELOADING APPS:
1. Place the desired .apk file to be installed within /android-sdk/platform-tools
2. Connect the Ouya and open a command window in /android-sdk/platform-tools and run the following command:
Code:
adb install [name.of.apk.file.here]
3. Wait for it to complete the installation
4. On the Ouya, navigate to 'Make' and 'Builds' and your app will be there
=============================================================================================================
ADDITIONAL STUFF BELOW
=============================================================================================================
HOW TO SET UP WIRELESS ADB (will allow you to wireless use adb command, without connecting directly to your computer)
1. Connect OUYA console via mini-usb (or using wireless adb) and run the following commands:
Code:
adb shell
su
mount -o rw,remount -t ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
chmod 666 /system/build.prop
2. Open another terminal (so we can do things locally) and run the following command:
Code:
adb pull /system/build.prop
3. Open build.prop in a text editor, add this line:
Code:
service.adb.tcp.port=5555
4. Return to the second command window and run the following command:
Code:
adb push build.prop /system
5. Now go back to your shell for the OUYA and run the following commands:
Code:
chmod 644 /system/build.prop
(seriously! the console won't boot if you forget this)
Code:
mount -o ro,remount -t ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
6. Disconnect your OUYA, put it where you want it, reboot it.
7. To wirelessly connect to your OUYA, use the following command:
Code:
adb connect 192.168.xxx.xxx
(your OUYA's ip address)
=============================================================================================================
HOW TO INSTALL BUSYBOX, SUPERUSER, AND SU BINARIES
1. Make sure you have ADB set up and working (wired or wireless).
2. Download and unzip the needed files here.
3. Place unzipped files in /android-sdk/platform-tools
4. Run the following commands to put su in the proper place:
Code:
adb shell
su
mount -o rw,remount -t ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
exit
exit
adb push su /sdcard/su
adb shell
su
cat /sdcard/su > /system/xbin/su
ln -s /system/xbin/su /system/bin/su
chmod 6755 /system/xbin/su
exit
exit
5. Install SuperUser and BusyBox:
Code:
adb install com.koushikdutta.superuser.apk
adb install stericson.busybox.apk
6. Run SuperUser on the Ouya (from Make > Software) and confirm the update (not in recovery).
=============================================================================================================
Again, this isn't my original content, only slightly edited (since I am OCD about writing).
My only intention is to share this knowledge with other users like me, who don't know much about this sort of thing (yet).
If i stepped on any toes, or did something wrong, I apologize. Let me know if you have any questions or concerns.
Thank you to the following people for their work in contributing to this guide:
WinDroidGuy
elmerohueso
The driver section doesn't seem to work on Windows 8 Pro 64-bit. I don't think the Google driver has been updated for Win8 yet.
You're probably right. I'm on Windows 7. I'll see if I can jump on a buddy's computer to play around with it.
Upon a quick Google search, I found this: http://forum.xda-developers.com/showthread.php?t=1161769
Perhaps give this a try? Please let me know how it goes.
I also tried Koush/ClockwordMod's universal ADB driver (adding in the Ouya section to 32/64) but same results about a bad hash in the driver file.
Well it was worth a try. I'll keep my ears open for a Windows 8 solution.
Did you try setting up adb over wireless by any chance? I don't know much about this stuff, but perhaps that's worth a try as well?
cosine83 said:
The driver section doesn't seem to work on Windows 8 Pro 64-bit. I don't think the Google driver has been updated for Win8 yet.
Click to expand...
Click to collapse
My Ouya was listed twice in Device manager and one of them was a driver problem. I manually selected my Samsung adb drivers from the list and it works fine. the easiest way yo get those is to install KIES. This was with 64 bit Windows 7.
TIP: The micro usb port is extra deep and my samsung cables don't work, fortunately I have a Kodak one that does.
It motivated to set up wireless adb.
Not getting very far, first I downloaded the SDK, which will not run on my system, might be the AV/FW or something else, but it attempts to find java (which is in the path), and then it does nothing. So I try to go the ClockWorkMod way using the Universal driver (as I saw that should work), that is better as I at least have drivers and it finds my device, but it also will not install throwing a message: "hash for the file is not present in the specified catalog. The file is likely the corrupt or the victim of tampering." Well duh, I modified the inf to get it to find the hardware for the OYUA. I'd just use Google's if I could get a copy without installing the SDK since that is obviously not going to working on this system. Any suggestions, so far while adb works fine with the G3 on this system it appears impossible to setup for the OUYA.
Please note: in C:\Java\jdk1.7u21 is the JDK in c:\java\jre is the JRE. So they are both present and up to date. If I open a command prompt and type java -version it is located and works fine, so no understanding of what "SDK Manager.exe" is doing.
Also, yes I followed the thread as best I could, first copying java into c:\android makes no sense, but I tried it (did nothing), second the adb driver does not require any extraction, where is the usb driver, it must be in a zip somewhere in the SDK for it to be installable, so can I just manually extract it?
Thanks,
ERIC
egandt said:
Not getting very far, first I downloaded the SDK, which will not run on my system, might be the AV/FW or something else, but it attempts to find java (which is in the path), and then it does nothing. So I try to go the ClockWorkMod way using the Universal driver (as I saw that should work), that is better as I at least have drivers and it finds my device, but it also will not install throwing a message: "hash for the file is not present in the specified catalog. The file is likely the corrupt or the victim of tampering." Well duh, I modified the inf to get it to find the hardware for the OYUA. I'd just use Google's if I could get a copy without installing the SDK since that is obviously not going to working on this system. Any suggestions, so far while adb works fine with the G3 on this system it appears impossible to setup for the OUYA.
Please note: in C:\Java\jdk1.7u21 is the JDK in c:\java\jre is the JRE. So they are both present and up to date. If I open a command prompt and type java -version it is located and works fine, so no understanding of what "SDK Manager.exe" is doing.
Also, yes I followed the thread as best I could, first copying java into c:\android makes no sense, but I tried it (did nothing), second the adb driver does not require any extraction, where is the usb driver, it must be in a zip somewhere in the SDK for it to be installable, so can I just manually extract it?
Thanks,
ERIC
Click to expand...
Click to collapse
By G3 do you mean Galaxy S3? If so then hopefully you already have Kies installed. When I connected my OUYA and started all of this, it did not install properly. It showed up twice in device manager, it was installed as a portable device, but was also listed as "other device" and not installed. After a lot of searching,I saw that people had been able to get out working by manually selecting the Samsung adb drivers that are included with Kies. It worked for me. You need to manually select the drivers (have disk) and install OUYA as a MTP device.
Regarding the SDK I know nothing. It installed just fine on Windows 7 for me.
Good luck
Sent from my SCH-I535 using Tapatalk 2
I was able to get ADB to work on Windows 7 64bit and Windows 8 64 bit by installing Samsung KIES and forcing it to use that driver.
eatmybiglazer said:
I was able to get ADB to work on Windows 7 64bit and Windows 8 64 bit by installing Samsung KIES and forcing it to use that driver.
Click to expand...
Click to collapse
Try this driver, got it to work, by selecting i from the list and forcing it
ERIC
Sideloading it relatively trivial for this. It is on by default (and can be toggled the usual way, you can access setting at manage->system->advanced-> security).
I used Real APK Leecher to snag ES File Explorer's APK, threw it on a web server, then downloaded it using OUYA's browser (make->software->browser). Installed it from settings (manage->system->advanced->storage->downloads)
The app then shows up under make->software
I have not tried a pen drive yet, but you could probably throw apks on a drive and use the USB port and install in a similar fashion.
I'm trying to do step 7. I input C:\Android\sdk\platform-tools into comand promt but get not regognizable message. What am I doing wrong?
You need to open the command prompt from wherever within platform-tools, or navigate to that folder from your command prompt. You can't run the adb command (which is located in platform-tools) unless your in that directory.
thanks. hopefully i'll get my OUYA soon. only 1 state away.
I dont get a number after adb devices. I editited the google usb file. Im using the 64 version of android sdk is that ok?
@tcollum: Perhaps you should add this to the OP, I tested and it worked. You can add that ;Ouya to the amd64 section of the USB driver, too
FrostyWolf said:
Sideloading it relatively trivial for this. It is on by default (and can be toggled the usual way, you can access setting at manage->system->advanced-> security).
I used Real APK Leecher to snag ES File Explorer's APK, threw it on a web server, then downloaded it using OUYA's browser (make->software->browser). Installed it from settings (manage->system->advanced->storage->downloads)
The app then shows up under make->software
I have not tried a pen drive yet, but you could probably throw apks on a drive and use the USB port and install in a similar fashion.
Click to expand...
Click to collapse
I just find it easier to ADB over Network and install from my laptop.
Sent from my Nexus 10 using XDA Premium HD app
TadeoNYC said:
My Ouya was listed twice in Device manager and one of them was a driver problem. I manually selected my Samsung adb drivers from the list and it works fine. the easiest way yo get those is to install KIES. This was with 64 bit Windows 7.
TIP: The micro usb port is extra deep and my samsung cables don't work, fortunately I have a Kodak one that does.
It motivated to set up wireless adb.
Click to expand...
Click to collapse
This was a great post...I did what you suggested and selected the latest Samsung ADB Interface driver in the windows list (think it was 23/1//2013) and voila. Thanks!
uncynd said:
This was a great post...I did what you suggested and selected the latest Samsung ADB Interface driver in the windows list (think it was 23/1//2013) and voila. Thanks!
Click to expand...
Click to collapse
You can also do the original USB driver edit in the OP and add it under the amd64 section in the inf file. Its how I did it.
dibblebill said:
You can also do the original USB driver edit in the OP and add it under the amd64 section in the inf file. Its how I did it.
Click to expand...
Click to collapse
Ahh, did not see your post that would have been a lot faster, good advice and maybe should be added to OP?
I've been a lurker for the last few years; never thinking I would need any help or assistance .. but I have a situation ..
My Sprint HTC One was working better than I had ever seen it just last Thursday. I was running CM11, with ART. I had an old version of SuperOne (Sense 5) backed up with TWRP. I thought I'd go ahead and load the backup, and update all the apps and then make another more recent backup before returning to CM11. I got as far holding the power button and selecting recovery. The phone locked up at that point.
It took 10 minutes to get it back to the screen where you can select fastboot, factory reset, etc. Interestingly I couldn't get into TWRP. The screen read "entering recovery" and nothing. It would just hang there.
I read that erasing the cache with fastboot might work, and it did. But when I was able to enter recovery, instead of restoring CM11, I thought, "well, maybe now it'll work", so I just rebooted. Wrong. Wouldn't boot. And, now running fastboot cache erase (or erase cache) doesn't do anything.
Now, by pressing the power button alone and holding it in I'm able to get to the fastboot, factory reset, etc screen. Went to fastboot usb, and fastboot commands work but ADB doesn't detect the device. I can't send ADB commands, but I can send ONE fastboot command. After sending any fastboot command, the phone locks up. Nothing from that point.
I tried installing a RUU. The .exe file detected the version on my phone, and everything went great until the program said it was booting to the bootloader. Locked it up. Nothing from that point.
I need help.
Thanks.
I uninstalled the HTC drivers and reinstalled them. A suggestion since ADB didn't work. And I can't get into bootloader. No difference.
Any suggestions
Any suggestions at all. I'm desperate.
Ogre77497 said:
Any suggestions at all. I'm desperate.
Click to expand...
Click to collapse
You can get into fastboot correct?
Fastboot - Yes .. Sorta
I can get into fastboot, but I copy anything to the phone via fastboot. I'm told "unable to write". Thanks.
Ogre77497 said:
I can get into fastboot, but I copy anything to the phone via fastboot. I'm told "unable to write". Thanks.
Click to expand...
Click to collapse
Ok it's probably a problem with your USB cable or USB port. Try using another PC and another cable.
If this doesn't work read some guide to properly set up ADB, uninstall all HTC stuff and install only the "naked driver" and than run the LATEST ruu. Maybe you have upgraded your firmware and can't flash older ruu's.
Sent from my HTCONE using Tapatalk
Will Try
I'll give that a try. I really appreciate the help. I run my whole business on that phone.
Just make sure you follow my suggestions properly. It should be just the cable, and I think you don't have the right drivers for ADB. Stay calm your phone is just soft bricked. You only need to be patient and read. Naked driver here http://forum.xda-developers.com/showthread.php?t=2263822
Sent from my HTCONE using Tapatalk
elvisypi said:
Ok it's probably a problem with your USB cable or USB port. Try using another PC and another cable.
If this doesn't work read some guide to properly set up ADB, uninstall all HTC stuff and install only the "naked driver" and than run the LATEST ruu. Maybe you have upgraded your firmware and can't flash older ruu's.
Sent from my HTCONE using Tapatalk
Click to expand...
Click to collapse
+1
I did the same thing a few weeks ago and lost recovery in the process. The naked driver did the trick. Also the thread about restoring after a gsm rom install is a great. It's not a loss. Not having an sd card in the one made things a little different for me, but I was able to get everything back. These drivers suck!
Progress
I've followed your directions. I downloaded the naked driver, and the minimal ADT. I found the correct RUU (3.04.651.2) I attempted to relock the bootloader, but I got a message .. " Status read failed <no such file or directory>" Went ahead and tried flashing the RUU (fastboot flash zip ruu.zip), and got the message "FAILED Remote: not allowed"
The phone is unlocked, CID SPCS_001, and HBOOT 1.44
I wasn't able to access TWRP recovery earlier, so I tried reflashing the img file. Failed remote: image update error. I tried erasing the cache .. "Failed remote erasing error", but now I can get into TWRP.
TWRP says I have "0" internal storage. I also can't mount system, data or cache. The choices are there but can't be selected.
I can't use ADB (device not found). and the phone isn't detected by windows. I had installed the HTC drivers, but couldn't uninstall them, so I install HTC Sync manager and then uninstalled it. The program deleted the HTC drivers when I uninstalled it. When I plugged in the HTC One (with a new cable) nothing happened, so I used the windows hardware wizard to install the naked driver. The phone still isn't detected, but again I can issue fastboot commands. Well, one fastboot command and then the phone freezes up.
If I use filemanager within TWRP there's no emulated sd card. I really think that's where my problem is. No partitions are available. And, when I use TWRP to shut down, it warns me that no OS is installed.
Any other suggestions?
I sure appreciate all your help. Thanks.
elvisypi said:
Just make sure you follow my suggestions properly. It should be just the cable, and I think you don't have the right drivers for ADB. Stay calm your phone is just soft bricked. You only need to be patient and read. Naked driver here http://forum.xda-developers.com/showthread.php?t=2263822
Sent from my HTCONE using Tapatalk
Click to expand...
Click to collapse
Are you Linux savvy at all? All this crap is far easier on Linux. I guarantee the drivers are absolute cakewalk -- there isn't a specific driver at all, just a rule to tell the kernel about the device.
I can give you the udev rule for the phone if you are sick of trying to get Windows to work. The Android SDK is also quite easy to install.
If you want to try, just install Ubuntu 12.04 LTS. Later versions also work, but that version is the current stable release. I can help from there.
Try another cable maybe it's faulty. Uninstall all the HTC crap, run some cleaner app like ccleaner (maybe there are leftovers) and install only the naked driver. Your phone should be detected. Make sure you have the latest version of ADB. here's the latest http://click.xda-developers.com/api...n 1.1.3 Here&jsonp=vglnk_jsonp_13877458281136
The ruu is not to be flashed with fastboot commands, you must run the exe file
Here's the latest ruu
http://click.xda-developers.com/api....05.651 .5&jsonp=vglnk_jsonp_138775039936710
-extract zip to a folder on your pc
-using fastboot, type this cmd: fastboot oem lock this will relock the bootloader
-from pc, run ARUWizard.exe from the extracted folder. it will run the RUU utility & flash back to stock
Sent from my HTCONE using Tapatalk
Installing Ubuntu
Not Linux savy at all, but I'll install Ubuntu. I'll let you know when I'm able to boot into it. Thanks.
tdhite said:
Are you Linux savvy at all? All this crap is far easier on Linux. I guarantee the drivers are absolute cakewalk -- there isn't a specific driver at all, just a rule to tell the kernel about the device.
I can give you the udev rule for the phone if you are sick of trying to get Windows to work. The Android SDK is also quite easy to install.
If you want to try, just install Ubuntu 12.04 LTS. Later versions also work, but that version is the current stable release. I can help from there.
Click to expand...
Click to collapse
Ogre77497 said:
Not Linux savy at all, but I'll install Ubuntu. I'll let you know when I'm able to boot into it. Thanks.
Click to expand...
Click to collapse
When you get it installed, login and open a terminal windows (it'll install Unity by default, so click on the first button on the left sidebar and search for terminal, then click on it), then type exactly the following (cut/copy/paste should do it too) noting that the first command will make you give your password since sudo requests root level access:
sudo apt-get update -y
sudo apt-get install -y wget openjdk-7-jdk
wget http://dl.google.com/android/android-sdk_r22.3-linux.tgz
mkdir ~/bin
cd ~/bin
tar xvzf ~/android-sdk_r22.3-linux.tgz
cat >> ~/.bashrc <<EOF
if [ -d ${HOME}/bin/android-sdk-linux ]; then
PATH+=":${HOME}/bin/android-sdk-linux/tools"
PATH+=":${HOME}/bin/android-sdk-linux/platform-tools"
fi
export PATH
EOF
exit
That last command will exit the terminal. Start another and it'll read the .bashrc file and presto -- you have SDK access from everywhere.
Then, type this command:
android
That will bring up the SDK UI -- let it download/install all of the latest stuff (r22 of the tools and whatnot).
When done, close the android SDK window.
Type adb (bet it works), but fastboot will require root access (I'm not going to teach you how to get around that yet -- no problem, you just run sudo and I'll show that in a sec).
Finally, plug in your HTC One and type adb devices and let's see if it didn't just know it already.
Lemme know.
Ubuntu 12.04 LTS Installed
I have Linux running on my Dell laptop. No internet though. Something about installing broadcom drivers ..
What do I need to do, sir?
tdhite said:
Are you Linux savvy at all? All this crap is far easier on Linux. I guarantee the drivers are absolute cakewalk -- there isn't a specific driver at all, just a rule to tell the kernel about the device.
I can give you the udev rule for the phone if you are sick of trying to get Windows to work. The Android SDK is also quite easy to install.
If you want to try, just install Ubuntu 12.04 LTS. Later versions also work, but that version is the current stable release. I can help from there.
Click to expand...
Click to collapse
Ogre77497 said:
I have Linux running on my Dell laptop. No internet though. Something about installing broadcom drivers ..
What do I need to do, sir?
Click to expand...
Click to collapse
Check PM
bigdaddy619 said:
Check PM
Click to expand...
Click to collapse
@bigdaddy619 probably got you covered, but if not, let me know. Your friend for Broadcom chips on Dell boxes is here:
https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx
The gist is pretty simple. If you don't know which wireless you have, do this:
1) widen your terminal window so you have ample room (good and wide);
2) run sudo lspci -v
Hunt down the Broadcom info -- it'll say which device is your broadcom wifi. Just need the numbers.
Working ..
I feel like I'm making some progress here, but it's still not being recognized. Everything worked great up until ...
After closing the SDK window, I connected the HTC One, and "Fastboot USB" came up on my phone. I typed adb devices and got a line "List of Devices attached" by nothing was showing as being attached.
If I enter a fastboot command, it hangs saying "waiting on device".
tdhite said:
When you get it installed, login and open a terminal windows (it'll install Unity by default, so click on the first button on the left sidebar and search for terminal, then click on it), then type exactly the following (cut/copy/paste should do it too) noting that the first command will make you give your password since sudo requests root level access:
sudo apt-get update -y
sudo apt-get install -y wget openjdk-7-jdk
wget http://dl.google.com/android/android-sdk_r22.3-linux.tgz
mkdir ~/bin
cd ~/bin
tar xvzf ~/android-sdk_r22.3-linux.tgz
cat >> ~/.bashrc <<EOF
if [ -d ${HOME}/bin/android-sdk-linux ]; then
PATH+=":${HOME}/bin/android-sdk-linux/tools"
PATH+=":${HOME}/bin/android-sdk-linux/platform-tools"
fi
export PATH
EOF
exit
That last command will exit the terminal. Start another and it'll read the .bashrc file and presto -- you have SDK access from everywhere.
Then, type this command:
android
That will bring up the SDK UI -- let it download/install all of the latest stuff (r22 of the tools and whatnot).
When done, close the android SDK window.
Type adb (bet it works), but fastboot will require root access (I'm not going to teach you how to get around that yet -- no problem, you just run sudo and I'll show that in a sec).
Finally, plug in your HTC One and type adb devices and let's see if it didn't just know it already.
Lemme know.
Click to expand...
Click to collapse
Ogre77497 said:
I feel like I'm making some progress here ....
Click to expand...
Click to collapse
Hang in, writing you some instructions, just a few minutes -- just need to get a udev rule into place but I want to make it easy for you.
---------- Post added at 08:18 PM ---------- Previous post was at 07:50 PM ----------
tdhite said:
Hang in, writing you some instructions, just a few minutes -- just need to get a udev rule into place but I want to make it easy for you.
Click to expand...
Click to collapse
Actually -- let's walk before we run. I loaded up Ubuntu real quick to assure I can duplicate what I want you to see. So, do this:
1) connect (if not already connected) the HTC to the usb port so you get 'fastboot (usb)' as normal;
2) type the following:
sudo su
lsusb -v >/tmp/lsusb.txt
chmod 666 /tmp/lsbusb.txt
exit
Now, edit that file in the text editor (just search for 'edit' like you did for 'termina' and select the "Text Editor". When you get that open, have it "File | Open" the file above -- /tmp/lsusb.txt
Then look through for text similar to what I give below. If we get that -- I need the idVendor line -- it should read: "idVendor 0x0bb4 High Tech Computer Corp."
I copied some sample output from my own machine so you can see how it should look:
--------
probably a bunch of stuff we don't care about, then something like...
Bus 001 Device 005: ID 0bb4:0ff0 High Tech Computer Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0bb4 High Tech Computer Corp.
idProduct 0x0ff0
bcdDevice 1.00
iManufacturer 1 htc, Inc
iProduct 2 Android 1.0
iSerial 3 XXXXXXXXXXXX (I X'd this out -- it'll be your device serial id).
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
and a bunch more stuff...
If we don't see that, we got troubles. If we do -- we'll make a udev rule to load it up for adb and fastboot.
It appears he's bricked, when we first mounted the phone to the PC and it tried to install drivers we got QHSUSB_DLOAD which usually indicates a brick.
The strange thing was we could still access fastbootusb and the PC would recognize it being in fastboot. But any other command then fastboot devices would lock up the bootloader and fail.
Getting Closer
That's exactly it. "idVendor 0x0bb4 High Tech Computer Corp."
Finally, something worked. Thanks.
Now, edit that file in the text editor (just search for 'edit' like you did for 'termina' and select the "Text Editor". When you get that open, have it "File | Open" the file above -- /tmp/lsusb.txt
Then look through for text similar to what I give below. If we get that -- I need the idVendor line -- it should read: "idVendor 0x0bb4 High Tech Computer Corp."