element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Blog Android based flash system
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join BeagleBoard to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 11 Sep 2013 10:17 PM Date Created
  • Views 1225 views
  • Likes 2 likes
  • Comments 4 comments
  • android
  • emmc
  • usb
  • flash
  • bbb
  • texas_intruments
  • host
  • api
  • beagle_bone_black
  • leedshackspace
  • ti
  • usd
  • java
Related
Recommended

Android based flash system

Former Member
Former Member
11 Sep 2013

Hello!

 

My name is Vlad Ungureanu and this summer I worked for BealgeBoard during Google Summer of Code and developed a way to flash the eMMC or the uSD of a BeagleBone Black using an Android device. All the sources for my project are located at : https://github.com/ungureanuvladvictor/BeagleDroid and I am running a blog where I have described in each week all my problems for the project http://beagleboot.vdev.ro/ . The app works on any Android device that supports USB Host.

 

There are a few drawbacks about the project:

- the AM335x SoC from the BeagleBone Black advertises USB OTG in it`s descriptor and the Android kernel tries to do HNP *host negotiation protocol* but the AM335x does not know how to do that and it cannot be enumerated properly. This issue can be solved my recompiling the kernel for your device and removing USB OTG support from it.

- the AM335x does over USB RNDIS and in my app I figured out in a really advance stage of the project that I need to code the initialization protocol as well and just decied to activate in the Android kernel support for RNDIS_HOST_DRIVER to get rid of this issue.

 

Once you have the app on your phone you can flash the eMMC/uSD card, you choose. The app offers you possiblity to download prebuilt images which can be flashed or supply your own image from the internal memory of the Android device. The supported extensions of images are .xz and .zip. In a future release I will implement more supported extensions.

 

The neat thing is that you can put Android on a BBB and use it to flash another BBB!

 

In the future I am planning to port all these things to Linux and with the help of libusb achieve the same thingie. A nice idea for production is to chain flash them *flash one board using a PC then that board automatically flashes another one and so on until it finishes the chain*.

 

Let me speak a bit about the internal of the app:

 

-when the board is connected to the Android device it first receives MLO over USB

-MLO then receives U-Boot over USB

-U-Boot receives a FIT Image *flatten image tree*. FIT is the same as DTB*syntax wise* it has in it the kernel, ramdisk and the dtb file.

-when the kernel finally booted it brings up an emulated serial port with the help of g_serial and it receives the image

-when the image is on the board *everything stored in the RAM* it flashed based on your choice from the app

 

eMMC flashing takes like 20 minutes with the sending of image to the board. If we compare this with the eMMC flasher from Koen it is a big improvement. Making an uSD card with the 4 gigs Angstrom it takes like 40~50 minutes with a no name uSD card. Did not test with a good SanDisk uSD card.

 

The app has been tested on Nexus 7 *old model* and Galaxy Nexus. I will appreciate if more people will take some time to test my work and be back with comments!

 

In 2 weeks GSoC finishes and until then I will have a full how-to-use guide which I will also post here.

 

Best,

Vlad Ungureanu *vvu on #beagle*

  • Sign in to reply
  • Former Member
    Former Member over 11 years ago

    As promised I`m back with some updates! I have ported most of my Java code to C and now everybody can flash their BBB/BBW using a Linux host. All the source files are at https://github.com/ungureanuvladvictor/BBBabb . How to build the project and how to use it is in the README file on the git repo. Have fun with it and please send me an email if something is wrong!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 11 years ago

    The bad part of the project is hacking the Android device kernel to remove OTG support...still we cannot find a solution to it. This bug was fixed in the 3.4> kernel but I don`t know any phones that are with this kernel version or newer.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fustini
    fustini over 11 years ago

    Thanks for posting!  This would be helpful for me as my last trip (the Open Hardware Summit) I just brought my BBB with Atrix lapdock for the display.  I did also have my Android Samsung SGII smartphone.  I would be cool if I could flash it if a new image came out that I wanted to try.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 11 years ago

    Hello Vlad,

     

    This is excellent stuff, I think it is really a compelling use-case that it is possible to re-flash AM3335x boards in the field (and in less than half the time!), using just a mobile phone. I look forward to the user guide (or I may try it sooner) and will provide feedback from a couple of Android devices.

    The chain-flashing sounds very cool too, replicating BBBs :-)

    The Linux capability will definitely be useful too, reducing the effective cost of a BBB further since no uSD will be needed to flash it with a new image from a PC (or from another BBB running Linux image). So many possibilities!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube