User:Dhylands: Difference between revisions
(Added ueventmon) |
mNo edit summary |
||
| Line 4: | Line 4: | ||
I wrote up a page on creating a [[DHylands_SGS2_SerialAdapter|serial adapter]] for the Samsung Galaxy S2. | I wrote up a page on creating a [[DHylands_SGS2_SerialAdapter|serial adapter]] for the Samsung Galaxy S2. | ||
And a page on getting the [[DHylands_SGS2_Console|kernel console]] on the serial port. | And a page on getting the [[DHylands_SGS2_Console|kernel console]] on the serial port. | ||
== Ubuntu 12.04 == | |||
Here's a page with notes about [[DHylands_Ubuntu_12.04|using ubuntu 12.04]]. | |||
==Tools== | ==Tools== | ||
Revision as of 19:15, 25 May 2012
Here's some information about me
Samsung Galaxy S2
I wrote up a page on creating a serial adapter for the Samsung Galaxy S2. And a page on getting the kernel console on the serial port.
Ubuntu 12.04
Here's a page with notes about using ubuntu 12.04.
Tools
ack
I found a really great search tool called ack. It's bascically grep but better. It automatically searches directories and knows about source files (which it looks through), and source repository files (which it ignores).
I normally install the standalone version (the command below assume you have a ~/bin directory)
curl http://betterthangrep.com/ack-standalone > ~/bin/ack && chmod 0755 !#:3
You can use the ACK_OPTIONS environment variable to make ack automatically search idl and ipdl files:
export ACK_OPTIONS="--type-set idl=.idl --type-set ipdl=.ipdl"
colored logcat
This is a script I've been carrying around for a while. It takes the output from adb logcat -v threadtime and colorizes it.
pathlist
I wrote a little utility called pathlist, which shows each element of your PATH variable, but puts each path on a separate line. It also highlights paths which exist by coloring them in green and highlights paths which don't exist in red.
#!/bin/bash
#
# This script prints out your PATH, one subdirectory per line.
#
RED="\033[1;31m"
GREEN="\033[1;32m"
NO_COLOR="\033[0m"
IFS=:
for dir in ${PATH}
do
if [ -d ${dir} ]
then
echo -e "${GREEN}${dir}${NO_COLOR}"
else
echo -e "${RED}${dir}${NO_COLOR} - doesn't exist"
fi
done
Typical output looks like:
/home/dhylands/bin
/usr/local/bin
/usr/local/sbin
/bin
/sbin
/usr/bin
/usr/sbin
/some/path/which/doesnt/exist
/opt/slickedit/bin
/home/dhylands/work/xulrunner-sdk/sdk/bin
ueventmon
ueventmon is a command line tool which will report uevents as they occur. It reports the event as well as the individual parameters.
Typical output looks like:
root@android:/ # ueventmon Socket opened change@/devices/platform/sec-battery/power_supply/battery ACTION=change DEVPATH=/devices/platform/sec-battery/power_supply/battery SUBSYSTEM=power_supply POWER_SUPPLY_NAME=battery POWER_SUPPLY_STATUS=Full POWER_SUPPLY_HEALTH=Good POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_ONLINE=1 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_VOLTAGE_NOW=4182500 POWER_SUPPLY_CAPACITY=100 POWER_SUPPLY_TEMP=280 POWER_SUPPLY_CURRENT_AVG=-1 SEQNUM=1767