Google Android SDK hello world

Started by jet, December 08, 2012, 02:08:59 AM

Previous topic - Next topic

jet

I am running Windows 8
Have download and installed Google Android SDK
I created the standard Hello World sample
Have run Hello World on the emulator on the PC screen

I have plugged in the A13
connected monitor to VGA, Keyboard & mouse
Plugged in power supply - Up comes Android welcome screen
I can unlock and get into Android and click around etc
Pwr button turns it off.  Reset button turns A13 back on and reboots Android

I have the USB OTG cable plugged into the A13 - but have not yet plugged into my PC
How do I load the Hello World "App" onto the A13 and run it?
I assume the program is loaded from the PC to the A13 over the USB cable
Do I use the wall socket power supply? or does the USB cable supply power to A13?

The Eclipse Android IDE requests a "device" - what is A13 device?
Any other step by step instructions would be appreciated

murerten

#1
First you have to install android adb composite driver on your os for the device. If you check windows devices from control panel you can see if the android adb driver is loaded. If it is not you have to manually choose the android adb driver for your device. The driver is in Android\android-sdk\extras\google\usb_driver folder. Then if you successfully installed the driver you can load your app to your device from eclipse. But you have to make sure that the usb debug option on your device is checked. It is on Settings -> Developer Settings -> Usb debugging on your android device. And that's it I think. But I forgot to say. You have to plug the external supply no matter the usb cable is plugged.

jet

I used the SDK manager to install Google USB Driver package
to C:\android\adt\sdk\extras\google\usb_driver

using the device manager
To Install the driver I browse to that location
android_winusb.inf is in that directory
But the device manager fails to find a driver
So I seem to be stuck - after several hours trying


The device manager seems to see the A13 as
>Other devices
    >Android

Most phones seem to supply their own usb driver - is there an A13 usb driver?

Thanks for any help
I guess if setting up and running the Android IDE were easy everyone would do it
then there would be 700Million apps rather than 700,000  :)



murerten

I understand you. It is hard because allwinner usb vendor id and product id is non standard(VID:0x18d1 PID:0x0003). The driver cannot find it automatically. If you had nexus developer phone it would be much easier. But once you know how to do it it is not difficult. So I say patience. I totally agree what u say. Sometimes a little thing can be so difficult. Whatever.. I don't know exactly how I did it but I think you have to update driver for the device from device manager. Then say pick from list. Then choose have disk and select the google adb driver. Then select adb composite interface. You can try to uninstall existing driver first. Finally the driver is same for all devices I think. It is the vendor and product id that makes difference.

jet

I tried some of these suggestions - another 3 - 4 hours. 
Still can not get driver going....
I could probably get this eventually if I just keep hacking at it.
What is really funny - even if you do manage to get a driver installed and working - you won't remember what you did to make it work - too many complicated steps.

OK lets do this another way.

I tried what seemed like the most obvious and common way to write code for the A13. 
Windows + Google Android SDK + Eclipse .

Is there some other "best way"
What system / tool chain is most used / recommended for A13 programming?

murerten

I think you will do it. I just tried uninstalling and resinstalling the driver as I said and after a restart it worked. But I am using windows 7 pro x64. I didn't used windows 8 so I don't know if there is any problem with that. Just update driver -> pick from list -> show all -> have disk -> choose the driver -> adb composite interface -> that's it. Maybe it's windows 8 you are using. What version are you using?


jet

I gave up on the A13 for now

I bought a Nexus 7 - which showed up this morning

Within 2 or 3 hours I had the Nexus ADB driver installed and my hello world running on the Nexus 7.

The only mistake I made today was to install some sort of file sharing USB driver by accident.  I had to uninstall that and restart the PC.  You do have to manually install the ADB driver -- browse to the correct directory with the ADB driver files.  I had the Nexus plugged in and the USB debugging enabled in settings on the Nexus

I'm sure the A13 replies here + instructions from google sdk all helped....

I will do some simple software testing on the Nexus - then go back to the A13 or my Odroid for testing GPIO.

IMO Arm / Android is overtaking X86 / Windows

Making progress.....

murerten

I'm glad you make progress. The key to success here is not to give up.

johnjonh

#9
Quote from: jet on December 18, 2012, 04:10:42 AM
I gave up on the A13 for now

