GithubHelp home page GithubHelp logo

metrodroid / metrodroid Goto Github PK

View Code? Open in Web Editor NEW
498.0 21.0 69.0 68.14 MB

Read data from public transit cards using your NFC Android phone! (iOS 13 and PC/SC support coming soon)

Home Page: https://www.metrodroid.org

License: GNU General Public License v3.0

Java 2.09% Python 3.69% Shell 0.30% HTML 0.05% Makefile 0.76% JavaScript 0.05% Kotlin 89.57% Swift 3.50%
nfc android mifare public-transport felica cepas mifare-ultralight mifare-desfire mifare-classic iso14443a

metrodroid's People

Contributors

albirew avatar atalanttore avatar badrpc avatar bakavic avatar codebutler avatar coderbm1 avatar comradekingu avatar cookieguru avatar lizzyd710 avatar marloncolhado avatar micolous avatar mliberato avatar mohammedbelkacem avatar naofum avatar nathanbnm avatar ninjas28 avatar nokisdemox avatar oersen avatar phcoder avatar robbiet480 avatar santossi avatar steets250 avatar stefanor avatar sybond avatar tbonang avatar vistaus avatar waldist avatar wandcode avatar weblate avatar yarons avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metrodroid's Issues

Improve Bilhete Único support

Bilhete Único currently looks for bcdefghi at the tail end of Sector 0 Block 0 on Mifare Classic cards. This is actually associated with the card vendor that they use, specifically the Fudan Microelectronics FM11RF08 (a Mifare Classic clone), so I disabled it. This picks up many false positives with other agencies and cards which use the same vendor.

I need some samples of cards (annotated dumps) in order to build a better detection for them.
https://github.com/vpereira/bilhete seems to have a few dumps. But a lot of the information is in Portuguese, which I don't speak.

