Skip to content

Instantly share code, notes, and snippets.

View xingrz's full-sized avatar

XiNGRZ xingrz

View GitHub Profile
@xingrz
xingrz / roomservice.xml
Last active January 25, 2024 11:13
Build minimal-manifest-twrp/platform_manifest_twrp_omni on macOS 10.14
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Re-add removed Darwin toolchain -->
<project path="prebuilts/clang/host/darwin-x86" name="platform/prebuilts/clang/host/darwin-x86" groups="pdk,darwin" clone-depth="1" />
<project path="prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9" name="platform/prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9" groups="pdk,darwin,arm" clone-depth="1" />
<project path="prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.9" name="platform/prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.9" groups="pdk,darwin,arm" clone-depth="1" />
<project path="prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1" name="platform/prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1" groups="pdk,darwin" clone-depth="1" />
<project path="prebuilts/go/darwin-x86" name="platform/prebuilts/go/darwin-x86" groups="darwin,pdk,tradefed" clone-depth="1" />
<project path="prebuilts/python/darwin-x86/2.7.5" name="platform/prebuilts/python/darwin-x86/2.7.5
@xingrz
xingrz / CMakeLists.txt
Created October 23, 2023 08:06
Build CH569EVT with CMake
cmake_minimum_required(VERSION 3.20)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR riscv32)
set(CMAKE_C_COMPILER_FORCED 1)
set(CMAKE_CXX_COMPILER_FORCED 1)
@xingrz
xingrz / UBOOT.md
Created October 15, 2023 13:24
Raspberry Pi 4B, U-Boot, Zephyr
@xingrz
xingrz / README.md
Last active April 21, 2022 06:00
Typed NodeJS.EventEmitter
const emitter: TypedEventEmitter<{
  start: () => void;
  stop: () => void;
  progress: (progress: number) => void;
}> = new EventEmitter();

emitter.on('progress', (progress) => {
  // foo
});
function get_build() {
if [[ "$MK_BUILD" ]]; then
echo $MK_BUILD
elif [[ "$LINEAGE_BUILD" ]]; then
echo $LINEAGE_BUILD
elif [[ "$CM_BUILD" ]]; then
echo $CM_BUILD
fi
}
@xingrz
xingrz / Makefile
Last active April 11, 2022 14:49
Extract a system-as-root update.zip
SOURCE := $(TARGET).zip
MOUNT := $(TARGET)/.mount
BOOT := $(TARGET)/boot
ROOT := $(TARGET)/system
VENDOR := $(ROOT)/vendor
PAYLOAD_BIN := $(TARGET)/payload.bin
@xingrz
xingrz / Makefile
Created January 1, 2020 14:31
Extract an update.zip
SOURCE := $(TARGET).zip
MOUNT := $(TARGET)/.mount
BOOT := $(TARGET)/boot
SYSTEM := $(TARGET)/system
VENDOR := $(SYSTEM)/vendor
BOOT_IMG := $(TARGET)/boot.img
@xingrz
xingrz / SquareImageView.java
Last active October 12, 2021 21:25
An ImageView that always square, matching parent's width
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;
public class SquareImageView extends ImageView {
public SquareImageView(Context context) {
super(context);
}
@xingrz
xingrz / !ONEPLUS.md
Last active September 1, 2020 16:01

fdisk -l output of these blocks on OnePlus 5

@xingrz
xingrz / README.md
Last active May 29, 2020 07:23
MoKee 71.X for Firefly-RK3288

MoKee 71.X for Firefly-RK3288

前提

只是能开机,并不保证所有功能可用。因此,仅供测试交流,不建议作正式用途。确保你具备足够的知识处理任何意料之外的情况。我不提供任何技术支持,也不对任何可能发生的后果负责。

截至目前(2017/04/21)最新版本为 Android 7.1.2。整体代码会紧跟着 AOSP 演进。

仅在 Firefly-RK3288 上测试,未在 Firefly-RK3288 Plus 及 Firefly-RK3288 Reload 上测试。如果你感兴趣,欢迎加入我和我一起开发。联系:Email xxx@oxo.ooo 或微博 @XiNGRZ