5,598,779 Members 34,354 Now Online
XDA Developers Android and Mobile Development Forum

[TUT] Debugging apps Via VS 2013 and Visual GDB

Tip us?
Junior Member - OP
Thanks Meter 1
Posts: 18
Join Date: Nov 2010
Talking [TUT] Debugging apps Via VS 2013 and Visual GDB

Maybe there is some clever people that wants to debugg with the VS debugger.

Here is an small guide debugging the psx app
Normally i use Ida Pro but this works also.

Download visual studio 2013

then visual gdb http://visualgdb.com/download/

Download Strongname helper https://anonfiles.com/file/0d112810b...957ae142402211

Download app

1) fire up StrongNameHelper4ANDROID

Drag apk into right posision

press decompile

2) If we rebuild it the gdb debugger wont debugg since the apk have no debugg flags we have to set that before rebuilding it.

open the decompiled folder an locate the manifest.xml

edit manifest.xml and put in the debug flag

    <application  android:debuggable="true"  /application>

like this.

    <application android:theme="@style/AppTheme" android:label="@string/app_name" android:icon="@drawable/drawable_launcher" android:name=".CustomApplication" android:debuggable="true" android:allowBackup="true" android:largeHeap="true">

        <activity android:name=".activity.DebugMainActivity" android:exported="true" android:screenOrientation="portrait" />
3) we have to put gdbserver in the app also.

ill upload it here.

put it in the decompile app.

com.scee.psxandroid\build\apk\lib\armeabi\gdbserve r




3) back to the StrongNameHelper4ANDROID

Press sign

The tool creates an com.scee.psxandroid-crk.apk

Now this is important !!!

Drag the crk-apk into the StrongNameHelper4ANDROID

Then press sign for debug.tool creates com.scee.psxandroid-crkSigned.apk

Not sure why but it only gets signed correctly this way.

ill upload my debugg ready with gdbserver APK here also.

4) Fire up visual studio 2013

Remember to install visual gdb first.

WE now have a new tool

5)press debugg an custom APK file

It will ask you to install some tools the debugger need but when your done it would look like this

Set the shared library to the decompile folder \lib


Now we can choose wich part we want to start debugg.

I find CompanionUtilConnectingActivity interesting so we try this, i see there is also Second screen

7) press debug and wait for an minut

It woul be here we would get alot off errors about the manifest.xml and gdbserver but we fixed that.



Hit the Break (pause)

Now you can set break points and wait to it hits or step 9

9) Use the phone here

connect to console with the app when it does hit break, then set the break point where it connect to console.

then run them to courser.

ITs pretty extended and you can get a ton off info from the debugger



Junior Member - OP
Thanks Meter 1
Posts: 18
Join Date: Nov 2010
LOL i noticed after i made the thread it was suppose to go here >>> Android Software and Hacking General [Developers Only]
Junior Member - OP
Thanks Meter 1
Posts: 18
Join Date: Nov 2010
Working Very nicely

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes