Deploy javacard applet on a Jcard - java

I have been working on a java card project for the last couple of days, and today I was given a card reader and a couple of cards, and was asked to deploy the applet on them and test them, I've basically no idea about how to deploy the app on the card, so far I've been workign with the CREF emulator, and all have been working great, now I'd like some guidance or advice from people who have already worked with this technology before, I've an Omnikey 3821 Reader, the cards I've are white and blank, I've no more information about them, I tried testing them with apps like:
JSmartCard Explorer
JSmex
APDUScanner
they are detected, in JSmex it's detected as an unkown card (not as a java card), can anyone show me any other way to interact with the cards? Get more information about them? Or how to deploy the .cap file on them and get the other apps to interact with them?
Thank you
PS : i'm workign with eclipse and javacard 2.2.2
EDIT :
I think i found a promising lead, the global plateform solution, but now i'm getting an error when trying to install the .cap file on the card, and according to the ATR i got from the card this is my Card Model
EDIT (1) :
I'm Using GPShell now, and i installed a sample hello world cap file successfuly, but when i try to install a simple counter applet which i already tried on CREF the same way i installed the hello word applet i get the following error : ( 6985 : Command not allowed - Conditions of use not satisfied )
I read the it might be version related, I usef an eclipse cap navigator plugin, and i got the following results : Major version = 2 , Minor version = 1, does that mean that the version is 2.0 - 2.1 ?
but when i tried running the same navigator on the counter cap file i generated, I got the same results even though i'm using JCDK 2.2.2
btw, when i try to download the hello world source and compile it into a .cap and install it i get the same error, is it my environmenent then ?

Try to get more info about your card using the "NFC Taginfo" Android app by NXP. It's been quite helpful for me when developing for Javacard. It will show a lot of information about your smartcard. If you can, please show here the data you get from this app when scanning your card.
Assuming it is a JCOP Javacard, you can always use JCOP Tools to load the .cap file. It's a pretty straightforward process. You must first have a NXP Docstore account and then send an email to tools.jcop#nxp.com asking for the JCOP Tool. Once you install the JCOP tools you can use the plugin for Eclipse to load and install the applet into the javacard.
About INITIALIZE UPDATE/EXTERNAL AUTHENTICATE
If your Javacard is GlobalPlatform compliant (you will know it using NFC Taginfo), it means that you will have to use GlobalPlatform commands to load and install the applet. One of the first steps is to create a secure channel between the off-card application (your omnikey reader) and the card. This is made through the INITIALIZE UPDATE and EXTERNAL AUTHENTICATE.

Related

what to use for web application that finds out information about windows/mac

I am a java beginner, looking for pointers to go about writing a web application that would
get downloaded from a internal server,
reads the system information like, OS, antivirus status - on Mac / Windows
generates a report for the user to view
from what i understand this could be done using applets. I learnt that applets are not supported any longer. so any pointers in the right direction would be very helpful
First thing first. You need to understand difference in between Web Application and Desktop application.
You should look for desktop application, which can read data from installed computer and send data using API and API will save that data in some DB and then you can generate reports from it.
In JAVA you can create a executable JAR to do some job on user's computer.

Moving/Porting Production Android Apps from Windows 7 to Linux Based Systems Correctly

