[SOLVED] HTC Sensation isn't recognized in Linux for Debugging - HTC Sensation

YES, i have watched the n00bs video and my mum wasn't very happy about the call.
I've posted this question in stackoverflow too.
ANYWAY, I'm using the Eclipse IDE.
I can only see question marks in the Android Device Chooser; where I'd usually find numbers. it's like I didn't add udev rules for the device
It's a Sensation 4g from T-Mobile to be exact. I tried with an HTC Inspire and it worked fine, logcat also worked fine but not with this newer Handset.
The sensation works fine on windows but i prefer developing on linux; Ubuntu 11.04 to be more specific
And also, I can use the sensation as a disk drive on Ubuntu but the problem remains. I usually connect the handset in "Charge Only" mode; this seems to allow debugging just fine on the HTC Inspire.
this is my terminal output from $lsusb
Code:
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 09da:054f A4 Tech Co., Ltd
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[B]Bus 001 Device 004: ID 0bb4:0c86 High Tech Computer Corp.[/B] //THIS IS THE ONE!!!
Bus 001 Device 002: ID 0c45:62c0 Microdia Sonix USB 2.0 Camera
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
and Here's the contents of my "rules" file: $sudo gedit /etc/udev/rules.d/51-android.rules
Code:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
I don't understand why it works fine with the older HTC handset but not with this one.
AND YES, I REMEMBERED TO TURN DEBUGGING ON THE PHONE; it works in windows remember?
sadly, I wasn't allowed to post his in the developers forum because i'm a n00b and I don't deserve it.
SUMMARY:
I want to debug my HTC Sensation in Ubuntu!

Did you also run this command?
Code:
chmod a+r /etc/udev/rules.d/51-android.rules
Sometimes you need to kill adb first.
You can do this by invoking this command:
Code:
sudo adb kill-server
Hope that helps ;-)

Hi M!W
Thanks for the answer.
I remember doing something similar before without success. I tried again using your commands and sadly nothing changed
It's never simple with me XD
Sent from my HTC Sensation Z710a using XDA Premium App

Looks like you are missing somehting from your udev rules
mine looks like:
Code:
#HTC Sensation
SUBSYSTEM=="usb", SYSFS{idVendor}=="[0bb4]", MODE="0666"
SUBSYSTEM=="usb",ATTR{idVendor}=="[0bb4]",ATTR{idProduct}=="[0c86]",SYMLINK+="android_adb"
SUBSYSTEM=="usb",ATTR{idVendor}=="[0bb4]",ATTR{idProduct}=="[0c86]",SYMLINK+="android_fastboot"

[SOLVED]
smakked said:
Looks like you are missing somehting from your udev rules
mine looks like:
Code:
#HTC Sensation
SUBSYSTEM=="usb", SYSFS{idVendor}=="[0bb4]", MODE="0666"
SUBSYSTEM=="usb",ATTR{idVendor}=="[0bb4]",ATTR{idProduct}=="[0c86]",SYMLINK+="android_adb"
SUBSYSTEM=="usb",ATTR{idVendor}=="[0bb4]",ATTR{idProduct}=="[0c86]",SYMLINK+="android_fastboot"
Click to expand...
Click to collapse
WORKS LIKE A CHARM! i just removed the "[]" brackets, maybe it would've worked anyway
THANKS A HEAP! I've clicked thanks

SUBSYSTEM=="usb", SYSFS{idVendor}=="[0bb4]", MODE="0666"
SUBSYSTEM=="usb",ATTR{idVendor}=="[0bb4]",ATTR{idProduct}=="[0c86]",SYMLINK+="android_adb"
SUBSYSTEM=="usb",ATTR{idVendor}=="[0bb4]",ATTR{idProduct}=="[0c86]",SYMLINK+="android_fastboot"
Click to expand...
Click to collapse
Finally i can break this problem.

Related

[Q][NS4G] Bricked? - Device Not Recognized in OS X, Windows or Ubuntu

