Java tutorial
//package com.java2s; // Use of this source code is governed by a BSD-style license that can be import android.content.Context; import android.provider.Settings; public class Main { @SuppressWarnings("deprecation") private static String getDebugAppPreJBMR1(Context context) { boolean adbEnabled = Settings.System.getInt(context.getContentResolver(), Settings.System.ADB_ENABLED, 0) == 1; if (adbEnabled) { return Settings.System.getString(context.getContentResolver(), Settings.System.DEBUG_APP); } return null; } }