yashsingh1/xdaforums huggingface dataset:
[Magisk] JohnWo:
[MENTION=6471406]lapwat[/MENTION], as Magisk already mounts /system/app/Nfc_st (or the correct path in each phone), and in case this problem appears in other phones, maybe you don't need to mount the directory in your script, just overwrite the correct ".apk" (and the other necessary files) over the (already mounted) /system/app/Nfc_st.

I think this won't overwrite the original files, and the mod will continue being "systemless".

This is just a suggestion (I'm not an expert at all).
[Magisk] lapwat:
I include classes.dex file inside the apk so I don't understand why vdex/odex files are mandatory.

Do you mean: mount --bind /data/adb/modules_update/NFCScreenOff/Nfc_st /system/app/Nfc_st

Happy it works for you :D

Interesting that you can boot with the modded apk. On my side, I need to boot with the original apk then inject the modded apk after boot (see service.sh).

I will think about a solution if more people bump into your issue, I may need your help to write the fix.
[Magisk] JohnWo:
Hi lapwat,

Just some clarifications (sorry, I sent a lot of messages with partial information so it was a bit of a mess)

If I understood it correctly, this is what is happened in my phone:

Magisk mounted /data/adb/modules/NFCScreenOff/system/app/Nfc_st in /system/app/Nfc_st. The directory was empty.

It seems that in my phone com.android.nfc tried to start at this point, but it couldn't find the binaries and crashed several times, making the phone reboot. Two things may have happened (I couldn't check):

Your script was not yet executed, so there was no Nfc_st.apk or any other file in the directory.

Your script mounted "$MODDIR/$APK_NAME" into "/system/app/$APK_NAME", but the .odex and .vdex files were missing (in my phone, those files are outside the .apk), causing the crashes in com.android.nfc.

To solve this problem what I did is copy the original content from /system/app/Nfc_st to the /system/app/Nfc_st directory inside the .ZIP of the module installer, so this content is now also stored at /data/adb/modules/NFCScreenOff/system/app/Nfc_st after the installation.

Now this is how it works in my phone. I made a small modification in your service.sh script to copy the files instead of mounting the directory (the files are copied in the directory that was mounted by Magisk, so no real modifications are done to the real /system/app/Nfc_st directory).

Magisk mounts /data/adb/modules/NFCScreenOff/system/app/Nfc_st in /system/app/Nfc_st. The directory includes the original files, so com.android.nfc starts withouth problems.

The modified service.sh copies the backup of the original .apk to /system/app/Nfc_st (all the other files already were there).

The service.sh script copies the modified file and kill the nfc service (which is immediately restarted).

I didn't try to start skipping the second step (restoring the original file), but I tried just overwriting the Nfc_st.apk file in the /system/app/Nfc_st directory (without all the other parts of the mod), and it didn't work.
[Magisk] mapagm:
Installed version 0.3.0 - installation was succesful, but it does't work with screen off. Xiaomi Mi 9T.
[Magisk] lapwat:
Thanks for the clarification.

/system/app/Nfc_st should not be empty because I copy the apk inside it before mounting it.

Here: https://github.com/Magisk-Modules-Repo/NfcScreenOff/blob/master/service.sh#L21-L22
[Magisk] lapwat:
Please provide Magisk installation logs so I am able to help you.
[Magisk] lapwat:
Does it still work with screen on?
[Magisk] mapagm:
Yes it does.
[Magisk] smilekachok:
help

Doesn't work with screen off

v0.3.0 for Mi 9T.
[Magisk] lapwat:
Can you share with me a zip file with the following files/folders from your phone:

- /system/app/NQNfcNci/NQNfcNci.apk

- /system/app/NQNfcNci/oat/arm64/NQNfcNci.odex

- /system/app/NQNfcNci/oat/arm64/NQNfcNci.vdex

- /system/framework/arm64 (folder)

And I shall look into it.

Thanks
[Magisk] mapagm:
lapwat here is some of the files* you asked for: https://chmura.elbud.poznan.pl/index.php/s/fDAt3tXBnqG7j6o

