Do AVDs (Android Virtual Devices) write logs? If so where?
Asked Answered
H

2

11

About 3 days ago, after doing a bunch of AVD updates, SDK updates, Eclipse updates, Windows updates, doing end of year backups.... all new AVDs I create using the AVD manager seem to crash while loading. Windows pops up a box with the following message.

  • Emulator-arm.exe has stopped working
  • A problem caused the program to stop working correctly;
  • Windows will closed the program and notify you if a solution is available [Close Program]

AVDs created more then a week ago still seem to be working fine. Dose the AVD write logs I can examine to try and figure out what happened (I'm a curious kind of guy, and like to figure out what happened, rather then just uninstall/reinstall the AVD and hope for the best.)? My questions are:

1 - Do ADVs and/or the ADV manager write logs when they have problems?

2 - Where do I find any of these logs? / How should I read them?

Hydrastinine answered 1/1, 2013 at 19:16 Comment(0)
S
8

You can run the emulator from within a terminal to get all the output ( including errors ).

Run "emulator.exe -help" to get the complete list of possible arguments.

Solidago answered 1/1, 2013 at 19:25 Comment(1)
Hi Robert : Ran emulator as C:\Andriod\adt-bundle-windows-x86\sdk\tools>emulator.exe -avd joe_04 -verbose Crashed as before with following info in log - Failed to allocate memory: 8 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. - Searched SO, found this might be caused by allocating too much memory. Reduced memory allocation to 512 Meg. Restarting AVD with lower memory got me past the original problem, but the AVD never fully activated. Will post new problem tomorrow - ThanksHydrastinine
P
0

In my case using emulator.exe -help was not working (probably not in path).

It was able to locate it in my case at

C:\Users\USERNAME\AppData\Local\Android\Sdk\emulator\

where USERNAME is the windows user name.

Something that is useful in this moment is for example the program Everything (it is a freeware, licence). Windows search also works but indexing takes a lot of time if all locations are included and this program kind of just finds everything instantly (at least for me).

How to get logs

If you know the name of the device you can just directly use some command like this (if emulator.exe is in path or you are in the correct folder or you use the full path):

emulator.exe -avd AVDDEVICENAME -debug init

AVDDEVICENAME is the name of your device. -verbose is an alias for -debug-init (which according to documentation disables emulator-init-logs and therefor it has to be used without -, but for me it looks like it does not make a difference so try both).

With -help-debug-tags all options for debug-mode can be listed. The basic options can be viewed with -help and all options with -help-all.

If you don't know what AVDs are available, then you can use -list-avds.

Prelect answered 18/6 at 13:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.