android on beaglebone - success and notes to share.

First off, does anyone know what person or group at TI maintains the following web page. I’d like to contact them and share the following collected notes of a relative noob to beagle and android along with what it took to get things completely working. some things on said page could have been clearer or were glossed over.

http://processors.wiki.ti.com/index.php/BeagleBone-Android-DevKit_Guide#Installation_and_Usage

I’m posting the full notes here in hopes they will help someone else who comes after.

notes on:
using
Ubuntu 12.04 LTS
and
http://processors.wiki.ti.com/index.php/BeagleBone-Android-DevKit_Guide#Installation_and_Usage
to install gingerbread.

card install went flawlessly, however the following did not go as expected.

$ sudo modprobe ftdi_sio vendor=0x0403 product=0xa6d0

  1. rather than using this, much better to simply add a udev rule. https://help.ubuntu.com/community/AndroidSDK is a pretty good guide for setting up a development environment for android on ubuntu.
  2. Failed initially with device busy, no explaination of why that may be or how to find and remedy the issue

$ minicom -D /dev/dmesg | grep FTDI | grep "now attached to" | tail -n 1 | awk '{ print $NF }'

  1. Had to run this command with sudo as aparently I have no rights to access the port as a mortal user.
  2. Failed initially with device busy, no explaination of why that may be or how to find and remedy the issue.

Powering on to Android Terminal

Put the Micro SD card to the slot on the BeagleBone. Press the reset button again. See X-loader and Uboot loading. Allow the boot loader to run the boot script uEve.txt to run.Kernel boots up and Android shell is activated. Wait till Android init to start the zygote thread.
See the below message appearing on the shell.

