Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCT crashes on HTC One (m7/m8) after updating to Lollipop #52

Closed
torberglund opened this issue Feb 8, 2015 · 75 comments
Closed

MCT crashes on HTC One (m7/m8) after updating to Lollipop #52

torberglund opened this issue Feb 8, 2015 · 75 comments

Comments

@torberglund
Copy link

MCT has always been working flawless on my HTC M8 pre-lollipop. This weekend I updated the device to 5.0, since then MCT crashes immediately when reading or writing to a tag.

@alierta
Copy link

alierta commented Feb 8, 2015

I have the same problem. I will have to downgrade the phone
El 08/02/2015 14:02, "torberglund" [email protected] escribió:

MCT has always been working flawless on my HTC M8 pre-lollipop. This
weekend I updated the device to 5.0, since then MCT crashes immediately
when reading or writing to a tag.


Reply to this email directly or view it on GitHub
#52.

@ikarus23
Copy link
Owner

ikarus23 commented Feb 9, 2015

Custom or official Lollipop build?

@ikarus23 ikarus23 added the bug label Feb 9, 2015
@alierta
Copy link

alierta commented Feb 9, 2015

Official Lolipop (vodafone uk)

@ikarus23
Copy link
Owner

ikarus23 commented Feb 9, 2015

Thanks for the info and - of course - thanks for reporting.
I just noticed that you tow are not the only ones. I got 8 crash reports via google play... The issues is within:

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'short android.os.Bundle.getShort(java.lang.String)' on a null object reference
at android.nfc.tech.NfcA.<init>(NfcA.java:92)
at android.nfc.tech.NfcA.get(NfcA.java:78)
at android.nfc.tech.MifareClassic.<init>(MifareClassic.java:166)
at android.nfc.tech.MifareClassic.get(MifareClassic.java:156)
at de.syss.MifareClassicTool.MCReader.<init>(MCReader.java:67)
at de.syss.MifareClassicTool.MCReader.get(MCReader.java:81)
at de.syss.MifareClassicTool.Common.checkForTagAndCreateReader(Common.java:622)
at de.syss.MifareClassicTool.Activities.KeyMapCreator.onCreateKeyMap(KeyMapCreator.java:372)

But I'm not really sure what is causing it. It occurs deep down in some Android method (as you can see from the android. package name. I will try to reproduce it order to find out more. Unfortunately I don't own a HTC M8, so I will try my best without one.

@ikarus23 ikarus23 added this to the Todo milestone Feb 9, 2015
@ikarus23
Copy link
Owner

ikarus23 commented Feb 9, 2015

Also: can you check if other apps work well?
e.g. NFC TagInfo (you can set key A and B via the settings) or NXP TagInfo

@ikarus23 ikarus23 removed this from the Todo milestone Feb 9, 2015
@alierta
Copy link

alierta commented Feb 9, 2015

Yes I have tested it, The other apps doesn't work. Nfc war, NFC taginfo (NXP)..., and all I tested. The only app that works is NFC Tools (by wakdev). All apps says the same error.

If you need help for test changes contact with me, If i can help in something. (sorry for my english) and thanks

@ikarus23
Copy link
Owner

ikarus23 commented Feb 9, 2015

Thanks for the testing!
So there is an issue within the Lollipop build that affects nearly all NFC applications. Now we have to find out what wakdev is doing better than all other NFC apps ;)

@ikarus23
Copy link
Owner

ikarus23 commented Feb 9, 2015

Hmm... so this issue is somehow connected with #53

@alierta
Copy link

alierta commented Feb 10, 2015

Today I tested the MCT tool in LG g3 with Lollipop and works perfectly. Best regards

@tinchogon34
Copy link

