How to Install .CAP file in the Java Card?

Hi Friends..
How to install *.CAP* file in the Java Card?..
I've GPShell script as follows :
mode_211
enable_trace
establish_context
card_connect -readerNumber 2
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f
install_for_load -pkgAID a00000006203010c01 -nvCodeLimit 500  -sdAID A000000003000000
load -file HelloWorld.cap
card_disconnect
release_contextwith that script i can load HelloWorld.cap file successfully..
Now, how to install the HelloWorld.cap file?..
if i add script : load -file HelloWorld.cap i got this error :
install -file HelloWorld.cap
file name HelloWorld.cap
Command --> 80E602001B09A00000006203010C0107A00000015100000006EF04C60201A80000
Wrapped command --> 84E602002309A00000006203010C0107A00000015100000006EF04C60201
A80030C859793049B85300
Response <-- 6985
install_for_load() returns 0x80206985 (6985: Command not allowed - Conditions of
use not satisfied.)i ask this question because when i tried to select the applet through its AID, by this script :
establish_context
card_connect -readerNumber 2
select -AID a00000006203010c0101i got this message error : select_application() returns 0x80216A82 (6A82: The application to be selected could not be found.)
but there's exactly any that AID in my Java Card..
here's is the list of AID from My Java Card :
C:\GPShell-1.4.2>GPShell listgp211.txt
mode_211
enable_trace
establish_context
card_connect -readerNumber 3
* reader name OMNIKEY CardMan 5x21-CL 0
select -AID a000000003000000
Command --> 00A4040008A000000003000000
Wrapped command --> 00A4040008A000000003000000
Response <-- 6F108408A000000003000000A5049F6501FF9000
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4
f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
Command --> 80CA006600
Wrapped command --> 80CA006600
Response <-- 664C734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864
886FC6B03640B06092A864886FC6B040215650B06092B8510864864020102660C060A2B060104012
A026E01029000
Command --> 8050000008AAF7A87C6013BC0300
Wrapped command --> 8050000008AAF7A87C6013BC0300
Response <-- 0000715457173C2A8FC1FF0200937A55C288805D8F2A04CCD43FA7E69000
Command --> 848201001023CA18742D36165ED992CFF2146C3D51
Wrapped command --> 848201001023CA18742D36165ED992CFF2146C3D51
Response <-- 9000
get_status -element 10
Command --> 80F21000024F0000
Wrapped command --> 84F210000A4F004FF8BE1492F7275400
Response <-- 0CF0544C00004D4F44554C415201000009A00000006203010C010100010AA000000
06203010C01019000
GP211_get_status() returned 2 items
List of Ex. Load File (AID state Ex. Module AIDs)
f0544c00004d4f44554c4152        1
a00000006203010c01      1
        a00000006203010c0101
card_disconnect
release_contextPlease help me..
And please correct me if i'm wrong,,
Thanks in advance..

Any suggestions for my question?..
Please help me..
Thanks in advance..

