Thank you again for this very informative post. However, > In the mean time, you need to use a development device or the > emulator, either of which will allow you to "chmod777 /data/misc".
For me this works fine on the emulator, but it does not work on my dev phone 1 (which I did not re-flash or anything): C:\Android\android-sdk-windows-1.0_r2\tools>adb -e shell # chmod 777 /data/misc chmod 777 /data/misc # ls -l /data/misc ls -l /data/misc drwxrwx--- bluetooth bluetooth 2008-12-06 13:34 hcid # exit exit C:\Android\android-sdk-windows-1.0_r2\tools>adb -d shell $ chmod 777 /data/misc chmod 777 /data/misc Unable to chmod /data/misc: Operation not permitted $ ls -l /data/misc ls -l /data/misc opendir failed, Permission denied $ ls data ls data opendir failed, Permission denied $ chmod 777 data chmod 777 data Unable to chmod data: Operation not permitted $ Is there another way? Thanks On Feb 4, 1:18 am, fadden <[email protected]> wrote: > On Feb 3, 1:42 am, blindfold <[email protected]> wrote: > > > One thing that kept me from further working with this a few days ago > > is that I ran the monkey tool with the --hprof option, which according > > tohttp://code.google.com/intl/zh-TW/android/reference/monkey.html > > puts results in the data/misc folder. However, it seems impossible > > (prohibited) to access that folder on the phone to retrieve the > > generated profiling results? So can this only be used by people who > > flash their own phones with a development build, or did I overlook > > something (I did not dig for long)? > > The VM is listening for two signals, SIGQUIT and SIGUSR1. If you send > it a SIGQUIT it will dump the stacks from all running threads; if you > send it a SIGUSR1 it will dump the heap profiling data. > > On a production device, you can't send signals to arbitrary processes, > so "adb shell kill -10 <pid>" isn't going to work. You can, however, > send the process a signal from itself, using > android.os.Process.sendSignal(myPid(), SIGNAL_USR1). Unfortunately > (as you've noted) this isn't useful unless (a) the process can write > to /data/misc, and (b) you can "adb pull" the files out once they have > been written. > > In not-yet-public Cupcake there's a new call in android.os.Debug that > will dump the heap profiling data to a file you specify. In the > future we hope to be able to control this through DDMS. > > In the mean time, you need to use a development device or the > emulator, either of which will allow you to "chmod777 /data/misc". --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

