HTC Wildfire Plugin for debugging not working in UBUNTU - android

I got this following devices :
I got my Ubuntu 64 bits PC
I got my Wildfire (not S, but normal Wildfire)
In my phone,
I have turned on:
USB debugging mode
Also in the charging mode
However, ECLIPSE didn't find my device in their DEVICE section. So, I am wondering for the ideas ! :)
Thank you !

Have you done this setting? (Step 4 mentioned at Using Hardware Devices)
If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below.
To set up device detection on Ubuntu Linux:
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules

Related

Porting AOSP to specific hardware device

UPDATE: Based on this Here is following question: Create specific device tree for AOSP
I followed this: https://source.android.com/source/building.html and set up the environment and downloaded the latest AOSP. Now I wnat to flash it on my specific device, let's say Galaxy S2.
In the "Configuring USB Access: 51-android.rules", how it should look? Because in above official tutorial each entry looks like:
//adb protocol for device X
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="user"
//fastboot protocol for device X
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="user"
But in many places I found this:
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev"
Of course adding user to plugdev group is obvious, but still: In Google`s way there is separate entries for adb & fastboot, and the mode is different...
What would be the ultimate test to see if this step works?
Suppose I modify the correct lines of code & config files for my specific device like stated here: Android device configuration for AOSP. Which means I have a directory with full AOSP files. In the stage of $ lunch aosp_arm-eng what parameters should be for specific hardware device?
Now suppose I have in my output directory built & compiled AOSP files. How should I flash it on my device? It's not very clear from Google`s above tutorial. I prefer to get just a single zip file in order to flash it via CWM recovery etc.
Is there a way to test the result before flashing it on hardware device (To reduce the chances for brick...)?
Thanks,
The adb rules are to enable adb to work over USB. If you can connect to your device over ADB then the adb rules worked. You may have to enable ADB in the device's Developer Settings.
After you have synced AOSP you can build for your device. You can choose your device in the lunch menu. Run the build/setenv.sh script. Then run lunch. It will have a list of specific devices you can choose from. You can add to that list by syncing new device trees into the tree.
By default it will build system.imgs that you flash through fastboot. If you are building AOSP, make otapackage will make a flashable zip.
The build will make an emulator image that you can test by running emulator. That will give you a general idea of if your build works, but will not give you the full story with regards to your specific device. For instance, the emulator build might run but if you forgot to add the correct proprietary files the build might not boot on your specific device. But you are very unlikely to hard brick your device by flashing a system.img.

How to debug using an android phone on Ubuntu Linux?

I have a Haier phone model W716 and I'm using ubuntu to develop my android applications. The issue I have is that I Google USD Driver is not compatible with linux and thus eclipse doesn't detect my device.
How do I proceed to make my device appear?
Enable USB debugging on your device.
Since development is on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property.
For a list of vendor IDs, see USB Vendor IDs, http://developer.android.com/tools/device.html#VendorIds
Now if you really ain't on the VIP list you'll have to write the udev rules yourself in order to access devices connected to USB via adb or fastboot on linux.
Verify your username is included in the plugdev group. Type
groups
From a terminal and look for plugdev in the listed groups. If you do not see plugdev listed, you can add your username to the group with:
sudo gpasswd -a username plugdev
where username should be replaced with your linux username.
After setting the device in USB Debug mode and connecting it to a USB port, throw the command :
lsusb
You should get an output similar to this
...Bus 002 Device 034: ID 0bb4:0c03 High Tech Computer Corp.
The number after ID and preceding the colon is the ATTR{idVendor}
Copy the set of rules listed here, https://gist.github.com/theeyl/a353632e7fdb41ea9e26, to a text file and save it as /etc/udev/rules.d/51-android.rules.You will need sudo/su to write to that directory. So, for instance:
sudo nano /etc/udev/rules.d/51-android.rules
Use this format to add new vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
If you cannot access your device via adb, even after adding your linux user to the plugdev group and restarting the computer, you can try starting the adb service as root. This is dangerous and not recommended but it worked for me:
adb kill-server
sudo $(which adb) start-server
adb devices
Follow same as at this link, its ok for me...
http://www.techotopia.com/index.php/Testing_Android_Applications_on_a_Physical_Android_Device_with_ADB#Linux_adb_Configuration

How to debug my application in Linux with my Android mobile?