warning: `zygote’ uses 32-bit capabilities (legacy support in use)

  1. above message never displays
  2. gives what looks like a brief # prompt that never echos anything back
  3. after above “false prompt” goes on to start adb server.

Finally got shell prompt after getting the basic sdk installed and figured out how to use adb -s with the proper incantation being ‘adb -s 0123456789ABCDEF shell’

keyboard and mouse on the host failed to “unloak” the home screen. plugging in a usb hub to the bone (target) and then attaching a usb keyboard and mouse got me a display on the host and working keyboard and mouse directly connected to the target (bone)

usefull reference webpages that made this possible:

https://help.ubuntu.com/community/AndroidSDK
http://processors.wiki.ti.com/index.php/BeagleBone-Android-DevKit_Guide#Installation_and_Usage
http://processors.wiki.ti.com/index.php/Android_ADB_Setup
http://developer.android.com/guide/developing/tools/adb.html
http://en.wikipedia.org/wiki/Android_%28operating_system%29
http://:5801

There is a "Leave a Comment" link at the bottom of the page. Just
register and you can document this all right on the page itself.
Ideally the owner will collect those comments into an update if
applicable.

-Matt

Eric,
thank you for posting your notes. I went through the process of putting Ubuntu 10.04 on my computer, downloading Eclipse and the Android SDK and such. Then I made the Android SD card for my A3 bone. Then I encountered your same problems, but I haven't been able to resolve mine.

I also had to "sudo" this command:
$ minicom -D /dev/`dmesg | grep FTDI | grep "now attached to" | tail -n 1 | awk '{ print $NF }'`

but for the longest time nothing else would happen. I finally got to a point where I could wait and then hit Return to give me a blank # prompt. I figured, wow, looks like the part in
http://processors.wiki.ti.com/index.php/BeagleBone-Android-DevKit_Guide
Setup Ethernet and VNC server

I type in the prompts, but it's flaky and doesn't follow typical CUI shortcuts and you can't back up. With perfect typing, I can get to "# netcfg eth0 dhcp" but it always times out. Did you have this problem? Did you do something different to avoid the odd # prompt?

(you wrote:
2. gives what looks like a brief # prompt that never echos anything back
3. after above "false prompt" goes on to start adb server.)

I don't think I ever got the adb server. And could you explain more about the sdk installation? If I did it through Eclipse earlier, am I good to go?

(Finally got shell prompt after getting the basic sdk installed and figured out how to use adb -s <serial-number> <adb-command> with the proper incantation being 'adb -s 0123456789ABCDEF shell')

Thanks very much for your help!

Eric,
thank you for posting your notes. I went through the process of putting Ubuntu 10.04 on my computer, downloading Eclipse and the Android SDK and such. Then I made the Android SD card for my A3 bone. Then I encountered your same problems, but I haven’t been able to resolve mine.

I also had to “sudo” this command:

$ minicom -D /dev/dmesg | grep FTDI | grep "now attached to" | tail -n 1 | awk '{ print $NF }'

check the permissions on your ttyusbXX ports in /dev and make sure that your normal user in added to the correct group. I’m presently doing email on a friends windows box so I can’t check settins on my dev workstation at present.

but for the longest time nothing else would happen. I finally got to a point where I could wait and then hit Return to give me a blank # prompt. I figured, wow, looks like the part in
http://processors.wiki.ti.com/index.php/BeagleBone-Android-DevKit_Guide
Setup Ethernet and VNC server

I type in the prompts, but it’s flaky and doesn’t follow typical CUI shortcuts and you can’t back up. With perfect typing, I can get to “# netcfg eth0 dhcp” but it always times out. Did you have this problem? Did you do something different to avoid the odd # prompt?

I think I did actually. I have yet to get network working or video with my hdmi cape (video may be working but mu monitor doesn’t like the default res)

(you wrote:
2. gives what looks like a brief # prompt that never echos anything back

  1. after above “false prompt” goes on to start adb server.)

I don’t think I ever got the adb server. And could you explain more about the sdk installation? If I did it through Eclipse earlier, am I good to go?

can you cut and paste the serial console output from the time the bone is powered until just after the false # prompt

(Finally got shell prompt after getting the basic sdk installed and figured out how to use adb -s with the proper incantation being ‘adb -s 0123456789ABCDEF shell’)

you have eclipse installed but do you have the sdk installed? where did you install it. this is one of my peeves about the sdk install directions in that usually one ends up sticking it in their home directory somewhere rather than a proper global install where the binaries are easily used by everyone. I believe adb can be found in the tools directory of the sdk install.

Eric

Thanks Eric-

can you cut and paste the serial console output from the time the bone is powered until just after the false # prompt
Sure, it's at the end of this post.

    (Finally got shell prompt after getting the basic sdk installed and figured out how to use adb -s <serial-number> <adb-command> with the proper incantation being 'adb -s 0123456789ABCDEF shell')

you have eclipse installed but do you have the sdk installed? where did you install it. this is one of my peeves about the sdk install directions in that usually one ends up sticking it in their home directory somewhere rather than a proper global install where the binaries are easily used by everyone. I believe adb can be found in the tools directory of the sdk install.

Eric

My SDK issue seems odd. I wonder if it's because of the time lapsed between my Bbone being distributed to the current software updates I have now. For example - upon opening my cpu terminal window, I have both an "android-sdk-linux" and an "android-sdks". When I look in the first, it doesn't have as many folders as I'm supposed to according to the wiki (specifically, it doesn't have "platform-tools"), but it has a .txt file indicating that the sdk has moved to the "android-sdks" folder. I go there, and dig down a couple layers to "adb". However, I don't know what I"m actually doing with that program. Any command line item starting with "adb" is not recognized.

And, I still don't have the eth0 port really working. I have to manually config each restart, and while sometimes I can ping from the cpu/host, I can't access it.

Thanks again,
Juli

Here's that boot log:

U-Boot SPL 2011.09-00001-g95a7849 (Feb 14 2012 - 10:53:14)
Texas Instruments Revision detection unimplemented
No AC power, disabling frequency switch
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img
                                        
U-Boot 2011.09-00001-g95a7849 (Feb 14 2012 - 10:53:14)
                                        
I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
No daughter card present
NAND: HW ECC Hamming Code selected
nand_get_flash_type: unknown NAND device: Manufacturer ID: 0x10, Chip ID: 0x10
No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0
*** Warning - readenv() failed, using default environment
                                                                                
Net: cpsw
Hit any key to stop autoboot: 0
SD/MMC found on device 0
reading uEnv.txt
                                                                                
214 bytes read
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading uImage
                                                                                
2761376 bytes read
## Booting kernel from Legacy Image at 82000000 ...
   Image Name: Linux-3.1.0-g62911f8-dirty
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 2761312 Bytes = 2.6 MiB
   Load Address: 80008000
   Entry Point: 80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
                                                                                
Starting kernel ...
                                                                                
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Linux version 3.1.0-g62911f8-dirty (a0131746@sditapps03) (gcc ve1
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: am335xevm
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] AM335X ES1.0 (neon )
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pa4
[ 0.000000] Kernel command line: console=ttyO0,115200n8 androidboot.console=f
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 256MB = 256MB total
[ 0.000000] Memory: 253052k/253052k available, 9092k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] DMA : 0xffa00000 - 0xffe00000 ( 4 MB)
[ 0.000000] vmalloc : 0xd0800000 - 0xf8000000 ( 632 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc04f1000 (5028 kB)
[ 0.000000] .init : 0xc04f1000 - 0xc0526000 ( 212 kB)
[ 0.000000] .data : 0xc0526000 - 0xc056ebe0 ( 291 kB)
[ 0.000000] .bss : 0xc056ec1c - 0xc06a5f48 (1245 kB)
[ 0.000000] NR_IRQS:396
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrus
[ 0.000000] Total of 128 interrupts on 1 active controller
[ 0.000000] OMAP clockevent source: GPTIMER1 at 24000000 Hz
[ 0.000000] OMAP clocksource: GPTIMER2 at 24000000 Hz
[ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 1789s
[ 0.000000] Console: colour dummy device 80x30
[ 0.000262] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
[ 0.058627] pid_max: default: 32768 minimum: 301
[ 0.058797] Security Framework initialized
[ 0.058885] Mount-cache hash table entries: 512
[ 0.059363] CPU: Testing write buffer coherency: ok
[ 0.064444] print_constraints: dummy:
[ 0.064694] NET: Registered protocol family 16
[ 0.064925] GPMC revision 6.0
[ 0.065993] OMAP GPIO hardware version 0.1
[ 0.066843] omap_l3_smx omap_l3_smx.0: couldn't find resource
[ 0.066961] omap_mux_init: Add partition: #1: core, flags: 0
[ 0.069678] omap_i2c.1: alias fck already exists
[ 0.070564] omap2_mcspi.1: alias fck already exists
[ 0.070695] omap2_mcspi.2: alias fck already exists
[ 0.080275] bio: create slab <bio-0> at 0
[ 0.081352] SCSI subsystem initialized
[ 0.082324] usbcore: registered new interface driver usbfs
[ 0.082447] usbcore: registered new interface driver hub
[ 0.082620] usbcore: registered new device driver usb
[ 0.083532] omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz
[ 0.084436] Advanced Linux Sound Architecture Driver Version 1.0.24.
[ 0.085093] Bluetooth: Core ver 2.16
[ 0.085194] NET: Registered protocol family 31
[ 0.085213] Bluetooth: HCI device and connection manager initialized
[ 0.085236] Bluetooth: HCI socket layer initialized
[ 0.085255] Bluetooth: L2CAP socket layer initialized
[ 0.085293] Bluetooth: SCO socket layer initialized
[ 0.085499] Switching to clocksource gp timer
[ 0.088708] Switched to NOHz mode on CPU #0
[ 0.094749] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 0.094952] musb-hdrc musb-hdrc.0: dma type: pio
[ 0.095715] musb-hdrc musb-hdrc.0: USB OTG mode controller at d080a000 using8
[ 0.096023] musb-hdrc musb-hdrc.1: dma type: pio
[ 0.096679] musb-hdrc musb-hdrc.1: USB OTG mode controller at d080c800 using9
[ 0.097050] NET: Registered protocol family 2
[ 0.097303] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.097732] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.097959] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.098097] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.098117] TCP reno registered
[ 0.098135] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.098173] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.098459] NET: Registered protocol family 1
[ 0.098841] RPC: Registered named UNIX socket transport module.
[ 0.098862] RPC: Registered udp transport module.
[ 0.098877] RPC: Registered tcp transport module.
[ 0.098892] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.099186] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.099271] omap_init_opp_table: no hwmod or odev for iva, [8] cannot add OP.
[ 0.259418] Gpio value is :117
[ 0.259999] ashmem: initialized
[ 0.261398] msgmni has been set to 494
[ 0.262512] io scheduler noop registered
[ 0.262532] io scheduler deadline registered
[ 0.262622] io scheduler cfq registered (default)
[ 0.263135] Could not set LED4 to fully on
[ 0.264262] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.265501] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[ 0.774897] console [ttyO0] enabled
[ 0.778911] WL1271: BT Enable
[ 0.782234] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[ 0.790084] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[ 0.797814] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[ 0.805491] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[ 0.813207] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[ 0.828015] brd: module loaded
[ 0.835081] loop: module loaded
[ 0.838708] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 0.905551] No daughter card found
[ 0.909200] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 0.924521] Board name: A335BONE
[ 0.927937] Board version: 00A3
[ 0.931239] The board is a AM335x Beaglebone.
[ 0.936647] da8xx_lcdc da8xx_lcdc.0: GLCD: Found TFC_S9700RTWV35TR_01B panel
[ 0.951605] omap_hsmmc.0: alias fck already exists
[ 0.958380] omap2-nand driver initializing
[ 0.962825] OneNAND driver initializing
[ 1.015583] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[ 1.022093] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
[ 1.029665] davinci_mdio.0: probed
[ 1.033253] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
[ 1.040826] Initializing USB Mass Storage driver...
[ 1.046135] usbcore: registered new interface driver usb-storage
[ 1.052462] USB Mass Storage support registered.
[ 1.059746] gadget: Mass Storage Function, version: 2009/09/11
[ 1.066042] gadget: Number of LUNs=1
[ 1.069906] lun0: LUN: removable file: (no medium)
[ 1.075344] gadget: android_usb ready
[ 1.079364] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
[ 1.084965] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus numb1
[ 1.093523] hub 1-0:1.0: USB hub found
[ 1.097526] hub 1-0:1.0: 1 port detected
[ 1.102250] mousedev: PS/2 mouse device common for all mice
[ 1.109387] using rtc device, omap_rtc, for alarms
[ 1.114314] omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
[ 1.121350] i2c /dev entries driver
[ 1.125980] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 1.132604] device-mapper: uevent: version 1.0.3
[ 1.137747] device-mapper: ioctl: 4.21.0-ioctl (2011-07-06) initialised: dm-m
[ 1.146665] Bluetooth: HCI UART driver ver 2.2
[ 1.151341] Bluetooth: HCI H4 protocol initialized
[ 1.156395] Bluetooth: HCILL protocol initialized
[ 1.162525] usbcore: registered new interface driver usbhid
[ 1.168451] usbhid: USB HID core driver
[ 1.173216] logger: created 256K log 'log_main'
[ 1.178188] logger: created 256K log 'log_events'
[ 1.183261] logger: created 256K log 'log_radio'
[ 1.188282] logger: created 256K log 'log_system'
[ 1.194570] ALSA device list:
[ 1.197756] No soundcards found.
[ 1.201514] nf_conntrack version 0.5.0 (3953 buckets, 15812 max)
[ 1.208399] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.214146] TCP cubic registered
[ 1.217586] NET: Registered protocol family 17
[ 1.222833] Bluetooth: RFCOMM TTY layer initialized
[ 1.228026] Bluetooth: RFCOMM socket layer initialized
[ 1.233432] Bluetooth: RFCOMM ver 1.11
[ 1.237401] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 1.242989] Bluetooth: BNEP filters: protocol multicast
[ 1.248505] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 1.254937] Registering the dns_resolver key type
[ 1.260000] VFP support v0.3: implementor 41 architecture 3 part 30 variant 3
[ 1.268100] ThumbEE CPU extension supported.
[ 1.273598] omap2_set_init_voltage: unable to get clk dpll1_ck
[ 1.279772] omap2_set_init_voltage: unable to set vdd_mpu_iva
[ 1.285851] omap2_set_init_voltage: unable to get clk l3_ick
[ 1.291804] omap2_set_init_voltage: unable to set vdd_core
[ 1.302849] Detected MACID=d4:94:a1:35:ca:11
[ 1.308372] omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 U)
[ 1.317847] Waiting for root device /dev/mmcblk0p2...
[ 1.356352] mmc0: host does not support reading read-only switch. assuming w.
[ 1.366813] mmc0: new high speed SDHC card at address b368
[ 1.373181] mmcblk0: mmc0:b368 NCard 7.47 GiB
[ 1.379544] mmcblk0: p1 p2 p3
[ 2.655916] kjournald starting. Commit interval 5 seconds
[ 2.665957] EXT3-fs (mmcblk0p2): using internal journal
[ 2.684186] EXT3-fs (mmcblk0p2): 1 truncate cleaned up
[ 2.689644] EXT3-fs (mmcblk0p2): recovery complete
[ 2.765827] EXT3-fs (mmcblk0p2): mounted filesystem with writeback data mode
[ 2.773324] VFS: Mounted root (ext3 filesystem) on device 179:2.
[ 2.780119] Freeing init memory: 212K
[ 2.928734] WL1271: BT Disable
[ 3.041650] init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_.
[ 3.093902] init: cannot find '/system/etc/install-recovery.sh', disabling ''
# [ 3.678452] adb_open
[ 3.686501] warning: `dhcpcd' uses 32-bit capabilities (legacy support in us)
[ 3.798479]
[ 3.798491] CPSW phy found : id is : 0x7c0f1
[ 3.805301] PHY 0:01 not found
[ 3.993586] gadget: Gadget Zero, version: Cinco de Mayo 2008
[ 3.999753] gadget: zero ready
[ 4.003096] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[ 4.008727] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus numb2
[ 4.017467] hub 2-0:1.0: USB hub found
[ 4.021436] hub 2-0:1.0: 1 port detected
[ 4.032077] android_usb: already disabled
[ 4.036999] adb_bind_config
[ 4.417012] gadget: high speed config #1: android
[ 5.796296] PHY: 0:00 - Link is Up - 100/Full

