Android disk size and wear level check

Use this command to get mount names and origins: df To get block information for data use the command: tune2fs -l /dev/block/mmcblk0p56 (example) If any block does not report “clean” then we can use e2fsck to clean them. To do a check with e2fsck without changing the file system: e2fsck -n /dev/block/mmcblk0p56 (example)

Fix comments not showing in WordPress page

If you have “magazine-basic” wordpress theme, and with recent updates or for any reason; if comment is not showing up in individual posts, follow this change. Navigate from your hosting panel to file:  …/ wp-content / themes / magazine-basic / functions.php. Edit this file. Around line 351, change case statement as below: function bavotasan_comment( $comment, $args, $depth ) {$GLOBALS[‘comment’] = $comment; switch अतिरिक्त Read More

CMake 101

(From When writing CMake scripts there is a lot you need to know about the syntax and how to use variables in CMake. The Syntax Strings using set(): set(MyString “Some Text”) set(MyStringWithVar “Some other Text: ${MyString}”) set(MyStringWithQuot “Some quote: \”${MyStringWithVar}\””) Or with string(): string(APPEND MyStringWithContent ” ${MyString}”) Lists using set(): set(MyList “a” “b” “c”) set(MyList ${MyList} “d”) Or अतिरिक्त Read More

Android NDK console print C/C++ – Chirag Patel

When your Android app has C/C++ code using NDK tools and you want printing output to serial port console, here’s the solution. // change sharing first chmod(“/dev/console”, S_IRWXG | S_IRWXO | S_IRWXU); // open file int serialFd = open(“/dev/console”, O_RDWR | O_NONBLOCK | O_NDELAY | O_NOCTTY | O_APPEND); __android_log_print(ANDROID_LOG_DEBUG, “Serial”, “Serial console fd=%d errno=%d(%s)”, serialFd, अतिरिक्त Read More

Memory Thrashing compiled by Chirag Patel December 27, 2008

Memory Thrashing compiled by Chirag Patel December 27, 2008 (Ref: Embedded Systems Design June 2008) Memory threshing is a typical problem that goes unnotices while programming time-critical systems. Translation Look-aside Buffers (TLB) are used for data and instruction cache. There are two main cache-replacement schemes: 1) Least Frequently Used (LFU) and 2) Least Recently Used अतिरिक्त Read More