Java tutorial
//package com.java2s; import android.content.Context; public class Main { static final boolean CLS_TRACE_DEFAULT = false; public static final int DEVICE_STATE_JAILBROKEN = 2; public static boolean isAppDebuggable(Context context) { return (context.getApplicationInfo().flags & DEVICE_STATE_JAILBROKEN) != 0 ? true : CLS_TRACE_DEFAULT; } }