Same problem here with M8 and official lollipop :(

@tinchogon34
Copy link

I tried to debug this error but it appears to be an Android nfc tech library bug.

@ikarus23
Copy link
Owner

@tinchogon34 In Android's nfc tech library, you say... this sounds bad. But if some other apps work there must be a way...

I don't know if there is any difference, but I compiled a testing version based on the latest source with the latest Android Studio: http://tests.icaria.de/MifareClassicTool-1.8.3-testing.apk
(All releases prior this testing version were compiled by using the old adt eclipse bundle.)

@HappyLer
Copy link

I also have the same issue with Stock Rom. Wakdevs app only works to read the UID. If you want to read the data it says "Not supperted yet".
I tested with your testing version. Detecting the tag works but when i want to read data it crashes.

@HappyLer
Copy link

Also i tested 3 or 4 other apps. All the same issue. If they allow to read UID only it works fine. As soon as i want to read data the app crashes. So i guess it is a general Lollipop/HTC lollipop issue.

@torberglund
Copy link
Author

Any news on the matter?

@ikarus23
Copy link
Owner

Not yet, sorry.

@arrabal
Copy link

arrabal commented Feb 26, 2015

I just want to add that this exact issue is happening to HTC One M7 on Lollipop. It worked perfectly in 4.x and crashes when reading/writing after updating to 5.0.2.
Also, tested some other apps as well and they all have the same problem.

Should I open a different issue for HTC One M7 or is it the same bug?

I can help testing as well if you need it.

@ikarus23 ikarus23 changed the title HTC M8 LOLLIPOP MCT chrashes on HTC One (m7/m8) after updating to Lollipop Feb 26, 2015
@ikarus23 ikarus23 changed the title MCT chrashes on HTC One (m7/m8) after updating to Lollipop MCT crashes on HTC One (m7/m8) after updating to Lollipop Feb 26, 2015
@ikarus23
Copy link
Owner

Thanks for the Information. No need to open another issue because it is the same symptom (and most likely the same cause). I updated the title to be more clear.

@DanielHosseini
Copy link

I have the same problem as arrabal, seems like lollipop is the evil in this :(
Any news on this?

@alfs
Copy link

alfs commented Mar 18, 2015

Sony Z3 compact, Lollipop 5.0.2 (build 23.1.A.0.690) is working fine with MCT and NFC TagInfo.
So the bug may not be related to Android's nfc tech library in general, but to specific to certain phone models. I see another user was successful also with LG G3. I know it's not much comfort for M7/M8 owners, but may still be useful information for the developer.

@mdanny82
Copy link

I have a HTC One M7. Same Issue after upgrading to Lollipop 5.0.2 (Stock Rom Vodafone Germany). If u need someone to make tests with apk-versions with stacktraces or need other Information, plz contact me.

@ikarus23
Copy link
Owner

ikarus23 commented Apr 2, 2015

Hey guys,
I managed to contact HTC about this issue. To investigate this further they need some information. Unfortunately I don't own a HTC One (m7/m8). Can one of you help me out? They need:

  • Serial Number:
  • IMEI Number:
  • Phone Model:
  • Build Number:
  • Android Version:
  • Baseband Version:
  • Sense Version:
  • Current network provider:

If you don't want to post this information here feel free to write me a mail. You can get the address from the google play page of MCT.

Thanks for your help!

@arrabal
Copy link

arrabal commented Apr 5, 2015

Email sent. I hope it helps. Thank you.

@iceiony
Copy link

iceiony commented May 22, 2015

@freerider7777 Like I mentioned, the sources don't seem to match. Regarless of what you see in the android sdk , HTC one seems to be running slightly different code.

@freerider7777
Copy link
Contributor

@iceiony Yes, I've seen your post... I was thinking about embedding original google code in apk to try to fix this problem, but didn't have time to try this. Now with this patch there is no need! :)

@iceiony
Copy link

iceiony commented May 22, 2015

@freerider7777 Oooh . Sorry for missunderstanding :D

@ikarus23
Copy link
Owner

Wow! So you're telling me if I implement the patch by bildin the issue will be gone on HTC One m7/m8 devices? For real?

I will try to publish a testing version with this patch applied as soon as possible (unfortunately not before May 25th).

@freerider7777
Copy link
Contributor

@ikarus23
yep :) tested on several HTC devices with Android 5.*

@ikarus23
Copy link
Owner

Ok, I was too excited to do anything else... so I implemented the patch... ;)
Please download an try this testing version of MCT.

@HappyLer
Copy link

It is working. Guess you are the only one having a working Nfc reader cor One's on 5.* now.

@freerider7777
Copy link
Contributor

@bildin What's your app? :) If not a secret... You made a lot of people happy with this patch :))

@ikarus23
Copy link
Owner

You guys are awesome!
Thank you. All of you. And especially bildin for analysing this further and providing a patch!

P.S.: Don't forget to use equals() to compare stings in Java. ;)

@freerider7777
Copy link
Contributor

@ikarus23 oh yes... you mean to replace these "ifs":
if(sTechList[idx] == NfcA.class.getName())
which can fail to compare...

@arrabal
Copy link

arrabal commented May 22, 2015

the testing version works on HTC one m7. Amazing! Thank you guys, this os awesome

@WheeIbarrow
Copy link

Many thanks to all of you for your great work! All of you deserve some beers after this! I owe you that much, so let me know if you are ever in Gothenburg, Sweden and I'll buy you a few rounds! @bildin @iceiony @freerider7777 @ikarus23

@ikarus23
Copy link
Owner

The workaround was added to the master with commit a793981.
The workaround was released with version 2.0.3. See: bacc424.

I truly hope we are done here. Thanks again for all the help!

@bildin
Copy link

bildin commented May 25, 2015

@freerider7777 my app is for reading Moscow public transport tickets and transport cards based on Mifare Ultralight and Mifare Classic chips.

I am glad to be helpful for all of you.

@hanssv
Copy link

hanssv commented May 25, 2015

@bildin I'm the developer of a similar app for Swedish public transport, and I have now succesfully added a similar workaround inspired by your patch! Many thanks from all the HTC-users!

@freerider7777
Copy link
Contributor

Has anyone tried on M9? Seems to be a problem there...

@bildin
Copy link

bildin commented May 27, 2015

@freerider7777 I have not any crash report from M9, but a few comments are exists. No issues like this weren't ticked.

@moscowneversleeping
Copy link

Hi. New version don't works with some type of Classic Tags. SONY Z3. Android 5.0.2.
I see debug information today, and write here crashing logs.

@ikarus23
Copy link
Owner

ikarus23 commented Jun 6, 2015

Hi. I'm not sure if this issue is related to the HTC One m7/m8 patch.
Therefore I opened a new issue here.

@ikarus23 ikarus23 mentioned this issue Jun 6, 2015
@ikarus23
Copy link
Owner

ikarus23 commented Jul 2, 2015

I have created another testing version of MCT with a slightly modified version of bildin's patch (just code structure). Could somebody please test if this still works for a HTC One?

@StHuginn
Copy link

StHuginn commented Jul 2, 2015

"Read Tag" at 2.0.4 works fine on HTC One (M7) - tag (UID) and sector 0 were read OK. Though Tools/Display Tag Info crashes the app.

@ikarus23
Copy link
Owner

ikarus23 commented Jul 2, 2015

Thanks for testing! Is this testing version any better?

@StHuginn
Copy link

StHuginn commented Jul 2, 2015

Nope, same crash :(

@ikarus23
Copy link
Owner

ikarus23 commented Jul 7, 2015

This version works for reading writing and displaying the Tag Info, right?

@StHuginn
Copy link

StHuginn commented Jul 7, 2015

Correct, works fine on M7 now.

@ikarus23
Copy link
Owner

ikarus23 commented Jul 8, 2015

Ok, thanks for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests