Mass APK-signer
This is a discussion on Mass APK-signer within the Droid Development forums, part of the Droid Hacking category; let me give an example, all I have available to me at this time is AIX (Unix)
Code:
# ls -l *.apk
total 24872
-rw-rw-rw- ...
-
let me give an example, all I have available to me at this time is AIX (Unix)
Code:
# ls -l *.apk
total 24872
-rw-rw-rw- 1 samba staff 385201 Jul 27 14:36 Browser.apk
-rw-rw-rw- 1 samba staff 334092 Jul 27 14:39 Camera.apk
-rw-rw-rw- 1 samba staff 658509 Jul 27 14:45 Contacts.apk
-rw-rw-rw- 1 samba staff 969791 Jul 22 11:46 Email.apk
-rw-rw-rw- 1 samba staff 525396 Jul 10 11:59 Gallery3D.apk
-rw-rw-rw- 1 samba staff 566089 Jul 27 14:11 Gmail.apk
-rw-rw-rw- 1 samba staff 3059265 Jul 27 14:22 LatinImeGoogle.apk
-rw-rw-rw- 1 samba staff 4808120 Jul 27 14:55 Launcher2.apk
-rw-rw-rw- 1 samba staff 623922 Jul 27 14:59 Mms.apk
-rw-rw-rw- 1 samba staff 784213 Jul 27 14:29 Vending.apk
in my case, the file name is in the 9th column, so to get that info to a file that can be processed line by line, I use awk:
Code:
# ls -l *.apk | awk '{print$9}'
Browser.apk
Camera.apk
Contacts.apk
Email.apk
Gallery3D.apk
Gmail.apk
LatinImeGoogle.apk
Launcher2.apk
Mms.apk
Vending.apk
hope it helps
though what you did will work for this application, my example shows how to use it correctly
also so you know how to take columns of data and process them
Last edited by raidzero; 07-27-2010 at 01:14 PM.
"
Success is going from failure to failure without loss of enthusiasm" - Winston Churchill
-
sorry for all the questions...but this is driving me crazy.
in your case it will only sign file in column 9...or all files through column 9? I am confused because anytime I run awk with a print$ higher than one i get a bunch of blank spaces. Just to make it clear. I am trying to sign all apks within a certain folder instead of having to sign them one by one....Thank you.
-
wait a minute..ok its COLUMN...not ROW. in my case it is 8
-
ok so now that I have the column number figured out....sorry about that...when i cd to unsigned folder and use ls *.apk | awk '{print$8}' i get no results but if i do
ls -l *.apk | awk '{print$8}' it returns all the *.apk's in the folder. when running the original script should I use the -l option?
-

Originally Posted by
Drew408
ok so now that I have the column number figured out....sorry about that...when i cd to unsigned folder and use ls *.apk | awk '{print$8}' i get no results but if i do
ls -l *.apk | awk '{print$8}' it returns all the *.apk's in the folder. when running the original script should I use the -l option?
yes you need the -l, if the output is not formatted awk wont even see any columns
"
Success is going from failure to failure without loss of enthusiasm" - Winston Churchill
-
ok cool. so here is the updated script
#!/bin/sh
cd ~/sign/unsigned
echo "apk's" are now being signed.
echo
ls -l *.apk | awk '{print$8}' > apklist
while read apk; do echo Now signing $apk.. && java -jar /home/andrew/sign/signapk.jar /home/andrew/sign/testkey.x509.pem /home/andrew/sign/testkey.pk8 $apk /home/andrew/sign/signed\$apk < apklist
done
echo Done!
Im calling the script "a" for now... so this is what I get back in the Terminal
andrew@development-laptop:~$ a
apk's are now being signed.
Then the cursor hangs with no directory just a blank space. an apklist document is created in my unsigned folder. Thats about it.
-

Originally Posted by
Drew408
ok cool. so here is the updated script
#!/bin/sh
cd ~/sign/unsigned
echo "apk's" are now being signed.
echo
ls -l *.apk | awk '{print$8}' > apklist
while read apk; do echo Now signing $apk.. && java -jar /home/andrew/sign/signapk.jar /home/andrew/sign/testkey.x509.pem /home/andrew/sign/testkey.pk8 $apk /home/andrew/sign/signed\$apk < apklist
done
echo Done!
Im calling the script "a" for now... so this is what I get back in the Terminal
andrew@development-laptop:~$ a
apk's are now being signed.
Then the cursor hangs with no directory just a blank space. an apklist document is created in my unsigned folder. Thats about it.
I don't know, I will have to load up a linux environment and try it. I will be doing that later in the week (parts for a desktop computer will be arriving on Thursday :-D)
"
Success is going from failure to failure without loss of enthusiasm" - Winston Churchill
-
Thanks for all your help! Update me if you figure it out. And i will research in the mean time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Similar Threads
-
By bkmoose in forum New Member Introductions & Site Assistance
Replies: 0
Last Post: 07-18-2010, 06:06 PM
-
By liam. in forum Droid General Discussions
Replies: 3
Last Post: 06-07-2010, 08:00 AM
-
By coondogg97 in forum Droid Applications
Replies: 1
Last Post: 02-10-2010, 08:13 PM
-
By jthompsn in forum Droid General Discussions
Replies: 4
Last Post: 01-19-2010, 08:55 PM
-
By GasGas332 in forum Droid General Discussions
Replies: 0
Last Post: 01-17-2010, 12:27 PM
Search tags for this page
apk signer
,
apksigner
,
error: signapk.jar failed
,
error: signapk.jar failed: return code
,
error: signapk.jar failed: return code 1
,
error:signapk.jar failed:return code 1
,
moto signapk
,
moto-signapk
,
online apk signer
,
rz mass apksign
,
sign apk online
,
signapk
,
signapk.jar failed return code 1
,
signapk.jar failed: return code 1
,
testkey.x509.pem
Click on a term to search our site for related topics.