ikarus23 / MifareClassicTool

An Android NFC app for reading, writing, analyzing, etc. MIFARE Classic RFID tags.
http://www.icaria.de/mct/
GNU General Public License v3.0
4.67k stars 901 forks source link

How to build? Checking TicWatch Pro compatibility #357

Closed yesimxev closed 2 years ago

yesimxev commented 2 years ago

I'd like to build this app with a bit of responsive layout for Ticwatch Pro, Pro 3. So need to adapt to screen res 450x450. I can't manage to build it without even touching it in android studio. Can you or anyone who built advise please? Hw compatibility will turn out as soon as the app won't crash on startup

ikarus23 commented 2 years ago

Hi. Not sure how you trying to build it. For me opening up Android Studio and selecting File->Open->Import Project did always work.

yesimxev commented 2 years ago

Just got a reply someone trying to build on Win10 and it worked. I'm building others on Kali and Ubuntu, not sure why this didn't work. Probably libs. Will give it a try. What are you building on?

ikarus23 commented 2 years ago

I'm building it on Arch Linux.

ikarus23 commented 2 years ago

I will close this for now. Feel free to reopen it, if you have more questions.

yesimxev commented 2 years ago

Ah forgot to report back, builds on Win7. Just trying to find out if the nfc chipset is incompatible or just not allowed to be used on the watch. I'll paste the error here if you don't mind. Invalid operation in NFC foreground service or so

ikarus23 commented 2 years ago

Hmm... not sure about the NFC foreground dispatch system on watches. I guess there could be specifics to the Android ROM.

yesimxev commented 2 years ago

Sure, trying to do some research on it. I'm quite new to NFC and (especially) wearOS. Is that needed for only background operation eg. read tag when recognised or even for read with read tag button?

ikarus23 commented 2 years ago

On an normal Android device the OS handles the detection of NFC tags and informs app when there is a new one. An app can subscribe to this notifications (intents). If you want to have exclusive access to the NFC resource, you need to run in the foreground and register for the foreground dispatch system. https://developer.android.com/guide/topics/connectivity/nfc/advanced-nfc has more information. But I don't think it the same in wearOS

yesimxev commented 2 years ago

Awesome! Thank you for the info

yesimxev commented 2 years ago

I dug into a little bit, but didn't go far. Is there a chance that the NFC is only capable of sending (eg. Google Pay) on hardware level or maybe just kernel?

ikarus23 commented 2 years ago

Hi. I'm not sure about watches, but on an Android phone there is a driver (Kernel module) and the firmware of the NFC controller. Both can be part of allowing/restricting functionality. At least to my knowledge.