There's a lot more data on the card which the reader doesn't decode, but not enough notes to be useful :( It only reads the balance.

There doesn't appear to be any standard header on these cards. They also use standard checksumming on records, so anyone who does the same thing will also be mis-detected. One of the card dumps listed has different manufacturer data, so even some BÚ cards will be not detected as BÚ.

This will require that certain cards be set as a "fallback" reader in order to work properly. Looking at the other MFC transit parsers, they implement more robust checks so aren't affected by this problem.

Opal employee card not readable

Please read the guidelines for contributions (CONTRIBUTING.md) before submitting new issues to this tracker. Failure to adhere to these guidelines may cause offense.

Unsupported card requests

If the card is not presently supported by Metrodroid:

  • I have read and acknowledged the New cards wiki page
  • I can provide dumps, transaction history, and balance records for more than one card from the operator.
  • I have attempted to understand the card format on my own.
  • I have provided notes on what I've found so far.

Description of the issue

I have an Opal good card which looks same as Opal employee card.

I get IOexception: tranceive failed

For card-specific issues

  • Name of the card type: opal
  • Name of the transit operator: transport for nsw
  • Location: ?

For all issues reading a currently supported card format (eg: balance shown is incorrect), please export a card dump from Metrodroid and email it to me privately.

Steps to reproduce

  1. Tap card to phone

Expected behaviour

Actual behaviour

Error as above

Workarounds (if any)

Logs

Generate a bug report ZIP using the instructions here: https://developer.android.com/studio/debug/bug-report.html

Please do not attach it to this issue. You may be asked for a copy later via private email.

Details from About screen:

  • Version:2.9.3(32)
  • Model:nexus 6p (angler)
  • Manufacturer:huawei
  • Android OS version:8.1.0
  • NFC: enabled
  • Mifare Classic: supported

Audit all the copyrights

Most of the code copyrights are unacknowledged. Need to work through the codebase and work out who wrote what from the git history, in order to correctly attribute those authors.

ITSO support (UK-wide transport smartcards)

(Disclaimer: this is not a request for support, but just a note in case anyone else wants to work on this. I have read the New cards wiki page. Sadly I don't have time to work on this myself, but I wanted to record my research in case it was useful to others.)

If anyone is interested in working on support for cards in the United Kingdom, many/most operators (including ScotRail, my local operator) use the ITSO specification. This specification is freely available and quite detailed.

At one time @rjmunro did some work on ITSO support in farebot: codebutler/farebot#56 which may serve as a basis for this work.

I'm happy to assist with dumps etc from my ScotRail smartcard if that's of use.

There is a closed-source app on Google Play (Rambus Smart Ticket Checker) which supports these cards, but it would be good to have this code in the open.

Los Angeles Transit Access Pass

Hi Micolous,

I have an "add my transit provider" request. Unlike other requests, you've already done most of the work. I live in Los Angeles, which uses the Transit Access Pass card, also known as TAP. When used with Metrodroid, it is recognized as the Go Card (SEQ), with the correct serial number showing. The card balance and history tabs are sometimes accurate but usually show incorrect data. It would seem that the Go Card and TAP Card share record types, but have varying sectors for where the records go. Using your description of the record types, I was able to correctly extrapolate data from my card scans including tap, top-up, and balance records. The Metrodroid app is able to do this, but it only works on certain transactions.

I created a wiki page similar to your existing ones with information about the TAP card, including the data locations of the card. Unfortunately, a total noob at programming, so I can't offer much help with the actual coding. It seems that this card is pretty similar to the ones you have already added to this app. I am able to provide more data about the card if needed, including actions that the app currently does and does not read correctly. Would implementing this card be hard to accomplish? I

Thanks, Steven

Transit Access Pass (TAP).txt

Externalise/deduplicate card support matrix

Description of the issue

There are currently multiple sources of card lists in Metrodroid:

I like the detailed card info matrix, because it has a lot of information about individual available features, not just what we support. There's also information which is off in individual wiki pages.

I like the wiki because it contains information as the support for a card gradually improves.

The website needs to be a little bit behind the rest, as that's what released on GPS / F-Droid.

I think the wiki is out of scope. But at least getting a source of truth for everything that's not the wiki would be an improvement.

Translation is still a challenge, but at least generating the source English text would help significantly. Right now these get out of sync when I forget to action them.

What information needs to be collated

  • Card name
  • (optional) Name of agency
  • Agency's website
  • Location (country, city)
  • Card media type (MFC, MFD, MFU, ISO7816, FeliCa...)
  • Logo

Maybe also get some screenshot metadata

Clipper single-use tickets throw TagLostException in v2.9.38

Please read the guidelines for contributions (CONTRIBUTING.md) before submitting new issues to this tracker. Failure to adhere to these guidelines may cause offense.

Description of the issue

Clipper single-use tickets fail to read in v2.9.38, throwing a TagLostException on my Pixel 3. I'm doing some research on these and have plenty of dumps if needed.

For card-specific issues

  • Name of the card type: Clipper (single-use)
  • Name of the transit operator: Clipper
  • Location: San Francisco, CA

For all issues reading a currently supported card format (eg: balance shown is incorrect), please export a card dump from Metrodroid and email it to me privately.

Steps to reproduce

  1. Scan a Clipper single-use ticket (only tested with Muni-issued ones).

Expected behaviour

Card reads, as it does in v2.9.37.

Actual behaviour

TagLostException every time.

Workarounds (if any)

Logs

Generate a bug report ZIP using the instructions here: https://developer.android.com/studio/debug/bug-report.html

Please do not attach it to this issue. You may be asked for a copy later via private email.

Details from About screen:

  • Version:
  • Model: Pixel 3 (blueline)
  • Manufacturer: Google (google)
  • Android OS version: 9 (PQ2A.190405.003)
  • NFC: enabled
  • MIFARE Classic: not supported

FeliCa: Handle card moved out of field better

Unsupported card requests

n/a

Description of the issue

Reading a FeliCa card takes some time. If the card is moved out of the field, there are strange errors given to the user.

For card-specific issues

  • Name of the card type: Suica / Pasmo / others
  • Name of the transit operator: JR East
  • Location: Japan

Steps to reproduce

  1. Hold a FeliCa card (ideally Suica/IC compatible) against the phone.
  2. Remove it from the field part way through reading.

Expected behaviour

Something that indicates that the card left the NFC field.

Actual behaviour

Exceptions within nfc-felica-lib are displayed in a dialog

Workarounds (if any)

Hold the card "properly".

Log

06-15 16:37:00.588 12623-12623/? W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] net.kazzz.felica.lib.FeliCaLib$IDm.getBytes()' on a null object reference
06-15 16:37:00.589 12623-12623/? W/System.err:     at net.kazzz.felica.lib.FeliCaLib$CommandPacket.<init>(FeliCaLib.java:276)
06-15 16:37:00.589 12623-12623/? W/System.err:     at net.kazzz.felica.FeliCaTag.readWithoutEncryption(FeliCaTag.java:268)
06-15 16:37:00.589 12623-12623/? W/System.err:     at au.id.micolous.metrodroid.card.felica.FelicaCard.dumpTag(FelicaCard.java:190)
06-15 16:37:00.590 12623-12623/? W/System.err:     at au.id.micolous.metrodroid.card.Card.dumpTag(Card.java:92)
06-15 16:37:00.590 12623-12623/? W/System.err:     at au.id.micolous.metrodroid.activity.ReadingTagActivity$ReadingTagTask.doInBackground(ReadingTagActivity.java:194)
06-15 16:37:00.590 12623-12623/? W/System.err:     at au.id.micolous.metrodroid.activity.ReadingTagActivity$ReadingTagTask.doInBackground(ReadingTagActivity.java:186)
06-15 16:37:00.590 12623-12623/? W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:333)
06-15 16:37:00.590 12623-12623/? W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
06-15 16:37:00.590 12623-12623/? W/System.err:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
06-15 16:37:00.590 12623-12623/? W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
06-15 16:37:00.590 12623-12623/? W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
06-15 16:37:00.590 12623-12623/? W/System.err:     at java.lang.Thread.run(Thread.java:764)

