Submit Developer help/feedback to Xiaomi team? (Fingerprint Authentication bug) - Xiaomi Mi A1 Questions & Answers

I noticed a weird bug on my phone while developing an Android app for it. I'm trying to use fingerprint authentication and Android's KeyStore to encrypt/decrypt sensitive data.
But I noticed that even if the user gets authenticated successfully, the KeyStore still throws an Exception saying the user isn't authenticated.
I noticed this bug only happening on my Mi A1 (all other devices work fine) and it only happens if Fingerprints are enrolled. If I remove all fingerprints and use some other lock screen method, it works (after restarting though).
I want to submit this to Xiaomi or possible get help on this but I'm not sure if there's a way to contact and submit development related queries/bugs to Xiaomi (not general feedback).
Or is there anyone here that has faced this issue and knows a way to fix it? Let me know if you need code snippets.

Related

Unlock Pattern – Beware

I don’t actually need help with this. Its just a cautionary tale about a bug in the unlock program.
So after reading threads over the years of people who managed to forget their device’s username or password and thinking to myself – how on earth can you be so stupid? Guess what I managed to do. Somehow I managed to set an unlock pattern that I had no idea what it was.
In theory this is fine, as if you enter the wrong pattern 5 times a button appears that allows you to unlock with your Google account. However please note that this DOES NOT WORK at all. I tried every conceivable way of entering my username and password (@googlemail.com @gmail.com username on its own) and nothing worked.
After searching I note that this is a problem with Andorid (it seems to have been noted on a lot of droid forums). I understand that Google are aware of the bug but haven’t yet fixed it.
In the end I managed to hit upon the code (pretty much by random).
Be careful!!
EDIT - Google bug report here http://code.google.com/p/android/issues/detail?id=4784
More info here http://androidforums.com/support-troubleshooting/17319-forgot-unlock-pattern.html
Maybe YOU had this problem, but I forgot the lock pattern I had set and it let me login just fine...took a couple of seconds.
Not sure what the use of capitals was for then…
Ok for clarification – yes *I* along with some others definately have this problem. Clearly it is a problem but I don’t know the pattern of people it affects and doesn’t (UK vs Non-UK? Googlemail.com vs Gmail.com?)
I raise it because it’d be prudent for people to check before they actually need to use it.

[FAQ]FingerPrint Scanner SDK for Apps

