[Q] How do I create a signed ZIP - Android Software Development

OK I have been trying to create a signed zip that contains an apk. So I assume I must sign the apk then zipalign it then make the zip, sign it and zipalign the zip file. When I do this i get a Verification error when I try to flash it.
Steps I do are;
1 create the folder structure
2 create the apk using apkbuilder
3 sign the apk with jarsigner
4 zipalign the apk
5 zip up the whole update
6 sign the zip with jarsigner
7 zipalign the zip
try to flash it and it fails.
I am using windows xp and a version of zip that doesn't add the directories.
Questions are.
Is this correct way to do this?
What tools should I be using. I have looked across xda and tried some suggestions but I cannot make the signed zip flash?
Help?

maybe this can help:
http://forum.xda-developers.com/showthread.php?t=471634
edit: also try this:http://forum.ppcgeeks.com/showthread.php?t=126517

heres my method
http://forum.xda-developers.com/showthread.php?t=732957

Related

[Q] Modifying Stock Keyboard

Hey all,
I was wondering whats the process to modify the stock multi-touch keyboard for the Droid 2? I was able to do it with the multi-touch keyboard that Punk.Kaos ported to the Eris, using some Windows batch files for extracting the apk source, compiling, signing, etc. I just can't remember for the life of me what that little program was called. Any ideas?
Thanks!
it would be nice since the space bar is soooo small i keep pressing . instead of space 70% of the times
Alright, I was able to get the program I was thinking of, it is called APK Manager. But the keyboard is a odex file... Which I don't know how to extract the XML files from... Yet.
I'd de-odex before you try to extract. It will be a lot easier. There's the method I used here.
What exactly is de-odex'ing? How will it affect my phone?
Deodexing just means that all of the stray .odex files will be put back into the correct .apk files this is done mostly for theme purposes in order to edit the services.jar file which has to be de-odexed before it can be edited. It won't corrupt anything if you do it right nothing should change on the outside the phone devs leave the .odex files out for loading reasons but nothing significant should change but you might experience a slightly slower boot up process but like I said nothing significant. Most ROM's now are de-odexed though.
So I deodexed my phone so I could work on the LatinIME.apk package. Using the APK-Manager for Linux, I was able to (0) pull the APK from my phone. Then I (9) decompiled the APK, edited the XML files as I wanted.
Now, from here I'm not entirely sure which direction to take. I tried running (13) Compile APK / Sign APK / Install APK, but I got an error saying something on how the signatures didn't match up. Then I tried running (3) ZIP APK (5) Zipalign APK then (8) ADB push, but now I don't even have the keyboard on my phone anymore.
How can I go about doing the correct way to compile my modified code and install it on my phone?
Here are the options I can do, if you're not familiar with APK Manager:
Code:
------------------Simple Tasks Such As Image Editing----------------------
0 Adb pull
1 Extract apk
2 Optimize images inside (Only if "Extract Apk" was selected)
3 Zip apk
4 Sign apk (Dont do this if its a system apk)
5 Zipalign apk (Do once apk is created/signed)
6 Install apk (Dont do this if system apk, do adb push)
7 Zip / Sign / Install apk (All in one step)
8 Adb push (Only for system apk)
-----------------Advanced Tasks Such As Code Editing-----------------------
9 Decompile apk
10 Compile apk
11 Sign apk
12 Install apk
13 Compile apk / Sign apk / Install apk (All in one step)
---------------------------------------------------------------------------
14 Batch Optimize Apk (inside place-apk-here-to-batch-optimize only)
15 Sign an apk (inside place-apk-here-for-signing folder only)
16 Batch optimize ogg files (inside place-ogg-here only)
17 Quit
****************************************************************************
Anyone? I would love to get my stock keyboard back!
Sent from my DROID2 using XDA App

[Q] How to create an flashable .zip file

Hello all,
I am looking for a good comprehensive guide to creating my own .zip files to flash certain changes I like to make when flashing a rom or just adding files.
Now I have found a few good guides here on XDA but they seem to no longer apply as the update script needs to be in edify and not amend. This is the issue I am having so if anyone can point me to a walk through that explains this type of thing I would appreciate it.
Anyone?
lol, i dont think developers/people-with-knowledge would go into a Q&A sub-forum .
I'm neither on of them, however here is my would-be-successful attempt p) :
1- Make all your modifications and finalize them, the root folder must be /system/ .
2- use apktool to recompile as an apk (apktool b system)
3- sign that .apk.
4- rename extension to zip and violla
theoretically, it should work.
Not shure if this can help you, but i created a zip (original Script is from dungphp) to replace files on my device from CWM:
http://forum.xda-developers.com/showthread.php?t=1241244

