Tag Archives: debug

Debugging IO on Android

Android is Linux based, so there are some interesting way to monitor and debug IO activity especially on storage.

The one I found more useful is this:

  1. enable dumping of IO info
    echo 1 > /proc/sys/vm/block_dump
  2. observe kernel log
    cat /proc/kmsg
  3. make your analysis
  4. disable dumping of IO info
    echo 0 > /proc/sys/vm/block_dump

The output you will get is similar to this:
<7>[71477.927886] kswapd0(24): WRITE block 21240712 on mmcblk0p12 (8 sectors)
<7>[71477.928436] kswapd0(24): WRITE block 21410792 on mmcblk0p12 (8 sectors)
<7>[71477.928710] kswapd0(24): WRITE block 21240704 on mmcblk0p12 (8 sectors)
<7>[71477.929016] kswapd0(24): WRITE block 21240656 on mmcblk0p12 (8 sectors)
<7>[71477.929443] kswapd0(24): WRITE block 25427968 on mmcblk0p12 (8 sectors)
<7>[71477.929687] kswapd0(24): WRITE block 8 on mmcblk0p12 (8 sectors)
<7>[71477.930084] kswapd0(24): WRITE block 0 on mmcblk0p12 (8 sectors)
<7>[71478.086639] sdcard(159): READ block 23431168 on mmcblk0p12 (256 sectors)
<7>[71478.087036] sdcard(159): READ block 23430912 on mmcblk0p12 (8 sectors)
<7>[71478.258148] sdcard(159): READ block 23430920 on mmcblk0p12 (200 sectors)
<7>[71478.258514] sdcard(159): READ block 23431424 on mmcblk0p12 (8 sectors)
<7>[71478.266967] sdcard(138): READ block 23430656 on mmcblk0p12 (32 sectors)
<7>[71478.268798] sdcard(159): READ block 23430688 on mmcblk0p12 (64 sectors)
<7>[71478.269409] sdcard(159): READ block 23430752 on mmcblk0p12 (128 sectors)
<7>[71478.271484] sdcard(159): READ block 23430880 on mmcblk0p12 (32 sectors)
<7>[71478.600646] sdcard(138): READ block 23431432 on mmcblk0p12 (512 sectors)
<7>[71478.765136] sdcard(159): READ block 23431944 on mmcblk0p12 (256 sectors)
<7>[71478.958129] Compiler(412): READ block 327320 on mmcblk0p11 (8 sectors)
<7>[71478.958557] Compiler(412): READ block 327400 on mmcblk0p11 (48 sectors)

Tried on my rooted Galaxy Nexus with CyanogenMod 10.1.0-RC1.

 

Weird problem solved: I cannot activate “Debug USB”

update with latest cm10 ROM from Kalimochoaz (cm-10-FEATURED-crespo.v1.10.zip), the problem is solved. You can download all here
“Android debugging” is crashing

I’m testing Android Jelly Bean on my Nexus S running CyanogenMod 10.

The exact ROM is “cm-10-20120715-FEATURED-crespo.v0.6.zip”.

I’m getting this weird problem: if I disable USB debug, I cannot re-enable it.

I’m talking about the feature of Android which allows you to use adb from your pc.

The exact menu entry can be found under Settings -> Developer options -> Android debugging.

I managed to re-enable Android debugging with Tasker and the Secure Settings plugin.

Step by step procedure

I’m assuming you own a copy of Tasker, you have successfully installed Secure Settings and enabled the relative Helper. To do so you must have a rooted ROM like CyanogenMod.

I’m reporting here the steps I did:

  1. Open Tasker
  2. Go to “Tasks” tab
  3. Create a new task with the green “+” button
  4. Give the task a name (i.e. “Enable Debug”)
  5. Add a new action
  6. Choose “Plugin”
  7. Choose “Secure Settings”
  8. Choose “Edit”
  9. Pick “USB Debugging” from the list
  10. Activate the “On” state
  11. Save with the floppy icon on the bottom
  12.  Now run your task in Tasker (you can use the “play” button)
  13. Verify the state of the checkbox in the Android’s Settings menu