File tree 3 files changed +21
-10
lines changed
3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,19 @@ create_backup() {
23
23
fi
24
24
}
25
25
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 ..."
27
27
set ' NfcNci' ' NQNfcNci' ' NxpNfcNci'
28
28
for name do
29
29
if [ -d " /system/app/$name " ]; then
30
30
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"
31
36
fi
32
37
done
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."
34
39
ui_print " -- $APK_NAME .apk found!"
35
40
36
41
# save device infos
@@ -48,10 +53,10 @@ ui_print '-- Device info --'
48
53
ui_print " $( cat $MODPATH /.env) "
49
54
ui_print ' -----------------'
50
55
51
- APK_PATH=" /system/app/$APK_NAME /$APK_NAME .apk"
56
+ # APK_PATH="/system/app/$APK_NAME/$APK_NAME.apk"
52
57
APK_DIR=" $( dirname $APK_PATH ) "
53
58
REPLACE="
54
- /system/app/ $APK_NAME
59
+ $APK_DIR
55
60
"
56
61
mkdir " $MODPATH /$APK_NAME "
57
62
Original file line number Diff line number Diff line change 1
1
id=NFCScreenOff
2
2
name=NFC Screen Off
3
- version=v0.3.1
4
- versionCode=31
3
+ version=v0.3.2
4
+ versionCode=32
5
5
author=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'
5
5
for name do
6
6
if [ -d " /system/app/$name " ]; then
7
7
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"
8
13
fi
9
14
done
10
15
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 ) "
12
18
13
19
# restore original apk
14
20
cp " $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 "
16
22
17
23
# wait for nfc service to start
18
24
sleep 20
19
25
20
26
# inject modded apk
21
27
cp " $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 "
23
29
24
30
# restart nfc service
25
31
killall com.android.nfc
You can’t perform that action at this time.
0 commit comments