How can I debug my Android application in a mobile, not in the emulator?
My OS is Linux. When I try to connect with my mobile device for debugging, it is not
responding.
This question is answered in the documentation for debugging against a mobile
device: Using Hardware Devices.
Directly quoted from their documentation:
Declare your application as "debuggable" in your Android Manifest.
In Eclipse, you can do this from the Application tab when viewing the Manifest (on the right side, set Debuggable to true). Otherwise, in the AndroidManifest.xml file, add android:debuggable="true" to the <application> element.
Set up your device to allow installation of non-Market applications.
On the device, go to Settings > Applications and enable Unknown sources (on an Android 4.0 device, the setting is located in Settings > Security).
Turn on "USB Debugging" on your device.
On the device, go to Settings > Applications > Development and enable USB debugging (on an Android 4.0 device, the setting is located in Settings > Developer options).
Set up your system to detect your device.
<snip - Not using Windows or Mac OS X>
If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux:
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules
You can verify that your device is connected by executing adb devices from your SDK platform-tools/ directory. If connected, you'll see the device name listed as a "device."
If using Eclipse, run or debug your application as usual. You will be presented with a Device Chooser dialog that lists the available emulator(s) and connected device(s). Select the device upon which you want to install and run the application.
If using the Android Debug Bridge (ADB), you can issue commands with the -d flag to target your connected device.
Setting up a Device for Development
Set up your device to allow installation of non-Market applications.
On the device, go to Settings > Applications and enable Unknown sources (on an Android 4.0 device, the setting is located in Settings > Security).
Turn on "USB Debugging".
On the device, go to Settings > Applications > Development and enable USB debugging (on an Android 4.0 device, the setting is located in Settings > Developer options).
Set up your system to detect your device.
If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux:
Log in as root and create the file /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules
On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.

Android on ubuntu with eclipse

I got HTC Desire phone, and i want to be able to run my application (developing ob eclipse or netbeans) on it. But when i run my applications i see (in the list of running devices ??? in 'name' column and ??? in status column. So i cant press OK button (its just disabled). Please tell me how can i make normal synchronization???
I think your problem is described here in step 3:
http://developer.android.com/guide/developing/device.html#setting-up
You have to:
If you're developing on Ubuntu Linux, you need to add a rules file that contains a USB configuration for each type of device you want to use for development. Each device manufacturer uses a different vendor ID. The example rules files below show how to add an entry for a single vendor ID (the HTC vendor ID). In order to support more devices, you will need additional lines of the same format that provide a different value for the SYSFS{idVendor} property. For other IDs, see the table of USB Vendor IDs, below.
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
For Gusty/Hardy, edit the file to read:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
For Dapper, edit the file to read:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules
So this means you've followed all the instructions on the android dev site:
http://developer.android.com/sdk/installing.html#InstallingADT
You should also google "Developing on a Device android dev" (cannot post 2 links!)
My solution is that you need to go (command-line) to "tools" sub-directory in the SDK (that's check step2 in the first link)
Commands to execute:
sudo ./adb kill-server
sudo ./adb start-server
./adb devices
this works for me. I have to do it every time I reboot (would love to have a solution for that!).

Using HTC wildfire for android development

I would like to know whether is it possible to use my HTC wildfire (some links would be nice) for android development instead of the emulator.
I have tried to find the information by Google, but so far no useful results.
If I get more information, I'll update here.
[When I used wildfire with eclipse, I got this.]
Thank you very much.
From your screenshot, it looks like you do not have the permissions set properly to access the USB device.
Either try to run the adb service as root:
$ sudo adb kill-server; sudo adb start-server
OR, the more permanent solution is to set up udev rules for USB device permissions. See the instructions in step 3 of the android Developing on a Device page.
Log in as root and create this file: /etc/udev/rules.d/51-android.rules. The udev system checks this file for special cases when devices are detected.
Edit the file to read:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
This sets permission bits on the dev node to world read and writeable for the special case where the USB vendor ID is equal to 0bb4.
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules
... gives world read permission to these android rules which is needed to let the udev daemon process this new rule.
Sure, all you need is to install the USB driver and follow the directions from here.
The USB driver is included in the HTC Sync software, which you can get here.
Go to htc website
http://www.htc.com/europe/SupportViewNews.aspx?dl_id=982&news_id=769
and download the driver
and just connect the htc phone to the pc and run the application from eclipse.
No configuration needed. It directly runs on the phone instead of emulator.
Cheers!
The only other thing I can think of is how you've set your phone to connect via usb-to-computer... And that might just solve my own similar problems... I'm using "HTC Sync" as my connection style, when I haven't even tried the others.
Lets find out, shall we?
Nope. Connection type didn't matter at all. "Charge Only", "disk drive", "usb tethering", it didn't change my behavior at all (I can launch apps, but logcat shows nothing from my app, and my breakpoints are ignored).
Sounds like it's time for a new question.
If device still not detected (???), after updating /etc/udev/rules.d/51-android.rules as suggested earlier, also unplug and re-plug the usb cable into the device.

Categories

Resources