* - i don't have these files:

/system/app/NQNfcNci/oat/arm64/NQNfcNci.odex

/system/app/NQNfcNci/oat/arm64/NQNfcNci.vdex
[Magisk] lapwat:
Looks like those files are the files when the module is installed.

Please uninstall the module and zip the files again.

/system/app/NQNfcNci/oat/arm64/NQNfcNci.odex and /system/app/NQNfcNci/oat/arm64/NQNfcNci.vdex will be back if you uninstall the module and reboot your phone.
[Magisk] mymihov:
Not working on Screen OFF

Hi, thank you for this work. Any way, NFC not working when the screen is OFF or locked. I have Xiaomi Mi8, MIUI 12. 1 Beta (with MIUI 11 Stable the same).

View attachment magisk_log_20200802_174947.log
[Magisk] mapagm:
Ok, I uninstalled the module and ziped the files: https://chmura.elbud.poznan.pl/index.php/s/3j97kH8zzydwoaW
[Magisk] lapwat:
Cool, now:

- uninstall any other version of NfcScreenOff

- reboot

- install enclosed zip with Magisk

- test it and write feedback

Not sure why it is not working, may be one of those 2 reasons:

- your NfcService.smali file is a bit different from what I am used to

- disassembling with device framework, modding and reassembling has no effect over the original behaviour

Thanks

Please consider donating so I can test on a side device, those back and forth are killing me.

[IMG="Buy me a coffee"]https://cdn.buymeacoffee.com/buttons/lato-blue.png[/IMG]
[Magisk] lapwat:
Those are booting logs, can you share the installation logs.

Thank you
[Magisk] mymihov:
Hello, I attached the correct file in my original post.
[Magisk] warrencoakley:
How are you getting in with GPay implementation?
[Magisk] lapwat:
Not well, everytime I try to mod it, it just disappears from my phone. I also have problems because the app is in /data/app and not in /system/app like NfcNci.
[Magisk] warrencoakley:
Shame. Hope you'll crack it
[Magisk] lochstar:
This worked well for me but it appeared to be draining my battery, I uninstalled and the battery issue went anyway. Anyone else had a similar problem?
[Magisk] mapagm:
It WORKS!!!! :) Thank You very much! :)
[Magisk] tomKater:
Hi everybody,

Could you tell me if internet connection must to be on during installation or not ? Is there any data that is send somewhere ?

Thank you for your feedback.
[Magisk] lapwat:
Hello [MENTION=5967434]tomKater[/MENTION],

Absolutely, you need an internet connection to install this module. The patch of your Nfc APK is happening on a distant server.

Best
[Magisk] warrencoakley:
Any update on using this for GPay with screen off yet?
[Magisk] lapwat:
I did not touch it in a while, this feature is currently on hold.
[Magisk] Valiante:
Any possibility to remove the NFC sound?
[Magisk] warrencoakley:
Has anyone tried yet using GPay with the screen off?
[Magisk] lapwat:
Would love to do it if you can find where the sound is triggered in the source: https://android.googlesource.com/pl...s/tags/android-9.0.0_r48/src/com/android/nfc/

EDIT

Found it here: https://android.googlesource.com/pl...0_r48/src/com/android/nfc/NfcService.java#758

Can make a patch if other users don't mind. I will let some time for people to see this message and if nobody is against removing the sound, I'll give it a try ;)
[Magisk] warrencoakley:
GPay still does not work with the screen off
[Magisk] rodken:
Is the patch currently available?
[Magisk] lapwat:
Yes it is available in version 0.3.1. Can you install it with Magisk and tell me if it works for you?
[Magisk] lapwat:
This feature is available in version 0.3.1. Can you install it with Magisk and tell me if it works for you?
[Magisk] Valiante:
Working perfectly on my Pixel 3 Android 10!

Such an obnoxious sound lol thanks for my sanity!
[Magisk] Gunnlaugg:
Without the sound i don't know if the tag was read, when the Display is off!

