Archive | January, 2014

Android Programming Notes

23 Jan

Basic Application elements

  •    Views  – TextBox etc ,
  •    GroupViews – LinerLayout etc
  •    Activity   – Main Screen and other screens
  •   Intent  – Communication mechanism between Activities

Android Activity Life Cycle ( Names are kind of self explanatory ! )

  •  OnCreate
  •  OnStart
  • OnResume
  • OnPause
  • OnPause
  • OnStop
  • OnDestroy

findViewById(  :- find the view by id in xml file , Cast it to appropriate class

Toast for displaying small messages

startActivity(intent) to create an new intent


  • Relative
  • Absolute
  • Lenier
  • Table
  • Grid

Log.* for logging  (DDMS)

Its is actually very easy , Most of it it there in SDK documentation.   I will read the SDK doc to get stuff done for the most part .  Bye for now . This is not supposed to make sense for anyone other than myself gg 😀

Android device not regonized ?

20 Jan

Borrowed from Stackoverflow . Keeping it here for my ready reference

First, check the kind of quotes you are using in your udev rules. It looks like you might be using non-ASCII double quotes. See the difference between the quotes around usb and usb_device, etc.

UBSYSTEM=="usb", SYSFS{idVendor}=="1bbb", MODE="0666"
SUBSYSTEM==”usb_device”, SYSFS{idVendor}==”1bbb”, MODE="0666"

You can also just use sudo with ADB, as suggested by @JeremyD. Doing that makes this file essentially irrelevant.


  1. Edit ~/.android/adb_usb.ini (or if you are running as root, check /root/.android)
  2. Add 0x1bbb to the end of the file if it already exists, otherwise do: echo 0x1bbb >> adb_usb.ini
  3. adb kill-server
  4. adb start-server
  5. Check output of adb devices for your device

Good video

17 Jan


2 Jan

Hey ,

my blog may contain lot of errors , i do not think many people ready my blog . I am therefore posting these as notes to myself , but  if someone did bump into my blog , I still hope that they find this garbage useful !. Please understand that none of it is authoritative

Embedded Linux Development

1 Jan

Although having no real world experience in embedded Linux development, I was deeply interested about the subject. I therefore read many books on the subject and the sad part is there is nothing that cannot be found online. I basically wasted money on the book, I therefore present summary of what I read and plenty of web references so that you save money on those books !.

Step 1 – Learning how to develop a Linux distro by hand

There are plenty of projects that help you do this , only difference is that them most books make use of uclibc or newlib instead of the standard glibc . These are the set of resources that will help you get started on rolling a base linux  system from scratch. Also vim is one true editor, learn to use vim – use vim as the IDE ,period.

  7.  – Buildroot website

The modulus of operandi is as follows

  • Build a root file system structure with what you need
  • Compile the  kernel with barely enough features needed
  • Installing the boot loader , In previous linux versions pre 2.6 i guess , you may get away without installing a boot loader . A summary linux bootloaders is given in following pages
  3. Network booting Linux :-
  • Setting various configurations files like initab, fstab etc

NOTE: if you are completely new to linux environment , you should check out the guide and tutorials in  ( The Linux Documentation Project ) 

Step 2 – Learn and play around with POSIX API

Linux is after all a POSIX complaint system there are plenty of resources available to learn  POSIX programming .

  1. – Linux Programming Guide
  2.  – Advanced Linux Programming , available for download

Step 3- Learn various Linux File systems

Conventional ones include ext based on ones and those with journaling support  brtfs , jfs ,xfs , ReisesFS . Linux supports something known as VFS – or virtual files system which provides a generic interface that is used across files systems . The concept is very similar to inheritance concept in C++ , although Linux kernel is written in C , VFS is a good example that shows that modularity can be attained even if the underlying language does not support it .

Linux includes support for various embedded file systems like f2fs , – file system optimized for nand flash , read only squashfs file system  , tmpfs for storing stuff in ram.  The  mtd devices are found in /proc/mtd  . Typical embedded file systems include jffs2  , yaffs2 , ubifs ,

Step4 Learn about device drivers and about the linux kernel

Programming device drivers : .   The best book on linux kernel in my opinion is by Bovet and Cesati. . It is very well worth your money . But never hesitate to play around and tinker with stuff ! .  After this you have probably gained mastery over all aspects !.  I am listing few libraries that came to my head  . The list is no where near complete.

Light Weight Libraries/Tools to look at

C Libraries:

  • uclibc :- ( also look at busybox !)
  • eglibc:-
  • dietlibc
  • klibc
  • pdpc – public domain c library


  • dropbear  -ssh
  • webservers :- lighthttpd  , boa , thttpd
  • avahi , bind , iw tools

For Graphics :

  • SDL –
  • DirectFb –
  • Kdrive
  • MicroWindows / NanoX –
  •  – Video for linux
  • TinyGL by fabrice bellard


  • sql lite


I summarize my bookish knowledge on embedded linux in general , if someone thinks more can be added , drop in a comment. I am almost sure no even a single soul reads my blog but i am hoping that some random soul will comment and suggest some improvemnts !