Results 1 to 4 of 4
Anyone have any idea how I would sign multiple files in ~/sign/unsigned and output them to ~/sign/signed with the orignal file name? The two issues I'm facing are
A.) I ...
- 07-29-2010 #1Just Joined!
- Join Date
- Jul 2010
- Posts
- 2
sign multiple files at once with jarsigner?
Anyone have any idea how I would sign multiple files in ~/sign/unsigned and output them to ~/sign/signed with the orignal file name? The two issues I'm facing are
A.) I don't know how to sign all the files at one time in a folder using signapk or jarsigner
B.) When I do sign and individual file I don't know how to keep the same name from input using *.file (the wildcard) and keep the original name in the output...any help would be appreciated!
There are 71 files i need to sign and make sure they all are signed with the same key at once. Individually signing them one by one would take too long because after I sign them individually I need to go and rename the signed file with the original name.
Here is the code I use to sign an individual apk file:
cd ~/sign/unsigned
java -jar /home/andrew/sign/signapk.jar /home/andrew/sign/certificate.pem /home/andrew/sign/key.pk8 ~/sign/unsigned/*.apk ~/sign/signed/signed.apk
Please tell me how I can keep the original input name to the output without having to rename them and then how could I sign multiple files at once?
- 07-30-2010 #2
Hello,
i think this mini-script can help you:
#!/bin/bash
cd ~/sign/unsigned
for i in *.apk
do
java -jar /home/andrew/sign/signapk.jar /home/andrew/sign/certificate.pem /home/andrew/sign/key.pk8 ~/sign/unsigned/$i ~/sign/signed/$i
done
I hope this can be usefull
RegardsLast edited by JosePF; 07-30-2010 at 02:46 PM.
- 07-30-2010 #3Just Joined!
- Join Date
- Jul 2010
- Posts
- 2
Thank you for the reply.
Heres what happened:
andrew@development-laptop:~$ cd ~/sign/unsigned
andrew@development-laptop:~/sign/unsigned$ for i in *.apk
> do
> java -jar ~/bin/signapk.jar ~/bin/certificate.pem ~/bin/key.pk8 ~/sign/signed
> done
Usage: signapk [-w] publickey.x509[.pem] privatekey.pk8 input.jar output.jar
Usage: signapk [-w] publickey.x509[.pem] privatekey.pk8 input.jar output.jar
Usage: signapk [-w] publickey.x509[.pem] privatekey.pk8 input.jar output.jar
Usage: signapk [-w] publickey.x509[.pem] privatekey.pk8 input.jar output.jar
Usage: signapk [-w] publickey.x509[.pem] privatekey.pk8 input.jar output.jar
Usage: signapk [-w] publickey.x509[.pem] privatekey.pk8 input.jar output.jar
I have six .apk's in this folder, its registering all six but giving me a usage instruction for them, any ideas?
- 07-30-2010 #4
Hello,
i dont understand,
in your first post you say:
"Here is the code I use to sign an individual apk file:
cd ~/sign/unsigned
java -jar /home/andrew/sign/signapk.jar /home/andrew/sign/certificate.pem /home/andrew/sign/key.pk8 ~/sign/unsigned/*.apk ~/sign/signed/signed.apk"
But code that you use is:
"> java -jar ~/bin/signapk.jar ~/bin/certificate.pem ~/bin/key.pk8 ~/sign/signed"
???


Reply With Quote