5

I have Android debuggable set to false, yet the condition true. What is wrong here?

Application:

//debugable false or true, nothing changes
 if ((applicationFlags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {

     Log.d(TAG, "debugable");
 }

Manifest:

<application android:debuggable="false" ...  
user949884
  • 503
  • 1
  • 8
  • 15
  • @Pleerock: This is absolutely wrong sire :) – OcuS Mar 30 '12 at 16:01
  • before publishing as per google **Preparing for Release** document You can deactivate logging by removing calls to Log methods in your source files. You can disable debugging by removing the android:debuggable attribute from the tag in your manifest file, or by setting the android:debuggable attribute to false in your manifest file. – Krutik Apr 05 '12 at 10:15

3 Answers3

2

The answer to this very question is already given on SO.

See Android 'debuggable' default value.

Community
  • 1
  • 1
OcuS
  • 5,320
  • 3
  • 36
  • 45
1

. Declaring your application as "debuggable" in your Android Manifest enables you to debug your Android applications on an Android-powered device , just as you would on the emulator When using Eclipse, running your app directly from the Eclipse IDE automatically enables debugging. If you manually enable debugging in the manifest file, be sure to disable it before you build for release (your published application should usually not be debuggable).

5hssba
  • 8,079
  • 2
  • 33
  • 35
  • So has the flag in the debug mode is ignored, only if I install die app on my device, right? – user949884 Mar 26 '12 at 10:00
  • 2
    yes..on running your app in eclipse.. it makes debuggable =true by default.. you can alter only when working on your device – 5hssba Mar 26 '12 at 10:04
0

The debuggable flag in the manifest gets changed automatically, you can remove it completely, which is also recommended by Google.

If you debug your application, the flag is true. If you export the applicaton, the flag is false.

Juan Cortés
  • 20,634
  • 8
  • 68
  • 91
vRallev
  • 4,982
  • 3
  • 31
  • 34