The Fingerprint Scanner SDK (originally posted at http://forum.xda-developers.com/showthread.php?t=1202577) for Android has been released by Authentec. Currently there is only one device(Motorola Atrix) with a fingerprint scanner, but if you release your application with support for the fingerprint scanner (once you get the hang of it it is really not hard to use at all) then users of phones with fingerprint scanners will most likely be happier with your application.
Google has stated that Google Wallet will use fingerprints to unlock the payment system, so clearly more capable devices are on the way (source: http://www.qrcodepress.com/google-unveils-safety-measure-for-their-upcoming-mobile-wallet/853399/). Including fingerprint scanner capability in your application will also future-proof it as AuthenTec will have the same framework in place in other phones that will use their fingerprint scanner (Authentec is a leader in biometric security systems for lots of devices).
MotoDEV Article Guide:
http://developer.motorola.com/docstools/library/writing-fingerprint-enabled-apps
Read and Download the (simple) SDK at their site:
http://developers.authentec.com/
Example of SDK Usage (pulled from the SDK)​At the time of this writing, it is my understanding that before you release the application you need to have them review it to meet their security specifications... They don't want you using this fingerprint scanner library and making their work look bad. It's a fair deal to me. I'm not sure if this is how they want it though - maybe that is just for Advanced SDK or maybe I'm just wrong (taken from their site) It appears right now that there is a mismatch between the developers and the makers of the authentec site... apparently there is no requirement for using the fingerprint scanner, so develop away!
I have an Atrix and the fingerprint scanner is amazing, once you use it you will never go back to patterns or pins. As such this guide was written by a user of the Atrix - future devices might not use the exact methodology but it should be nearly identical.
I have the Advanced SDK but I have not used any of the advanced functions yet. After using the code (And getting it to finally work) I have found some things that are not documented or are documented incorrectly in the SDK docs and I have come here to post items that will save you great time. If you find others I hope to hear about them so I can add it to the list - I'll even credit you (maybe with a post number so you can score some thanks points!)
The swipe fingerprint screen won't show up - but I'm getting a result (mine was always 14)
AM2 (Authentec fingerprint framework - there are a lot of unsubscribed terms in the documentation so just go with me here) requires Internet Permission (perhaps to verify the key for the advanced SDK, it might not be done locally - without a key advanced SDK functions will not load). If you don't, all uses of the tsm.jar will not work. Not listed at all in documentation
AM2ClientLibraryLoaded() doesn't work with the code they provide!?
You must Instantiate Authentec.AM2ClientLibraryLoaded() - SDK Docs shows as static but it is not used in the example program they give.
It goes into verification but does not show anything and locks up the fingerprint sensor.
Do not change the 'screen' in the examples of sScreen... I thought that was the title of the window that would appear, but apparently those strings are built into it... it would work better as static fields passed as integers. For values look at the next answer.
What can I use for sScreen (viaGfxScreen(string))?
The documentation says nothing of this but these are different types of verification screens. There is fingerprint scanning only and then there is the unlock style one where you also get the PIN. I'm guessing a modifed version of this is how the lock screen works.
"lap-verify" is fingerprint and PIN
"get-app-secret" is fingerprint only - hit and miss right now... will update when I get it perfected
Why does it lock up?
Only 1 app at a time can access the fingerprint scanner. Motoblur seems to access it occasionally and I think that's why it died on the Atrix's Froyo 1.8.3. It seems mostly fixed but as you develop you will most likely lock it up as you debug. Having a wrong sScreen variable will kill your FP scanner. If it locks in your app you will lose the ability to unlock the device with the FP scanner.
Use DDMS to kill com.authentec.TrueSuiteMobile and the lock will work again. This might work on 1.8.3 but I'm not sure it works that way. If the application exits with the home button, it seems to also lock it up. I'm looking into a way to avoid this..
I can't register my application, it's failing with code 6 - (System Error)
I encountered this one myself when using my Api key for com.mgamerzproductions.gibbertalk - I changed it to com.mgamerzproductions.gibbertalk.testing and it no longer worked. They did tell me this in the email that it is only for one package - so make sure you choose wisely, or bribe the people giving out the API keys to give you another one. I wish it was more specific (API_KEY_NOT_AUTHENTIC or something)
I'm still having problems. What can I do?
You can use these tags for debugging in logcat:
AMJNI (AuthenTec Mobile - permissions - server)
TrueMobileSuite (some gfx log info - swipe fingerprint screen)
AndroidRuntime (will tell you crash related things, as debugging for errors will produce too much to read at once)
Any other things would be greatly appreciated for all of use Developers so speak up if you have something I don't have listed and I'll add it.
If you want to use the encrypted storage provided by the framework you'll need to apply for the Advanced SDK. You have to give them a description of your app, and it has to be security related (obviously that's the whole point of the fingerprint scanner and they don't want you to abuse it).
If you like the guide, and you are on MotoDev, I wouldn't mind a kudos in the contest http://community.developer.motorola...print-Enabled-Apps-quot-article-in/td-p/17206
RESERVED
Reserved for OP at a later date
Pictures of my use right now (more later)
Spoke to OP, moved to main Android development, as this would be of more interest to the development community in general, as I'm sure other phones will be using fingerprint scanning (and this sdk) in the near future.
Originally posted in the source thread:
heilpern said:
I tried to post in the linked thread, but as I'm a new XDA poster the system wouldn't allow me to.
The INTERNET permission is required, however there aren't any connections made off of the device. The system uses sockets internally and INET sockets are used rather than UNIX sockets.
> Why does it lock up?
> Only 1 app at a time can access the fingerprint scanner.
This should not cause the system to lock up; it should cause your app to delay briefly and either continue with your request or return to you with an error. If you can duplicate some other result reliably, please share details.
> If someone also can upload and create an eclipse project it would be must easier to import and view their source code they post. I tried but eventually gave up cause of so many problems.
The eclipse projects for these examples are very simple -- with the exception of the .project you have everything you need in the example directories. Worst case is you can create a new Android project and replace its manifest, sources and resources with those provided by the examples. Then point the build path at your tsm.jar and you'll be ready to go.
Click to expand...
Click to collapse
What I meant was that if an app is asking for the fingerprint reader (not the app entirely, but actively asking for the FP reader scan), and motorola does something in the background with the FP scanner (on atrix), it can lock it up. This was heavily apparent on Atrix 1.8.3 but in the new update it seems to have been mostly fixed.
Errors: If you bring up the window with anything but lap-verify or get-app-secret, the window will lock up (and i think fingerprint reader will lock up as well - if you return to the lockscreen you'll see it never finishes initializing it) I can attempt to reproduce this error but I want to finish some development I am doing now.
heilpern said:
com.authentec.TrueSuiteMobile drives the UI, directly or indirectly depending on exactly what's going on (indirectly in the case of the lock screen, for example). If this package is killed it will restart with the next fingerprint operation however it will disrupt any currently active verification attempt (causing the requesting app to receive an error -- probably the USER_CANCELED error).
Click to expand...
Click to collapse
I never really kill it except if it locks up. Haven't tested what it returns (perhaps null)
heilpern said:
Here's something you can do to experiment if you're using StoreCredential -- swipe one of your existing fingers (the index fingers) and you'll store data to that particular finger. Swipe a different finger (multiple times as prompted) and eventually (after three swipes if all goes well) you'll be asked which finger you just enrolled (and your credential will be stored to that finger). This new finger can be used for subsequent Store Credential requests (without the automatic training session) and to release data stored with Get Secret... but only the index fingers can be used to unlock the Atrix.
Click to expand...
Click to collapse
Yeah, in the original thread I had that image posted... It's in the framework but it never was used... I'm not sure if it was there for this purpose or was just cancelled at the end because it was incredibly confusing... I don't get why you would need all those credentials. It's not like your phone will get passed around that much. You swipe new fingers just like you would if you were registering a finger, then you choose the finger... but the accuracy of the 'pick a finger' one is pretty bad.
Would love to see a test apk where we can try this out...
Nothing available right now?
My application works with the FP scanner... its not done yet though.
These are the included APK's that are the code samples they use:
Download tsm-apk-pack.zip from Host-A
Will it support HTC Desire HD? It won't right?
The fingerprint scanner is a hardware device, just like a laptop fingerprint reader. Its not touchscreen, unfortunately.
Trolling from my ATRIX 4G on probably the crappiest main US carrier
Mgamerz said:
I can't register my application, it's failing with code 6 - (System Error)
I encountered this one myself when using my Api key for com.mgamerzproductions.gibbertalk - I changed it to com.mgamerzproductions.gibbertalk.testing and it no longer worked. They did tell me this in the email that it is only for one package - so make sure you choose wisely, or bribe the people giving out the API keys to give you another one. I wish it was more specific (API_KEY_NOT_AUTHENTIC or something)
Click to expand...
Click to collapse
I agree that a more telling error code would be a better option. Error 6 is eAM_STATUS_ACCESS_ERROR but that value can be returned for other problems as well.
Note that if a generic API key is needed, TSM-0E08085A-1210171A-001A7465-632E7473 can be used if you name your package com.authentec.tsmgetsecret. You cannot post that package to the Market however if you want a means of creating a test APK with a neutral package name that package/key combination will work.
Has AuthenTec claimed that package name on the market...?
they probably should or someone might take that package...
Mgamerz said:
Has AuthenTec claimed that package name on the market...?
they probably should or someone might take that package...
Click to expand...
Click to collapse
Yes, it's already claimed in an unpublished but uploaded entry.
Hi . question: is it possible to use fingerprint senzor as wake up function? My button is very very hard to push, this function would be great....

Security Policy prevents fingerprint unlock ?

After the April security patch, Are you guys able to use the fingerprint to unlock the device after using a 3rd party app like 'Screen Off and Lock' to lock the screen?
PS: Actually having this issue with my Galaxy S7 after the April patch. Before updating my 6P to latest I want to know that whether any of you are experiencing.
After playing in my Galaxy Note 8 phone with several apps that can lock my screen without requiring a PIN to unlock, I decided to create my own and share it with the community. You can find it in Google Play at https://play.google.com/store/apps/details?id=gr.ictpro.jsalatas.screenoff
Furthermore, it is distributed as Free Open Source Software and its source code is available at https://github.com/jsalatas/ScreenOff
A feature that I couldn't find is the ability to set it as the Assist App of your device and just long-press your home key to turn your screen off.
Hope you'll find it useful and I would really appreciate your feedback and comments.
Thanks!

bypass android secure startup possible?

My phone was stolen by hobos. I'm trying to see if there's a way to bypass the android secure startup. I was hoping these crackheads would take it somewhere to get a new rom for a different provider put on it and they wouldn't be able to and that would make me feel better. I've done some googling on it but I couldn't find anything clear on it.
What? So some people stole your phone, and secure startup is enabled, and you can't get in? Hmm. Sounds like if it's YOUR phone, you would know the pass code and there's no issue. I don't understand how anything else in your post is relevant. If you have someone else's phone and your trying to ask XDA to help you break into it, sorry but no can do. And secure startup is part of the new encryption features starting with Android 6.0, so there's not just a simple fix for getting around it. It's designed to keep thieves and hackers from gaining access to someone else's phone when rebooted. If you want to take a crack at military-grade encryption with some hex editor and hours and hours of coding, be my guest.
Ex gf changed pin for secure startup. Any way I can bypass it.
question:
we have many nexus 5x and pixel phones in my company. before we had the option to disable the "secure startup" in settings. but now that option is gone on all our phones, our phones have oreo 8.1.0 and the security patch level March 5, 2018.
the problem is that many users forget their password because they like to use their fingerprint to unlock their phones. if for some reason they have to restart their phone, they do not remember it, and after 20 attempts the phone gets wiped.
any idea on how to disable this feature?
I'm so interesting too if a tips exist to bypass secure startup, without wipe
chris rv said:
question:
we have many nexus 5x and pixel phones in my company. before we had the option to disable the "secure startup" in settings. but now that option is gone on all our phones, our phones have oreo 8.1.0 and the security patch level March 5, 2018.
the problem is that many users forget their password because they like to use their fingerprint to unlock their phones. if for some reason they have to restart their phone, they do not remember it, and after 20 attempts the phone gets wiped.
any idea on how to disable this feature?
Click to expand...
Click to collapse
Just go to Settings>Lockscreen and security>screenlock type>change to swipe, should remove password.

Please HELP get Redmagic 5G NFC GPay fix AND BL unlock FP fix: Takes 10m of time!

Please HELP get Redmagic 5G NFC GPay fix AND BL unlock FP fix: Takes 10m of time!
We have proven the easiest way to get development started on a new device is to NOTIFY the device manufacturer that there is a NEED for the company to fix issues. Thanks to XDA folks for 10 minutes of their time to email [email protected], we have gotten ZTE to release the full source code (that's an accomplishment, they haven't done this since the RM3, 2 phone versions ago, and it was Android 9 code). WE HAVE STRENGTH IN NUMBERS.
The first issue is Google Pay does NOT WORK with NA and Global ROMs. It reports 2 cards instead of 1 card when you go to a terminal, so you can NEVER make a payment!!! I BELIEVE THIS IS PROBLEM #1 TO ADDRESS FIRST
The second issue is THE BOOTLOADER UNLOCK METHOD BREAKS THE FINGERPRINT SENSOR. This is obviously highly undesirable for anyone who wants ROOT. *** WE HAVE DISCOVERED A BYPASS METHOD SO THIS IS LESS IMPORTANT ATM *** But it may stop working in the future, but is not required at the moment. See my XDA post: https://forum.xda-developers.com/nu...how-to-unlock-bootloader-redmagic-5g-t4081743
So how can we fix this issue? COMPLAIN!!! We got source code this way already (THANK YOU FOR YOUR HELP GUYS WE DID IT! CONTACTING NUBIA VIA EMAIL AND UTILIZING GITHUB ISSUES REALLY WORKS! YOU CAN ALSO USE SOCIAL MEDIA (FACEBOOK etc.) WHICH WILL PROBABLE RESULT IN EVEN FASTER FIXES!
METHOD #1
EMAIL Nubia customer support at [email protected]
You can simply report the issue similar to this message in your email:
Subject: Google Pay does not work NFC on Global / NFC ROMs
Google Pay does not work with NFC which your Global and North American phones claim to support. It reports 2 cards at the terminal instead of 1 card so payment fails EVERY time. This is an issue across the world for everyone with Google Pay. WE NEED THIS FIXED AS IT IS A LISTED FEATURE OF THE PHONE THAT DOES NOT WORK.
XDA has a list of people reporting the same issue: https://forum.xda-developers.com/nubia-red-magic-5g/help/nfc-available-t4081831
Please fix as soon as possible.
Signed,
[YOUR NAME / Country / Phone Model]
*** NOTE - FOR THE TIME BEING, LESS IMPORTANT WITH THE BL BYPASS METHOD LINKED ABOVE (UNTIL THEY PATCH IT) ***
Separate email (they put tickets into bins of issues to address the most requested ones first)
Subject: Bootloader Unlock breaks the Fingerprint Sensor
The bootloader unlock on the Redmagic 5G disables the fingerprint sensor completely - the error message says to contact Nubia support. The device will not even allow a fingerprint to be added. The Android installation detects the sensor on the "back of the phone" i.e. missing the Goodix in-screen fingerprint location, so it can not be added. Later trying to add an FP results in an error:
Loss of fingerprint calibration data
Loss of fingerprint calibration data was detected.
Currently unable to complete fingerprint entry,
please contact Nubia after-sales support via
4007006600
Please fix as soon as possible.
Signed,
[YOUR NAME / Country / Phone Model]
METHOD #2:
https://github.com/ztemt/NX659J_Q_kernel/issues/2
Post something like I did here - GOOGLE PAY DOES NOT WORK. FIX NFC ON GLOBAL AND NA VARIANT ROMS ASAP.
Many customers are very upset an advertised feature of the phone does not work. We use GooglePay regularly and it does not work, this must be fixed as soon as possible. Or you have falsely advertised (expect many returned phones). The sooner the issue is fixed, the more happy customers you will have. And more sales of the phone for addressing your customer feedback and social media approvals will jump tremendously.
Thank you everyone who contacted [email protected] or posted to the original GitHub issue, now we just need them to follow through on these other items!
@mslezak THREAD CLOSED as duplicate of https://forum.xda-developers.com/nubia-red-magic-5g/how-to/please-help-redmagic-5g-source-fp-fix-t4087597
XDA Forum Rules (excerpt):
...
5. Create a thread topic or post a message only once, this includes external links & streaming media.
As a large forum, we don't need unnecessary clutter. You're free to edit your message as you like, so if you do not receive an answer, revisit your message and see if you can describe your problem better. Not everyone is online at the same time so it might take a while before you receive an answer.
You can bump your unanswered question once every 24 hours
Duplicate threads and posts will be removed
Always post in an existing thread if a topic already exists, before creating a new thread.
Use our search function to find the best forum for your device.
Links to an external source are only allowed if relevant to the topic in hand. A description must be included, no copy & pasting from the original source.
Self-promotion is forbidden, this includes blogs, social media and video channels etc. Random links will be removed.
...
Click to expand...
Click to collapse

Categories

Resources