Android – How to debug apk signed for release

androidgoogle-play

I have an apk which I've signed and uploaded to Android Market, and installed on my phone. I would like to debug this release apk (by means of Eclipse) whilst it is running on my phone. I have done this before (and remember it being with one of the Android development tools; perhaps Dalvik Debug Monitor) but unfortunately cannot remember how to do it and have been unable to find any articles online. Does anyone know how this can be done?

Note: I have set android:debuggable="true" in the manifest and have enabled USB Debugging on my phone.

Best Answer

I know this is old question, but future references. In Android Studio with Gradle:

buildTypes {
    release {
        debuggable true
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}

The line debuggable true was the trick for me.

Before Gradle 1.0 it was runProguard instead of minifyEnabled. Look at here.