Sunday, April 21, 2013

TFTP LCD PANEL STRUCTURE:

Linux 3.5 Drv Arch commits : A best and simple examples for LED , PMIC, backlight , char driver, to start and simple, are integrated. 
And a new and most important commit on IOMMU ... gr8 
Added Renasas armadillo800eva board support.
iommu/exynos: Add iommu driver for EXYNOS Platforms
This is the System MMU driver and IOMMU API implementation for EXYNOS SoC platforms. EXYNOS platforms has more than 10 System MMUs dedicated for each multimedia accelerators. The System MMU driver is already in arc/arm/plat-s5p but it is moved to drivers/iommu due to Ohad Ben-Cohen gathered IOMMU drivers there. Any device driver in EXYNOS platforms that needs to control its System MMU must call platform_set_sysmmu() to inform System MMU driver who will control it. platform_set_sysmmu() is defined in







Adding a AHB driver, example is can be taken as Tegra : how about commit , and this is the link: 

Then how about MT in HID  feature 

Adding Class D , Stereo Amplifiers ,  driver in ST ,...Multi standard  Sound Processor  ... 
SMARTY LK 3.5 ....


Block diagram for MSP ref design : 
PMIC :

RICOH PMIC RC5T583 regulator Nvidia 

TPS65090 regulator driver 

Friday, April 12, 2013

