How to read the device serial number (not IMEI) of a Samsung Android phone (same value that you get when you call 'adb devices') but from within an app or from the device; not using PC/USB/adb.
I found a solution for HTC and other devices, which is - to call
getprop ro.serialno
in a terminal
as described here,
http://groups.google.com/group/android-developers/browse_thread/thread/3d57b1a214cdf928
but it doesn't work on a Samsung Galaxy S.