Remove GMS dependency

Currently depends on GMS for Google Maps API v2. The older versions of Farebot were available in F-Droid, but then depended on Google Maps API v1, which is deprecated.

It seems non-trivial to remove Google Maps API from the application at build time.

Instead, replace the mapping functionality with something like MapQuest Open tiles in a WebView with Leaflet.

Date header is not shown when previous trip is on the same day of week in the same year and month

If a trip is on 2016-03-16, and the previous trip shown was on 2016-03-23, the date header for the trip on 2016-03-16 would not be shown. This is because they are on the same day of the week (Wednesday) in the same year and month.

Offending function: CardsTripFragment.UseLogListAdapter.isFirstInSection / .isLastInSection:

https://github.com/micolous/metrodroid/blob/6e0178c/src/main/java/com/codebutler/farebot/fragment/CardTripsFragment.java#L228

Appears to call Date.getDay instead of Date.getDate.

This appears to also be a bug in Farebot.

Pixel 2 (and XL) reports "no MIFARE Classic support" when it supports MIFARE Classic.

Description of the issue

Pixel 2 (walleye) and Pixel 2 XL (taimen) report "no MIFARE Classic Support" in Metrodroid, when they actually support it.

iFixit reports "NXP 81A04 39 04 sSD730 (likely NFC controller)" for Pixel 2 XL.

Pixel 2 is also able to communicate with MFC cards just fine.

This is probably due to the extra detection routines added for the LG F60 picking up something it doesn't like.

LG G3 Mifare Classic read failure

With Metrodroid 2.9.29 (the latest as of yesterday, apparently), reading a Niagara Falls Adventure Pass (for the city of Niagara Falls, ON, CA) results in IOException: Transceive failed for each sector. Expanding any of the sectors results in Metrodroid force closing.

The card is a Mifare Classic 1k, and I've successfully dumped the card contents with mfoc. This dump is attached, along with a screenshot of the failed read.