Hello Jet

I had a similar problem with the ADB driver on XP about a year ago. I had a cheap A8 tablet that had a device ID that was not recognized.

I can not remember the exact details, but what I did was I opened up one of the driver description files that comes with ADB. There were entries for devices like the Nexus that had the device name and usb Vendor ID and product ID. Then I simply made a new entry into the file that had a name for my device and the correct VID and PID. Then the ADB driver recognized my device, no problems. I got the VID and PID of my device by looking at what a (I cant remember what) USB-diagnosis tool was reporting about my tablet when it was connected. I was only using the ADK to root my device, not for actual development.

But what you are asking is possible to solve, rest assured.
   

markome

#10
In order to run hello world on Olinuxino A13 from Eclipse (tools available on http://developer.android.com) you have to install ADB drivers.

I have managed to solve the issue of installing ADB drivers for Olinuxino a13 on Windows 7.

First read a brief explanation about Android drivers, taken from http://www.topnotchtablets.com/installADBdriver
Android tablets have several different modes of operation. We have identified "3" although there are probably at least 1 or 2 more.

I. Firmware Upgrade Mode - Use for installing new firmware on the tablet. Different tablets initiate this mode in different ways. Most often, the device starts in a "powered down" state though.

II. Storage Drive Mode - Used when the tablet is turned on. Allows the user to mount the internal partition(s) of the device to copy files to and from using a computer and a USB Data cable.

III. Android Debugging Mode or ADB (Android Debugging Bridge) mode - Used to run commands from a computer on the device over a USB Data cable. Many of the "scripts" available on our site take advantage of this mode of operation to easily modify system files for users to enhance their device or fix problems without doing a full firmware flash. This mode is the one we will be discussing.

Windows treats each of the above modes as 3 "different" devices. In other words, a different driver (the software that lets the computer and the tablet talk to one another) must be installed for each. Firmware Upgrade mode varies from device to device. Often the driver is easily installed though. Storage Drive Mode takes advantage a generic windows microsoft driver. It is the same driver or something similar that is used to communicate with an external hard drive or a USB thumb drive. It is probably the easiest mode to get setup and running. Finally, ADB Mode can either us a device specific driver, OR, more commonly the device can use a generic driver (ADB Driver or "Android Device" driver) developed by Google. This is what we are concerning ourselves with.

Then download the drivers from http://chinamobiles.org/downloads/zap/Drivers_AllwinnerA10_32and64.zip

Next you will have to install them:
-Connect your Olinuxino A13 USB cable to your PC.
-On Olinuxino select Settings|Developer options and make shure, that USB debugging checkbox is checked.
-After unpacking appropriate version (32 or 64 bit) fire up the device manager of your PC.
-From the device manager select Android device with exclamation mark and choose Properties.
-Select Driver|Update driver|Browse my computer for driver software
-Select folder where you have unpacked correct version of drivers.
Finish installation by few next button clicks and restart of your computer.

When you try to run application from Eclipse now you can choose a running android device.

In order to install drivers on windows 8 you have to switch windows 8 to developer mode.




MastaChau

Anyone have a link to a tutorial that outlines how to get ADB working under Linux with the Olinuxino A13 board?

swiggers

Hi jet,

you have to open the file "android_winusb.inf" in the directory where is the Google USB Driver and add the following lines:

;Android
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_0003
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_0003&MI_01


Hope that helps.

JohnS

On Linux just install ADK, plug board in and for me it just worked.  Really easy.

The previous reply looks to be for Windows.

John

hdpavan

For the first time it's very difficult to get hand on android development so here is the step by step instruction on setting up and writing android application

1) you need to setup the development envirnment and configure it for the first time
     a) [url href="http://www.pavanh.com/2013/03/how-to-install-android-sdk-adt-into.html
"]Set up Android Development Environment[/url]
     b) [url href="http://www.pavanh.com/2013/06/environment-variable-setup-android-sdk.html"]Configure Environment Variable for android[/url]
     c) [url href="http://www.pavanh.com/2013/05/how-to-create-android-virtual-device.html"]Create android virtual device [/url]

2) After you setup the development environment now you are set ready to write android application for sample example
check here [url href="http://www.pavanh.com/2012/09/android-hello-world-example.html"]android helloworld[/url]