Can i turn on the sound again?
[Magisk] lapwat:
Maybe you can enable vibration to have a haptic feedback?

The sound was disabled in last release because this feature was requested.

If you would like a version with the sound back, try flashing the enclosed zip with magisk.

It would be interesting to have a dynamic Magisk installation that let's you select features while flashing the module. Don't know how to do that though.
[Magisk] gasparirob:
Hi, I'm trying to install the module but I get this error:

- Copying zip to temp directory
- Installing NFCScreenOff-v0.3.0.zip
- Device is system-as-root
Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip
inflating: module.prop
Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip
inflating: customize.sh
****************
NFC Screen Off
****************
*******************
Powered by Magisk
*******************
Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip
inflating: customize.sh
inflating: module.prop
inflating: service.sh
creating: system/
inflating: system/placeholder
creating: bin/
inflating: bin/zip
inflating: bin/curl
- Extracting module files
-- Searching for NFC app in /system/app/ folder...
-- NQNfcNci.apk found!
-- Device info --
APK_NAME=NQNfcNci
MANUFACTURER=Xiaomi
MODEL=Mi 10
DEVICE=umi
ROM=
-----------------
-- Searching for NQNfcNci.apk backup...
-- NQNfcNci_bak.apk not found. Creating backup of original NQNfcNci.apk.
-- Searching for NQNfcNci.odex backup...
-- NQNfcNci_bak.odex not found. Creating backup of original NQNfcNci.odex.
cp: can't stat '/system/app/NQNfcNci/oat/arm64/NQNfcNci.odex': No such file or directory
cp: can't stat '/system/app/NQNfcNci/oat/arm64/NQNfcNci.vdex': No such file or directory
-- Searching for NQNfcNci.vdex backup...
-- NQNfcNci_bak.vdex not found. Creating backup of original NQNfcNci.vdex.
-- Searching for custom NQNfcNci.apk in extracted files...
-- NQNfcNci_align.apk not found.
-- Zipping NQNfcNci.apk and device's framework (/data/adb/modules_update/NFCScreenOff/bin/zip)
adding: .env (deflated 2%)
adding: NQNfcNci.apk (deflated 19%)
adding: framework-res.apk (deflated 49%)
-- Uploading device's apks for modding (/system/bin/curl), it may take a while (8Mb)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 8734k 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
-- Classic modding failed, trying odex strategy
-- Adding whole framework folder and odex/vdex files to archive
zip warning: name not matched: /dev/tmp/NQNfcNci.odex
zip warning: name not matched: /dev/tmp/NQNfcNci.vdex
adding: .env (deflated 1%)
adding: NQNfcNci.apk (deflated 19%)
/data/user/0/com.topjohnwu.magisk/cache/flash/update-binary: cd: line 89: can't cd to (unreachable)/: No such file or directory
zip warning: name not matched: arm64

zip error: Nothing to do! (try: zip -r /dev/tmp/NQNfcNci . -i arm64)
-- Uploading archive for odex modding (/system/bin/curl), it may take a while (1Mb)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 1156k 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
!! Odex strategy failed.
! Installation failed
[Magisk] mikeshutte:
I'm having issues when trying to install this module I keep getting an install error. I had it successfully installed on lineage OS 18.1, and now currently trying to install on dot os and getting installed error. My phone is a moto z3 play. I've attached the install log as well.
[Magisk] shmykelsa:
Hi, installing this module fails for me. Here's a log:
[Magisk] Endip:
+1
[Magisk] Gunnlaugg:
Thank you!

And you are right, the vibration works too.
[Magisk] 2me3:
Also getting odex strategy failed error on my Pixel4a on android 11.

A few weeks ago it worked fine on my old pixel 4a 5g also on android 11.
[Magisk] lapwat:
Sorry for the delay, it was indeed the patcher that was down. All good now :)
[Magisk] Auros42:
Same issue for me, here is my log.
[Magisk] lapwat:
Should be good now, is this error still happening ?
[Magisk] Jordan5900:
Okay sorry I had another issue as well that I didn't realize were 2 separate issues. The first issue that is related is fixed now and it completed install.

