How to debug Android Emulator? - android

I want to debug Android emulator source code in order to get deeper understanding of the simulator. It would be great if I can debug with Eclipse.
I have found just a little information about Android emulator source code.
Any help would be appreciated.

See this. This will guide you how to debug in step by step.
To get Different shout-Cuts >> click Ctrl + Shift + L

I don't know what platform you're on, but basically compile it with all debugging symbols, if in linux you can open with gdb or cgdb also providing the source tree and you'll be able to see everything in the context of the source code.
I haven't used eclipse for this purpose but http://wiki.eclipse.org/DSDP/DD/GDB looks promising ...
I'm sure someone can tell you how to do this with windows if you can't figure it out with uncle google.

Related

Building android source and flashing it in emulator

I'm trying to build Android Nougat source following the instructions provided here. For the source code and tags I'm not sure what to opt for so I opted for,
N2G48H android-7.1.2_r36 Nougat 2017-10-05
make is successful it created image files within out/target directory. When I tried to flash it on emulator by simply typing emulator I'm seeing some weird device like this.
Got doubted on my target device type so tried following the instructions provided in this answer but still I'm seeing the same weird screen. Any help on this would be much appreciated.

Enabled symlinks, but fire-app-builder wont work still

I'd like to think I am fairly experienced with Android Studio after a year of playing around with it in my spare time. I've recently wanted to start developing for the Amazon Fire Stick/TV, so I followed the tutorial here, word for word.
The problem I'm encountering has to do with the symbolic linking. I've typed the enable command into both the git and Windows command windows. When I check the status of symlinks in my git shell, it returns true. But when I compile the program my values-en-rUS/strings.xml reads
"../values/strings.xml"
Any help will be greatly appreciated, cheers.
L.Mellor, I updated the Fire App Builder docs with some more instructions that should hopefully address this issue. See the following:
Download and Build Fire App Builder
Configure Symlinks for Windows Without Admin Privileges
In particular, after cloning the repo, run the scripts in that second link.
If you have the chance to try this out and it solves the issue, will you let me know? Thanks.

Can't Set Up Cocos2dx [Android, Eclipse, Windows]

After I have set up the cocos2d-x development environment for Android in Eclipse on Windows through this tutorial, I thought I have settled everything down and ready for development except I can't copy the sample project into my own workspace .. (Still Can't) ..
But, later I found this tutorial, .. It is for setting up cocos2dx for android in Eclipse on iOS ..
In the next tutorial, the author didn't use Cgywin or MinGW anymore.. He just set up with Android NDK ..
What I'm curious is
There are a lot of differences between 1st tutorial and 2nd tutorial. Is that just because of the 2nd tutorial is only meant for iOS ?
I don't see any CPP file except in here "jni/hellocpp/main.cpp" in the project content "org.cocos2dx.hellocpp.HelloCpp" project. But, the 2nd author mentioned a lot of CPP files in his tutorial. Why ? Because of the cocos2dx version difference ?
When I open main.cpp file, it shows a lot of errors.. Almost all of those are xxx could not be resolved. I have already added ..\cocos2dx\include path and ..\platforms\android-9\arch-arm\usr\include path correctly. Why ?
I literally can't run the sample program.. It said java.io.IOException: An established connection was aborted by the software in your host machine .. and in Logcat don't support gles2.0 .. Why ? Is that because my JVM is Java SE 7 Server Version ? The first author mentioned "JavaSE 7" won't work with cocos2dx. It only work with "JavaSE 6" .. But, I still have other Android application projects which depends on "JavaSE 7" .. How can I run the sample project in "JavaSE 7" ??
Sorry for the 1001 questions .. I'm totally a newbie to cocos2dx and really eager to work something with it .. :-)
Regards,
If you are still looking for answers, here are some:
1) The "cannot resolve" errors are actually false, and based on eclipse's buggy predictions. You should turn off this error reporting (see the second tutorial link you have, it shows you how at the end).
2) I have recently used cocos2d-x 2.x, and (to my surprise) it doesn't support running on the AVD. I bought a cheap old Galaxy S of of eBay, and the app ran fine on that.
3) you don't see the cpp files, cause they are added only in the make file initially. You must do some extra work to make them appear in eclipse. (Again, check the second tutorial).

Debugging native code in Android on the *device* (not emulator)

I followed this description for debugging native code in an Android app and it works when debugging on the emulator.
When I want to debug on the actual device, at the point where I switch to the C/C++ debug configuration, Eclipse reports "Remote communication error: Bad file descriptor.". Apparently there's a problem reaching GdbServer (I guess). I suppose all that's missing is a small tweak to the debug configuration. Unfortunately, I don't yet really understand how the whole setup works, so I'm unable to pinpoint/solve the problem. Any help would really be appreciated.
Assuming you're on an ARM Android, you may have better luck with the free ARM-supplied Android debugger: http://ds.arm.com/ds-5-community-edition/
You can get that error if you don't run ndk-gdb to start gdbserver on the device. Here a link to an explaination of how the android remote debugging works: http://mhandroid.wordpress.com/2011/01/25/how-cc-debugging-works-on-android/

Eclipse connected to GDB but when my program crashes, nothing happens

I've managed to build the Debug Configuration that targets remote client using GDB. This was done as per the Android NDK Sequoyah's plugin documentation.
After a few hours of tinkering I was able to get Eclipse to connect to the gdbserver on the device and see its crash through the console (verifying its connected).
But the problem is eclipse doesn't really do anything when it does. No stack trace, no highlighted problem code, nothing!
If anyone has any pointers on this I would greatly appreciate it.
Thanks,
Kevin
I managed to get this working by using OS X instead of Fedora. Probably not a real answer though.

Categories

Resources