My phone is an LG G3. Other NFC apps on this same device are able to read this card without issue.
Likewise, I'm able to use Metrodroid to read the contents of another Mifare Classic that I have - this issue appears to be solely limited to Metrodroid reading this specific card.

screenshot_2016-12-26-13-39-08

nfap.zip

seq_go: Implement concessional fares

At present, the fare calculation logic only handles full fares.

Concessional fares are also a thing, but for simplicity this wasn't implemented in the last version of Metrodroid.

Two things need to happen in order to make this work:

  1. The fare calculator needs to know how to calculate concessional fares. This will require some extension to the algorithm to allow dropping in extra fare types.

  2. A way to tell between concessional and adult cards needs to be found.

TAP Card Expiration Date

Hi Micolous,

The TAP Card functionality on the app is wonderful. I'm working on compiling a list of bus routes and the remaining train stops to add eventually.

In the mean time, I believe I've found the sector of the card that shows when the card expires.
card_data.txt

Would it be possible to add in the expiration data as part of the card's information page in the app?

Thanks, Steven

GP: Adding a key can cause OOM

Description of the issue

java.lang.OutOfMemoryError: 
  at org.apache.commons.io.output.ByteArrayOutputStream.needNewBuffer (ByteArrayOutputStream.java:127)
  at org.apache.commons.io.output.ByteArrayOutputStream.write (ByteArrayOutputStream.java:158)
  at org.apache.commons.io.IOUtils.copyLarge (IOUtils.java:2147)
  at org.apache.commons.io.IOUtils.copy (IOUtils.java:2102)
  at org.apache.commons.io.IOUtils.copyLarge (IOUtils.java:2123)
  at org.apache.commons.io.IOUtils.copy (IOUtils.java:2078)
  at org.apache.commons.io.IOUtils.toByteArray (IOUtils.java:721)
  at au.id.micolous.metrodroid.activity.AddKeyActivity.readKeyFile (AddKeyActivity.java:168)
  at au.id.micolous.metrodroid.activity.AddKeyActivity.onCreate (AddKeyActivity.java:140)
  at android.app.Activity.performCreate (Activity.java:7183)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1220)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2908)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3030)
  at android.app.ActivityThread.-wrap11 (Unknown Source)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1696)
  at android.os.Handler.dispatchMessage (Handler.java:105)
  at android.os.Looper.loop (Looper.java:164)
  at android.app.ActivityThread.main (ActivityThread.java:6938)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)

Only reported on 2.9.34.

Calypso 1.0 - ISO14443 Type B card not recognized

Description of the issue

I have a ISO14443B card that uses the Calypso 1.0 protocol. I'm sure of this because I've read official documentation from the company that states witch card they use.
If I put the card on my ACR122U and give nfc-list command, it says there is such ISO14443B card, but mfoc does not found any tag.

Now the issue:
If I scan the tag with the debugger attached to android studio, it does not even pass from onNewIntent(Intent intent) in ReadingTagActivity, so it's like I haven't approach anything.
But... Metrodroid actually supports Calypso! Could this be related to phone specific NFC stack?
I have an Oneplus 6, but I tried also with Oneplus 3T and LG G7.
Someone could read any ISO14443B Calypso card with metrodroid?
---> I CAN read others NfcB IsoDep tags with my mobile phone, so NfcB works, the strange thing is linked to Calypso i suppose.

Steps to reproduce

  1. Approach a ISO14443B Calypso 1.0 card with metrodroid

Expected behaviour

onNewIntent(Intent intent) being called

Actual behaviour

onNewIntent(Intent intent) is not called

Possible solution

I saw in res/xml/filter_nfc.xml that is missing NfcB and in the intent it does not expect NfcB, but even in this way, I can't recognize the card. It's like it is not supported... by android?

Details from About screen:

  • Version: 2.9.36-269-ge4204e37-dirty (1740)
  • Model: ONEPLUS A6003
  • Manufacturer: OnePlus
  • Android OS version: 9.0
  • NFC: enabled
  • MIFARE Classic: supported

seq_go: Implement support for fares

