# Install & configure script for Gemalto TOP IM GX4, mother key

mode_201
gemXpressoPro
enable_trace
establish_context
card_connect

select -AID A000000018434D00
open_sc -security 3 -keyind 0 -keyver 0 -key 47454d5850524553534f53414d504c45

delete -AID ${jc.applet.AID_GPShell}
delete -AID ${jc.package.AID_GPShell}

install -file ${build.classes.dir}/${jc.package.path}/javacard/${jc.package.shortName}.cap -sdAID A000000018434D00 -nvCodeLimit 4000 -priv 4

# initialize applet with default pin 12345678
select -AID ${jc.applet.AID_GPShell}
send_apdu -APDU B02A000038084D7573636C6530300401083132333435363738083132333435363738050208313233343536373808313233343536373800001770000201

# check PIN1 (12345678)
send_apdu -APDU B0420100083132333435363738

card_disconnect
release_context