My second issue was related to the Universal SafetyNet fix modules installation immediately it freezing the phone when first getting to the homescreen after reboot. Solution was to flash latest Kirisakura_Bluecross kernel. I'm pretty sure these two problems are unrelated.

Thank you for your help with my first issue.
[Magisk] mbecroft:
Hi - module fails to install for me on LineageOS 18 at:

-- Searching for NFC app in /system/app/ folder...

! Installation failed

I had a look around and my NFC app seems to be located here:

/system/system_ext/app/NQNfcNci

/system/system_ext/app/NQNfcNci/NQNfcNci.apk

/system/system_ext/app/NQNfcNci/oat/arm64/NQNfcNci.vdex

/system/system_ext/app/NQNfcNci/oat/arm64/NQNfcNci.odex

/system/system_ext/app/NQNfcNci/lib/arm64/libsn100nfc_nci_jni.so

I am not sure what system_ext is or why my NFC app is located there instead of in /system/app where the module installer is searching.

Any help much appreciated!
[Magisk] Auros42:
It's working now, thanks so much.
[Magisk] mbecroft:
I did some reading. system_ext is a new thing introduced in Android 11, to help separate device-specific files from common components. system and system_ext are separate partitions.

On my phone (an Fxtec Pro1 with LineageOS 18), the NFC apk, NFC vendor C++ libs etc. are located in system_ext. The current NfcScreenOff installer is hard-coded to search only within /system/app to locate the NFC apk and associated files. For Android 11 support, this needs to be extended to also search /system_ext/app.

OP: are you willing to do this? If not, I will have a crack at it and, if I get it working, submit a PR. But it would be hugely appreciated if OP could make the change, as I'm not too familiar with the magisk install process.

Cheers -Mario
[Magisk] rodken:
I was wondering why the module kept failing to install on Android 11.
[Magisk] mbecroft:
Yep. We need to get Android 11 system_ext support in the installer. It's not hard in theory, but I'm hoping OP will help us out here...pretty please :)
[Magisk] lapwat:
Thank you for investigating, I've created a release especially for you :)

Give it a try

EDIT

First zip does not work (error 404). Second one neither. The third one has been tested and released as v0.3.2.
[Magisk] lapwat:
I have created a system_ext/app release, backward compatible with classic system/app. Give it a try and I shall push it on Github.
[Magisk] SubjectGinger:
Doesn't work on OnePlus 7 with Android 11, log attached
[Magisk] lapwat:
Can you please try the second zip above ? I forgot to change the endpoint in the first one.
[Magisk] dz.smilga:
Hello dear Dev, thanks for this amazing module.

Unfortunately, it is not working for me at all!

I install it from Magisk Modules section - NFC Screen Off v0.3.1

Google Pay works fine only when screen is on, and it works with sound!

* In attachment You wil find log file

* Device - Xiaomi POCO X3 NFC

* Rom - MIUI Global 12.0.7 stable (miui_SURYAIDGlobal_V12.0.7.0.QJGIDXM_58e1a55be4_10.0)

* Rooted - Magisk 23 / Check SafetyNet - SUCCESS!

Help me, how to make poco great again? :)
[Magisk] lapwat:
I am not sure I get what you want, Google Pay screen off feature was dropped a while ago. This module does work with NFC tags only (office badges, Bluetooth pairing devices, ...).
[Magisk] dz.smilga:
Ouu i see, sorry for my misunderstanding, will try with my badges. I had thought that this is for Google Pay too.
[Magisk] SubjectGinger:
Just gave it a shot, put my device in a bootloop then it rebooted to recovery. I had to use adb to uninstall my magisk modules to get back to my system
[Magisk] lapwat:
Attached a third file, should be the one.
[Magisk] SubjectGinger:
Yep, that worked! Thanks!
[Magisk] blank_dvth:
The install keeps failing whenever it reaches "uploading archive for odex modding".