Hey all, I had a botched ICS upgrade on my Nexus S 4G today using Google's factory images. I can get into TWRP and into the bootloader, but my device is not recognized by any operating system that I have tried to connect it to. Swapping USB cables hasn't made a difference. My other NS4G can connect with no problems to any of these operating systems with any USB cable. While the phone does charge over USB while connected to a computer, I can't mount the SD card in TWRP and I can't use fastboot in the bootloader. With fastboot, the only message I get is "waiting for device."
Should I just cut my losses and jettison the phone? Any suggestions on how to remedy the situation?
Thanks in advance for your help.
Pitiful bump.
Which factory image did you flash? What's the exact model of your phone? See the sticker beneath the battery.
Can you boot the mobile?
What was the problem through fastboot update?
Boot into bootloader/fastboot mode. What does it display?
Please provide a lot more details about the problem.
anglergab said:
Which factory image did you flash? What's the exact model of your phone? See the sticker beneath the battery.
Can you boot the mobile?
What was the problem through fastboot update?
Boot into bootloader/fastboot mode. What does it display?
Please provide a lot more details about the problem.
Click to expand...
Click to collapse
Thanks for the reply. Pretty sure I'm bricked unless I can get JTAG. I wasn't paying attention and it was super late at night when I was flashing for my wife (who was over custom roms). I mixed up bootloaders and sent the GSM version to my CDMA Nexus. I can't boot into Android. I can get into TWRP, but can't mount USB to get any files onto the device.
Connect the phone to a Linux PC, then please post in this thread the output of the following commands:
Code:
tail /var/log/messages
Code:
lsusb
By the way you can reflash baseband/radio firmware image from recovery through ADB.
anglergab said:
Connect the phone to a Linux PC, then please post in this thread the output of the following commands:
Code:
tail /var/log/messages
Code:
lsusb
By the way you can reflash baseband/radio firmware image from recovery through ADB.
Click to expand...
Click to collapse
Thanks for the reply. I'll give it a shot in a few hours when I can get to a linux box. Part of the problem is that I get no recognition that the device is connected from any OS. I tried accessing the phone while it was in download mode through Heimdall running on Ubuntu and it couldn't see the phone.
I'll give the commands a try though and let you know. Should the phone be at the bootloader or in recovery?
You can try connecting the phone first in bootloader and then recovery. Run the above commands in both modes. Connect the phone directly, without hubs, preferably with its own cable.
anglergab said:
You can try connecting the phone first in bootloader and then recovery. Run the above commands in both modes. Connect the phone directly, without hubs, preferably with its own cable.
Click to expand...
Click to collapse
This is my output both times. The computer can't see the phone.
[email protected]:~$ tail /var/log/messages
tail: cannot open `/var/log/messages' for reading: No such file or directory
[email protected]:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 04f2:0841 Chicony Electronics Co., Ltd
Bus 001 Device 004: ID 046d:0990 Logitech, Inc. QuickCam Pro 9000
Bus 001 Device 005: ID 0781:5530 SanDisk Corp. Cruzer U3 4gb SDCZ36
Bus 001 Device 006: ID 0461:4d0f Primax Electronics, Ltd
Bus 002 Device 003: ID 0bda:0151 Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)
Bus 002 Device 004: ID 148f:3573 Ralink Technology, Corp.
[email protected]:~$
Click to expand...
Click to collapse

IF stuck between roms Tutorial (Linux walkthrough, Windows one on the way)

This is for if you have flashed a rom and it boot loops and when you try and restore and it stays in a bootloop,
I had this issue during the week and freaked out but thanks to termleech who created this http://forum.xda-developers.com/showthread.php?t=1699535 rom I was able to get my tablet back in working order.
This Tutorial is for Ubuntu/Linux (ill try and get one for windows but I wasnt able to do this through windows) for this im also guessing that you have a custom recovery flashed.
Step one:
go to http://source.android.com/source/initializing.html and go down to the section that says configure usb access the file will be saved in this location in /etc/udev/rules.d/51-android.rules
follow that section for all the lines that say "<username>" replace <username> with the account name that you are using,
in my case each of those it was changed to "aaron".
Step two:
Open terminal and type sudo lsusb this will display everything that is connected through usb. you should get something looking like this
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 0c45:641d Microdia 1.3 MPixel Integrated Webcam
Bus 002 Device 003: ID 0b05:4d03 ASUSTek Computer, Inc.
Bus 002 Device 004: ID 0bda:0159 Realtek Semiconductor Corp. Digital Media Card Reader
Bus 002 Device 005: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 002 Device 006: ID 413c:8161 Dell Computer Corp. Integrated Keyboard
Bus 002 Device 007: ID 413c:8162 Dell Computer Corp. Integrated Touchpad [Synaptics]
Bus 002 Device 008: ID 413c:8160 Dell Computer Corp. Wireless 365 Bluetooth
Now in the File you created from step one create a new line and replace the values with the values you just got from lsusb
so the line for me looked like this when I pasted it back into the file.
# usbboot protocol on asus (Asus Transformer TF300T)
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="4d03", MODE="0600", OWNER="Aaron"
Step three:
Setting up the Android SDK
This is where I had the most trouble.
So you need to open the market place on Ubunto and download openJDK7, let that install then go to the android site and download the the android tools
http://dl.google.com/android/android-sdk_r20-linux.tgz
extract that to your desktop.
Then in terminal navigate to the folder called tools in the sdk and open it.
then type sudo ./android
that will install the tools and open android sdk manager.
when that opens all you will need to do is tick the tools box and it will install everything you need.
Once that is installed you will need to navigate to the platform-tools folder in the root of that folder.
What I did was also copy the rom that I wanted to flash into the folder just to make it easier on myself.
On your tablet boot it into the custom recovery but by powering the tablet it on and holding the volume down and power button then pressing the volume up.
YOu can leave you tablet in the home screen for the recovery for the next bit.
Step four:
Copying the rom to the tablet.
On terminal you will need to navigate back to the platform-tools folder.
and copy the rom you want to use into it (for this i will call the rom fix.zip this is just for this tutorial)
make sure your tablet is connected now and in the recovery sceen not{/B] fastboot!!!!!
on terminal type sudo ./adb push fix.zip /sdcard
It will look like its doing nothing that pop up saying that it copied it 33 seconds.
Step five:
factory reset x3
then wipe cache and dalvik
then flash + gapps (if not included with rom)
then wipe cache + davlik again
then reboot, on first boot it can take between 2-5minutes to start.
Now you have a working tablet again
Hope this helps those who are stuck! ill try get a guide together for windows and maybe a video if many people end up using this.
if you need to get in touch fast im always on twitter @d_crossfader
I am not responsible if anything goes wrong
How do you give root to a user in ubuntu? Thanks for the help by the way have ubuntu installed made rule but cant transfer because im not root user?
Sent from my HTCEVOV4G using xda premium
lukethepainter said:
How do you give root to a user in ubuntu? Thanks for the help by the way have ubuntu installed made rule but cant transfer because im not root user?
Sent from my HTCEVOV4G using xda premium
Click to expand...
Click to collapse
Just use sudo. There is no root user in Ubuntu-based distros.
almost got it
i followed all steps and when i go to push the rom i get
[email protected]:/media/sdk/platform-tools$ ls
aapt adb.vol03+04.par2 aidl fix.zip source.properties
adb adb.vol07+08.par2 api lib
adb.par2 adb.vol15+16.par2 dexdump llvm-rs-cc
adb.vol00+01.par2 adb.vol31+32.par2 dx NOTICE.txt
adb.vol01+02.par2 adb.vol63+35.par2 fastboot renderscript
[email protected]:/media/sdk/platform-tools$ sudo ./adb push fix.zip /sdcard
sudo: ./adb: command not found
[email protected]:/media/sdk/platform-tools$
any suggestions?
Hey could you enable root by following these steps https://help.ubuntu.com/community/RootSudo then try again as su
Sent from my Transformer Pad TF300T using XDA Premium HD app
On vacation this week will try it when I get home and thank you for helping me your the best
Sent from my HTCEVOV4G using xda premium
No worries, when it happened to me last week I freaked out
Sent from my Transformer Pad TF300T using XDA Premium HD app

How to Internet Pass Through from Linux to Sensation?

Hi everyone
I have a Sensation 4g and my system runs Ubuntu 12.04.
I was wondering if there is any way to make Internet Pass Through work with Linux?
In Windows, I install the HTC Sync and it works, but what about Linux?
Thanks
NikosDim said:
Hi everyone
I have a Sensation 4g and my system runs Ubuntu 12.04.
I was wondering if there is any way to make Internet Pass Through work with Linux?
In Windows, I install the HTC Sync and it works, but what about Linux?
Thanks
Click to expand...
Click to collapse
It works by default
In windows it asks for htc sync coz it need drivers to recognize the device
In Linux drivers are not necessarily required
You can just connect the device and use Internet pass through
(if you got adb working on that pc already then you are good to go)
Sent from my pyramid.. Through blazing fast sonic waves
I remember this as well on Ubuntu 11.04 - I only needed to modify some lines for ADB to get it work
well add the attached 51-android.rules file to /etc/udev/rules.d/ ( remove the .txt extension to the file ..i need to add it to attach in xda )
and chmod it to 755
(i.e chmod 755 /etc/udev/rules.d/51-android.rules )
then try the pass through it might work
For me it is not working
Let me explain what I did.
First of all I connected my phone with the laptop. In the beginning the
Code:
adb devices
was giving me ??????????? but I restarted the server as root and then adb was recognizing my device properly.
Then I chose Internet Pass Through in my phone but despite the fact that Ubuntu recognize my phone as a Wired Connection 2 (Wired Network - HTC Android Phone) I don't have internet on my phone. Also when I chose the Internet Pass Through in my phone, the
Code:
adb devices
list is empty (is this normal?).
So, ganeshp I pasted the rules that you gave me in the /etc/udev/rules.d/ and I changed the permisions but no luck. It doesn't work.
Also, after enabling the Internet Pass Through after some minuter I get a failure message on my phone that says
Unable to connect to PC
Either you don't have the latest version of HTC Sync installed on your PC, or another phone is already using Internet pass-through on your PC. Please ensure......etc
Click to expand...
Click to collapse
davebugyi what lines you needed to modify in the adb to get it work?
No one has an answer for this? If you are using Internet pass through without problems in your linux OS share what you did to make it work.
NikosDim said:
No one has an answer for this? If you are using Internet pass through without problems in your linux OS share what you did to make it work.
Click to expand...
Click to collapse
I've got my HIS working in Ubuntu 12.04 (DHD also). No root access or adb needed. Just simple script for Network Manager. I've posted a blog entry about this, it's in Russian, but you can use Google Translate to read it. http_://blog.loquens.org/?p=489
NikosDim said:
For me it is not working
Let me explain what I did.
First of all I connected my phone with the laptop. In the beginning the
Code:
adb devices
was giving me ??????????? but I restarted the server as root and then adb was recognizing my device properly.
Then I chose Internet Pass Through in my phone but despite the fact that Ubuntu recognize my phone as a Wired Connection 2 (Wired Network - HTC Android Phone) I don't have internet on my phone. Also when I chose the Internet Pass Through in my phone, the
Code:
adb devices
list is empty (is this normal?).
So, ganeshp I pasted the rules that you gave me in the /etc/udev/rules.d/ and I changed the permisions but no luck. It doesn't work.
Also, after enabling the Internet Pass Through after some minuter I get a failure message on my phone that says
davebugyi what lines you needed to modify in the adb to get it work?
Click to expand...
Click to collapse
all you have to do is to use sudo
HTML:
sudo adb devices
Do the following:
Press CTRL + ALT + T to open the Terminal.
Inside the terminal type:
Code:
lsusb
Output should look something like this
Code:
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 003: ID 0bb4:0c86 HTC (High Tech Computer Corp.) Sensation
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Take note of these two values 0bb4:0c86 next to the HTC (High Tech Computer Corp.) Sensation.
Then type:
Code:
sudo nano /etc/udev/rules.d/51-android.rules
That will open a file named 51-android.rules then type:
Code:
SUBSYSTEM="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c86", MODE="0666", OWNER="username"
In the text above change 0bb4 and 0c86 with the numbers you got from the lsusb, and instead of the username type youre user name.
Press CTRL + O and hit enter, then press CTRL + X .
if your adb-server was running up until now you need to kill it and restart it as root so type the following:
Code:
adb kill-server
sudo adb start-server
Then to check if everything worked out type
Code:
sudo adb devices
If all went well there should be an output similar this and you are good to go:
Code:
$ sudo adb devices
List of devices attached
BLABLABLA device
Edit: I assumed by the way that you have turned USB Debugging on :> that covers adb part, for the Internet pass trough you dont need drivers for linux just select the mode when you connect your device and you should be good to go.

MI4C ubs drives for linux

Please tell me if there are drivers for our phone under Linux (Manjaro).
If there is, please provide a link.
neonzoff said:
Please tell me if there are drivers for our phone under Linux (Manjaro).
If there is, please provide a link.
Click to expand...
Click to collapse
It doesn't work like that on Linux, you don't need a driver. You need to add a udev rule: go to /etc/udev/rules.d, create if it doesn't exist a .rule file and add something like SUBSYSTEM=="usb", ATTR{idVendor}=="[05c6]", MODE="0666", GROUP="plugdev" to it making sure that you are part of plugdev group. Best, look online, I'm sure Manjaro must have precise instructions on this in some wiki. Vendor/device id can be found if you connect your device via usb and do in terminal lsusb, it will show you all usb devices connected, yours must be Qualcomm: Bus 003 Device 017: ID 05c6:9025 Qualcomm, Inc. Qualcomm HSUSB Device.

adb devices: device offline

Hi, I have recently flashed the Evolution X (Android 11) ROM to my previously bricked device. I'm trying to install some APKs but I get the device offline error:
Code:
~ $ adb install ~/usr/local/Downloads/sh.ppy.osulazer.apk
Performing Push Install
adb: error: failed to get feature set: device offline
This hasnt happened in LineageOS or Pixel Experience.
And if you ask, yes the laptop is detecting the device
Code:
~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0bda:5521 Realtek Semiconductor Corp. Integrated_Webcam_HD
Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 005: ID 0cf3:e009 Qualcomm Atheros Communications
Bus 001 Device 025: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I tried adding the /etc/udev/rules.d/51-android.rules file with the following contents:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0660", GROUP="adbusers"
SUBSYSTEM=="usb",ATTR{idVendor}=="04e8",ATTR{idProduct}=="6860",SYMLINK+="android_adb"
SUBSYSTEM=="usb",ATTR{idVendor}=="04e8",ATTR{idProduct}=="6860",SYMLINK+="android_fastboot"
Then restarted my computer, reloaded udev rules but it still doesnt work. Yes, my user is part of the adbusers group. Also tried as root user but same thing. I'm on Arch Linux btw.
Is there any way to fix this or do I just go back to PixelExperience/LineageOS?
rogerpanza said:
Hi, I have recently flashed the Evolution X (Android 11) ROM to my previously bricked device. I'm trying to install some APKs but I get the device offline error:
Code:
~ $ adb install ~/usr/local/Downloads/sh.ppy.osulazer.apk
Performing Push Install
adb: error: failed to get feature set: device offline
This hasnt happened in LineageOS or Pixel Experience.
And if you ask, yes the laptop is detecting the device
Code:
~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0bda:5521 Realtek Semiconductor Corp. Integrated_Webcam_HD
Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 005: ID 0cf3:e009 Qualcomm Atheros Communications
Bus 001 Device 025: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I tried adding the /etc/udev/rules.d/51-android.rules file with the following contents:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0660", GROUP="adbusers"
SUBSYSTEM=="usb",ATTR{idVendor}=="04e8",ATTR{idProduct}=="6860",SYMLINK+="android_adb"
SUBSYSTEM=="usb",ATTR{idVendor}=="04e8",ATTR{idProduct}=="6860",SYMLINK+="android_fastboot"
Then restarted my computer, reloaded udev rules but it still doesnt work. Yes, my user is part of the adbusers group. Also tried as root user but same thing. I'm on Arch Linux btw.
Is there any way to fix this or do I just go back to PixelExperience/LineageOS?
Click to expand...
Click to collapse
Restart your device.
SubwayChamp said:
Restart your device.
Click to expand...
Click to collapse
I've done that tons of times
rogerpanza said:
I've done that tons of times
Click to expand...
Click to collapse
Well, you didn't mention it, it looks like all is fine with Linux, it could be an error on the ROM side anyway check that you killed ADB server previously, and you don't have many devices attached to the PC. You should try running a terminal from user space like Desktop or Downloads (moving the app there) and not from the root directory to see if something change.
SubwayChamp said:
Well, you didn't mention it, it looks like all is fine with Linux, it could be an error on the ROM side anyway check that you killed ADB server previously, and you don't have many devices attached to the PC. You should try running a terminal from user space like Desktop or Downloads (moving the app there) and not from the root directory to see if something change.
Click to expand...
Click to collapse
I only have my phone plugged into my laptop, tried moving /usr/bin/adb to another folder as you said but same thing. And yeah it's most probably a ROM problem :/

Categories

Resources