Android : Get Hprof Dump For Other Processes From App Code?
Jun 16, 2010
In my application , i have an option to capture the hprof dump. I used
android.os.Debug.dumpHprofData (String fileName)
Initially i though the hprof data generated by the method above is for the entire device , which is not so . The hprof data generated is only for my process.
Now i am trying to generate hprof data for other process as well. I need to get the Hprof dump for all the running processes from application code.
from adb shell i tried "kill -10 <pid>" , This command will generate the hprof file for the corresponding process in the data/misc folder.
Now the problem is this command is working perfectly from the adb shell prompt , but i am not able to embed the command to mycode.
My code is like
Runtime.getRuntime().exec("chmod 777 /data/misc") Runtime.getRunTime().exec("kill -10 <pid>")
No exceptions are thrown , but somehow it is not working. The same code above is capturing Hprof dump for my process, when i give my process ID.
I tried with "android.os.Process.sendSignal (int pid, android.os.Process.SIGNAL_USR1) ;" also.Getting the same problem.It is capturing Hprof dump for my process. For other processes it is not working.
Do we need to have any special permission to kill other process from our process ? Or is it a built issue ? can you please suggest some possible way to get Hprof dump for other processes from application code?.
View 2 Replies
Feb 3, 2010
I'm having trouble analyzing a hprof dum using the Memory Analyzer.. Anyone have any ideas? Here is the error message I get. I just used the "Dump HPROF file" button, and picked it up from the sdcard and opened it with MAT...
View 6 Replies
View Related
Nov 18, 2009
Here,http://android.git.kernel.org/?p=platform/ dalvik.git;a=blob_plain;f=docs/heap-profiling.html;hb=HEAD is a description about Dalvik Heap Profiling.
In "Android 1.6 ("Donut")" section, it says "Select your application and click the "dump HPROF file" button. ". I can find that button in DDMS.
I found there were three items in Device menu: 1.dump device state 2.dump app state(always disabed) 3.dump radio state
Is "dump app state" button the "dump HPROF file" button?
View 5 Replies
View Related
Aug 4, 2010
We have a service that seem to get deadlocked very occasionally in the field. It's not possible to hook up to a debugger. We can detect the deadlock situation programmatically. Is it possible to do this from within Java code?
if (ohIamDeadlocked()) { Thread.something.dumpStacksOfAllThreads(); }
If this is not possible, is there an adb command that could do it? I tried "adb dumpsys" but it doesn't print any stack information.
View 3 Replies
View Related
Apr 17, 2009
As mentioned in the second message, i can generate the hprof files. But I m facing difficulty in opening this file using Jprofiler.
View 3 Replies
View Related
Jan 30, 2009
I found the tool monkey and I ve been doing some test with it but there were two things that I could not do. The first is to read the. hprof files that it produces when the -hprof option is set. I tried to process them with the ECLIPSE memory analizer but it did not work. Do you know if there is a program that reads these files? OH and the other feature that I wanted to know if it even existed was if I could set a preestablished order of commands for the monkey to follow or if it only works randomly.
View 3 Replies
View Related
Oct 4, 2010
I am busy writing an app and I have noticed that it sometimes crashes, and when it does and I get back to my computer then I only have the stack trace.
Is there a way for me to take a memory dump of the app at crash time?
View 3 Replies
View Related
Sep 1, 2010
I'm trying to get a heap dump from ddms in Eclipse, but it gives me the following error:
"Unable to create HPROF file for application 'space.shhh'. Check logcat for more information."
And here is the logcat output: D/ddm-heap(19153): Heap dump: file='/sdcard/com.bunnies.Shhh.hprof' E/dalvikvm(19153): hprof: can't open /sdcard/com.bunnies.Shhh.hprof- hptemp: Perm ission denied.
I've tried this on an actual device (HTC Desire w/ 2.1 Eclair) and an emulator (Donut). Both gave exactly the same result as above. Also, I do have the WRITE_EXTERNAL_STORAGE permission in the manifest.
View 4 Replies
View Related
Apr 16, 2009
I am trying to dump the content of sqlite via adb shell command.
Here is what i did:
CODE:...........
My questions I try both 'tables' command and dump the schema for 'main', I can't find my table. Can you please tell me what am I doing wrong?
In my java code, I am able to insert value to DB like this:
CODE:.................
View 4 Replies
View Related
Sep 8, 2009
Is there any documentation describing the various sections of "dump device state" output from DDMS?
View 3 Replies
View Related
Jun 3, 2010
Is there way to dump the current screen to a bitmap in Android?
And what about dump screen of other applications? For example, running a service background, the foreground app could send an intent to start the service, and capture the current screen and save as a bitmap.
View 2 Replies
View Related
Nov 5, 2010
I am preparing a new update of my application, in this version I need to insert lot of new rows (200) in my db.
Because I don't want to programatically add 200 insert code line for each row, I would like to know what is the best method to accomplish it just with a call to the file and dumping it into my db.
View 4 Replies
View Related
Feb 8, 2010
I have an app which declares a BroadcastReceiver, the receiver gets the broadcast, does what it needs to, then ends ensuring that everything is tidied up as needed. When I examine the system through the DDMS view in Eclipse the process for the application is still running after the receiver has completed. I've even boiled it down to a simple test case which gets a shared preferences instance from the context, checks a random setting, and then exits, and, when run on the 1.5 emulator (which is the minimum supported OS level) the process is still hanging around.The reason this is an issue is memory usage (which shows under DDMS as around 2MB).I've had queries about why the application still uses up memory even when it's not doing anything, so, my question is; Is this behaviour normal, or have I missed something that would make the process exit?
View 9 Replies
View Related
Jun 22, 2009
I've been able to send data via shared memory between threads within a process using MemoryFile.I then tried to send data between a service and an activity in different processes, but the data did not get passed. The name for each call the MemoryFile's constructor was the same.Is it possible to share data between processes using a MemoryFile?
View 6 Replies
View Related
Mar 23, 2010
I have a singleton class and I am using it to access databases. I would like to know how it would behave if I use the same from my remote service class which runs as a separate process. Will it create a new instance in that process or will it use the instance from the other process?
View 3 Replies
View Related
Apr 19, 2010
We were told that, as of Android 1.6, background processes were put in a Linux process scheduling class that limited how much CPU they would use. A few weeks ago, I ran a benchmark test that seemed to validate this claim.I have run more tests, and I am no longer confident in my earlier conclusion. I can get a background process to significantly impact the foreground process, more than would seem to be possible if the background process was, indeed, CPU-limited.
View 14 Replies
View Related
May 1, 2010
I'm having trouble using the nexus one in DDMS on Fedora 12. It is detected fine and I can see two processes, cooliris and uploader.These are the only two that show up. The emulator shows up just fine and i can debug from there. Does anyone have suggestions on how to get the nexus to connect properly?
View 2 Replies
View Related
Nov 4, 2010
I have read all about having separate processes for different Application components, and how to use them.I am curious, what are some appropriate use cases for when an application should actually use separate processes?It seems to me, the main advantage to using separate processes is to make the different portions of your app more easily killable by the OS.
View 7 Replies
View Related
Feb 15, 2009
I've been trying to locate some excessive object creation to deal with hiccuping caused by the garbage collector (any word on upcoming improvements to this, btw?), and have discovered that DDMS is the tool for the job.I shut down eclipse and booted up DDMS, and it finds my device, but lists no processes running (no matter what I run).Initially, it did list the "powermanager" app that I had installed, so I assumed this was causing some kind of conflict and uninstalled it and rebooted my device.Now it simply lists no processes.
View 4 Replies
View Related
Nov 23, 2010
I wrote a JAVA application with native methods, and trigger encoding program in native methods. That makes two processes, one is application process, another is encoding process.I would like to know if there is a way to get encoded data from encoding program and pass them to JAVA application.
View 2 Replies
View Related
Oct 20, 2010
Is there a process manager or task viewer for android that shows how much CPU percentage each process or even each thread in a process takes up?
View 1 Replies
View Related
Nov 12, 2010
I need a library in java that can take HTML content and generate text in the same format that is generated by the Linux lynx program.
That's it. Reasons below if you care.
I need to expose data provided by 3rd party servers to end users on Android. Data format is ancient, in badly formatted HTML, so much that I've tried reading it using java and it fails occasionally (unacceptable). It is also growing every month (preinstall ruled out) and I can't convince them to change to "modern" stuff (life would be great in XML etc.).
Shortest route: I wrote a class to use the W3 html2txt service online (google search it). It worked fine on the app until I got complains and noticed that the W3 service fails occasionally. It's not that big of a deal, but the black box logic expects the output to be in this "lynx like" text format.
So I would like a library to do the conversion (HTML->TXT) in "lynx style" inside the app and avoid the outages in the W3 service. And besides, the lynx output the probably the best I've seen, the most organized and neat.
View 1 Replies
View Related
Mar 4, 2010
Some times after installing my application and first running my application is creating two processes as follows.
CODE:................
View 4 Replies
View Related
Jul 28, 2010
I have an application with a multi-instance activity. I would like each instance of the activity to appear in a new task and process. Any suggestions on how to do this? By manipulating the manifest I can cause all instances of the activity to appear in a specific task and
process, but I haven't found any way to cause each instance to appear in a different task and process.(The requirement to have different tasks is that we want each instance of the activity to appear separately in the task list; the requirement for different processes is that each instance of the activity is backed by a chunk of native code with global state. We can't change either of these.)
View 1 Replies
View Related
Jan 18, 2010
How can I debug some system process (...acore), for example, the status bar, in Eclipse ? I couldn't find any help online yet. I'm able to debug a normal application, but not system threads (windowManagerSevice etc).Also, when I open the Android source in Eclipse using the official instructions, I get build errors, is it OK ? (already executed "make" successfully)
View 2 Replies
View Related
Aug 13, 2010
I have to post messages from one process to another process by using handler .
I am using Handler.post/Handler.sendMessage but i am not getting those messages in another process. I am not getting any exceptions also.
Is it possible to sent messages across processes using Handler?
If it is the case how can i do it?
View 5 Replies
View Related
Jun 24, 2010
Below is a list of all .apk files in the dump, and some notes about what is working and not working .apk apps in the Droix X dump useful for the Evo.
LIST
AccountAndSyncSettings.apk
AdminFeedNotifier.apk
AdService.apk
amazonmp3_1.7.22_signed_zipaligned.apk
android-syncservice-app.apk
ApplicationsProvider.apk
ArcPhotoworkshop.apk
ArcVideoEditorLite.apk (Doesn't work)
AtCmd.apk
AudioEffectSettings.apk
BackupAssistanceClient.apk
BatteryManager.apk
BatteryReport.apk
Blockbuster.apk (Won't install)
Bluetooth.apk
BluetoothDun.apk
blur-services.apk
BlurAlarmClock.apk
BlurCalendar.apk
BlurCalendarProvider.apk
BlurCamera.apk
BlurContacts.apk
BlurContactsSync.apk
BlurEmail.apk
BlurEmailEngine.apk
BlurHome.apk
BlurPhone.apk
BlurSNMessagingEngine.apk
BlurUpdater.apk
Browser.apk
BuaContactAdapter.apk
Calculator.apk
CalendarSync.apk
CarDock.apk (works)
CertInstaller.apk
CityID.apk
ClockWidget.apk
cmas.apk
CompassCalibrate.apk
ContactsData.apk
ContactsProvider2_0.apk
ContactsUnconnected.apk
Conversations.apk
DatamanagerApp.apk
DataManagerService.apk
DLNA.apk
DlnaSystemService.apk
DMService.apk
Dock.apk
DownloadProvider.apk
DrmProvider.apk
EnhancedGoogleSearchProvider.apk
ExtDispService.apk
file.txt
FileManager.apk
FirewallService.apk
FMRadio.apk
FMRadioService.apk
Fota.apk
FriendFeed.apk
GlobalSearch.apk
GlobalUnplug.apk
Gmail.apk
GmailProvider.apk
GoogleApps.apk
GoogleCheckin.apk
GoogleContactsSyncAdapter.apk
GooglePartnerSetup.apk
GoogleSearch.apk
GoogleSettingsProvider.apk
GoogleSubscribedFeedsProvider.apk
gtalkservice.apk
HelpCenter.apk
HomeSyncWizard.apk
HTMLViewer.apk
ImDmPlugin.apk
LatinIME.apk
LiveWallpapers.apk
LiveWallpapersPicker.apk
Location.apk
LocationProxyDmPlugin.apk
MagicSmokeWallpapers.apk
Maps.apk
MarketUpdater.apk
MasterClearErrorReport.apk
MediaGallery.apk
MediaProvider.apk
MediaSync.apk
MediaUploader.apk
megamaid.apk
MessagesWidget.apk
Messaging.apk
MotoAtCmdPlugin.apk
MotoAttAtCmdPlugin.apk
MotoGAL.apk
MotorolaSettingsProvider.apk
MtlrNotifier.apk
Music.apk
Mynet.apk
MyVerizon.apk
NetworkLocation.apk
NewsWidget.apk
oma1motService.apk
OMADownload.apk
OMAProvisioning.apk
OverlaySettingsProvider.apk
PackageInstaller.apk
PhoneAddons.apk
PhoneConfig.apk
PhotoWidget.apk
PicoTts.apk
PNI-Moto.apk
PolicyMgrProvider.apk
PolicyMgrService.apk
ProgramMenu.apk
ProgramMenuSystem.apk
Protips.apk
QuickContactWidget.apk
QuickOffice.apk
RichTextCommon.apk
ScreenReader.apk
SDMService.apk
Settings.apk
Setup.apk
SetupProvider.apk
SetupWizard.apk
Skype_mobile.live.apk ("Skype Mobile can only be used on Verizon Wireless phones")
SocialMessaging.apk
SocialShare.apk
SoundRecorder.apk
StatusWidget.apk
StickyNoteWidget.apk
Stk.apk
StorageMonitorService.apk
Street.apk
Swype.apk
SyncML.apk
SyncMLApp.apk
Talk.apk
TalkProvider.apk
TelephonyProvider.apk
Term.apk
ToggleWidgets.apk
TtsService.apk
UniversalInbox.apk
Upgrader.apk
Usb.apk
UserDictionaryProvider.apk
VClipboard.apk
Vending.apk
VideoPlayer.apk
Visualization.apk
VisualizationWallpapers.apk
VoiceCommands.apk
VoiceSearch.apk
VpnServices.apk
Vvm.apk
WeatherWidget.apk
WmdrmDla.apk
WmdrmWebpush.apk
WorkContacts.apk
YouTube.apk
View 16 Replies
View Related
Sep 2, 2010
I've been trying to diagnose a memory leak in an Android application I'm writing. I got a heap dump loaded into Eclipse, but the results I'm seeing are very curious. There are some 20,000 instances of an exception (specifically, LDAPException from the UnboundID LDAP library) in the heap with no inbound references.
That is, they show up at the root of the dominator tree. The OQL SELECT objects e FROM com.unboundid.ldap.sdk.LDAPException e WHERE (inbounds(e).length = 0) returns over 20,000 results, totalling to nearly all of the heap. And yet, the GC runs before the heap dump and I can see that it's running in the console, repeatedly, during the execution of the leaky code. If these instances have no inbound refs, what could be keeping them alive?
I also tried doing a "shortest paths to GC" query. It shows one LDAPConnectionReader row retaining 2 instances, and ~20k LDAPException @ <addr> unknown rows with various hex addresses.
Update: I haven't had time to further diagnose this since posting it, and the bounty I posted is ending before I likely will. I'm awarding it as best I can now, lest the points go to waste. Thanks to everyone who looked into this! I will come back later and update again with the results of further diagnosis, when life is a little less hectic.
View 3 Replies
View Related
Jul 22, 2010
I rarely play music on myphone, but i do have a few songs on my SD card. Using battery history it shows that MEDIA uses the most internet usage. Was wondering if its safe to put these on autokill and turn off in startup manager
View 1 Replies
View Related
Nov 27, 2010
Seems that what I am about to describe has plagued Droid Incredible users (post from another Android forum). Hoping someone using an Evo on Sprint can share some insight and/or solutions to the issue.
At least twice in the past couple months, all of my text messages (several thousand within dozens of conversation threads) have suddenly disappeared without warning. It basically happens like this: I check or send some texts, check something else on my phone like my email or calender or other routine function, then go back within moments to check or send another text and just like that, my entire text message history is EMPTY. Talk about frustrating!
I have doubled checked my settings and have nothing set that would cause older messages to be purged. Anyone know what may cause this and how to prevent it from happening again? BTW, I also had all my favs as identified in my favs widget totally disappear once (had to re-select each one again). Not sure if this is related, but I thought I mention it.
View 2 Replies
View Related