-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_on_server_and_flash.sh
34 lines (29 loc) · 1.02 KB
/
build_on_server_and_flash.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
build_mode=$1
echo $build_mode | grep -q "clean\|dirty"
if [ $? = 1 ]
then
echo "Please specify whether to clean build or dirty build"
exit 1
fi
if [ $build_mode = "clean" ]
then
ssh [email protected] "rm -rf /home/kazuki/pipa/out"
fi
# Build
ssh -tt [email protected] "cd pipa && git pull origin && git reset --hard FETCH_HEAD && bash build_kernel.sh"
if [ $? != 0 ]
then
echo $?
echo -e "\e[0;31mBuild failed, exiting... \e[0m"
exit 1
fi
cd prebuilts
scp [email protected]:/home/kazuki/AnyKernel3/Image Image
scp [email protected]:/home/kazuki/AnyKernel3/dtb dtb
scp [email protected]:/home/kazuki/AnyKernel3/dtbo.img dtbo.img
python3 mkbootimg.py --header_version 3 --output boot.img --kernel Image --ramdisk pipa-ramdisk --os_version 13.0.0 --os_patch_level 2023-09
python3 mkbootimg.py --header_version 3 --vendor_boot vendor_boot.img --vendor_ramdisk pipa-vendor_ramdisk --dtb dtb
fastboot flash boot boot.img
fastboot flash vendor_boot vendor_boot.img
fastboot flash dtbo dtbo.img