Skip to content

Instantly share code, notes, and snippets.

zhuowei

Block or report user

Report or block zhuowei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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
View modem_crosshatch.txt
Attempting to boot the modem on Pixel 3 XL - it just crashes the phone.
No time to get this packaged properly
see the Moto G wiki page for how to do this properly:
https://wiki.postmarketos.org/wiki/Moto_G4_Play_(motorola-harpia)
but here's how to do it in the ramdisk:
# Pack the modem firmware
Grab the radio firmware from the factory image:
@zhuowei
zhuowei / bitcode2intel
Last active May 18, 2019 — forked from steventroughtonsmith/bitcode2intel
Modified version of Stroughtonsmith's bitcode2intel script; doesn't work; gives"ld: in section __TEXT,__swift5_types reloc 0: X86_64_RELOC_SUBTRACTOR must have r_extern=1 file 'F31BA3F0-12EE-482A-8399-26EEA2E654DD.o' for architecture x86_64"
View bitcode2intel
#!/bin/bash
TARGET="$( cd "$(dirname "$1")" ; pwd -P )/$1"
SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk"
TARGET_ARCH=x86_64
LLVMROOT="/Users/zhuowei/Documents/prog/clang+llvm-8.0.0-x86_64-apple-darwin"
export IPHONEOS_DEPLOYMENT_TARGET=12.2
rm -r /tmp/bitcode2intel
mkdir -p /tmp/bitcode2intel
View acpiview_qemu.txt
ACPIView output from EDK2 EFI Shell on QEMU Aarch64:
$ qemu-system-aarch64 --version
QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.9)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
$ qemu-system-aarch64 -M virt,gic-version=3 -m 1G -cpu cortex-a57 -nographic -bios workspace/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/FV/QEMU_EFI.fd
--------------- RSDP Table ---------------
Address : 0x7C020000
View nextfloat.c
#include <stdio.h>
int main() {
union {
unsigned int a;
float b;
} theunion;
theunion.a = (0x80 << 23) | 0x7fffff;
printf("%x %.30f\n", theunion.a, theunion.b);
theunion.a += 1;
View dumped.txt
bootrom.elf: file format elf64-littleriscv
SYMBOL TABLE:
0000000000010000 l d .data 0000000000000000 .data
0000000000010000 g .data 0000000000000000 _binary_bootrom_bin_start
0000000000013068 g .data 0000000000000000 _binary_bootrom_bin_end
0000000000003068 g *ABS* 0000000000000000 _binary_bootrom_bin_size
You can’t perform that action at this time.