Skip to content

Instantly share code, notes, and snippets.

Avatar

zhuowei

View GitHub Profile
@zhuowei
zhuowei / WDBSetWebSecurityEnabled.m
Created Sep 1, 2020
Disable same-origin policy on iOS WKWebView with private API.
View WDBSetWebSecurityEnabled.m
// Allows disabling Same-Origin Policy on iOS WKWebView.
// Tested on iOS 12.4.
// Uses private API; obviously can't be used on app store.
@import WebKit;
@import ObjectiveC;
void WKPreferencesSetWebSecurityEnabled(id, bool);
@interface WDBFakeWebKitPointer: NSObject
View bootingintolaunchd.txt
QEMU 5.0.92 monitor - type 'help' for more information
(qemu) kprintf initialized
Serial mode specified: 00000007
WARNING: Forcing uart driver to output synchronously.printf()s/IOLogs will impact kernel performance.
You are advised to avoid using 'drain_uart_sync' boot-arg.
initialize_screen: b=00000000, w=00000000, h=00000000, r=00000000, d=00000000
initialize_screen: No video - forcing serial mode
pe_arm_init_interrupts: args: <ptr>
pe_arm_map_interrupt_controller: soc_phys: 0x200000000
pe_arm_map_interrupt_controller: found interrupt-controller
View bootlogalmostlaunchd.txt
QEMU 5.0.92 monitor - type 'help' for more information
(qemu) kprintf initialized
Serial mode specified: 00000007
WARNING: Forcing uart driver to output synchronously.printf()s/IOLogs will impact kernel performance.
You are advised to avoid using 'drain_uart_sync' boot-arg.
initialize_screen: b=00000000, w=00000000, h=00000000, r=00000000, d=00000000
initialize_screen: No video - forcing serial mode
pe_arm_init_interrupts: args: <ptr>
pe_arm_map_interrupt_controller: soc_phys: 0x200000000
pe_arm_map_interrupt_controller: found interrupt-controller
View bootloghang2.txt
QEMU 5.0.92 monitor - type 'help' for more information
(qemu) kprintf initialized
Serial mode specified: 00000007
WARNING: Forcing uart driver to output synchronously.printf()s/IOLogs will impact kernel performance.
You are advised to avoid using 'drain_uart_sync' boot-arg.
initialize_screen: b=00000000, w=00000000, h=00000000, r=00000000, d=00000000
initialize_screen: No video - forcing serial mode
pe_arm_init_interrupts: args: <ptr>
pe_arm_map_interrupt_controller: soc_phys: 0x200000000
pe_arm_map_interrupt_controller: found interrupt-controller
@zhuowei
zhuowei / hidephrases.js
Last active Jul 13, 2020
Hide Duolingo phrases, so I can practice listening in Duolingo stories
View hidephrases.js
(function() {
if (document.getElementById("zhuowei-hidephrase")) {
document.getElementById("zhuowei-hidephrase").remove();
}
const elem = document.createElement("style");
elem.id = "zhuowei-hidephrase";
// TODO(zhuowei): autodetect the classes by going through all of the CSS
elem.textContent = `
._3YBKO *, ._2rXtz .phrase * {
color: white !important;
@zhuowei
zhuowei / kaios_a405dl.js
Last active Feb 13, 2020
from /system/b2g/webapps/launcher.gaiamobile.org/application.zip, dist/vendors.js
View kaios_a405dl.js
if ("TRACFONE" === r) {
n.instantDialNumbers = ["*#06#", "*#07#", "*#2886#", "*#837837#", "*#16#", "###232#", "*#7810#", "##4382#", "*#4636#", "*#3228#", "*#22384#*", "*#*#33284#*#*", "*#*#3646633#*#*", "*#7260#", "*#7265#", "#83865625#", "#83782887#", "*#*#05743424#*#*"];
"FRM" === navigator.engmodeExtension.getPropertyValue("ro.operator.name.tf.frm") && m.default.get("debugger.remote-mode").then(function(e) {
"disabled" !== e && (n.debuggerRemoteMode = !0, n.instantDialNumbers = n.instantDialNumbers.concat(["*#8378269#"]))
}), o = !1
} else n.instantDialNumbers = ["*#06#", "*#07#", "*#2886#", "*#228378#", "##4382#", "*#*#33284#*#*", "*#*#3646633#*#*", "*#4636#", "*#*#825364#*#*", "*#3228#", "##258#", "*#7977767#", "*#7810#", "*#837837#", "*#16#", "*#22384#*", "*#*#123321#*#*", "*#6626625#", "*#*#0574#*#*", "###232#", "*#*#9328378#*#*", "##3424#"], m.default.get("debugger.remote-mode").then(fun
View j97ap.txt
{
target-type: 'J97'
mlb-serial-number: 'syscfg/MLB#/0x20,zeroes/0x20'
compatible: b'J97AP\x00iPad5,2\x00AppleARM\x00'
secure-root-prefix: 'md'
AAPL,phandle: 0x1
firmware-min-capacity: 0x400000
platform-name: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
device_type: 'bootrom'
region-info: 'syscfg/Regn/0x20,zeroes/0x20'
View j82ap.txt
{
target-type: 'J82'
mlb-serial-number: 'syscfg/MLB#/0x20,zeroes/0x20'
compatible: b'J82AP\x00iPad5,4\x00AppleARM\x00'
secure-root-prefix: 'md'
AAPL,phandle: 0x1
firmware-min-capacity: 0x400000
platform-name: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
device_type: 'bootrom'
region-info: 'syscfg/Regn/0x20,zeroes/0x20'
View CrosshatchConfigWithBluelineParts
CONFIG_RELOCATABLE=y
CONFIG_RANDOMIZE_BASE=y
CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
CONFIG_DEBUG_DRIVER=y
CONFIG_MD=y
CONFIG_BLK_DEV_DM_BUILTIN=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_CRYPT=y
CONFIG_TOUCHSCREEN_S6SY761=m
CONFIG_I2C_QCOM_GENI=y
View modem_boot_dmesg.txt
[ 0.310700] of: _opp_add_static_v2: turbo:0 rate:0 uv:0 uvmin:0 uvmax:0 latency:0
[ 0.310740] of: _opp_add_static_v2: turbo:0 rate:0 uv:0 uvmin:0 uvmax:0 latency:0
[ 0.310796] of: _opp_add_static_v2: turbo:0 rate:0 uv:0 uvmin:0 uvmax:0 latency:0
[ 0.310841] of: _opp_add_static_v2: turbo:0 rate:0 uv:0 uvmin:0 uvmax:0 latency:0
[ 0.310885] of: _opp_add_static_v2: turbo:0 rate:0 uv:0 uvmin:0 uvmax:0 latency:0
[ 0.310943] of: _opp_add_static_v2: turbo:0 rate:0 uv:0 uvmin:0 uvmax:0 latency:0
[ 0.310982] of: _opp_add_static_v2: turbo:0 rate:0 uv:0 uvmin:0 uvmax:0 latency:0
[ 0.311004] mx_ao: _allocate_opp_table: Couldn't find clock: -2
[ 0.311039] of: _opp_add_static_v2: turbo:0 rate:0 uv:0 uvmin:0 uvmax:0 latency:0
[ 0.311095] of: _opp_add_static_v2: turbo:0 rate:0 uv:0 uvmin:0 uvmax:0 latency:0
You can’t perform that action at this time.