forked from xiaoxindada/actions_make_XiaoxinSGSIs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pinkdoge <3361534564@qq.com>
- Loading branch information
Showing
7 changed files
with
225 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<h1 align="center"> Auto XiaoxinSGSIs Tools </h1> | ||
|
||
<p align="center"> | ||
A Github Action to make XiaoxinSGSIs | ||
</p> | ||
|
||
<div align="center"> | ||
<a href="../../actions"> | ||
<img src="../../workflows/build_XiaoxinSGSIs/badge.svg" title="Building Status" /> | ||
</a> | ||
</div> | ||
|
||
<br /> | ||
|
||
## Configuration | ||
|
||
The configuration file is [sgsi.json](sgsi.json) | ||
|
||
| Variable | Type | Description | | ||
| ------------------ | ------- | ------------------------------------------------------------ | | ||
| `rom_url` | String | Your rom url | | ||
| `rom_name` | String | Your rom file name | | ||
| `pack_sgsi` | String | The compressed file name after compilation | | ||
| `make_miui` | Boolean | Indicates whether to make MIUI sgsi | | ||
| `make_flyme` | Boolean | Indicates whether to make Flyme sgsi | | ||
| `make_coloros` | Boolean | Indicates whether to make ColorOS sgsi | | ||
| `make_h2os` | Boolean | Indicates whether to make H2OS sgsi | | ||
| `make_smartisanos` | Boolean | Indicates whether to make SmartisanOS sgsi | | ||
| `make_zui` | Boolean | Indicates whether to make zui sgsi | | ||
| `make_super` | Boolean | Indicate whether to create a dynamic partitioned sgsi <sub>(Note: The production of `ColorOS` with dynamic partition is not supported)</sub> | | ||
| `upload_transfer` | Boolean | Indicate whether to upload sgsi to wetransfer | | ||
| `upload_artifact` | Boolean | Indicate whether to upload sgsi to artifact <sub>(Note: Github seems to have restrictions on free users, uploads can no longer be uploaded after a certain amount of upload, so this scheme is not recommended)</sub> | | ||
|
||
## Start | ||
|
||
After Fork this repositorie, click on Star in the upper right corner to start | ||
|
||
## Compilation result | ||
Provide three upload ways, please see the form for details | ||
|
||
## File Structure | ||
|
||
| File | Type | Description | | ||
| ------------------ | ------- | ------------------------------------------------------------ | | ||
| `system.img` | IMG | The main of SGSI | | ||
| `Patch1.zip`<br>`Patch2.zip`<br>`Patch3.zip` | ZIP | Patch template | | ||
| `Patchmod.zip` | ZIP | Apply patch templates to make patches | | ||
|
||
## Troubleshoot | ||
### Q1: Why not support the SGSI production of super partition ColorOS? | ||
|
||
A1: The SGSI produced by Dynamic Partition ColorOS can not boot after several tests, so it is not supported. | ||
|
||
### Q2: Why can't tools make SGSI fully automated? | ||
|
||
A2: The Patch part of this tool needs to be manually, because some processing automation is not ideal and often changes, so it is better to make Patch1 2 3 manually (Thanks to **[@迷路的小新大大](https://github.com/xiaoxindada)**) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
#!/bin/bash | ||
|
||
#by 迷路的小新大大 | ||
|
||
source ./bin.sh | ||
|
||
echo "环境初始化中 请稍候......." | ||
chmod -R 777 ./ | ||
chown -R root:root ./ | ||
rm -rf ./out | ||
rm -rf ./SGSI | ||
echo "初始化环境完成" | ||
echo "请把要解压的刷机包放入tmp文件夹中" | ||
read -p "请输入需要解压的zip包名: " zip | ||
echo "解压当前目录的刷机包中......" | ||
cd ./tmp | ||
|
||
if [ -e ./$zip ];then | ||
7z x ./$zip | ||
echo "解压zip完成" | ||
else | ||
echo "当前所输入的刷机包不存在" | ||
fi | ||
|
||
#payload.bin检测 | ||
if [ -e './payload.bin' ];then | ||
mv ./payload.bin ../payload | ||
echo "解压payload.bin中......." | ||
cd ../ | ||
cd ./payload | ||
python3 ./payload.py ./payload.bin ./out | ||
mv ./payload.bin ../tmp | ||
echo "移动img至输出目录......." | ||
|
||
if [ -e "./out/product.img" ];then | ||
mv ./out/product.img ../tmp/ | ||
fi | ||
|
||
if [ -e "./out/reserve.img" ];then | ||
mv ./out/reserve.img ../tmp/ | ||
fi | ||
|
||
mv ./out/system.img ../tmp/ | ||
mv ./out/vendor.img ../tmp/ | ||
rm -rf ./out/* | ||
cd ../ | ||
cd ./tmp | ||
mv ./system.img ../ | ||
mv ./vendor.img ../ | ||
|
||
if [ -e "./product.img" ];then | ||
mv ./product.img ../ | ||
fi | ||
|
||
if [ -e "./res:erve.img" ];then | ||
mv ./reserve.img ../ | ||
fi | ||
|
||
echo "转换完成" | ||
fi | ||
|
||
#br检测 | ||
if [ -e ./system.new.dat.br ];then | ||
echo "正在解压system.new.br" | ||
if [ -e ./system.new.dat.br ];then | ||
brotli -d system.new.dat.br | ||
python $bin/sdat2img.py system.transfer.list system.new.dat ./system.img | ||
mv ./system.img ../ | ||
rm -rf ./system.new.dat | ||
fi | ||
|
||
if [ -e ./vendor.new.dat.br ];then | ||
echo "正在解压vendor.new.br" | ||
brotli -d vendor.new.dat.br | ||
python $bin/sdat2img.py vendor.transfer.list vendor.new.dat ./vendor.img | ||
mv ./vendor.img ../ | ||
fi | ||
|
||
if [ -e ./product.new.dat.br ];then | ||
echo "正在解压product.new.br" | ||
brotli -d product.new.dat.br | ||
python $bin/sdat2img.py product.transfer.list product.new.dat ./product.img | ||
mv ./product.img ../ | ||
fi | ||
|
||
if [ -e ./system_ext.new.dat.br ];then | ||
echo "正在解压system_ext.new.br" | ||
brotli -d system_ext.new.dat.br | ||
python $bin/sdat2img.py system_ext.transfer.list system_ext.new.dat ./system_ext.img | ||
mv ./system_ext.img ../ | ||
fi | ||
fi | ||
|
||
#dat检测 | ||
if [ -e ./system.new.dat ];then | ||
echo "正在转换system.new.dat" | ||
if [ -e ./system.new.dat ];then | ||
python $bin/sdat2img.py system.transfer.list system.new.dat ./system.img | ||
mv ./system.img ../ | ||
fi | ||
|
||
if [ -e ./vendor.new.dat ];then | ||
python $bin/sdat2img.py vendor.transfer.list vendor.new.dat ./vendor.img | ||
mv ./vendor.img ../ | ||
fi | ||
|
||
if [ -e ./product.new.dat ];then | ||
python $bin/sdat2img.py product.transfer.list product.new.dat ./product.img | ||
mv ./product.img ../ | ||
fi | ||
|
||
if [ -e ./system_ext.new.dat ];then | ||
echo "正在解压system_ext.new.dat" | ||
python $bin/sdat2img.py system_ext.transfer.list system_ext.new.dat ./system_ext.img | ||
mv ./system_ext.img ../ | ||
fi | ||
fi | ||
|
||
#img检测 | ||
if [ -e ./system.img ];then | ||
mv ./*.img ../ | ||
fi | ||
|
||
cd ../ | ||
if [ -e ./system.img ];then | ||
./SGSI.sh | ||
exit | ||
else | ||
echo "没有检测到system.img 无法制作SGSI" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters