File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,14 +23,19 @@ create_backup() {
2323 fi
2424}
2525
26- ui_print " -- Searching for NFC app in /system/app/ folder ..."
26+ ui_print " -- Searching for NFC app in /system/app/ and /system/system_ext/app/ folders ..."
2727set ' NfcNci' ' NQNfcNci' ' NxpNfcNci'
2828for name do
2929 if [ -d " /system/app/$name " ]; then
3030 APK_NAME=" $name "
31+ APK_PATH=" /system/app/$APK_NAME /$APK_NAME .apk"
32+ fi
33+ if [ -d " /system/system_ext/app/$name " ]; then
34+ APK_NAME=" $name "
35+ APK_PATH=" /system/system_ext/app/$APK_NAME /$APK_NAME .apk"
3136 fi
3237done
33- [ -z $APK_NAME ] && abort " !! Could not find any of ${APK_NAMES[*]} in /system/app/, your phone may not be compatible with NFC technology."
38+ [ -z $APK_NAME ] && abort " !! Could not find any of ${APK_NAMES[*]} in /system/app/ or /system/system_ext/app/ , your phone may not be compatible with NFC technology."
3439ui_print " -- $APK_NAME .apk found!"
3540
3641# save device infos
@@ -48,10 +53,10 @@ ui_print '-- Device info --'
4853ui_print " $( cat $MODPATH /.env) "
4954ui_print ' -----------------'
5055
51- APK_PATH=" /system/app/$APK_NAME /$APK_NAME .apk"
56+ # APK_PATH="/system/app/$APK_NAME/$APK_NAME.apk"
5257APK_DIR=" $( dirname $APK_PATH ) "
5358REPLACE="
54- /system/app/ $APK_NAME
59+ $APK_DIR
5560"
5661mkdir " $MODPATH /$APK_NAME "
5762
Original file line number Diff line number Diff line change 11id=NFCScreenOff
22name=NFC Screen Off
3- version=v0.3.1
4- versionCode=31
3+ version=v0.3.2
4+ versionCode=32
55author=lapwat
6- description=Read NFC tags when screen is off.
6+ description=Read NFC tags when screen is off. Disable NFC tagging sound.
Original file line number Diff line number Diff line change @@ -5,21 +5,27 @@ set 'NfcNci' 'NQNfcNci' 'NxpNfcNci'
55for name do
66 if [ -d " /system/app/$name " ]; then
77 APK_NAME=" $name "
8+ APK_PATH=" /system/app/$APK_NAME /$APK_NAME .apk"
9+ fi
10+ if [ -d " /system/system_ext/app/$name " ]; then
11+ APK_NAME=" $name "
12+ APK_PATH=" /system/system_ext/app/$APK_NAME /$APK_NAME .apk"
813 fi
914done
1015
11- APK_PATH=" /system/app/$APK_NAME /$APK_NAME .apk"
16+ # APK_PATH="/system/app/$APK_NAME/$APK_NAME.apk"
17+ APK_DIR=" $( dirname $APK_PATH ) "
1218
1319# restore original apk
1420cp " $MODDIR /${APK_NAME} _bak.apk" " $MODDIR /$APK_NAME /$APK_NAME .apk"
15- mount --bind " $MODDIR /$APK_NAME " " /system/app/ $APK_NAME "
21+ mount --bind " $MODDIR /$APK_NAME " " $APK_DIR "
1622
1723# wait for nfc service to start
1824sleep 20
1925
2026# inject modded apk
2127cp " $MODDIR /${APK_NAME} _align.apk" " $MODDIR /$APK_NAME /$APK_NAME .apk"
22- mount --bind " $MODDIR /$APK_NAME " " /system/app/ $APK_NAME "
28+ mount --bind " $MODDIR /$APK_NAME " " $APK_DIR "
2329
2430# restart nfc service
2531killall com.android.nfc
You can’t perform that action at this time.
0 commit comments