-
Notifications
You must be signed in to change notification settings - Fork 70
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: yanbuyu <[email protected]>
- Loading branch information
Showing
6 changed files
with
37 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
id=XiaomiCTSPass | ||
name=Xiaomi CTS Pass | ||
version=v1.4.2 | ||
versionCode=142 | ||
version=v1.4.3 | ||
versionCode=143 | ||
author=yanbuyu | ||
description=强制小米设备通过谷歌CTS测试,github开源地址:https://github.com/yanbuyu/XiaomiCTSPass | ||
updateJson=https://raw.githubusercontent.com/yanbuyu/XiaomiCTSPass/master/release/XiaomiCTSPass.json |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,27 @@ | ||
#!/sbin/sh | ||
currentDir=$(dirname $0) | ||
modulesDir=$(dirname $currentDir) | ||
newModule=$modulesDir/checkCTSModule | ||
mkdir -p $newModule | ||
cp -af $currentDir/module_pro.prop $newModule/module.prop | ||
##自启脚本 | ||
mount -o remount,rw -t auto /data | ||
|
||
##变量 | ||
MODDIR=${0%/*} | ||
MODSDIR=$(dirname ${MODDIR%/*})/XiaomiCTSPass | ||
systemprop=$MODDIR/system.prop | ||
systemprop_bak=$MODDIR/system.prop.bak | ||
moduleprop=$MODDIR/module.prop | ||
##检测安卓版本 | ||
SDK=$(getprop ro.build.version.sdk) | ||
cat $currentDir/init.d | sed "s#REPLACE_SDK#$SDK#g;s#REPLACE_MODULE#$currentDir#g" >$newModule/post-fs-data.sh | ||
[[ "$SDK" != REPLACE_SDK ]] && rm -rf $MODDIR | ||
##比对指纹 | ||
fingerprint=$(getprop ro.build.fingerprint) | ||
mkdir -p $MODSDIR | ||
log=$MODSDIR/fingerprint_record.log | ||
if [ -f "$log" ];then | ||
getline=$(cat $log | sed 's/\n//g;s/\r//g') | ||
if [ "$getline" == "$fingerprint" ];then | ||
[[ -f $systemprop_bak ]] && mv -f $systemprop_bak $systemprop | ||
sed -i "s#description=.*#description=强制小米设备通过谷歌CTS测试,github开源地址:https://github.com/yanbuyu/XiaomiCTSPass#" $moduleprop | ||
else | ||
[[ -f $systemprop ]] && mv -f $systemprop $systemprop_bak | ||
sed -i "s#description=.*#description=🤔该设备似乎刚更新完系统,请重启设备以激活XiaomiCTSPass#" $moduleprop | ||
fi | ||
fi | ||
echo "$fingerprint" >$log |
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
#!/sbin/sh | ||
MODDIR=${0%/*} | ||
MODSDIR=$(dirname ${MODDIR%/*})/XiaomiCTSPass | ||
rm -rf $MODSDIR |