On Android 11, trying to install v0.3.2
[Magisk] lapwat:
Should be good now :)
[Magisk] blank_dvth:
Perfect! It works
[Magisk] LeifAlbor:
So I'm curious - should this Mod work with Android 12 Beta 2?
[Magisk] lapwat:
I don't see any reason why it shouldn't work.

Please try and tell us :)
[Magisk] LeifAlbor:
Failed installation through Magisk I'm afraid. Here's the output.
[Magisk] Tahsin Can:
Poco X3 pro not installed. 12.5.2 Global Rom. Data mounted.
[Magisk] ninja00083:
Also getting the Odex strategy failed. Installation failed message.
[Magisk] lokalkey:
@lapwat

Odex strategy failed
[Magisk] Alessandrotischer:
I get odex strategy failure too...
[Magisk] Abdu55799:
Anyone who can help? Everything worked perfectly before. Thanks in advance
[Magisk] flunkyball:
Same here on LOS 18.1 with Galaxy S7.

"Odex strategy failed"

Any update on this ?
[Magisk] sunchau:
https://xdaforums.com/t/nfc-screen-off-for-zenfone-8.4357039/

i had made a version for zf8
[Magisk] Alessandrotischer:
I get odex strategy failed too...
[Magisk] sunchau:
it works again
[Magisk] wiley2484:
Thank you so much for the development on this @lapwat

The version in the main post works perfectly, except it doesn't have sound. When I try to flash this version with sound, it fails on the curl. Looks like https://patcherwithsound.lapw.at defined in the script is a 404. Any chance you could help with a version that does have sound? I'm working on a project for my son to be able to scan NFC cards and he needs the audio feedback from the card scans to know that his scan worked. Thanks in advance!
[Magisk] lapwat:
@wiley2484

https://patcherwithsound.lapw.at should work now wish you the best for your project !
[Magisk] wiley2484:
Worked like a charm, thanks @lapwat this project is only possible with your hard work.
[Magisk] Tizetre:
Hey, I keep getting this error during installation:

- Copying zip to temp directory
- Installing NFCScreenOff-v0.3.2.zip
- Current boot slot: _b
- Device is system-as-root
Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip
inflating: module.prop
****************
NFC Screen Off
****************
*******************
Powered by Magisk
*******************
Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip
inflating: customize.sh
- Extracting module files
Archive: /data/user/0/com.topjohnwu.magisk/cache/flash/install.zip
inflating: customize.sh
inflating: module.prop
inflating: service.sh
creating: system/
inflating: system/placeholder
creating: bin/
inflating: bin/curl
inflating: bin/zip
-- Searching for NFC app in /system/app/ and /system/system_ext/app/ folders...
/data/user/0/com.topjohnwu.magisk/cache/flash/update-binary: /data/adb/modules_update/NFCScreenOff/customize.sh: line 39: syntax error: bad substitution
! Installation failed

Phone is a Xiaomi Poco M4 Pro, I've tried looking for the NFC app manually and it seems to be located in system/system_ext/app/Nfc_st/Nfc_st.apk

Any help appreciated
[Magisk] sajgon338:
Any chance to make Google pay work with this module?
[Magisk] lapwat:
Hi,

New release v0.3.3 should handle Nfc_st app name.

Release v0.3.3 · Magisk-Modules-Repo/NfcScreenOff

Read NFC tags when screen is off. Disable NFC tagging sound. - Release v0.3.3 · Magisk-Modules-Repo/NfcScreenOff

github.com
[Magisk] lapwat:
Thanks for the feedback, I have updated the ZIP on the release. But it does not seem to work with Nfc_st sorry. Maybe other people can write feedback.
[Magisk] lapwat:
For NFC to start after reboot, I personally need to unlock my phone and wait for about 30 seconds and then NFC starts.
[Magisk] Tizetre:
It starts pretty much instantly on mine. I still waited a few minutes just to see but no luck :/

Besides the NFC section disappears from the system settings and when I try launching an app that uses NFC it tells me my phone doesn't support it.

Still thanks for the help!
[Android Auto General] mightyInca:
Had anybody purchase this type of headunit?