Note: My folders (android-sdk-linux and android-sdks) are in my home directory. However, I also realized the android-sdk-linux is also installed in my Eclipse directory, but only the newer "/home/user/android-sdks" appears to have the complete set of folders and files.

I tried this "export PATH=${PATH}:/home/user/android-sdks/tools:/home/user/android-sdks/platform-tools"
as suggested from this page: http://wiki.cyanogenmod.com/wiki/Howto:_Install_the_Android_SDK#Linux
No errors, no response. :shrug

It then says go to udev set up. ?

Hi, great work, thanks for sharing the process.
May I ask you about pwm support on Android? If you ls /sys/class/pwm what’s in there? Does the directory even exist? Is it empty or are the pwmss listed?
Thanks!

Thanks Eric-
……

My SDK issue seems odd. I wonder if it’s because of the time lapsed between my Bbone being distributed to the current software updates I have now. For example - upon opening my cpu terminal window, I have both an “android-sdk-linux” and an “android-sdks”. When I look in the first, it doesn’t have as many folders as I’m supposed to according to the wiki (specifically, it doesn’t have “platform-tools”), but it has a .txt file indicating that the sdk has moved to the “android-sdks” folder. I go there, and dig down a couple layers to “adb”. However, I don’t know what I"m actually doing with that program. Any command line item starting with “adb” is not recognized.

adb (and any other executable needs to be in your path or you need to specify it’s location. try changing directories into the directory with the adb executable and typing ./adb -s . the ./ explicitly says go look in the current directory giving the path to the executable and telling the computer where to find it. the biggest problem with how they tell you to install the sdk is that you are told to install in some non standard random place that is only known to you and is not in the global path and not usable systemwide.

And, I still don’t have the eth0 port really working. I have to manually config each restart, and while sometimes I can ping from the cpu/host, I can’t access it.

Can’t help with that (yet) I had the same issue but have yet to resolve it. I’m pretty new to droid and still learning.

Eric