I've been trying to get malloc debug working on my Nexus S 4G but,
after a few days, I'm more lost than when I started. First, I should
ask for a pointer to any docs for this -- I've been going off of
random 2 year old forum posts scattered across the interwebs.
Second, here's what I've done -- a patchwork of what I could get to
work from the aforementioned forum posts:
* Rooted my phone using
http://forum.xda-developers.com/showthread.php?t=970237
(the instructions fail at step 7 but its much easier to ignore them
and copy the zip to the phone as step 1). Despite my changes to their
instructions, this seems to have worked but I had not rooted before.
* Added "native=true" to ddms.cfg.
* As per the forum posts, I've run:
adb shell setprop libc.debug.malloc 1
adb shell stop
adb shell start
adb shell ls
This did nothing unusual but when I do:
adb shell
su
setprop libc.debug.malloc 1
stop
start
ls
then I get this error:
E/libc ( 1519): ls: Missing module /system/lib/
libc_malloc_debug_leak.so required for malloc debug level 1
E/libc ( 1520): getprop: Missing module /system/lib/
libc_malloc_debug_leak.so required for malloc debug level 1
That shared lib mentioned in the error does not exist in /system/lib
(it only has libc.so).
I also get the error if I run the "SuperUser" app on my phone and then
run the first four adb shell commands.
My OS is 2.3.4. My understanding is that the 'ls' command should
simply show a message saying that its running with memory debugging
turned on if all is well.
- David