Fares don't appear to be stored on the card.

In order to calculate the fare, you need to know what zone a particular stop is in, and which fare table version to use for the agency.

This also probably means we need to handle continuations properly, which I'm unsure what state it is in.

The Translink GTFS data contains zone information (column: zone_id). We include this information at present with compile_stops_from_gtfs.py, as the zone_id column. This works for everything but the Airport stations which do not contain zone information.

What needs to happen:

  1. Fix airport station issues
  2. Implement fare calculator, with support for multiple editions of the fare table
  3. Identify and handle continuations
  4. Display all of this information in the UI

Design Contribution

Hi, I am a designer. I support special projects with my design contributions. I see you have a good project. But unfortunately I wouldn't say the same for the logo. So I designed a logo for this project.

The main idea in design is;

NFC bus tickets. And a bus with an NFC antenna inside the ticket. Because it is a simple, minimalistic logo, it will appear clearly in small android icon sizes.

If there's something you want to change in design, I can do it. I'd like to inform you that this is a contribution.

Here are the designs;

metrodroid_suunu

Android App Icon Menu Mockup

Work through Play Store policy complaints

List of items provided by J to address before the next Play Store version.

Provide J new screenshots before release which show that the issues have been addressed.

Detect absence of Mifare Classic support

Some new phones (like Nexus 4/5/6) don't support Mifare Classic.

Farebot doesn't handle this very well, so implement a way for this to gracefully degrade on these devices.

Gradle won't compile

Gradle 'metrodroid-master' project refresh failed
Error:Project : declares a dependency from configuration 'compile' to configuration 'default' which is not declared in the descriptor for project :nfc-felica-lib.

Add missing card images

Description of the issue

Missing card images added in other pull requests:

  • Ventra (Chicago, IL, USA)
  • Trimet (Portland, OR, USA)
  • Viva (Lisboa, Portugal)
  • Envibus (France)
  • Navigo (France)
  • OùRA (France)
  • TaM (France)
  • Transgironde (France)
  • Mobib (Belgium)
  • RicaricaMi (Italy)
  • Adelaide Metro
  • Beijing
  • City Union
  • Pastel (France)
  • Kiev
  • MetroQ (Houston)
  • Selecta (France)
  • SunCard (Orlando)
  • Tartu Bus
  • Wuhan Tong

Project Build Failed / Spanish Translate Proposal

Description of the issue

I click on make project and it says "CreateProcess error=2"

I have git updated, github account fully working in android studio and updated JDK and I can't find more info about this error.
This application looks very interesting and I would like how it works and which keys uses.

Also in this same issue I would like to told you about translating this app to Spanish, im from Spain and I think I can help you guys. This app is not very known here and seems to have a lot of potencial, if i were able to build the project i will help.

I made a MOD apk for Mifare Classic Tool app and now im adding some new features to it, it will be possible to add your keys to that app?

Link to the video of the MOD apk: https://www.youtube.com/watch?v=Or2XoKedLS4

Or you can just look for "Mifare Classic Tool Bruteforce Android" in youtube,

Thanks for making such a good app 😁

how to hack metrocard

please help me how to hack metro card using mifare tool, my friends add money changing sector keys but they don't help me and don't say so help me please . thank u sincerely.

Setup LAX TAP support for Stops website

At present, Stops website only supports the Go card. It should also support LAX TAP card.

There are some quirks to handle:

  • Multiple agencies, not just 1 agency.
  • Metro Bus stop IDs actually show the route number, not the stop at which the service was boarded

This will need some refactoring of the site.

Scanning Suica card results in NullPointerException

Description of the issue

Scanning a Suica card results in this error:
NullPointerException: Attempt to invoke the virtual method 'byte[] net.kazzz.felica.lib.FeliCaLib$IDm.getBytes()' on a null object reference

For card-specific issues

  • Name of the card type: Suica
  • Name of the transit operator: JR East
  • Location: Japan

Steps to reproduce

  1. Scan Suica card
  2. Enjoy error message

