globalplatform - Why I can't delete unused packages from my JavaCard? -


i have gemalto top dl v2 java card. when list contents, there lot of packages loaded in card:

globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -list aid: a000000018434d00 (|.....cm.|)      isd op_ready: security domain, card lock, card terminate, default selected, cvm (pin) management  aid: a0000000620001 (|....b..|)      exm loaded: (none)  aid: a0000000620002 (|....b..|)      exm loaded: (none)  aid: a0000000620003 (|....b..|)      exm loaded: (none)  aid: a0000000620101 (|....b..|)      exm loaded: (none)  aid: a000000062010101 (|....b...|)      exm loaded: (none)  aid: a0000000620102 (|....b..|)      exm loaded: (none)  aid: a0000000620201 (|....b..|)      exm loaded: (none)  aid: a0000000030000 (|.......|)      exm loaded: (none)  aid: a000000018100201 (|........|)      exm loaded: (none)  aid: a000000018100101 (|........|)      exm loaded: (none)      a000000018534441 (|.....sda|)  aid: a00000015100 (|....q.|)      exm loaded: (none) 

now, want delete unused packages:

globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -delete a0000000620001 -deletedeps not delete aid: a0000000620001 tip: maybe try --deletedeps openkms.gp.gpexception: deletion failed sw: 6985         @ openkms.gp.globalplatform.check(globalplatform.java:1039)         @ openkms.gp.globalplatform.deleteaid(globalplatform.java:814)         @ openkms.gp.gptool.main(gptool.java:367)  globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -delete a0000000620002 -deletedeps not delete aid: a0000000620002 tip: maybe try --deletedeps openkms.gp.gpexception: deletion failed sw: 6985         @ openkms.gp.globalplatform.check(globalplatform.java:1039)         @ openkms.gp.globalplatform.deleteaid(globalplatform.java:814)         @ openkms.gp.gptool.main(gptool.java:367)  globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -delete a0000000620003 -deletedeps not delete aid: a0000000620003 tip: maybe try --deletedeps openkms.gp.gpexception: deletion failed sw: 6985         @ openkms.gp.globalplatform.check(globalplatform.java:1039)         @ openkms.gp.globalplatform.deleteaid(globalplatform.java:814)         @ openkms.gp.gptool.main(gptool.java:367)  globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -delete a0000000620101 -deletedeps not delete aid: a0000000620101 tip: maybe try --deletedeps openkms.gp.gpexception: deletion failed sw: 6985         @ openkms.gp.globalplatform.check(globalplatform.java:1039)         @ openkms.gp.globalplatform.deleteaid(globalplatform.java:814)         @ openkms.gp.gptool.main(gptool.java:367)  globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -delete a000000062010101 -deletedeps not delete aid: a000000062010101 tip: maybe try --deletedeps openkms.gp.gpexception: deletion failed sw: 6985         @ openkms.gp.globalplatform.check(globalplatform.java:1039)         @ openkms.gp.globalplatform.deleteaid(globalplatform.java:814)         @ openkms.gp.gptool.main(gptool.java:367)  globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -delete a0000000620102 -deletedeps not delete aid: a0000000620102 tip: maybe try --deletedeps openkms.gp.gpexception: deletion failed sw: 6985         @ openkms.gp.globalplatform.check(globalplatform.java:1039)         @ openkms.gp.globalplatform.deleteaid(globalplatform.java:814)         @ openkms.gp.gptool.main(gptool.java:367)  globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -delete  a0000000620201 -deletedeps not delete aid: a0000000620201 tip: maybe try --deletedeps openkms.gp.gpexception: deletion failed sw: 6985         @ openkms.gp.globalplatform.check(globalplatform.java:1039)         @ openkms.gp.globalplatform.deleteaid(globalplatform.java:814)         @ openkms.gp.gptool.main(gptool.java:367)  globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -delete  a0000000030000 -deletedeps not delete aid: a0000000030000 tip: maybe try --deletedeps openkms.gp.gpexception: deletion failed sw: 6985         @ openkms.gp.globalplatform.check(globalplatform.java:1039)         @ openkms.gp.globalplatform.deleteaid(globalplatform.java:814)         @ openkms.gp.gptool.main(gptool.java:367)  globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -delete  a000000018100201 -deletedeps not delete aid: a000000018100201 tip: maybe try --deletedeps openkms.gp.gpexception: deletion failed sw: 6985         @ openkms.gp.globalplatform.check(globalplatform.java:1039)         @ openkms.gp.globalplatform.deleteaid(globalplatform.java:814)         @ openkms.gp.gptool.main(gptool.java:367)  globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -delete  a000000018100101 -deletedeps not delete aid: a000000018100101 tip: maybe try --deletedeps openkms.gp.gpexception: deletion failed sw: 6985         @ openkms.gp.globalplatform.check(globalplatform.java:1039)         @ openkms.gp.globalplatform.deleteaid(globalplatform.java:814)         @ openkms.gp.gptool.main(gptool.java:367)  globalplatformpro:> gp -visa2 -key 47454d5850524553534f53414d504c45 -delete  a00000015100 -deletedeps not delete aid: a00000015100 tip: maybe try --deletedeps openkms.gp.gpexception: deletion failed sw: 6985         @ openkms.gp.globalplatform.check(globalplatform.java:1039)         @ openkms.gp.globalplatform.deleteaid(globalplatform.java:814)         @ openkms.gp.gptool.main(gptool.java:367) 

the question why can't delete them , free card's memory?

answer

how sure these packages unused? applet have been designed use separate libraries , / or services. these libraries / services have own aid within gp, you'd first need delete applet instances , applet modules - in order - before can remove them.

a lot of cards contain pre-installed software in rom. space in rom mask cannot reused else. deleting these modules won't free many resources. if deletion succeeds have removed aid registry. can useful if want upload new version of same library, otherwise won't make of difference.

aid's , rid's explained

aid's consist of 2 parts: 5 byte rid , variable sized extension - called pix - rid identifying entity. entity in application df, java card modules identified aid.

now i've procured list of rid's so:

  • a000000018434d00 security domain gemplus (now gemalto);
  • a0000000620001, a0000000620002, a0000000620003, a0000000620101, a000000062010101, a0000000620102, a0000000620201 sun (now oracle) modules; contain extensions basic java card runtime;
  • a0000000030000 card manager under old visa rid;
  • a000000018100201, a000000018100101 extension modules or applets gemalto;
  • a00000015100 card manager under global platform aid;

the a0000000030000 aid being phased out - visa founder of open platform, global platform. gp supposed use own rid.

notes:

  • libraries code , constants, services contain state can used through object sharing mechanisms;
  • kind of obvious: specific card may want contact vendor find out how configured.

Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -