Guest Frankish Posted April 19, 2012 Report Posted April 19, 2012 (edited) This bit of code is by Paul and makes apk signature checking and sorting really simple. I used to use it on Ubuntu but don't have Ubuntu set up at the moment. Is anyone capable of converting it to a windows .bat for me? Thanks in advance! #!/bin/bash cd $1 for filename in *.apk do unzip -d $filename.extract $filename META-INF/CERT.RSA if [ -f $filename.extract/META-INF/CERT.RSA ] then mkdir `keytool -printcert -v -file $filename.extract/META-INF/CERT.RSA|grep SerialNumber| cut -c 19-23` mv $filename `keytool -printcert -v -file $filename.extract/META-INF/CERT.RSA|grep SerialNumber| cut -c 19-23`/$filename mv `echo $filename | sed 's/\(.*\.\)apk/\1odex/'` `keytool -printcert -v -file $filename.extract/META-INF/CERT.RSA|grep SerialNumber| cut -c 19-23`/`echo $filename | sed 's/\(.*\.\)apk/\1odex/'` rm -rf $filename.extract else mkdir none mv $filename none mv `echo $filename | sed 's/\(.*\.\)apk/\1odex/'` none rm -rf $filename.extract fi done; mkdir other mv * other mv other/b399 platform mv other/f2a7 shared mv other/f2b9 media mv other/936e test Edited April 19, 2012 by Frankish
Guest smfd Posted April 19, 2012 Report Posted April 19, 2012 The part of converting bash to windows bat is not the big problem you have in hands. The big problem is the utils that normally you don't have in windows and that you have almost by default in a linux. I'm naming just a few: - cut - sed - grep ... and so on... you should download a live cd of linux, and use a pen drive to insert the data you want to sign and use the live linux distro to sign. It's much less work.... This bit of code is by Paul and makes apk signature checking and sorting really simple. I used to use it on Ubuntu but don't have Ubuntu set up at the moment. Is anyone capable of converting it to a windows .bat for me? Thanks in advance! #!/bin/bash cd $1 for filename in *.apk do unzip -d $filename.extract $filename META-INF/CERT.RSA if [ -f $filename.extract/META-INF/CERT.RSA ] then mkdir `keytool -printcert -v -file $filename.extract/META-INF/CERT.RSA|grep SerialNumber| cut -c 19-23` mv $filename `keytool -printcert -v -file $filename.extract/META-INF/CERT.RSA|grep SerialNumber| cut -c 19-23`/$filename mv `echo $filename | sed 's/\(.*\.\)apk/\1odex/'` `keytool -printcert -v -file $filename.extract/META-INF/CERT.RSA|grep SerialNumber| cut -c 19-23`/`echo $filename | sed 's/\(.*\.\)apk/\1odex/'` rm -rf $filename.extract else mkdir none mv $filename none mv `echo $filename | sed 's/\(.*\.\)apk/\1odex/'` none rm -rf $filename.extract fi done; mkdir other mv * other mv other/b399 platform mv other/f2a7 shared mv other/f2b9 media mv other/936e test
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now