在Android开发中,我们使用android.util.Log来打印日志,方便我们的开发调试.但是这些代码不想在发布后执行,我们并不想在软件发布后调试日志被其他开发者看到,现在我的方法是设置一个全局变量,标记软件为Debug模式还是Release模式.来看下代码: public class Log { private static final boolean DEBUG = true; public static void i(String tag, String msg) { if (DEB…
Android device debug by Charge Only mode Method 1 Connect devices to computer and execute lsusb Find current device's info: Bus 001 Device 006: ID 2717:ff08 2717 is VendorID and ff08 is ProductID Then create /etc/udev/rules.d/51-android.rules (sudo n…