Sorry in advance, there are a lot of questions in this post. I was not able to find much good information on this online so far (maybe I missed the correct search term).
The idea of this post is to migrate Android applications (that can potentially be production level on the Play Store) from Windows 7 to Linux based machines and document it correctly (like I said above I haven't found any good articles about it yet). If I find the solution myself I will post the answer.
Short background: Currently Windows 7 support ends in 2020, looking to move/port production level Android Studio applications to a Linux based system moving the following.
Code for each project.
Moving keystores and other important Android Studio production level files not inside of the project folder.
My main question is what is the best way to do this:
Copy all of the files on an external drive and move them that way?
Use Git to upload the app and redownload on the Linux PC?*
*I understand that Keystores and other non application settings for Android Studio will need to be moved manually with a copy to the external drive since Git generally only loads on the project level.
So far I am looking to see if anyone has experience already with this process and if they have run into any roadblocks or difficulties doing this?
Also what keystore files are necessary to copy? I understand they are in the directory below.
Is the debug.keystore the correct keystore to use for production level keystore applications?
Directory: C:\Users\username\.android
File 1: debug.keystore
File 2: default.keyset
No. The debug.keystore and debug.keyset keystore files shouldn't be used in production, and only in development. If they are missing, they will be generated on your next build, so you won't have to worry about moving them - building the project in Android Studio on your Linux will create these for you.
To generate release keys used in production, please see this.

How to run Java app in Android

Is it possible to run java app (jar) in my android application? Because I need to create PDF, the problem is if I generate PDF in android, only can show with small image, if it contains large image in many pages, it will be error. So I think, I can generate PDF in java and then included to android app.
Concernig the mentiones app JBED:
Well honestly, I could not find any credible source for this tools JBED, so I would really be very cautious (e.g. who is the developer?)
In the manifestfile (in Androidmanifest.xml, where every app has to state what rights it needs to run, see How to view AndroidManifest.xml from APK file?) there are many rights mentioned (what could be necessary, as the app wants to run as an emulator), so a java application might want to send an SMS, record audio, take pictures and place calls -- so the emulator would need those rights as well.
But then the app also registers the "android.intent.action.BOOT_COMPLETED" event (i.e. autostart after boot) and this would go against every description of the tool.
Ah yeah and giveaway: The apk has a folder "certs" that has some (root-)certificates. But those are not the real certificates of the authorities, e.g. Versign. If one installs the app and by that those certificates the trust you might have in https-connections is lost because those who made the fake certificates can create own, false certificates that your phone would trust.
I assume (or am pretty sure) this is a spy tool, but I could be wrong. The (rare) testimonials that claim the tool ran perfectly will probably be the same person that posted the tool under a different name.
Andreas
You can import java Third-party libraries into Android app, follow the steps here.
I am not sure whether it will work,but just try.
If your program is a console program, the answer is yes.
Install Jvdroid from Google play. Click terminal and then write this command: java -jar YourJarFileName.jar
The simplest way would be to some install terminal emulator and then install java and then you can run java apps on standard java. You can even install full Linux distro with x server without rooting the phone, then connect to it from x client and you have Linux desktop on android. Once I've even installed eclipse for java development on it and everything worked. I tested this setup last time in 2014, but I'm pretty sure you can do this nowadays as well. The app with Linux I get from play store as well app for the x client. The app I used back then was "Debian no ROOT" or smthg like this. You need to check what's currently available to make this setup in Google Play store according to your android version and your preferences. Last time I've checked there was a lot of different tools for this kind of task. Lastly I've even successfully installed TF and keras on my android phone using terminal emulator.
You can use JBED. JBED is an .apk Android application which run java games and app on your android Device. JBED is a java android emulator, by using
this application we can install .JAR/.JAD/Java/J2ME/MIDP app on android phones.
You can do it quite easily as there are many ways to run java apps on android. Specific application called Java Emulators can do it quite easily.
These are four most popular java emulators for android viz, JBED, PhoneME, Jblend and NetMite. These are arranged in order of their preference. You can use phoneme for non rooted device, however if your device is rooted try any of the remaining three applications.

which mobile phone SIMs actually support javacard today?

i wonder on which smartcards i can actually run javacard? afaik it requires the "open platform" OS, but: which USIM-cards for mobile phones today (especially in germany) do actually support this?
Updated with TheGoodUser correction
I afraid issued cards will be useless for you.
Almost (if not all of them) will be in lifecycle state CARD_SECURED which doesn't allow you to load an applet using GlobalPlatform/OpenPlatform.
In case of SIM cards for the network operator there is a way to load an applet on the Java card - OTA. If Remote Applet Manager applet (part of OTA) is installed and configured applet could be loaded and installed to the SIM using ENVELOPE command (special formated SMS comes to the phone and phone passes them in ENVELOPE command to the card). Unfortunately for you to do that you still need to know keys - card will expect signed or/and encrypted ENVELOPEs. So you'll need keys to do that.
If your interest is just academic - you can always buy java card with some SDK/Tools from some small card manufactures and play with java card. If you want to install something on existing card I'd say it is impossible.
As far as I know all SIM card produced during last ~10 years are able to run java. The problem is that you need code can be obtained from the card owner, i.e. the carrier. But carrier will not give you this code unless you are the carrier's partner...
Probably the following links can help you.
http://forums.techarena.in/software-development/1353925.htm
How to programmatically load a Java card applet ( a .cap file ) using Visual C++/PCSC
some operator provide USIM to customer by javacard.you can download applets into java card.

Android: Installing Wikitude on Android Emulator

I'm trying to write some apps using wikitude, and I'm having some problems running even the example.
I've put the sample ( BasicOpenARDemo ) that comes with the SDK inside eclipse and tried to run it, where I encountered the next error: "wikitude was not found on the system. Please press the ok-button to access the Android market and download wikitude."
First question- I don't understand- Why am I approached to download the utility when I have a standalone sample inside my eclipse? Doesn't the core files behind Wikitude come with the SDK or the sample itself?
The next question will be - after some googling, I've found that in order to install this "Android market" I need to follow the manual that comes in the 9th message in the next thread (the message that was written by ronni.rasmussen) -
http://forum.xda-developers.com/archive/index.php/t-529170.html
Well, I've followed it, and now when I try to press the OK button that comes after the "wikitude was not found on the system..." message, I get redirected to the Android market, where I find Wikitude, but when I try to download it- I get a "Download was unsuccessful. Please try again" error message. How do I fix that?
One more thing that I don't understand- How come it's written in this offline Android market that the available wikitude version is for android 1.5 and no longer maintained?
As you can see- I'm quite baffled here. Hope someone could clear this up for me.
I was with the exact same problem. The problem was that installing Wikitude from the market (following the link you provided) does not guarantee to have the system requirements supported in the virtual device, therefore it gives an error when you run the BasicOpenARDemo, if it let you install it at all.
The solution was creating an AVD with an GoogleAPI (it includes maps support, I used the level 10 API for Android 2.3.3, it didn't work for the level 8 API), adding the camera, accelerometer, compass, GPS, etc., support to the virtual device (I did this via Eclipse). Then I downloaded the .apk for Wikitude and installed it via command line (.adb).

Categories

Resources