[Q] JellyBean ZIP Packages (aka unzip: zip flags 1 and 8 are not supported)

Hey Guys,
I've been trying to understand why in all the JellyBean ROM that I've encountered so far there is an error message: "unzip: zip flags 1 and 8 are not supported" when I try viewing the archive in Fedora 17, or even in BusyBox, natively on the phone itself.
The ZIPs install correctly from the Recovery.
I've tried extracting it with WinRAR on windows, but after re-packing the archive and installing the newly created ROM ZIP the phone hangs. I didn't change anything at all, only extracted the original ZIP ROM and repacked.
The ROM that I've used: http://tinyw.in/YMJG
If anybody could shed some light on this I'd be really greatful
Try 7zip instead of winRAR as 7zip retains the file structure (you should use 7zip for all Cwm editing imo). I'm able to extract, modify, repackage and flash miuiandroid releases using 7zip and windows 8 (win7 will work too). Let me know how you get on!
Edit: I know you said the zip installs okay but you may want to check the md5 just to be safe
Sent from my GT-I9300 using xda app-developers app

[Tool] ZIP/APK/JAR Signer for Windows..

ZIP Signer for Windows.
Requirment :
JDK or JRE must be installed in your system.
Steps to use :
- Download and Extract Zip_Signer
- Place zip file you want to sign in the Zip_Signer folder.
- Run Zip_Signer.exe
- Enter the name of zip file without extension like (.zip) and hit enter.
- wait for moment and done.
- check signed folder to get your signed zip..
If you like this please hit thanks button and I appreciate.​
sorry for noob-questions:
what is the sense of the signer?
moonryder said:
sorry for noob-questions:
what is the sense of the signer?
Click to expand...
Click to collapse
some recovery does not accept unsigned zip like rom or other flashable zip. If you get "Signature Verification fail" error during flashing you need to sign the zip.
You can give as information works and what this file installation method.
Help other community members. @bhavik9243
bhavik9243 said:
ZIP Signer for Windows.
Requirment :
JDK or JRE must be installed in your system.
Steps to use :
- Download and Extract Zip_Signer
- Place zip file you want to sign in the Zip_Signer folder.
- Run Zip_Signer.exe
- Enter the name of zip file without extension like (.zip) and hit enter.
- wait for moment and done.
- check signed folder to get your signed zip..
If you like this please hit thanks button and I appreciate.​
Click to expand...
Click to collapse
I checked this with I337 AT&T NC1 kernel ZIP. I signed it as mentioned in read me.txt and tried to flash a cellphone. The messages were "Failed to verify whole file signature" and "Signature verification failed". As I suppose testkey.pk8 and testkey.x509.pem are not good to sign this ZIP.
Any suggestions please?
Hi bro! Help me with these questions, please!
This program in the APK version, is now in v3.4, in my case when I use it or when I sign a file, the output folder creates an equal file with a name changed to name-SIGNED.xxx but for the size that It has not seem to be the same signed file, the original weighs, for example 16MB. And the signed copy weighs 1.63 KB. Something is wrong?
1. Zip Signed for Windows has any final version superior to yours posted here?
2. Is the Android APK version of ZipSigned legit? Are they created by the same person or are they other creators? Which do you recommend?
3. We have Firmware DUMPs extracted from BLU brand terminals, but some of them ask us that the Scatter files (DUMPs in Scatter format) must be signed and gives us an error in the installation ("Failed verifications Signed"), you can help us and explain to us which files should be signed inside the folder with all the scatter files? Can you tell us if this program can sign files with the extensions .IMG or .BIN for example?
Capture: https://prntscr.com/qost19

cannot complete decompile apk file procedure succesfully

hello i am a newbie on android development and i am just trying to decompile an apk file.i have done it all correct using apk tool and when i am trying to decompile the apk file via command prompt it doesn't dissapear the folder with the name of apk which encluding the resource files.any ideas???
Dont show log, so i could not help.
But when you compile it, selected signed or unsigned apk. For debug, unsigned apk is okay. With signed apk, searching for how to make progruard-rules, how to config it. Then everything will work.

Categories

Resources