Skip to content

Application management

Martin Paljak edited this page Sep 27, 2024 · 2 revisions

Tip

Please consult the --help output for options that are not described here

  • List applets (this and following commands open the secure channel and thus can brick your card with wrong keys!):

     gp -list # or gp -l
    

    How to interpret the output:

    • All AID-s of on-card objects are listed, starting with Issuer Security Domain (ISD)
    • Object's type, lifecycle state and privileges are listed below the AID line
    • Applications have type APP and a state (like SELECTABLE) and privileges (like CardReset)
    • Executable Modules (type PKG, representing Java packages) are listed together with applets in them (which can be initiated with --create)
    • Security Domains have type DOM
  • Delete package D27600012401 and all applets from it:

     gp -f -delete D27600012401
    
  • Install applet.cap as default applet (with AID information from the CAP):

     gp -install applet.cap -privs CardReset
    
  • Install applet.cap (with AID information from the CAP):

     gp -install applet.cap
    
  • Unistall applet.cap (with AID information from the CAP):

     gp -uninstall applet.cap
    
  • Force installation of applet.cap, deleting anything that's necessary, with AID information from the CAP:

     gp -f -install applet.cap
    
  • Create new instance of applet D2760001240102000000000000000000 from package D27600012401 with AID D2760001240102000000000272950000:

     gp -package D27600012401 -applet D2760001240102000000000000000000 -create D2760001240102000000000272950000
    
  • Same as previous, but takes the package/applet AID-s from CAP file and makes the new instance default selected:

     gp -cap OpenPGPApplet.cap -create D2760001240102000000000272950000 -privs CardReset