Expected behaviour

  1. Scan Suica card
  2. Probably something that doesn't involve an error message

Actual behaviour

  1. Scan Suica card
  2. Receive error message

Logs

Generate a bug report ZIP using the instructions here: https://developer.android.com/studio/debug/bug-report.html

Please do not attach it to this issue. You may be asked for a copy later via private email.

Details from About screen:

  • Version: v2.9.31-fdroid (31)
  • Model: Nexus 6P (angler)
  • Manufacturer: Huawei (google)
  • Android OS version: 8.1.0 (OPM7.181205.001)
  • NFC: enabled
  • MIFARE Classic: supported

New card request - Bilhete BOM

Please read the guidelines for contributions (CONTRIBUTING.md) before submitting new issues to this tracker. Failure to adhere to these guidelines may cause offense.

Unsupported card requests

If the card is not presently supported by Metrodroid:

  • I have read and acknowledged the New cards wiki page
  • I can provide dumps, transaction history, and balance records for more than one card from the operator.
  • I have attempted to understand the card format on my own.
  • I have provided notes on what I've found so far.

Description of the issue

There's a new type o mifare card on Brazil besides Bilhete Unico called Bilhete BOM. I have two of them working just fine, and I've broken the keys of both with mfoc. I have plenty of dumps, documented time, fare, date, and so on. I've already understood part of the logic, but there are some Value blocks that make some kind of checksum with Sector 2, that if we try to put a image of the day before on it, it gets a "integrity error" on the subway, so I have to put the normal back on, since I have no idea how to decrement Value Blocks on the card.

I'm using only Kali Linux for all of my research. I just need some help to understand how the integrity check works, and where is stored the fare value.

Looking forward to meet you!

For card-specific issues

  • Name of the card type: Bilhete BOM
  • Name of the transit operator: EMTU
  • Location: Sao Paulo - Brazil

For all issues reading a currently supported card format (eg: balance shown is incorrect), please export a card dump from Metrodroid and email it to me privately.

Steps to reproduce

Expected behaviour

Actual behaviour

Workarounds (if any)

Logs

Generate a bug report ZIP using the instructions here: https://developer.android.com/studio/debug/bug-report.html

Please do not attach it to this issue. You may be asked for a copy later via private email.

Details from About screen:

  • Version:
  • Model:
  • Manufacturer:
  • Android OS version:
  • NFC:
  • MIFARE Classic:

Propose New Logo

Hello, I want to contribute to this awesome project, and I have a new logo design for you, if you allowed I will send to you :)

Fail to read some Singapore cards (EZLink, NETS Flashpay)

Please read the guidelines for contributions (CONTRIBUTING.md) before submitting new issues to this tracker. Failure to adhere to these guidelines may cause offense.

Unsupported card requests

If the card is not presently supported by Metrodroid:

  • [* ] I have read and acknowledged the New cards wiki page
  • [* ] I can provide dumps, transaction history, and balance records for more than one card from the operator.
  • [ *] I have attempted to understand the card format on my own.
  • [* ] I have provided notes on what I've found so far.

Description of the issue

Singapore EZLink, Hong Kong Octopus and Indonesia KMT cards cannot be read but all of them can be read using Farebot.

For card-specific issues

  • Name of the card type: NfcA, NfcB and Isodep
  • Name of the transit operator: EZ Link, Octopus and KMT
  • Location: Singapore, Hong Kong and Indonesia

For all issues reading a currently supported card format (eg: balance shown is incorrect), please export a card dump from Metrodroid and email it to me privately.

Steps to reproduce

  1. Just tap any EZ Link card.. I tried with 4 different EZ Link cards but none can be read
  2. Just tap any Octopus card.. app can identify the card but no content can be read
  3. Just tap any KMT card.. it cannot be read

Expected behaviour

It shows balance and/or (routes)

Actual behaviour

Data dump function is called but none is shown

Workarounds (if any)

Logs

Generate a bug report ZIP using the instructions here: https://developer.android.com/studio/debug/bug-report.html

Please do not attach it to this issue. You may be asked for a copy later via private email.