CAMERA INTERFACE TO AXI BUS (MIPI Camera Serial Interface 1.0specification .Camera Serial Interface 2 v1.0 (CSI-2)





































Monday, April 1, 2013

Android 4.1.2 on Samsung Mobile

Find the images of Samsung make, Android 4.1.2, JB...
adb offline mode in 4.3 is due to non-compatibility of ADB get latest x.x.31 from android.

Check KERNEL VERSION .



To get the Kernel time stamp for the main log or android platform or services running on the system , logcat with some options have to be given. Command as a string :

# logcat -v time -f /dev/kmsg | cat /proc/kmsg > /data/klog_plog.txt

So here klog_plog.txt is the file which has the platform or main log with kernel time stamp.

MADE SYSFS AND PROC FS ENTRIES ON THE LINUX KERNEL FOR THE ANDROID 4.1.2 FOR EMULATOR AND LETS SEE HOW THESE WORKS ON THE DEVICE AND ILL GET BACK AGAIN WITH THE SCREEN SHOTS WITH THE DEVICE , NEXUS S.

CLICK ON THE IMAGE TO VIEW THEM ORGINAL SIZE.....



Error Log details and changes:

LOGE in JB is ALOGE
LOGI in JB is ALOGI


Using dumpsys commands in the Android adb shell

To begin using the following commands, first start a shell with a terminal application or use the adb shell command.

dumpsys gives a wealth of information about the applications on the phone, and the current state of the phone. Without any subcommand, it gives you everything.

dumpsys meminfo displays memory usage

dumpsys cpuinfo displays processor usage

dumpsys account displays information on all accounts

dumpsys activity displays information about activities

dumpsys window displays information about keyboards, windows and their z order

dumpsys wifi shows information about available access points and current connection


I just realized that the quick way to see all of the "subcommands" of dumpsys is to do:

dumpsys | grep DUMP 


The following commands can be found in the folder "/system/bin/ on Nexus .


CommandsDesc.
adbAndroid Debug Bridge
amActivity Manager
app_processExecute a runtime environment for a dalvik class/Jar file.
applypatchApply patches to android files.
usage: applypatch [: ...]
   or  applypatch -c [ ...]
   or  applypatch -s 
   or  applypatch -l

Filenames may be of the form
  MTD::::::...
to specify reading from or writing to an MTD partition.
atraceTrace information captured in the folder of /sys/kernel/debug/tracing/
usage: atrace [options]. Measure the system performance and do the analysis. Systrace tool provides more parameters to measure the performance than atrace.
options include:
  -b N            use a trace buffer size of N KB
  -c              trace into a circular buffer
  -d              trace disk I/O
  -f              trace CPU frequency changes
  -l              trace CPU frequency governor load
  -s              trace the kernel scheduler switches
  -t N            trace for N seconds [defualt 5]
  -w              trace the kernel workqueue
  -z              compress the trace dump
bluetoothdBluetooth Debuging Utility
Usage:
  bluetoothd [OPTION...]

Help Options:
  -?, --help                  Show help options

Application Options:
  -d, --debug=DEBUG           Specify debug options to enable
  -p, --plugin=NAME,..,       Specify plugins to load
  -P, --noplugin=NAME,...     Specify plugins not to load
  -n, --nodetach              Don't run as daemon in background
  -v, --version               Show version information and exit
  -u, --udev                  Run from udev mode of operation
bmgrbmgr is a shell tool you can use to interact with the Backup Manager on Android devices.
usage: bmgr [backup|restore|list|transport|run]
       bmgr backup PACKAGE
       bmgr enable BOOL
       bmgr enabled
       bmgr list transports
       bmgr list sets
       bmgr transport WHICH
       bmgr restore TOKEN
       bmgr restore TOKEN PACKAGE...
       bmgr restore PACKAGE
       bmgr run
       bmgr wipe PACKAGE
bootanimationShow the boot animation.
brcm_patchram_plusThis program downloads a patchram files in the HCD format to Broadcom Bluetooth based silicon and combo chips and and other utility functions.
It can be invoked from the command line in the form
 <-d> to print a debug log
 <--patchram patchram_file="patchram_file">
 <--baudrate baud_rate="baud_rate">
 <--bd_addr bd_address="bd_address">
 <--enable_lpm>
 <--enable_hci>
 uart_device_name
btmacreaderBluetooth MAC Reader.
buBackup
Options:
   -apk,   Save APK
   -noapk,  Save no APK
   -shared,  Save Shared
   -noshared, Save no Shared
   -system,  All Includes System
   -nosystem,  Not all Includes System
   -all,   Everything
bugmailer.shSend Bug Report to Vendor.
bugreportExport all the debug message from Android and Linux layer.
cat -> toolboxConcatenate, a tool to print out the content of a file continually. It's the same usage with Linux.
chmod -> toolboxChange the mode of file. Usage is the same with Linux.
chown -> toolboxChange the owner of a file/folder. Usage is the same with Linux.
cmp -> toolboxCompare the file. Usage is the same with Linux.
contentPerform operations on particular content
usage: adb shell content [subcommand] [options]
usage: adb shell content insert --uri --bind [--bind ...]
  a content provider URI.
  binds a typed value to a column and is formatted:
  :: where:
  specifies data type such as:
  b - boolean, s - string, i - integer, l - long, f - float, d - double
  Note: Omit the value for passing an empty string, e.g column:s:
  Example:
  # Add "new_setting" secure setting with value "new_value".
  adb shell content insert --uri content://settings/secure --bind name:s:new_setting --bind value:s:new_value

usage: adb shell content update --uri [--where ]
  is a SQL style where clause in quotes (You have to escape single quotes - see example below).
  Example:
  # Change "new_setting" secure setting to "newer_value".
  adb shell content update --uri content://settings/secure --bind value:s:newer_value --where "name='new_setting'"

usage: adb shell content delete --uri --bind [--bind ...] [--where ]
  Example:
  # Remove "new_setting" secure setting.
  adb shell content delete --uri content://settings/secure --where "name='new_setting'"

usage: adb shell content query --uri [--projection ] [--where ] [--sort ]
  is a list of colon separated column names and is formatted:
  [:...]
  is the order in which rows in the result should be sorted.
  Example:
  # Select "name" and "value" columns from secure settings where "name" is equal to "new_setting" and sort the result by name in ascending order.
  adb shell content query --uri content://settings/secure --projection name:value --where "name='new_setting'" --sort "name ASC"
dalvikvmLaunch the Dalvik VM to run a Java class in DEX format.
dalvikvm: [options] class [argument ...]
dalvikvm: [options] -jar file.jar [argument ...]

The following standard options are recognized:
  -classpath classpath
  -Dproperty=value
  -verbose:tag  ('gc', 'jni', or 'class')
  -ea[:... |:]
  -da[:... |:]
   (-enableassertions, -disableassertions)
  -esa
  -dsa
   (-enablesystemassertions, -disablesystemassertions)
  -showversion
  -help

The following extended options are recognized:
  -Xrunjdwp:
  -Xbootclasspath:bootclasspath
  -Xcheck:tag  (e.g. 'jni')
  -XmsN  (min heap, must be multiple of 1K, >= 1MB)
  -XmxN  (max heap, must be multiple of 1K, >= 2MB)
  -XssN  (stack size, >= 1KB, <= 256KB)
  -Xverify:{none,remote,all}
  -Xrs
  -Xint  (extended to accept ':portable', ':fast' and ':jit')

These are unique to Dalvik:
  -Xzygote
  -Xdexopt:{none,verified,all,full}
  -Xnoquithandler
  -Xjnigreflimit:N  (must be multiple of 100, >= 200)
  -Xjniopts:{warnonly,forcecopy}
  -Xjnitrace:substring (eg NativeClass or nativeMethod)
  -Xstacktracefile:
  -Xgc:[no]precise
  -Xgc:[no]preverify
  -Xgc:[no]postverify
  -Xgc:[no]concurrent
  -Xgc:[no]verifycardtable
  -XX:+DisableExplicitGC
  -X[no]genregmap
  -Xverifyopt:[no]checkmon
  -Xcheckdexsum
  -Xincludeselectedop
  -Xjitop:hexopvalue[-endvalue][,hexopvalue[-endvalue]]*
  -Xincludeselectedmethod
  -Xjitthreshold:decimalvalue
  -Xjitblocking
  -Xjitmethod:signature[,signature]* (eg Ljava/lang/String\;replace)
  -Xjitcheckcg
  -Xjitverbose
  -Xjitprofile
  -Xjitdisableopt
  -Xjitsuspendpoll

Configured with: debugger profiler hprof jit(armv7-a) show_exception=1

Dalvik VM init failed (check log file)
date -> toolboxSet date value.
date -s yyyymmdd, set date on Android
dd -> toolboxCopy, Convert, and Format a file.
Usage: dd [options]
   bs=BYTES [block size]
   cbs=BYTES [conversion record size]
   conv=KEYWORDS [conv option disabled]
   count=BLOCKS [block count]
   ibs=BYTES [input block size]
   if=FILE [read file]
   obs=BYTES [output block size]
   of=FILE [write file]
   seek=BLOCKS [seek blocks]
   skip=BLOCKS [skip blocks]
Ex: dd if=/data/local/tmp/1gb bs=64k | dd of=/sdcard/1gb
df -> toolboxList free space on disk
dmesg -> toolboxOutput linux debug message
dumpstateDump system status
usage: dumpstate [-b soundfile] [-e soundfile] [-o file [-d] [-p] [-z]] [-s]
  -o: write to file (instead of stdout)
  -d: append date to filename (requires -o)
  -z: gzip output (requires -o)
  -p: capture screenshot to filename.png (requires -o)
  -s: write output to control socket (for init)
  -b: play sound file instead of vibrate, at beginning of job
  -e: play sound file instead of vibrate, at end of job
dumpsysDump functional state
dumpsys [options]
Execute dumpsys will output all the message in case there's no option specified.
option: 
  accessibility
  account
  activity
  alarm
  appwidget
  audio
  backup
  battery
  batteryinfo
  bluetooth
  bluetooth_a2dp
  clipboard
  commontime_management
  connectivity
  content
  country_detector
  cpuinfo
  dbinfo
  device_policy
  devicestoragemonitor
  diskstats
  drm.drmManager
  dropbox
  entropy
  gfxinfo
  hardware
  input
  input_method
  iphonesubinfo
  isms
  location
  lock_settings
  media.audio_flinger
  media.audio_policy
  media.camera
  media.player
  meminfo
  mount
  netpolicy
  netstats
  network_management
  nfc
  notification
  package
  permission
  phone
  power
  samplingprofiler
  scheduling_policy
  search
  sensorservice
  serial
  servicediscovery
  simphonebook
  sip
  statusbar
  SurfaceFlinger
  telephony.registry
  textservices
  throttle
  uimode
  updatelock
  usagestats
  usb
  vibrator
  wallpaper
  wifi
  wifip2p
  window
getevent -> toolboxThe getevent tool runs on the device and provides information about input devices and a live dump of kernel input events.
Usage: getevent [-t] [-n] [-s switchmask] [-S] [-v [mask]] [-d] [-p] [-i] [-l] [-q] [-c count] [-r]
[device]
    -t: show time stamps
    -n: don't print newlines
    -s: print switch states for given bits
    -S: print all switch states
    -v: verbosity mask (errs=1, dev=2, name=4, info=8, vers=16, pos. events=32, props=64)
    -d: show HID descriptor, if available
    -p: show possible events (errs, dev, name, pos. events)
    -i: show all device info and possible events
    -l: label event types and names in plain text
    -q: quiet (clear verbosity mask)
    -c: print given number of events then exit
    -r: print rate events are received
http://source.android.com/tech/input/getevent.html
getprop -> toolboxList some property of Android
hd -> toolboxTo sum up each character in specified file and result the summation.
To do hd command repeatedly and to set delay interval between each execution if -r is designated.
Usage: hd [-b base] [-c count] [-r delay] file
id -> toolboxPrint uid, gid, and context
ifconfig -> toolboxTCP/IP command. Assign an address to a network interface and/or configure network interface parameters. ifconfig is typically used at boot time to define the network address of each interface on a machine.
iftop -> toolboxShow the packet flow for each network interface
Usage: iftop [ -r repeats] [ -d delay ]
inputSend string or key event to device
usage: input [text|keyevent]
       input text 
       input keyevent
insmod -> toolboxLoad a module into the kernel at runtime. The module cannot be used after reboot.
Usage: insmod
ioctl -> toolboxIO Control Command between Up and lower layer.
ioctl [-l ] [-a ] [-rdh] 
  -l    Length of io buffer
  -a   Size of each argument (1-8)
  -r            Open device in read only mode
  -d            Direct argument (no iobuffer)
  -h            Print help
ionice -> toolboxConfigure the Process.
Usage: ionice [none|rt|be|idle] [prio]
kill -> toolboxKill the process
usage:  kill [-s signame | -signum | -signame] { job | pid | pgrp }
        kill -l [exit_status ...]
ln -> toolboxCreate pseudonyms (links) for files, allowing them to be accessed by different names.
ln [-s]
log -> toolboxDisplay specified log information.
USAGE: log [-p priorityChar] [-t tag] message
        priorityChar should be one of:
                v,d,i,w,e
logcatReal time Log for all application running on Android System.
options include:
  -s              Set default filter to silent.
                  Like specifying filterspec '*:s'
  -f    Log to file. Default to stdout
  -r []   Rotate log every kbytes. (16 if unspecified). Requires -f
  -n       Sets max number of rotated logs to , default 4
  -v      Sets the log print format, where is one of:

                  brief process tag thread raw time threadtime long

  -c              clear (flush) the entire log and exit
  -d              dump the log and then exit (don't block)
  -t       print only the most recent lines (implies -d)
  -g              get the size of the log's ring buffer and exit
  -b      Request alternate ring buffer, 'main', 'system', 'radio'
                  or 'events'. Multiple -b parameters are allowed and the
                  results are interleaved. The default is -b main -b system.
  -B              output the log in binary
filterspecs are a series of
  [:priority]

where is a log component tag (or * for all) and priority is:
  V    Verbose
  D    Debug
  I    Info
  W    Warn
  E    Error
  F    Fatal
  S    Silent (supress all output)

'*' means '*:d' and by itself means :v

If not specified on the commandline, filterspec is set from ANDROID_LOG_TAGS.
If no filterspec is found, filter defaults to '*:I'

If not specified with -v, format is set from ANDROID_PRINTF_LOG
or defaults to "brief"
ls -> toolboxList the file and directory at current or specified path.
Usage: ls -l: LIST_LONG; break;
-n:LIST_LONG | LIST_LONG_NUMERIC; break;
-s: LIST_SIZE; break;
-R:LIST_RECURSIVE; break;
-d: LIST_DIRECTORIES; break;
-Z: LIST_MACLABEL; break;
-a: LIST_ALL; break;
-F: LIST_CLASSIFY; break;
lsmod -> toolboxList the module in Android device.
lsof -> toolboxList information in /Proc folder which contains all the process information.
md5 -> toolboxMD5 encription tool
mkdir -> toolboxCreate a folder.
monkeyA automation stress test tool which generates random event for Android device.
mount -> toolboxMount a file structure.
Usage: mount [-r] [-w] [-o options] [-t type] device directory
mv -> toolboxRemove a file.
USAGE: mv 
nandread -> toolboxnandread [-d ] [-f file] [-s sparesize] [-vh]
  -d    Read from 
  -f   Write to 
  -s   Number of spare bytes in file (default 64)
  -R         Raw mode
  -S Start offset (default 0)
  -L    Length (default 0)
  -v         Print info
  -h         Print help
netcfgConfigure network interface
usage: netcfg [ {dhcp|up|down}]
netstat -> toolboxPrint net state
newfs_msdos -> toolboxNew a file System with specified format
usage: newfs_msdos [ -options ] special [disktype]
where the options are:
        -@ create file system at specified offset
        -B get bootstrap from file
        -C create image file with specified size
        -F FAT type (12, 16, or 32)
        -I volume ID
        -L volume label
        -N don't create file system: just print out parameters
        -O OEM string
        -S bytes/sector
        -a sectors/FAT
        -b block size
        -c sectors/cluster
        -e root directory entries
        -f standard format
        -h drive heads
        -i file system info sector
        -k backup boot sector
        -m media descriptor
        -n number of FATs
        -o hidden sectors
        -r reserved sectors
        -s file system size (sectors)
        -u sectors/track
pingCheck if the specified host address is online.
pmPackage Manager for running Dalvik Class file.
printenv -> toolboxPrint Environment Variables and their Values for Android Device
ps -> toolboxPrint the running process with its state.
Usage: ps [options]
    -t   Show threads
   -x   Show time
   -Z   Show MAC Label
   -P   Show Policy
   -p   Show Priority
   -c   Show CPU
reboot -> toolboxReboot Android Device
renice -> toolboxChange the priority of a process.
USAGE: renice [[-r] priority pids ...] [-g pid]
rm -> toolboxRemove a file or folder.
Usage: rm file_name or rm -r folder_name  
rmdir -> toolboxRemove the folder.
Usage: rmdir
rmmod -> toolboxRemove a module
usage: rmmod
route -> toolboxAdd or Remove route
Ex: route add -net 192.168.1.2 netmask 255.255.255.0 gw 192.168.1.1
screencapOutput Android screen
usage: screencap [-hp] [FILENAME]
   -h: this message
   -p: save the file as a png.
If FILENAME ends with .png it will be saved as a png.
If FILENAME is not given, the results will be printed to stdout.
screenshotOutput Android screen
usage: screenshot [-s soundfile] filename.png
   -s: play a sound effect to signal success
   -i: autoincrement to avoid overwriting filename.png
sendevent -> toolboxSend a event trigger to specified device with type, code, and value. E.g. Touch, or Key.
Usage: sendevent [device] [type] [code] [value].
serviceService operation
Usage: service [-h|-?]
       service list
       service check SERVICE
       service call SERVICE CODE [i32 INT | s16 STR] ...
Options:
   i32: Write the integer INT into the send parcel.
   s16: Write the UTF-16 string STR into the send parcel.
setconsole -> toolboxsetconsole [-d ] [-v ] [-gtncpoh]
  -d    Use instead of /dev/tty0
  -v     Switch to virtual console 
  -g         Switch to graphics mode
  -t         Switch to text mode
  -n         Create and switch to new virtual console
  -c         Close unused virtual consoles
  -p         Print new virtual console
  -o         Print old virtual console
  -h         Print help
setprop -> toolboxSet the Android property.
Usage: setprop
sh -> mkshExecute a shell script.
sleep -> toolboxInterval of next action/command (seconds)
start -> toolboxStart a specified service
stop -> toolboxStop a specified service
sync -> toolboxCopy host->device only if changed. adb sync is a tool which may be used to copy files from the computer to the device if the files has been changed. By default the command will synchronize /data and /system unless one option is specified. For the command to operate properly a system variable must be created and defined. ANDROID_PRODUCT_OUT must designate the full actual path to the directory containing a file structure with system and/or data subfolders containing the files and folders changed.
Usage: sync [ ]
toolboxCheck if the specified command existed.
Usage: toolbox command_name
top -> toolboxDisplay usage of thread or process.
Usage: top [ -m max_procs ] [ -n iterations ] [ -d delay ] [ -s sort_column ] [ -t ] [ -h ]
    -m num  Maximum number of processes to display.
    -n num  Updates to show before exiting.
    -d num  Seconds to wait between updates.
    -s col  Column to sort by (cpu,vss,rss,thr).
    -t      Show threads instead of processes.
    -h      Display this help screen.
umount -> toolboxUnmount the device
Usage: umount device_path
uptime -> toolboxThe up time since last boot. The information includes up, idle, and sleep time.
vmstat -> toolboxVirtual Meomory Statistics
Usage: vmstat [ -h ] [ -n iterations ] [ -d delay ] [ -r header_repeat ]
    -n iterations     How many rows of data to print.
    -d delay          How long to sleep between rows.
    -r header_repeat  How many rows to print before repeating
                      the header.  Zero means never repeat.
    -h                Displays this help screen.
voldManage the device on Android. The function is similar with udev in Linux.
watchprops -> toolboxMonitor the change of property and list them. The properties can be viewed by executing getprop and set by executing setprop.
wipe -> toolboxErase the system or data
Usage: wipe 
   system means '/system'
   data means '/data'
wpa_supplicantConfigure WLAN
usage:
  wpa_supplicant [-BddhKLqqstuvW] [-P] [-g] \
        -i -c [-C] [-D] [-p] \
        [-b] [-f] [-e] \
        [-o] [-O] \
        [-N -i -c [-C] [-D] \
        [-p] [-b] ...]

drivers:
  nl80211 = Linux nl80211/cfg80211
options:
  -b = optional bridge interface name
  -B = run daemon in the background
  -c = Configuration file
  -C = ctrl_interface parameter (only used if -c is not)
  -i = interface name
  -d = increase debugging verbosity (-dd even more)
  -D = driver name (can be multiple drivers: nl80211,wext)
  -e = entropy file
  -g = global ctrl_interface
  -K = include keys (passwords, etc.) in debug output
  -t = include timestamp in debug messages
  -h = show this help text
  -L = show license (GPL and BSD)
  -o = override driver parameter for new interfaces
  -O = override ctrl_interface parameter for new interfaces
  -p = driver parameters
  -P = PID file
  -q = decrease debugging verbosity (-qq even less)
  -v = show version
  -W = wait for a control interface monitor before starting
  -N = start describing new interface
example:
  wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
http://tk-blog.blogspot.in/2009/02/relro-not-so-well-known-memory.html


MDP 4 leading to crash :: landscape 1080p video
in portrait orientation or a portrait video in landscape.
Adjusting the clock rate in mdp4_calc_req_blt. 
in Pr_error function. 
pr_err() in this case was missing an argument which caused printk() to dereference a null string.

if (clk > mdp_max_clk * 2) {
pr_err("%s: blt required, clk=%d max=%d", __func__, clk, mdp_max_clk * 2);
ret = -EINVAL;