Skip to content

Commit dafde53

Browse files
committed
Feat: MiLinkOS2CN: Unlock Hypermind
1 parent 27d2efd commit dafde53

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

port.sh

+12
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,18 @@ if [[ -f $targetFrameworkExtRes ]] && [[ ${port_android_version} != "15" ]]; the
900900
java -jar bin/apktool/APKEditor.jar b -i tmp/framework-ext-res -o tmp/$filename -f> /dev/null 2>&1 || error "apktool 打包失败" "apktool mod failed"
901901
cp -rf tmp/$filename $targetFrameworkExtRes
902902
fi
903+
904+
targetMiLinkOS2APK=$(find build/portrom -type f -name "MiLinkOS2CN.apk")
905+
if [[ -f $targetMiLinkOS2APK ]];then
906+
cp -rf $targetMiLinkOS2APK tmp/$(basename $targetMiLinkOS2APK).bak
907+
java -jar bin/apktool/APKEditor.jar d -i $targetMiLinkOS2APK -o tmp/MiLinkOS2 -f > /dev/null 2>&1
908+
targetsmali=$(find tmp/MiLinkOS2 -name "HMindManager.smali")
909+
python3 bin/patchmethod.py -d tmp/MiLinkOS2 -k "isSupportCapability() context == null" -return true
910+
python3 bin/patchmethod.py $targetsmali J -return true
911+
java -jar bin/apktool/APKEditor.jar b -i tmp/MiLinkOS2 -o $targetMiLinkOS2APK -f > /dev/null 2>&1
912+
913+
fi
914+
903915
targetMIUIThemeManagerAPK=$(find build/portrom -type f -name "MIUIThemeManager.apk")
904916
if [[ -f $targetMIUIThemeManagerAPK ]];then
905917
cp -rf $targetMIUIThemeManagerAPK tmp/$(basename $targetMIUIThemeManagerAPK).bak

0 commit comments

Comments
 (0)