I bought it off Amazon and is a unit for A BMW f25 or x3 it says it runs on android 9.0 with 4GB ram and 64gb also. I was just wondering if anybody has been able to modified or change the UI. I have come across some issues. Let me know if anyone has.

8.8 Inch Android 9.0 6 core.
[OnePlus 7T Questions & Answers] kid386:
Recently bought a OnePlus 7t 8GB 128GB from Aliexpress. From my understanding it was the CN version flashed to the Global version. Originally I wasn’t all that worried until I realized the system took 21% of my storage space. I don’t think my previous android phones took up 27GB and my Iphone only uses about 10GB for system storage.

Since I think this storage number is higher than normal can anyone walk me through how to completely wipe the OnePlus 7t and start from new with the Oxygen OS?

Thank you in advance
[OnePlus 7T Questions & Answers] Ionakr:
Every oneplus 7t have the same issue. If you look on the forum there are a couple of topic about this. You're not the only one

https://xdaforums.com/oneplus-7t/help/storage-t3984073
[OnePlus 7T Questions & Answers] kid386:
Thanx for that info. I’m still going to wipe it clean just in case. I just have to figure out how without breaking my new phone. Back to the drawing board
[Nokia 6.1 (2018) Questions & Answers] Vollwertkost:
Problem:

Unlocked phone is seemingly stuck in bootloop. Need guidance fixing it.

Explanation:

Hey guys,

I bought a used Nokia 6 (2018) and want to install a custom ROM on it. Last year, I used the paid service to have it unlocked - worked like a charm! So thanks again for that! After reading up on the topic, I set up drivers, adb and fastboot on my PC (Win10). I used

fastboot erase cache

fastboot erase userdata

fastboot erase boot

fastboot erase system​

to prepare the phone and then

fastboot boot twrp-3.3.1-1-PL2.img​

to get into TWRP. Next is where I ****ed up I think.

I followed a guide and moved twrp-installer-3.3.1-0-PL2.zip on to my SD card. In TWRP, I chose "install" and then picked said installer. After that, I chose the option to reboot.

That must have been the wrong thing to do, because now the phone only boots into download mode. When I hold the power button it does not shut down, but instead instantly reboots into download mode.

When I type

fastboot devices​

I still get

PL2GAR9811701240 fastboot​

and Windows plays the "connect" sound, when I plug it in. Yet all fastboot commands (boot, flash, reboot) now return

FAILED (Write to device failed (Unknown error))​

What can I do at this point? Can I somehow revert to stock? How is that done? Can I use this guide and the linked stock ROM?

If you'd like more information, just ask away. I'm glad for any guidance at this point, so thanks in advance for your help!
[Touch Cruise General] alsorogo:
hello:

how i can disable de plugin orange in the principal screen?

if not disable this plugin i can´t select htc-home.

thank´s
[Samsung Galaxy Watch] Adhamelalfy:
I need some assistance from people with experience on this;

When I try to build a watchface using Galaxy Watch Studio, I usually encounter the OPR warning after the AOD version is generated.

What is OPR?

Is it because I use a design with too many pixels? or too many colors?

Thanks in advance
[Xiaomi Redmi 5 Questions & Answers] Filarh:
I've installed many Ten roms(Havoc, Lineage Test and port, pixel experience, etc) but all of those are having mic problems. At the start everything just works fine but after a days, hours or weeks it starts failling, sometimes it doesn't work and when it works present a terrible recorded audio quality, I don't use any kind of audio mod. Please help me, im start thinking that I'm the only one who is happening for this cuz I'm been asking this on many roms's thread without answer nor solutions
[Xiaomi Redmi 5 Questions & Answers] orucmahmood:
Hi, my phones mic also not working. And it was suddenly. Now I saw your words and remember about my mics problem was suddenly. Maybe it was how you describe.. Do you flash miui 9 rom back ? and it works on miui 9 roms ? Please reply.
[Xiaomi Redmi 5 Questions & Answers] Filarh:
Mic work fine on any other Android version(stock or custom), it fails just on Android 10 Roms.