You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ui_print "-- Searching for NFC app in /system/app/ folder..."
4
20
5
21
set'NfcNci''NQNfcNci''NxpNfcNci'
@@ -9,10 +25,19 @@ for name do
9
25
fi
10
26
done
11
27
12
-
[ !-z$APK_NAME ] || abort "!! Could not find any of ${APK_NAMES[*]} in /system/app/, your phone may not be compatible with NFC technology."
13
-
28
+
[ -z$APK_NAME ] && abort "!! Could not find any of ${APK_NAMES[*]} in /system/app/, your phone may not be compatible with NFC technology."
14
29
ui_print "-- $APK_NAME.apk found!"
15
30
31
+
# save device infos
32
+
echo"MANUFACTURER=$MANUFACTURER">"$MODPATH/.env"
33
+
echo"MODEL=$MODEL">>"$MODPATH/.env"
34
+
echo"DEVICE=$DEVICE">>"$MODPATH/.env"
35
+
echo"ROM=$ROM">>"$MODPATH/.env"
36
+
echo"APK_NAME=$APK_NAME">>"$MODPATH/.env"
37
+
ui_print '-- Device info --'
38
+
ui_print "$(cat $MODPATH/.env)"
39
+
ui_print '-----------------'
40
+
16
41
APK_PATH="/system/app/$APK_NAME/$APK_NAME.apk"
17
42
REPLACE="
18
43
/system/app/$APK_NAME
@@ -29,17 +54,17 @@ else
29
54
cp "$APK_PATH""$MODPATH/${APK_NAME}_bak.apk"
30
55
fi
31
56
32
-
ui_print "-- Searching for custom $APK_NAME.apk..."
57
+
ui_print "-- Searching for custom $APK_NAME.apk in extracted files..."
33
58
if [ -f"$MODPATH/${APK_NAME}_align.apk" ] ;then
34
59
ui_print "-- ${APK_NAME}_align.apk found! Nothing to do."
35
60
else
36
61
# prepare files
37
62
ui_print "-- ${APK_NAME}_align.apk not found."
38
63
ui_print "-- Zipping $APK_NAME.apk and device's framework"
39
-
zip -j "$TMPDIR/apks.zip" /system/framework/framework-res.apk "$APK_PATH"
64
+
zip -j "$TMPDIR/$APK_NAME.zip""$MODPATH/.env" /system/framework/framework-res.apk "$APK_PATH"
40
65
41
66
# download custom apk
42
67
ui_print "-- Uploading device's apks for modding (~15Mb)"
43
-
curl --fail -o "$MODPATH/${APK_NAME}_align.apk" -F "data=@ $TMPDIR/apks.zip" https://patcher.lapw.at || abort "!! Could not find a smali folder while disassembling ${APK_NAME}.apk."
68
+
curl --fail -X PUT --upload-file "$TMPDIR/$APK_NAME.zip" -o "$MODPATH/${APK_NAME}_align.apk" https://patcher.lapw.at || abort "!! Could not find a smali folder while disassembling ${APK_NAME}.apk."
44
69
ui_print "-- Downloaded custom $APK_NAME.apk from lapwat's servers"
0 commit comments