Skip to content

Instantly share code, notes, and snippets.

@shakalaca
shakalaca / diff_of_ze554kl_twrp
Last active December 24, 2019 06:08
Evidence
➜ thief ls -l shaka
total 22552
-rw-r--r-- 1 shakalaca staff 385 Oct 22 11:48 cmdline
-rw-r--r-- 1 shakalaca staff 130 Oct 22 11:48 image_info
drwxr-xr-x 39 shakalaca staff 1248 Oct 22 11:48 r
-rw-r--r-- 1 shakalaca staff 10235039 Oct 22 11:48 ramdisk.cpio.gz
-rw-r--r-- 1 shakalaca staff 12847781 Oct 22 11:48 zImage
➜ thief ls -l rk
total 22608
-rw-r--r-- 1 shakalaca staff 385 Oct 22 11:47 cmdline
@shakalaca
shakalaca / note.txt
Last active September 17, 2017 00:23
bash 設定
環境基本安裝
sudo apt install build-essential
sudo apt install python-minimal
sudo apt install bc
sudo apt install unzip
編譯 kernel 用的 compiler
git clone https://source.codeaurora.org/quic/la/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 -b android-framework.lnx.2.0.r5-rel
解開打包 boot.img 的工具
@shakalaca
shakalaca / bboot.sh
Created September 16, 2017 17:07
wrapper for mkbootimg
#!/bin/bash
if [ -z $1 ] || [ -z $2 ] || [ -z $3 ]; then
echo "$0 <kernel> <ramdisk> <boot.img>"
exit
fi
if [ -f "$3" ]; then
mv "$3" "$3.old"
fi
if (!of_match_node(tsens_match, of_node)) {
pr_err("Need to read SoC specific fuse map\n");
return -ENODEV;
}
id = of_match_node(tsens_match, of_node);
if (id == NULL) {
pr_err("can not find tsens_match of_node\n");
return -ENODEV;
}
drivers/built-in.o: In function `msm_otg_init_sm':
/home/source/twrp-7.1/out/target/product/A001/obj/KERNEL_OBJ/../../../../../../kernel/asus/A001/drivers/usb/phy/phy-msm-usb.c:4040: undefined reference to `ohio_get_id_state'
drivers/built-in.o: In function `msm_otg_register_power_supply':
/home/source/twrp-7.1/out/target/product/A001/obj/KERNEL_OBJ/../../../../../../kernel/asus/A001/drivers/usb/phy/phy-msm-usb.c:6162: undefined reference to `ohio_set_power_supply'
drivers/built-in.o: In function `asus_is_chg_high_temp':
/home/source/twrp-7.1/out/target/product/A001/obj/KERNEL_OBJ/../../../../../../kernel/asus/A001/drivers/power/qpnp-smbcharger.c:8496: undefined reference to `us5587_read_pmi8952_thermal'
/home/source/twrp-7.1/out/target/product/A001/obj/KERNEL_OBJ/../../../../../../kernel/asus/A001/drivers/power/qpnp-smbcharger.c:8497: undefined reference to `us5587_read_smb1351_thermal'
drivers/built-in.o: In function `asus_thermal_policy':
/home/source/twrp-7.1/out/target/product/A001/obj/KERNEL_OBJ/../../.
qq@build:/home/source/cm-14.1$ make -j4 bacon
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20170418-UNOFFICIAL-Z017
TARGET_PRODUCT=lineage_Z017
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld: internal error in global_symbol, at /usr/local/google/home/chh/workdir/precise7/toolchain-src/binutils/binutils-2.23/gold/object.h:2041
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld: internal error in global_symbol, at /usr/local/google/home/chh/workdir/precise7/toolchain-src/binutils/binutils-2.23/gold/object.h:2041
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
@shakalaca
shakalaca / README.txt
Last active April 10, 2017 09:55
Environment setup for kernel building
Paths:
# /home/prebuilts/aarch64-linux-android-4.9 : your toolchain
# /home/work/ZS570KL : your working directory
# /home/work/ZS570KL/kernel/msm-3.18 : your kernel source (with AndroidKernel.mk)
# /home/work/ZS570KL/out/KERNEL_OBJ : compiled kernel objects
# /home/work/ZS570KL/system/lib/modules : output modules
* execute 'source envsetup.sh' when login
* mkconfig to setup kernel config file for building
* mkkernel to build kernel image and modules
@shakalaca
shakalaca / README.txt
Last active December 1, 2016 05:57
Enable multi-user on ZenFone 2 (x86)
1. 適用於 ZenFone 2 ZE551ML & ZE550ML & ZX551ML
2. bootloader (fastboot) 請使用 5.0 的最新版本
3. 手機開啟到 bootloader 模式後執行 go.bat