Skip to content

Commit b5df360

Browse files
committed
Merge branch 'xiaomi.eu' in main
* porting xiaomi.eu official rom is now supported.
1 parent 88e2e37 commit b5df360

File tree

8 files changed

+241
-107
lines changed

8 files changed

+241
-107
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
/out/
66
.DS_Store
77
*.pyc
8-
.history/
8+
/.history/

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 torai
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<div align="center">
2-
## WIP
3-
基于xiaomi.eu的包还无法开机。
42

53
# HyperOS 移植项目
64
### 基于 https://github.com/ljc-fight/miui_port
@@ -12,15 +10,17 @@
1210
## 简介
1311
- HyperOS 一键自动移植打包
1412

13+
1514
## 测试机型及版本
16-
- 测试机型小米10 底包 (V14.0.4.0.TJBCNXM)
17-
- 测试版本 小米14/Pro HyperOS1.0 xiaomi.eu官改包
15+
- 测试机型小米10/Pro/Ultra MIUI 14最新版
16+
- 测试版本 小米12、小米13/Pro/Ultra、小米14/Pro HyperOS1.0 正式版和开发版 官方OTA包 & xiaomi.eu官改包
17+
1818

1919
## 正常工作
2020
- 人脸
2121
- 挖孔
2222
- 指纹
23-
- 相机(需另外单独下载附件的相机到devices对应机型目录)
23+
- 相机
2424
- NFC
2525
- 自动亮度
2626
- 通话息屏

README_en-US.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@
1212
- HyperOS Porting Project for Android 13 devices "Onekey" script
1313

1414
## Tested devices and portroms
15-
- Xiaomi 10 (V14.0.4.0.TJBCNXM)
16-
- Port from Xiaomi Mi 14Pro Android 14 OS1.0.09.0.UNBCNXM - OS1.0.20.0.UNBCNXM OTA zip
15+
- Tested Devices: Xiaomi 10/Pro/Ultra(umi/cmi/cas) (with latest stock MIUI14 ROM)
16+
- Tested Ports: Xiaomi Mi 13/13Pro/14/14Pro K70Pro Stable and Dev stock flashable zip
1717

1818
## Working
1919
- Face unlock
2020
- Fringerprint
2121
- Camera(from leaked mi10s A13 based hyperos)
2222
- Automatic Brightness
23+
- NFC
2324
- etc
2425

2526

2627
## BUG
27-
- NFC(not writable)
2828

2929
- When unlocking device, the screen may flicker , Enabling "Disable HW overlays" in Developer options may help.
3030

3131
## Description
32-
- All the above testing is based on Xiaomi 10 official version (V14.0.4.0.TJBCNXM). for V-AB devices, tester needed.
32+
- All the above testing is based on Xiaomi 10/10Pro/10 Ultra official MIUI 14 version. for V-AB devices, tester needed.
3333