Details from About screen:

  • Version: 2.9.37-208
  • Model: Mi 5
  • Manufacturer: Xiaomi
  • Android OS version: 8.0
  • NFC: enabled
  • MIFARE Classic: supported

FYI: all those cards can be read using Farebot though the app is not stable and crashes many times until it can read the cards

When language is set to Japanese, cents are rounded off

Description of the issue

When the system language is set to Japanese, cents are rounded off of Australian dollars.

Steps to reproduce

  1. Set system language to Japanese
  2. Scan a card where the currency is Australian dollars
  3. Observe balance.

Expected behaviour

A$1.23 will be displayed as "A$1.23".

Actual behaviour

A$1.23 will be displayed as "A$1".

Only impacts development / master branch.

Questions on ATM (Milan metro card) implementation

(tl;dr: skip to last part)

I have an ATM card (Azienda Trasporti Milanesi - Milan metro - not a bank card), I just saw this contributed by @phcoder, so I built the app from master and tested it.

First of all, the app also works with the regular ATM card (which looks like this), not only with the RicaricaMi card (which is the one mentioned in the source code).

The main difference (to my knoweledge) is that the regular orange card is personal and can be used for monthly and annual subscriptions, while the ricaricami card is anonymous and can only be used to store short-term tickets. Most people living in Milan have the orange card, the green RicaricaMi card is a lot less common and is usually used by occasional travelers. That is to say I think "ATM card" in strings and source code would be better, though I see most people might confuse it with bank cards.

That being said I scanned my card (loaded with an annual subscription) and I noticed that

  • Subscription name is displayed as unknown
    • As a matter of fact that makes sense and I see that in the source code, because the "RicaricaMi" card won't be sold with this kind of subscription
    • I think I might be able to patch it to support this
  • Subscription issue date doesn't make sense to me (though it may be the issuer's fault, I'll check at a metro station totem next time I go there)
  • I have some entries in my history and not all metro stations are known to the app
    • I haven't been able to find where in the code the station name is identified

tl;dr here

Finally, my questions:

  • Does it make sense to you to
    • Change strings and graphics and display it as "ATM Milano Card" or something like that?
    • Also refactor class/package names?
  • Where the hell is the code that identifies the station names?

Unknown stations UI disappeared

Description of the issue

"Unknown stations" reporting UI has disappeared on git master.

For card-specific issues

  • Name of the card type: Go card
  • Name of the transit operator: Translink
  • Location: Brisbane, AU

Steps to reproduce

  1. Load a Go card with unknown stations
  2. Go to the history tab

Expected behaviour

The unknown stop report UI is shown.

Actual behaviour

The unknown stop report UI is never shown.

Workarounds (if any)

None

Details from About screen:

  • Version: 2.9.34-195-g3062482

MdST compression

Description of the issue

I'd reckon that not everyone would use every stop database, and some of them may never be loaded.

I would still like everything to be offline, so I still need to ship these things.

I think there is some value in compressing these.

I've been running experiments on mdst-compression-experiment, after adding a new compressed field to mdst-license-notice. In mdst-license-notice, I moved the attribution data into a field which is gzip-compressed.

Also in mdst-license-notice, I lazy-load the station index.

It's probably better to compress entire sections of the file. MdST requires you to load the header block, then the entire index block if you want to reference stations by ID.

Looking at a big database (suica_rail.mdst):

Mode header size stations size index size
uncompressed 18710 254315 56307
zlib (compressing each station record) 9888 308086 24939
brotli (compressing each station record) 8576 277950 15694
zlib (solid station records) 9888 138167 24939
brotli (solid station records) 8576 106444 15694

"compressing each station record" is where I pushed a separate compressed block for each record in the file. "solid station records" is where I concatenated all station records, then compressed the entire block.

It should be possible to make changes to the format to seek within a solid station record list. It does mean a bunch of data will need to be decompressed for every lookup, unless the solid blocks can be split.

At worst, just compressing the header and the index is generally a pretty good win.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.