Similar Messages

  • How to Install the CAP file on the Java Card

    Hi guys. I've already written and tested a java card applet. Now i want to put the CAP file on the card. Could anyone please tell me the procedures or direct me to where i can find the procedures on how to do this?
    Thanks

    I suggest you search this forum. That question has been answered a lot.
    1) If you are using a pure Java Card use scriptgen tool and send those commands to the card.
    2) If you are using a Java Card with Global Platform
    A) Follow the Global Platform specs and authenticate to the card with developer keyset(0x40,0x41,0x42,0x43...0x4f)
    b) Get a kit
    Since you are a beginner, I recommend you get the a kit like JCOP or one from card vendors like G&D, Gemplus, etc.

  • How to install .exe applications and the java on m...

    hi ! sorry if this has already been discussed but i wanted to know ~~~ how to install .exe applications and the java on my n9 ~~~ ... because i wanted to use plenty of other apps which are not supported  but these 2 would help fix the issue

    Is it stil not possible to install java applications on N9?
    Files containing JAD and JAR-ending in the file name.
    I am not familiar with Nokia N9 so I ask even if I suppose that JAR and JAD files are not able to install on a Nokia N9.
    Nokia 808 again (delight Belle), Nokia E7 and X7 ( again, all on Delight Belle...after some time on Nokia Lumia 925 (retired), 1020 (not that great)and Lumia 820 (Replaced my router at home, great for internet sharing).., N9 The best device ever (use it as much as Lumia 1020), Nokia 700 (Sport Phone/My Love :-) ) Nokia 701, Nokia E6 (Should have a follow-up from Nokia among with larger screen, NFC, Autofocus), Lumia 800 (Retired After 6 weeks), -Sports Tracker-Nokia Internet Radio-Handy Safe-Skype-Bambuser-Screenshot app pro-fMobi-ComingNext-Manual TaskSwitcher-jagiTimer-Easy StopWatch-Boldbeast-Equalizer-Financial Calculator-WiMP Music-YTasks-Davi-Thumbnail Folders-BizCalendar-Tiny7-Situations-nn reeder-Sport Timer-CameraLover-CameraPro-GrabRadio-LiveScore-Poddi-Gravity-SkyFilesPro

  • Manually upload .cap file on a java card

    Hi
    I wonder how to manually upload a .cap file on a java card. I do know that it must be an or more APDUs that contain the file and so on.
    What I wonder is how to convert a .cap file into a byte array (byte array that on-card installer can read and understand) without using JCOP or any other tools? Does (must) this array have a special format or something?
    I am interested in the process of taking a.cap file and convert it to byte array (nothing else).
    Thanks in advance!
    /Lyudmila

    The .cap file uploading mechanism depends if you have a java card or a GlobalPlatform card.Java Card cards are GlobalPlatform based.
    If you have a java card you can use the same mechanism that it is used with Cref (see Java Card Kit - Development Kit - Chapter 11): .cap file is divided in n apdus, one or more (if a component not fit in one apdu, for example method component) for component (first:Header.cap, second:directory.cap, third:import.cap, etc).
    If you use a GlobalPlatform card, the mechanism is more complex:
    first you have to create a session using a specific protocol (SCP01, SCP02, etc) through INITIALIZE UPDATE and EXTERNAL AUTHENTICATE commands, then an INSTALL FOR LOAD command and n LOAD commads as they are necessary.
    To use GlobalPlatform mechanism, see GlobalPlatform Specification 2.1.1.The JCRE spec does not define the applet loader and CREF has a basic version of an applet loader that is not GP compliant, but this is not the Java Card standard. To load onto any physical Java Card you will need to follow the GlobalPlatform specification.
    - Shane

  • C5-03; how to view music files in the memory card ...

    Is it possible to view the files in the memory card (using the File Manager) folder-wise? I have some music files in the memory card; in a folder named 'Music'.  When I go to Menu - Applications- Office- File mgr - E:Memory car-Music , I see the files in different collections corresponding to the artist/ genre names.  I don't see the folders I had created.  The artist/ genre (meta) data is not accurate and so the listing based on that is not useful. 
    This is related to the problem with Palylists I had posted earlier.

    go to music player select options and refresh player this will pick up all the music
    you will get a message on screen for example 40 songs added the go to music player select all songs
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Unable to load the cap file to the JCOP card

    I develop my applet by JCOP IDE and it works well in the VM. But when I want to load it on my JCOP card, I face a problem. it can successful send the 1st 254 bytes, but always return 6A86 when send the second 254 bytes to the card.
    Status: Incorrect parameters (P1,P2)
    Error code: 6a86 (Incorrect parameters (P1,P2))
    Offending APDU: 6A86
    Wrong response APDU.
    I don't know why this happen. Can anyone show some light on that. Thank you in advance.

    Have you written your own loader for this ?
    What is the prompt "cm>" from, is that a standard Java Card tool ?
    Looking at the data I can see, its looks well formed. However when I wrote my own loader I found I could only send 239 bytes of data (255 - 16) otherwise I'd get an error. Maybe part of this is todo with the option of using M-DAP to MAC each APDU. FYI its a JCOP10 I'm using.
    Also my data was never concatentated, that is to say, check your 'FileSystem.cap' file with "unzip -tv FileSystem.cap" for the real CAP files. Each of these files never crossed an APDU boundary, the first one Header.cap (IIRC) is a small file, so my first APDU was less than 40 bytes of actual data (with C4 TLV data before it), certainly not 254 bytes.
    I'm not sure if this is allowed or not, I've plans to try it out soon and see myself since i've not read anything that says you can not do this.
    This is the only obvious difference I can see to other loader scripts and programs I have seen.

  • How do I import files to the sd card?

    % Hey all,
    I've been trying to import files to my sd card because it gives me the option on my zen player but once the files are imported I can't find them anywhere on my sd card. ? Were the files imported? Where did they go ? What purpose this function serve? Is there a guide on how to use this zen player because pamphlet that comes with it does not do any justice?

    ) ? http://support.creative.com/kb/?h=6? These may help you.http://www.creative.com/products/mp3/zen/?nav=howto

  • How to create .exe file of the java program you create?

    This must be the qustions asked several time on the forums.So here it is again.
    This sounds absurd to some developers here cause you'll say just create jar file and distributre to usr but sometimes there is not possiblity of having runtime environment in windows computers.So if we can bundle the enviroment and the setup together then packing into exe and then distribute like most of commercial java application sounds better.But the problem is how to do that?
    Ok creating exe will increase the size but that doesn't matter,if there is any freeware tool to accomplish just that?

    Check this out:
    http://search.java.sun.com/search/java/index.jsp?qp=%2B
    orum%3A31&nh=10&qt=create+exe+file+program&col=javaforu
    s

  • How to install .ibooks file on the iPad ?

    Hello,
    I have created a large ibooks (1,3Gb) and want to distribute it for validation before publication on the AppStore.
    If I use a simple webpage with a link to my ibooks file, it works without any problem with a small iBooks (safari download complete and popup asking to open it with iBooks)
    but when I tried with my 1,3Gb it will take "hours" before safari complete the download and the "Open with iBook" never appears...
    Same problem with iTunes... I did not succeed to install it on my iPad
    How can I distribute a LARGE iBooks for peer reviews ?
    In the past I used a plist file in order to distribute iOs app via Safari, but i don't know how to do it with a Book...
    Thanx for your anwser,
    TP

    Hi,
    I've a 390MB .ibooks file that I made and I need to put it on a few ipads without using iTunes.
    I tried the dropbox method:
    -after downloading the .ibooks file in dropbox and choosing "open with iBooks" dropbox app went stuck on "exporting file" spinning wheel forever.
    So I tried the web download method:
    -I put the .ibooks file on a webserver, downloaded the file with safari then pressed the "open in iBooks" button: the button seems unresponsive. After a *very* long time (20-30 minutes) the file was eventually transferred to ibooks.
    This is going to confuse every user I ask to download the book.
    Do you have any advice please?
    TIA
    Guido

  • How to execute *.BAT file from  the Java Application

    Hello to all.
    I wants to run *.BAT file form my applicaion.
    Can u give the code of that two-four line,please
    Wating four your replay.
    Yours Friend
    Bhavin Shah.....

    pr = rt.exec("cmd.exe /c start " + yourProgramName)The exec() method executes the command you specify in the argument and returns a process. In this example, it's telling Windows to run "yourProgramName".
    HTH

  • How to Load the cap file to the SSD with DAP

    Dear everybody,
    How to use upload, load and install command to load cap file to the SSD with DAP?
    My step:
    1 I have already input the DAP Key into the SSD.
    2 Select ISD
    3 Do auth
    4 Upload -s ssdaid -d "XXX.cap", but JCOP return 6985.
    I don't kown why.
    Thank you very much.
    Edited by: Ivy_D on May 20, 2009 12:16 AM

    (The JCOP3.1,1 Eclipse Plugin's emulator) install for load still complains 6985 after i did these belows step by step. I will appreciate yours helps very much!
    1: install a new security domain.
    cm> install -s -b -i A000000003535042 A0000000035350 A000000003535041
    => 80 E6 0C 00 20 07 A0 00 00 00 03 53 50 08 A0 00 .... ......SP...
    00 00 03 53 50 41 08 A0 00 00 00 03 53 50 41 01 ...SPA......SPA.
    C0 02 C9 00 00 00 ......
    (5227 usec)
    <= 90 00
    cm> /select A000000003535041
    => 00 A4 04 00 08 A0 00 00 00 03 53 50 41 00 ..........SPA.
    (2303 usec)
    <= 6F 10 84 08 A0 00 00 00 03 53 50 41 A5 04 9F 65 o........SPA...e
    01 FF 90 00 ....
    Status: No Error
    2.1 use the ISD key to build a security channle by ISD to personalize the new secuirty domain
    cm> set-key 255/1/DES-ECB/404142434445464748494a4b4c4d4e4f 255/2/DES-ECB/404142434445464748494a4b4c4d4e4f 255/3/DES-ECB/404142434445464748494a4b4c4d4e4f
    cm> auth
    => 80 50 00 00 08 40 74 01 18 F9 FA 68 07 00 [email protected]..
    (2274 usec)
    <= 00 00 57 F3 97 D9 7F 72 88 55 FF 02 00 02 81 8D ..W....r.U......
    91 65 B4 F2 A9 29 B2 C0 A4 AD FD C5 90 00 .e...)........
    Status: No Error
    => 84 82 00 00 10 DE 01 A2 F1 79 12 8F 2E 87 6F FE .........y....o.
    63 0E E4 5D 40 c..]@
    (1969 usec)
    cm> put-pub-key --tokenpin 123456 115 c:/gptest.p12
    => 80 D8 00 01 88 73 A1 80 EA 15 24 8C 5C 26 E1 31 .....s....$.\&.1
    02 FE B1 44 0E 37 4F D5 49 29 25 14 5C 7B E0 63 ...D.7O.I)%.\{.c
    87 0C E8 B8 03 FF AF 0B F2 2B 54 6A 16 4A D6 8F .........+Tj.J..+
    EE B6 E0 1A 29 F2 13 E8 2B 04 FC 5F 2F D2 51 ED    ....)....._/.Q._
    _18 40 D3 E1 AF 36 CA A2 58 45 AC 38 3D 5F D4 56 [email protected]=_.V
    56 D8 87 5D 45 86 B9 36 F0 07 88 AD 59 78 A1 03 V..]E..6....Yx..
    2D F4 DE E9 51 E3 75 65 E3 2B B7 49 11 A5 E3 75 -...Q.ue.+.I...u
    39 25 1C 44 FB D5 3C 57 40 DD 64 22 D0 0A 8E 88 9%.D..<[email protected]"....
    2C 52 7B E2 67 A4 0B 65 A0 03 01 00 01 00 ,R{.g..e......
    (2614 usec)
    <= 73 90 00
    cm> card-info
    => 80 F2 80 00 02 4F 00 00 .....O..
    (1488 usec)
    <= 08 A0 00 00 00 03 00 00 00 01 9E 90 00 .............
    Status: No Error
    => 80 F2 40 00 02 4F 00 00 [email protected]..
    (2125 usec)
    <= 08 A0 00 00 00 03 53 50 42 0F C0 90 00 ......SPB....
    Status: No Error
    => 80 F2 10 00 02 4F 00 00 .....O..
    (1794 usec)
    <= 07 A0 00 00 00 03 53 50 01 00 01 08 A0 00 00 00 ......SP........
    03 53 50 41 90 00 .SPA..
    Status: No Error
    Card Manager AID : A000000003000000
    Card Manager state : OP_READY
    Sec. Domain:{color:#ff0000}PERSONALIZED (SV------) A000000003535042{color}
    Load File : LOADED (--------) A0000000035350 (Security Domain)
    Module : A000000003535041
    cm> /cap-sign --tokenpin 123456 a.cap A000000003535042 c:/gptest.p12
    cm> /cap-info a.cap
    SHA (Load File data): {color:#ff0000}1BD8F3CCC0042A5EEF9845FA3C667834051F4FAD{color} -- Load File Data Block Hash
    SHA (Load File dbg) : A36B4AED89FF8C4B8D8BBDDEB40757E36477143F
    SHA (Load File) : 0D4AD84E20D00C26ABA1BF5677636414234F5743
    DAP block(s) :
    DAP block : 1
    AID : A000000003535042
    Signature : 19F414292C00F9B7C89E7341A13AF15B
    CCF90D17A112418EAF556B5172EBE39C
    E05DF0CDDD68EFD2559CC7EC591878DF
    14B5C0FBC5C6CF6A0DC6E50B4AC99216
    7D6C46DC4098E0A1AC11DB69596E4A71
    F34CBFBD7DFABA88C6E8C2348FF8A9FC
    A8E22074B4D1B9D2AB5993A539BE8E1F
    6187252B9912909AE1DA4E5FAE866960
    Algorithm : VOP 2.0.1'
    Signed by : c=CN, st=beijing, l=beijing, o=logis, ou=logiscn, cn=gptest
    Load Token(s) : none
    Install Token(s) : none
    then send install for load
    cm> send 80E602002908{color:#ff0000}72666370626F6332{color}08{color:#ff0000}A000000003535042{color}14{color:#ff0000}1BD8F3CCC0042A5EEF9845FA3C667834051F4FAD{color}000000
    => 80 E6 02 00 29 08 72 66 63 70 62 6F 63 32 08 A0
    00 00 00 03 53 50 42 14 1B D8 F3 CC C0 04 2A 5E
    EF 98 45 FA 3C 66 78 34 05 1F 4F AD 00 00 00
    (3108 usec)
    <= 69 85 i.
    Status: Conditions of use not satisfied

  • How to invoke the .bat(batch file ) from the java program

    i want to run some commands when i run one java program.
    I wrote those dos commands on the batch file and i want to include the bat file in the java program so that i can execute the bat file when i run the java program.
    tell me the way that i can run my bat file inside the java program.

    i tried this :
    a .bat file named test.bat, with this code : copy test.bat test2.bat
    a java class, Test.class, in the same directory
    public class Test {
         public static void main(String[] args) {
              try {           
                   Runtime rt = Runtime.getRuntime();
                   Process proc = rt.exec("cmd /c test.bat");
                   proc.waitFor();
                   int exitVal = proc.exitValue();
                   System.out.println("Process exitValue: " + exitVal);
              catch (Throwable t) {
                   t.printStackTrace();
    }

  • How to create CAP file based on a J2ME project ?

    Hi all,
    Recently I need to install a midlet application into the sim card with an applet loader.
    And it requires a java card cap file.
    I already installed:
    1> JAVA Card Kit 2.2.2
    2> JDK 1.6.0_01
    3> J2ME Wireless Toolkit 2.2
    4> Eclipse 3.2
    But I don't know how to generate a cap file from the Eclipse J2ME midlet project.
    Any tips?
    Thank you in advance.

    You cannot install a midlet on a sim card. If it's a Java Card, the format is defined to .cap file. Check out the Java Card VM specification for details. For .cap file creation/installation you can use Sun's Java Card development kit.
    http://java.sun.com/products/javacard/dev_kit.html

  • How to download a file from the net and save it into .txt format in a datab

    Can some one show me a tutorial on how to download a file from the net and save it into .txt format in a database?
    Thank you,

    http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html

  • How to change a setting in the Java Control Panel with command line

    Hi,
    I am trying to figure out how to change a setting in the Java Control Panel with command line or with a script. I want to enable "Use SSL 2.0 compatible ClientHello format"
    I can't seem to find any documentation on how to change settings in the Java Control Panel via the command line
    Edited by: 897133 on Nov 14, 2011 7:15 AM

    OK figured it out. This is for the next person seeking the same solution.
    When you click on the Java Control Panel (found in the Control panel) in any version of Windows, it first looks for a System Wide Java Configuration (found here: C:\Windows\Sun\Java\Deployment). At this point you must be wondering why you don't have this folder (C:\Windows\Sun\Java\Deployment) or why its empty. Well, for an enterprise environment, you have to create it and place something in it - it doesn't exist by default. So you'll need a script (I used Autoit) to create the directory structure and place the the two files into it. The two files are "deployment.properties" and "deployment.config".
    Example: When you click on the Java Control Panel it first checks to see if this directory exists (C:\Windows\Sun\Java\Deployment) and then checks if there is a "deployment.config". If there is one it opens it and reads it. If it doesn't exist, Java creates user settings found here C:\Users\USERNAME\AppData\LocalLow\Sun\Java\Deployment on Windows 7.
    __deployment.config__
    It should look like this inside:
    *#deployment.config*
    *#Mon Nov 14 13:06:38 AST 2011*
    *# The First line below specifies if this config is mandatory which is simple enough*
    *# The second line just tells Java where to the properties of your Java Configuration*
    *# NOTE: These java settings will be applied to each user file and will overwrite existing ones*
    deployment.system.config.mandatory=True
    deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
    If you look in C:\Users\USERNAME\AppData\LocalLow\Sun\Java\Deployment on Windows 7 for example you will find "deployment.properties". You can use this as your default example and add your settings to it.
    How?
    Easy. If you want to add *"Use SSL 2.0 compatible ClientHello format"*
    Add this line:
    deployment.security.SSLv2Hello=true
    Maybe you want to disable Java update (which is a big problem for enterprises)
    Add these lines:
    deployment.javaws.autodownload=NEVER
    deployment.javaws.autodownload.locked=
    Below is a basic AutoIt script you could use (It compiles the files into the executable. When you compile the script the two Java files must be in the directory you specify in the FileInstall line, which can be anything you choose. It will also create your directory structure):
    #NoTrayIcon
    #RequireAdmin
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=n
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    Func _JavaConfig()
         $ConfigFile_1 = @TempDir & "\deployment.properties"
         $ConfigFile_2 = @TempDir & "\deployment.config"
         FileInstall ("D:\My Documents\Autoit\Java config\deployment.properties", $ConfigFile_1)
    FileInstall ("D:\My Documents\Autoit\Java config\deployment.config", $ConfigFile_2)
         FileCopy($ConfigFile_1, @WindowsDir & "\Sun\Java\Deployment\", 9)
         FileCopy($ConfigFile_2, @WindowsDir & "\Sun\Java\Deployment\", 9)
         Sleep(10000)
         FileDelete(@TempDir & "\deployment.properties")
         FileDelete(@TempDir & "\deployment.config")
    EndFunc
    _JavaConfig()
    Now if you have SCUP and have setup Self Cert for your organization, you just need to create a SCUP update for JRE.
    Edited by: 897133 on Nov 16, 2011 4:53 AM

Maybe you are looking for

  • How do I get name in Mail to be the same as Address book?

    Just wondering if there was a way for the name that shows up when I get an e-mail to be the same as the name I have on that person's contact card in Address book? For example say I have a Contact card for someone named Alexander, but in Address book

  • Problem with how AppXray works...?

    After defining my application in NitroX/Eclipse and building, I receive errors of this type: Error The file "/resources/images/trans1x1.gif" does not exist. brandEditorList.html Nsyrinx/templates/cat/admin/brand The html file in question contains thi

  • Junk Folder does not accept new entries

    I just upgraded to an Intel I MAC. The transfer of information from my old I MAC was easy but now the Junk does not work properly. When I put an email in junk it goes to the Junk folder that time but the same sender repeats on incoming mail. I tried

  • Question about Weblogic

    Hello, I have a question about Weblogic and would like someone to help me with it. I created a JSP and everything was doing fine while i was testing it in Tomcat. But once I started the tests with Weblogic, it seemed Weblo wasn't accepting a class th

  • Flash Player 9 and Safari problems

    Okay.... I'm sure someone has already written about this, but I'm too damn tired to look very far back. I have been trying to download Flash Player 9 onto my mac and it won't work. It displays this message "safari cannot find the internet plug-in MIM