In the Android source code project , I found that ADT doesn’t use jarsigner to sign a APK, as:
jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore *pathtokey* -storepass *yourpass* -keypass *yourpass* *app.apk* *keyalias*
or
String args[] = {"-keystore", keystore, "-storepass", password, jar, keyname};
JarSigner js = new JarSigner();
js.run(args);
, ADT will read the keystore and sign the apk by coding, It’s really confusing me.
Maybe at the time it was just sun.security.* implementation available and they did not want to import sun.* packages to Android source. So they created own signer implementation.
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/security/tools/JarSigner.java