Posts

Showing posts with the label Android 4.4 Kitkat

Android Webview Set Proxy Programmatically Kitkat

Answer : Here is my solution: public static void setKitKatWebViewProxy(Context appContext, String host, int port) { System.setProperty("http.proxyHost", host); System.setProperty("http.proxyPort", port + ""); System.setProperty("https.proxyHost", host); System.setProperty("https.proxyPort", port + ""); try { Class applictionCls = Class.forName("android.app.Application"); Field loadedApkField = applictionCls.getDeclaredField("mLoadedApk"); loadedApkField.setAccessible(true); Object loadedApk = loadedApkField.get(appContext); Class loadedApkCls = Class.forName("android.app.LoadedApk"); Field receiversField = loadedApkCls.getDeclaredField("mReceivers"); receiversField.setAccessible(true); ArrayMap receivers = (ArrayMap) receiversField.get(loadedApk); for (Object receiverMap : receivers.values())...

Bluetooth HCI Snoop Log Not Generated

Answer : UPDATE: The btsnoop hci log seems to be getting phased out of the user-accessible areas on a lot of phones. Assuming you have hci logging enabled, you can get a bugreport adb bugreport anewbugreportfolder Then decompress the folder. If you're lucky there is an 'FS' folder that contains the btsnoop_hci.log log several layers down (not sure why some phones have this and some don't.) If you don`t have it, grab the bug report text file that looks like this bugreport-2018-08-01-15-08-01.txt Run btsnooz.py against it. Per Google`s instructions, To extract snoop logs from the bug report, use the btsnooz script. Get btsnooz.py. Extract the text version of the bug report. Run btsnooz.py on the text version of the bug report: btsnooz.py BUG_REPORT.txt > BTSNOOP.log As of 8/1/18 the link to btsnooz is here: https://android.googlesource.com/platform/system/bt/+/master/tools/scripts/btsnooz.py LEGACY ANSWER: You can see where your phone is storing th...