-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using my server to patch the apk with device's framework
- Loading branch information
Showing
6 changed files
with
25 additions
and
27 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,6 +1,6 @@ | ||
id=NFCScreenOff | ||
name=NFC Screen Off | ||
version=v0.0.3 | ||
versionCode=3 | ||
version=v0.1.0 | ||
versionCode=10 | ||
author=lapwat | ||
description=Enable NFC Pooling when screen is off for Android 9 and above | ||
description=Enable NFC Pooling when screen is off |
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,23 +1,24 @@ | ||
#!/system/bin/sh | ||
MODDIR=${0%/*} | ||
|
||
APK_NAME_AOSP="NfcNci" | ||
APK_NAME_ONEPLUS="NxpNfcNci" | ||
set 'NfcNci' 'NQNfcNci' 'NxpNfcNci' | ||
for name do | ||
if [ -d "/system/app/$name" ]; then | ||
APK_NAME="$name" | ||
fi | ||
done | ||
|
||
if [ -d "/system/app/$APK_NAME_AOSP" ]; then | ||
APK_NAME="$APK_NAME_AOSP" | ||
else | ||
APK_NAME="$APK_NAME_ONEPLUS" | ||
fi | ||
APK_PATH="/system/app/$APK_NAME/$APK_NAME.apk" | ||
echo "$APK_PATH" >> "$MODDIR/log.txt" | ||
|
||
# restore original apk | ||
cp "$MODDIR/${APK_NAME}_bak.apk" "/system/app/$APK_NAME/$APK_NAME.apk" | ||
cp "$MODDIR/${APK_NAME}_bak.apk" "$APK_PATH" | ||
|
||
# wait for nfc service to start | ||
sleep 20 | ||
|
||
# inject modded apk | ||
cp "$MODDIR/${APK_NAME}_align.apk" "/system/app/$APK_NAME/$APK_NAME.apk" | ||
cp "$MODDIR/${APK_NAME}_align.apk" "$APK_PATH" | ||
|
||
# restart nfc service | ||
killall com.android.nfc |