7

I work in a QA department that receives APKs signed with development keys. When we want to sign one of these builds for purchase testing, I typically use 7zip to open the APK and delete the META-INF folder, and then I run a script that assists me with re-signing the APK. I would like to include un-signing the APK as part of the script, but I can't figure out a way to un-sign an APK in windows via command line.

Doing this on a Mac is easy. All you need is

zip -d yourapp.apk "META-INF*"

but windows doesn't have a native zip process that I can access via command line.

I tried using 7zip and winRar and attempted

Rar d yourapp.apk "META-INF*" 

and

7z d yourapp.apk "META-INF*" 

But all I get is errors such as "bad archive" or "is not supported archive type"

Neither of these programs have an issue opening APKs via GUI, so I'm not sure why this isn't working via command line.

Is anyone else able to unsign an APK on Windows via command line somehow?

jpelletier
  • 133
  • 1
  • 8
  • Can't you just ask to receive non-signed APKs and do whatever you want with them after ? – OcuS Jun 13 '13 at 15:27
  • According to the help [here](http://www.dotnetperls.com/7-zip-examples), the d command should work just fine. Have you tried without quotes? They aren't using quotes int he example. – Raghav Sood Jun 13 '13 at 15:33
  • I pull these builds from the same location everyone else in the QA department does, and it makes more sense for them to sign with our development key. This isn't a huge issue as I can still manually open the apk and delete the signature. I'm just try to find a way to save my self 10 seconds every day. – jpelletier Jun 13 '13 at 17:06
  • Also, I tried a lot of variations on the syntax including no quotes, but 7zip keeps giving me "apk is not supported archive" – jpelletier Jun 13 '13 at 17:23
  • Try and rename the file to yourapp.apk.zip and run the 7zip command. – foxidrive Jun 13 '13 at 18:22

2 Answers2

2

If you use 7-Zip, you just have to tell it what kind of file it is reading:

7z d -tzip yourapp.apk "META-INF*"
Tim
  • 21
  • 2
1

You can download zip for windows from this site: www.info-zip.org

Direct link to Zip 3.0 for Windows

just make sure to put it in a folder which is in the PATH variable

cwin
  • 956
  • 1
  • 7
  • 14