Benjamin-Loison / waydroid

Waydroid uses a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu.
https://waydro.id
GNU General Public License v3.0
0 stars 0 forks source link

[Feature] Leverage an actual device NFC #33

Open Benjamin-Loison opened 6 months ago

Benjamin-Loison commented 6 months ago

Is your feature request related to a problem? Please describe.

Related to Benjamin_Loison/franceidentite/issues/7.

In fact Benjamin-Loison/termux-api/issues/9 is a more general solution.

Describe the solution you'd like.

Not read.

Describe alternatives you've considered.

Not read.

Additional context

No response

Benjamin-Loison commented 4 months ago

Related to waydroid/issues/{1339,980}.

Concerning the former the only interesting occurrences of:

Concerning the latter it is about hoping to be lucky with an USB NFC reader/writer by leveraging waydroid prop set persist.waydroid.uevent documented at https://docs.waydro.id/usage/waydroid-prop-options#properties.

Benjamin-Loison commented 2 months ago
grep -rin nfc
Output: ``` tools/services/hardware_manager.py:15: def enableNFC(enable): tools/services/hardware_manager.py:16: logging.debug("Function enableNFC not implemented") tools/services/hardware_manager.py:57: args, enableNFC, enableBluetooth, suspend, reboot, upgrade) tools/actions/container_manager.py:164: #TODO: remove NFC hacks tools/actions/container_manager.py:166: command = ["stop", "nfcd"] tools/actions/container_manager.py:168: elif which("systemctl") and (tools.helpers.run.user(args, ["systemctl", "is-active", "-q", "nfcd"], check=False) == 0): tools/actions/container_manager.py:169: command = ["systemctl", "stop", "nfcd"] tools/actions/container_manager.py:208: #TODO: remove NFC hacks tools/actions/container_manager.py:210: command = ["start", "nfcd"] tools/actions/container_manager.py:212: elif which("systemctl") and (tools.helpers.run.user(args, ["systemctl", "is-enabled", "-q", "nfcd"], check=False) == 0): tools/actions/container_manager.py:213: command = ["systemctl", "start", "nfcd"] tools/helpers/lxc.py:119: # NFC config tools/helpers/lxc.py:120: make_entry("/system/etc/libnfc-nci.conf", options="bind,optional 0 0") tools/helpers/lxc.py:359: glob.glob("/vendor/etc/permissions/android.hardware.nfc.*")) tools/helpers/lxc.py:363: glob.glob("/odm/etc/permissions/android.hardware.nfc.*")) tools/helpers/lxc.py:368: glob.glob("/odm/etc/permissions/sku_{}/android.hardware.nfc.*".format(sku))) tools/interfaces/IHardware.py:10:TRANSACTION_enableNFC = 1 tools/interfaces/IHardware.py:17:def add_service(args, enableNFC, enableBluetooth, suspend, reboot, upgrade): tools/interfaces/IHardware.py:29: if code == TRANSACTION_enableNFC: tools/interfaces/IHardware.py:31: ret = enableNFC(arg1 != 0) debian/changelog:103: * container: Extend nfcd stop/start hacks to systemd debian/changelog:207: * lxc: Optionally bind-mount NFC config ```