3434
## How to use
3535
- On WSL、ubuntu、deepin and other Linux
@@ -74,5 +74,13 @@
7474
```
7575
- baserom and portrom can be a direct download link. you can get the ota download link from third-party websites.
7676

77-
## Camera
78-
- You need to download camera apk from [here](https://drive.google.com/file/d/1igjsEVG7ermqfDObSn3qXDe-QqyPVd61/view?usp=sharing) ,and place it to devices/device_code/overlay/product/priv-app/MiuiCamera/MiuiCamera.apk.
77+
## Credits
78+
> In this project, some or all of the content is derived from the following open-source projects. Special thanks to the developers of these projects.
79+
80+
- [「BypassSignCheck」by Weverses](https://github.com/Weverses/BypassSignCheck)
81+
- [「contextpatch」 by ColdWindScholar](https://github.com/ColdWindScholar/TIK)
82+
- [「fspatch」by affggh](https://github.com/affggh/fspatch)
83+
- [「gettype」by affggh](https://github.com/affggh/gettype)
84+
- [「lpunpack」by unix3dgforce](https://github.com/unix3dgforce/lpunpack)
85+
- [「miui_port」by ljc-fight](https://github.com/ljc-fight/miui_port)
86+
- etc

bin/flash/a-only/update-binary

+26-19
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ ui_print() {
88
}
99

1010
package_extract_file() {
11-
ui_print "- Flashing $(echo $2 | cut -d '/' -f 6) "
11+
ui_print "- 正在刷写分区 - Flashing $(echo $2 | cut -d '/' -f 6) "
1212
unzip -p "$ZIPFILE" $1 >$2
1313
}
1414

1515
package_extract_zstd() {
16-
ui_print "- Flashing $(echo $2 | cut -d '/' -f 6) "
16+
ui_print "- 正在刷写分区 - Flashing $(echo $2 | cut -d '/' -f 6) "
1717
unzip -p "$ZIPFILE" $1 | /tmp/META-INF/zstd -c -d >$2
1818
}
1919

2020
getVolumeKey() {
21+
ui_print "- 监听音量键 按[+]选择"" 按[-]选择"""
2122
ui_print "- Press Volume Key [+] "Yes" [-] "No""
2223
keyInfo=true
2324
while $keyInfo;do
@@ -37,18 +38,21 @@ checkDevice() {
3738
romDevice=device_code
3839
ui_print "========================="
3940
ui_print " "
40-
ui_print " Device :$myDevice"
41+
42+
ui_print " 设备代号/Device Code:$myDevice"
4143
ui_print " "
42-
ui_print " ROM $romDevice"
44+
ui_print " ROM代号/ROM Code$romDevice"
4345
ui_print " "
44-
ui_print " BASE :baseversion"
46+
ui_print " 底包版本/BASE Version:baseversion"
4547
ui_print " "
46-
ui_print " PORT :portversion"
48+
ui_print " 移植版本/PORT Version:portversion"
4749
ui_print " "
4850
ui_print " "
4951
ui_print "========================="
5052
if [ "$myDevice" != "$romDevice" ];then
53+
ui_print "- 设备代号检验不通过,请再次核实此包是否对应你的机型"
5154
ui_print "- Device code verification failed, please double-check whether this package corresponds to your device model."
55+
ui_print "- 如果刷错包导致变砖,你将自己承担其后果,是否继续刷入?"
5256
ui_print "- If flashing the wrong package leads to bricking, you will bear the consequences yourself. Do you want to continue flashing?"
5357
if ! getVolumeKey ;then
5458
ui_print "- Terminate flashing."
@@ -69,40 +73,42 @@ checkDevice
6973
# 检查是否存在打包错误
7074
isDamaged=$(unzip -l $ZIPFILE |grep "patcherror.txt")
7175
if [ "$isDamaged" != "" ];then
76+
ui_print "该ROM存在打包错误,终止刷入"
7277
ui_print "The ROM has packaging errors. Terminate the flashing process."
7378
exit 1
7479
fi
7580

7681
if [ "$AdbSideLoad" = "" ]; then
77-
ui_print "- Verifying MD5 checksum."
82+
ui_print "- 正在校验MD5 - Verifying MD5 checksum."
7883
ui_print " "
7984
RealMd5=$(echo $ZIPNAME | cut -d '_' -f 4)
80-
ui_print "- The correct MD5 value: $RealMd5"
85+
ui_print " - ROM正确的MD5值为 - The correct MD5 value: $RealMd5"
8186
ui_print " "
8287
LocalMd5=$(md5sum $ZIPFILE | head -c10)
83-
ui_print "- The real MD5 value: $LocalMd5"
88+
ui_print "- ROM经校验MD5值为 - The real MD5 value: $LocalMd5"
8489
ui_print " "
8590
if [ "$RealMd5" != "$LocalMd5" ]; then
91+
ui_print "- MD5校验不通过,终止刷机"
8692
ui_print "- MD5 verification failed. Abort the flashing process."
8793
ui_print " "
8894
exit 1
8995
fi
90-
ui_print "- MD5 verification successful."
96+
ui_print "- MD5校验通过 - MD5 verification successful."
9197
ui_print " "
9298
else
99+
ui_print "- ADB Sideload 跳过MD5校验"
93100
ui_print "- Skip MD5 verification for ADB Sideload."
94101
ui_print " "
95102
fi
96103
ui_print " "
97-
ui_print "- Flashing process started."
104+
ui_print "- 开始刷机 - Flashing process started."
98105
ui_print " "
99106

100107
#boot
101-
if [[ $ZIPFILE == *OFFICIAL_BOOT* ]] ; then
102-
package_extract_file "boot_official.img" "/dev/block/bootdevice/by-name/boot"
103-
else
104-
ui_print "Flashing third-party kernel: boot_tv.img"
108+
if [[ $ZIPFILE == *ROOT* ]] ; then
105109
package_extract_file "boot_tv.img" "/dev/block/bootdevice/by-name/boot"
110+
else
111+
package_extract_file "boot_official.img" "/dev/block/bootdevice/by-name/boot"
106112
fi
107113

108114

@@ -144,18 +150,19 @@ package_extract_file "firmware-update/cmnlib64.mbn" "/dev/block/bootdevice/by-na
144150
#super cust image
145151
package_extract_zstd "super.zst" "/dev/block/bootdevice/by-name/super"
146152

147-
ui_print "- Clearing cache."
153+
ui_print "- 清除缓存 - Clearing cache."
148154
rm -rf /data/dalvik-cache/arm/*
149155
rm -rf /data/dalvik-cache/arm64/*
150156
rm -rf /data/system/package_cache/*
151157
ui_print " "
152158
ui_print " "
153-
ui_print "- Flashing process completed."
159+
ui_print "- 刷机完毕 - Flashing process completed."
154160

155161
ui_print " "
156162
ui_print " "
157-
ui_print "- If there is a red mounting error, please ignore it."
158-
ui_print "- If there is a red mounting error, please ignore it."
163+
ui_print "- 如有红色挂载报错请直接忽略"
164+
ui_print "- 如有红色挂载报错请直接忽略"
165+
ui_print "- 如有红色挂载报错请直接忽略"
159166
ui_print "- If there is a red mounting error, please ignore it."
160167
ui_print " "
161168
ui_print " "

bin/port_config

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,11 @@ repack_with_ext4=true
1111

1212
# 去除data加密 true:是 false:否
1313
# Remove data encryption or not. if it is false, you cannot access encrypted-data partition in recovery without a A14 supported TWRP.
14-
remove_data_encryption=false
14+
remove_data_encryption=false
15+
16+
17+
# using stockrom display_id content or portrom's: stock or port
18+
brightness_fix_method=stock
19+
20+
# whether to disable vintf matrix matches in framework level. enabled by defaut.
21+
compatible_matrix_matches_check=true

0 commit comments

Comments
 (0)