i am new in android app testing. i need to find the heap size and heap uses for a app. so i am doing this by using DDMS but there is a problem that, its not showing the running process of device.
Device .Nexus 6.0.1. Can you tell me please What am I missing here??
any help would be appreciated.
See circle in the screenshot where the device is appear but its process not displayed
I just solved the problem.
If you only want to show the information of your app, adding android:debuggable="true" in the corresponding Manifest.xml.
Otherwise, rooting the device and flashing a customized boot.img with "ro.debuggable" set to 1.
Why? Check out:
ro.debuggable
There are 3 possibilities:
Try to change another usb cable.
There are many cables only for charge, not for data connection. buy a cable with data connection maybe solve your problem.
Enable developer option
Go to the settings menu, and scroll down to "About phone." Tap it.
Scroll down to the bottom again, where you see "Build number." Tap it seven (7) times.
After the third tap, you'll see a playful dialog that says you're four taps away from being a developer.
Keep on tapping, you've got the developer settings back.
You dive into that menu to do things like enable USB debugging
Restart adb
adb kill-server
adb start-server
Here you can find step by step process for find the heap size.
Heap Viewer Walkthrough
Hope this will help you..
Related
Google glass 2 stuck on the "Glass" screen, I tried restarting it, but it shows the logo and nothing changes.
I tried to make a factory reset - holding the camera button, clicking on the power button, and continue holding the camera button. I show me the recovery screen with options, but nothing is selectable, clicking on camera button won't let me select or click anything.
Is there any way to make a full factory reset to fix this "Glass" screen issue to make it working again?
As i am not allowed to put a comment i give you following answer....
Have you tried to do a factory reset with ADB as described here:
How can I do factory reset using adb in android?
How to factory reset android using adb
This is the factory reset commands with adb in your command line:
adb reboot bootloader //device will restart
fastboot devices //this will print a device code if it worked right
fastboot erase userdata
fastboot erase cache
Then manually reboot device. You'll need adb and fastboot.
If that doesn't fix the problem, and you don't care about keeping a warranty intact, you can re-flash the firmware. If you care about a warranty... use the warranty.
The firmware is available for the Explorer Edition here, if it's Enterprise E2 it'll be here. Enterprise E1 firmware isn't available freely as far as I know, so if it's EE1 you're out of luck.
The firmware files come with a text file which contains the adb commands you need to run. Run them all in the order they're written. The final one will restart your device. Voila. Clean slate.
If it still doesn't work after that, it's a hardware problem.
I'm using Eclipse+ADT on Mac OS. I have a Nexus 5 connected via USB, but it does not show up in the Android Device Chooser when I run my app from Eclipse. Actually, it did show up once, and I could deploy my app to the phone, but then it just disappeared from the Android Device Chooser.
The really weird thing is that the device is listed when I run
adb devices
on the terminal. I even get the debug messages from the phone in Eclipse's LogCat, so it clearly is connected and recognized – but it still doesn't show up in the Device Chooser. I have tried all the solutions proposed here (rebooting the phone, turning debug mode on and off, restarting adb, restarting Eclipse, etc.) – to no effect.
Any ideas?
I had the same problem. I couldn't see my Nexus 4 in the Device Chooser list even though I could see it in the DDMS. I found out it is just hidden from view. Click the device chooser list and scroll up with your mouse wheel. The device should now be visible in the list.
Eerily similar to what I just spent the last hour figuring out. OS X, Nexus 5, shows up in adb devices, tried everything under the sun.
In my case, it turned out that even though the device wasn't listed, I was able to press the OK button and it launched just fine. (seen below)
I'm not sure if it also helped, but before I stumbled upon that solution, I edited my Launch config options to change from "Always prompt to pick device" to "Launch on all compatible devices/AVS'S" and selected the "Active Devices" options. I ran that and it worked! I expected the device to start showing up in the above menu afterwards, but it didn't. Then I realized it didn't matter and I could hit OK and it would build. Go figure.
The solution of blazeline worked for me but it was a little bit tricky to scroll up to make appear the device.
Another way to do it and to make appear the device more clearly is to disconnect your device when the Device Chooser List is opened and to reconnect it. It will clearly appear now in the device chooser list.
Eclipse is really sometimes strange...
My case was same as mentioned here and obviously i did all tricks with no success but solution was very logic:
device i was missing in pickup list had lower API then allow by AndroidManifest.xml
I'm working on android . it seem's that some times my LogCat doesn't work correctly and do not any thing mean that it don't show any thing . (specialy when i working on more than one emulator .) can any one help me ?I need my LogCat .
Usually it happens when eclipse loses the connection to the adb server. The cause is often testing on more devices/emulators.
In order to fix this, open the DDMS perspective and in the Devices View click on the device for which you want to output the logs in LogCat and they will appear again.
In Eclipse:
Window > Open Perspective > DDMS, then
click on the device in the "Devices" view
Or if you do not want to switch perspectives
Window > Show View > Other
select -> Android > Devices
Might be an filtering issue in eclipse...clear filters and set mode to verbose!
A few items to try:
Make sure your USB Debugging is enabled.
Make sure you have the right drivers for your phone installed - you can usually get them from the manufacturer's website. These are not always the same as the drivers installed by Windows for media sharing. This site will help for finding OEM USB drivers.
Close the LogCat window. Connect your device. Make sure USB debugging is enabled. Re-open LogCat.
Make sure you're in the right view in LogCat. You may be in an app filter view and not the un-filtered view.
Restart Eclipse and try any of #1 - #4.
Good luck!
I have two android devices connected to the same station. I would like to view the logcat for both while running them in debug mode in eclipse.
I have had SOME luck with the following steps:
Run the app on Device 1
Run the app on Device 2
Open a new window (window/new)
In the new window, open view logcat
About 40% of the time this results in in each eclipse window showing data from a different phone... but not always. It seems to be almost a luck-of-the-draw kind of thing. More often than not both windows show the same device. If I open device viewer and select a device in either window both change.
How can I do this all the time?
This is a very late reply but probably you didn't find a solution.
Solution:
Click Window ---> Show View ---> Other ---> Android ---> Devices.
Simply click on a device to switch to its logcat.
You can try to use adb in two different console windows to get the logcat for each one.
Example:
in console window 1: adb -s <device01_serial> logcat
in console window 2: adb -s <device02_serial> logcat
As takecare said.
This is how you can do it:
Find the device id's of Device 1 and Device 2. Do this by opening a shell prompt and typing the command
adb devices
You'll get a list of connected devices and their id's.
Run the command
adb -s [device_1_id] logcat
Where [device_1_id] is the device id of your Device 1 which you obtained in the first step.
Open another shell and do the same as in step 2, but for you Device 2.
I don't believe there's a good way to do this. You can approximate it though. One option is (as other answers have suggested) to use logcat from adb. This obviously isn't as pretty. Another is to run DDMS directly (instead of through Eclipse) for your second window. This gets you pretty close and gives you two logcat windows each with their own device selectors. The DDMS executable is found in the tools folder of your Android installation.
Here's the way I handle switching between device's logcat output using Juno M20120914-1800.
Unfortunately it is not automatic, but it is at least the most reliable way I've found yet, and once you get used to doing it, it's not that bad.
I click on the device icon in the toolbar.
I click on the device name.
Then I click on logcat again and it will show the device I selected.
It seems like this should be a feature, to be able to monitor more than one device/AVD at a time.
I am new to Android development and bought a cheap Huawei Sonic (U8650 apparently) so I could test my first attempts at making an app on an actual device.
However, whenever I try to use 'adb logcat' or 'adb shell' then 'logcat' on the device I get:
Unable to open log device '/dev/log/main': No such file or directory
I have already enabled Usb debugging in Settings -> Developer.
I just don't know enough about Android to know if this is something I can even fix.
I have found two other questions with similar problems:
/dev/log/main not found
??-?? ??:??:??.???: INFO/<unknown>(<unknown>): Unable to open log device '/dev/log/main': No such file or directory
...but they both turned out to be using some kind of non standard kernel that had logging disabled. Mine is a stock phone out of the box.
It's a very cheap but snappy Android 2.3 phone, so hopefully it wasn't a total waste of money.
Any help would be greatly appreciated.
Dial this: *#*#2846579#*#*
Service menu will appear.
Go to "ProjectMenu" -> "Background Setting" -> "Log Setting"
Open "Log switch" and set it to ON.
Open "Log level setting" and set the log level you wish.
Reboot the phone.
Open: /system/etc/init.d/××× (not the same file on different ROMs, find the right file)
Find the line that says: rm /dev/log/main
Change the line to: # rm /dev/log/main (comments out the line, rm = remove, in case you were wondering)
Save and reboot
I'm sharing my case and solution:
My cellphone had a jellybean version oriented to performance (To be exact a Slim Bean ROM) with a Semaphore kernel (You can recognize it because when the cellphone is starting, the semaphore logo is shown). These kind of ROM have by default disabled the logging so I had to download the Semaphore Manager application (You can download it from here). After that, in the section "Modules" I had to turn on the Logger option as it is shown in the picture
Restart and the logcat should be working now!
I have actually found an answer for this finally!
I was having another aimless look to see if anything had been updated about this anywhere and came across a post on xda-developers about a slightly different Huawei device with the same problem.
http://forum.xda-developers.com/showpost.php?p=17774398&postcount=93
It actually worked. I have complete logcat logging on my Huawei Sonic (U8650) now.
Three cheers for not giving up.
Solution, copied from the xda (in case it is removed etc):
There is a hidden service-menu where you can set loggin up. The
service-menu is started by "dialing" this phone number:
*#*#2846579#*#*
I have a custom rom on my Samsung Captivate, but my approach may work for others as well:
Open up CMD or Terminal and type:
adb shell
logcat-enable
reboot
The rom I have is Continuum v6.1, but this still may work for others.
If you have the terminal emulator on the phone, you also may be able to do:
logcat-enable
and then just reboot the phone. I didn't try that, but it probably would work too. My phone is also rooted - don't know if that makes a difference.
it was enough to restart the Huawei device
adb shell
reboot
I'm having exactly the same problem.
Someone from xda-developers wrote something as follows in msg #33
http://forum.xda-developers.com/showthread.php?t=1169869&page=4
One of the reason it can't be rooted is this phone had removed the
"Logcat" mechanism from android. So, this makes most of rooting ways
malfunction.
Maybe right maybe wrong i don't know.Anyway it gives some idea about the case.