Skip to content

Instantly share code, notes, and snippets.

diff -ur a/src/com/android/phone/NetworkQueryService.java b/src/com/android/phone/NetworkQueryService.java
--- a/src/com/android/phone/NetworkQueryService.java 2019-05-04 07:44:45.525858527 +0100
+++ b/src/com/android/phone/NetworkQueryService.java 2019-05-04 07:49:03.385063857 +0100
@@ -334,9 +334,10 @@
String mcc = null;
String mnc = null;
log("operatorNumeric: " + operatorNumeric);
- if (operatorNumeric != null && operatorNumeric.matches("^[0-9]{5,6}$")) {
+ if (operatorNumeric != null && operatorNumeric.matches("^[0-9]{5,6}")) {
mcc = operatorNumeric.substring(0, 3);

Debugging a crashing bluetooth service

Getting logs for others

Enable Bluetooth HCI Snoop Logging in Developer Options and reboot. Wait for a crash and when one occurs, send /data/misc/bluetooth/logs and a logcat of the crash

Reading logs

DO NOT ATTEMPT THIS IF YOU ARE NOT EXPERIENCED WITH C/C++

#!/usr/bin/perl
######################################################################
#
# File : split_bootimg.pl
# Author(s) : William Enck <enck@cse.psu.edu> & Hackintosh5 (penn5@github)
# Description : Split appart an Android boot image created
# with mkbootimg. The format can be found in
# android-src/system/core/mkbootimg/bootimg.h
#
# Thanks to alansj on xda-developers.com for