How to sign custom OTA update .zip file with release keys - Android Q&A, Help & Troubleshooting

We have a kiosk application that needs to be able to periodically do OTA updates using our self-made OTA update .zip files.
Our custom OTA update .zip file have the following files:
/data/misc/adb/
adb_keys
/system
/priv-app/
MyApp.apk
/vendor/
build.prop
/META-INF/com/google/android/
update-binary
updater-script
We have used many different tablets like Galaxy Tab 3, Galaxy Tab 4 and Yoga 3, the only thing we have had to do is to replace the `mount` command arguments inside `updater-script` with the right ones for each tablet.
Of couse, since we do not have the release keys of each of these tablets, we have had to replace every Recovery with its own TWRP Recovery replacement, in order to be able to flash our custom OTA update file. All this worked like a charm every time.
Now we bought new tablets from a chinese manufacturer and when we tried to flash our OTA update package we got the following error:
Verifying update package...
E:footer is wrong
E:signature verification failed
Restarting adbd...
Installation aborted.
From that message is clear that error occurred because the OTA update .zip file was not signed. So, I asked from the manufacturer the release keys and the instructions in order to sign our OTA update .zip file and being able to flash it.
The problem is that the manufacturer's engineers have no clue of how to do this (signing OTA update files so they don't get rejected by their Recovery), which seems like a very common problem because we asked in multiple manufacturers and nobody knows how to do this.
So, I would like to ask for your help since I cannot find the instructions on how to sign it. Anybody knows how to do it?

sebastiantoro84 said:
We have a kiosk application that needs to be able to periodically do OTA updates using our self-made OTA update .zip files.
Our custom OTA update .zip file have the following files:
/data/misc/adb/
adb_keys
/system
/priv-app/
MyApp.apk
/vendor/
build.prop
/META-INF/com/google/android/
update-binary
updater-script
We have used many different tablets like Galaxy Tab 3, Galaxy Tab 4 and Yoga 3, the only thing we have had to do is to replace the `mount` command arguments inside `updater-script` with the right ones for each tablet.
Of couse, since we do not have the release keys of each of these tablets, we have had to replace every Recovery with its own TWRP Recovery replacement, in order to be able to flash our custom OTA update file. All this worked like a charm every time.
Now we bought new tablets from a chinese manufacturer and when we tried to flash our OTA update package we got the following error:
Verifying update package...
E:footer is wrong
E:signature verification failed
Restarting adbd...
Installation aborted.
From that message is clear that error occurred because the OTA update .zip file was not signed. So, I asked from the manufacturer the release keys and the instructions in order to sign our OTA update .zip file and being able to flash it.
The problem is that the manufacturer's engineers have no clue of how to do this (signing OTA update files so they don't get rejected by their Recovery), which seems like a very common problem because we asked in multiple manufacturers and nobody knows how to do this.
So, I would like to ask for your help since I cannot find the instructions on how to sign it. Anybody knows how to do it?
Click to expand...
Click to collapse
Got any answers?

Skrappy187 said:
Got any answers?
Click to expand...
Click to collapse
The answer is simple:
If you want to provide self-made OTA update you also have to use your own custom ROM. Then you are able to sign OS and OTA update using the same key.

To use testkeys at least the keys file must be changed in the recovery...

Related

[Q] Installation Aborted - may be self inflicted but...

I'm an ol' windows geek and an Android noob. I rooted my Evo 3D and had a few bumps during the root process (still during beta) and got S-off and able to run all my rooted apps no errors - but, every time I try to apply any zip (using CRM v4.0.1.5 ), I now get:
Installing: /sdcard/download/zipnamehere.zip
Finding update package...
Opening update package...
Installing update...
Installation aborted.
The first time I saw it was when I was trying to add SU to my phone -but - SU was on there and I was able to update it so I ignored the error.
Now, I'm trying to apply radios, etc and none will work.
I have tried downloading to Win7 x64 workstation, XP netbook and copying - have tried downloading directly - have tried praying and downloading - all (so far) to no avail
I was able to apply the latest deodexed ROM no problem (THANK YOU!) but i'm stuck and since i'm in the short-stack near-side of the bell-curve, I'm hoping maybe someone smarter than I can give me some things to check an' try...
As always, I'm very grateful for all the time and assistance!
(yes, i'm selecting zip, yes, i've verified checksum)
Cheers!
Try using TWRP recovery from TeamWin. I think the clockwork recovery is a port and may have some bugs. I believe most of the bugs have been worked out in TWRP. Worth a try anyway. It's a bit different than CW but I think as you get used to it you may like it better. I advise to never use Rom Manager app and flash everything manually from recovery anyway.
Sent from my Transformer TF101 using XDA Premium App
housry23 -
TWRP, eh? - It's something new to try tonight... I'll post back either way once I've got the kids to sleep and have a moment to focus
Many thanks for the quick reply and the information!
Cheers!
Okay - one more piece of the puzzle: installed TWRP and told it to doa signature verification... the md5 check is fine but even so, it's telling me the signature check is failing - for the sake of argument - if i assume the file is good, what would cause my phone to be unable to correctly verify file signatures?
and so far - very impressed with TWRP - thanks for pointing me in a proper direction!

OTA with Stock rooted and HTCDev unlock question

I was sitting a work when I noticed the OTA notice come up, I planned to hit differ so that I could check my order of operations on how to handle this. In my haste to prove I really got the OTA notice I hit a screenshot which closed the notice. I assumed it automatically hit differ when I pressed the home button. I returned to the phone after finding here I should S-Off before the update, only to find it on the "Android system recovery" screen.
I am faced with the following.
Code:
- Reboot system now
- USB-MS toggle
- Backup/Restore
- Flash zip menu
- Wipe
- Partition sdcard
- Mounts
- Other
- Format data.system.cache Ext4 | Ext3
- Developer menu
- Power off
---------------------------------------------------------------------------
Build : RA-VIGOR-v3.1.0-getitnowmarketing
Finding update package...
Opening update package...
Installing update...
Copying fotaBoot to /data/system for customize reload...
Verifying current system...
Deleting specific files...
Removing unneeded files...
Patching system files...
Unpacking new files...
Symlinks and permissions...
I am not running a rom, I was stock rooted with HTCDev unlock and I do believe Amon-Ra recovery though I admit I haven't touched that aspect of things since February. I wanted to wait for the OTA to make any bigger changes than adding a tether app I could really use. Am I screwed? Do I tell it to reboot and hope for the best?
At the time of this post I could not find anything for someone in my situation. Sorry if it is in the wrong area. I lurk instead of posting 99% of the time.
EDIT: I told it to reboot and it spit me back to the home screen I am used to, still old software. Doing a little more reading I have established this is normal in cases with a recovery installed.
howser87 said:
I was sitting a work when I noticed the OTA notice come up, I planned to hit differ so that I could check my order of operations on how to handle this. In my haste to prove I really got the OTA notice I hit a screenshot which closed the notice. I assumed it automatically hit differ when I pressed the home button. I returned to the phone after finding here I should S-Off before the update, only to find it on the "Android system recovery" screen.
I am faced with the following.
Code:
- Reboot system now
- USB-MS toggle
- Backup/Restore
- Flash zip menu
- Wipe
- Partition sdcard
- Mounts
- Other
- Format data.system.cache Ext4 | Ext3
- Developer menu
- Power off
---------------------------------------------------------------------------
Build : RA-VIGOR-v3.1.0-getitnowmarketing
Finding update package...
Opening update package...
Installing update...
Copying fotaBoot to /data/system for customize reload...
Verifying current system...
Deleting specific files...
Removing unneeded files...
Patching system files...
Unpacking new files...
Symlinks and permissions...
I am not running a rom, I was stock rooted with HTCDev unlock and I do believe Amon-Ra recovery though I admit I haven't touched that aspect of things since February. I wanted to wait for the OTA to make any bigger changes than adding a tether app I could really use. Am I screwed? Do I tell it to reboot and hope for the best?
At the time of this post I could not find anything for someone in my situation. Sorry if it is in the wrong area. I lurk instead of posting 99% of the time.
EDIT: I told it to reboot and it spit me back to the home screen I am used to, still old software. Doing a little more reading I have established this is normal in cases with a recovery installed.
Click to expand...
Click to collapse
I don't believe you can accept OTA with AmonRa. Stock recovery is what it installs through. Could be wrong tho.
zac41189 said:
I don't believe you can accept OTA with AmonRa. Stock recovery is what it installs through. Could be wrong tho.
Click to expand...
Click to collapse
you can get stock recovery over here http://www.androidfilehost.com/main/-Support_Files-/SuperChilPil/ down at the bottom.
topgun1953 said:
you can get stock recovery over here http://www.androidfilehost.com/main/-Support_Files-/SuperChilPil/ down at the bottom.
Click to expand...
Click to collapse
Thanks all! This was my exact situation as well.. AmonRa was the only real change I made since picking up the phone, holding out for ICS!
So let's go waaay back to the basics.. anyone have a link to how I install that stock recovery? Sorry for the n00bness.
namebrandon said:
Thanks all! This was my exact situation as well.. AmonRa was the only real change I made since picking up the phone, holding out for ICS!
So let's go waaay back to the basics.. anyone have a link to how I install that stock recovery? Sorry for the n00bness.
Click to expand...
Click to collapse
I think you would just be better off to install the full .12 RUU. Links are everywhere here but since you just ran stock rooted you can still root it I believe. If its not rootable install the full .10 RUU and root that. The differences between the two are minor and that way you will have the updated firmware and radios.
It will wipe data though.
namebrandon said:
Thanks all! This was my exact situation as well.. AmonRa was the only real change I made since picking up the phone, holding out for ICS!
So let's go waaay back to the basics.. anyone have a link to how I install that stock recovery? Sorry for the n00bness.
Click to expand...
Click to collapse
Rename the file to ph98img.zip. Reboot into bootloader and select yes to update. It will install the stock recovery.

[Q] i747M rom signing

The usb port in my samsug i747M S3 is not working on any pc and my phone is stuck in a bootloop. I need to know if there is anyway to flash in a custom recovery via the stock recovery or flash in a new zip flashable rom through stock recovery.
I have used cygwin kitchen to put together a flashable zip from a odin rom i downloaded online but i keep getting esignature verification failed. After researching this i found that only samsung signed zips are allowed to be flashed in stock recovery. How can i sign my zips and make them appear as Samsung signed? If possible!!
narell said:
The usb port in my samsug i747M S3 is not working on any pc and my phone is stuck in a bootloop. I need to know if there is anyway to flash in a custom recovery via the stock recovery or flash in a new zip flashable rom through stock recovery.
I have used cygwin kitchen to put together a flashable zip from a odin rom i downloaded online but i keep getting esignature verification failed. After researching this i found that only samsung signed zips are allowed to be flashed in stock recovery. How can i sign my zips and make them appear as Samsung signed? If possible!!
Click to expand...
Click to collapse
Sorry man, that's pretty much the proverbial rock and a hard place... I'm assuming you already tried the factory reset? There really aren't many options when you are in this situation without getting the USB port fixed (which is soldered, so not the easiest thing to do). You can't flash a custom recovery or rom through the stock 3e recovery. At all. Some phones you can, this isn't one of them. This limits your options to 2 things -
Find an OTA update zip that is the same version or the one that is the next in line of updates such as this:
http://www.androidegis.com/how-to/leaked-jelly-bean-ota-update-for-bell-galaxy-s3-i747m-9-mvlali1/ (but this is older and probably won't work and do not even try if you were 4.3 last and is a leak version - this is just for example purposes only)
or you can try this, though since your boatloader is probably fine, not sure if it will work either:
http://forum.xda-developers.com/showthread.php?t=2549068
Other than that, your options are JTAG service or fixing the port, which if you are gonna spend the $ for a JTAG service, it'd make more sense to just put that towards the repair and then it will be very easy to reload the OS once that is fixed.
es0tericcha0s said:
Sorry man, that's pretty much the proverbial rock and a hard place... I'm assuming you already tried the factory reset? There really aren't many options when you are in this situation without getting the USB port fixed (which is soldered, so not the easiest thing to do). You can't flash a custom recovery or rom through the stock 3e recovery. At all. Some phones you can, this isn't one of them. This limits your options to 2 things -
Find an OTA update zip that is the same version or the one that is the next in line of updates such as this:
http://www.androidegis.com/how-to/leaked-jelly-bean-ota-update-for-bell-galaxy-s3-i747m-9-mvlali1/ (but this is older and probably won't work and do not even try if you were 4.3 last and is a leak version - this is just for example purposes only)
or you can try this, though since your boatloader is probably fine, not sure if it will work either:
http://forum.xda-developers.com/showthread.php?t=2549068
Other than that, your options are JTAG service or fixing the port, which if you are gonna spend the $ for a JTAG service, it'd make more sense to just put that towards the repair and then it will be very easy to reload the OS once that is fixed.
Click to expand...
Click to collapse
Thanks alot for your help...i downloaded the rom from the link u sent..the flash woud have been successfull but it was aborted due to this error
E: Error in /tmp/sideload/package.zip (Status 6). Installation aborted.
What does this mean? Is there anyway i can go into the rom package and fix it?
narell said:
Thanks alot for your help...i downloaded the rom from the link u sent..the flash woud have been successfull but it was aborted due to this error
E: Error in /tmp/sideload/package.zip (Status 6). Installation aborted.
What does this mean? Is there anyway i can go into the rom package and fix it?
Click to expand...
Click to collapse
I specifically said that it probably wouldn't work and was only for the idea. That update was a leaked version of 4.1.1. I'm assuming your system is probably newer than that, hence why it wouldn't work. I don't know what update you are on and not sure if there is an OTA that would be helpful even. Just saying in your current situation, there aren't many options.

[Q] SGH-M819N Flashing Custom ROM

Hi everyone. Recently, I have tried to flash the CyanogenMod (CM11) ROM via TWRP Recovery (v2.7.1.0), and it ends up with an error saying E:Error executing updater binary in zip '/sdcard/TWRP/cm-11-20140628-UNOFFICIAL-meliusltexx.zip' which results in the "error flashing zip". I have the MetroPCS variant of the Samsung Galaxy Mega, and I could not find many threads that support this particular model. For anyone's reference, I downloaded the Custom ROM from here http://forum.xda-developers.com/showthread.php?t=2566642.
I was wondering if anyone could help me solve this error. So far, my research on Google led me to unzip the zip file, navigate to "[ROM Name]\META-INF\com\google\android\", and replace the "update-binary" file in which no regard was given for what to replace it with. Google also brought me to this forum http://unleashedprepaids.com/thread-8745-post-71471.html#pid71471 which gave compatible ROMS for my particular phone, but all gave me the same error message.
At this point, I am willing to try anything else since I have both a Nandroid Backup and a TWRP created backup saved on my phone and computer. Currently, I have no system installed on my phone, but I'll restore it soon. Thank you guys for the help. I appreciate it.
Solved!
Never mind! I was able to figure it out. The thread can be closed now.

Expert Help Really Needed Please Guys

Hi all,
I'm new to the forum, and in need of your expert skills.
A good friend of mine has given me their Tablet to try and fix.
Hannspree SN14T71.
The tablet had to be factory reset and ever since that was done, we can't get google play to work. looking into this more and via the Manufacture website there is an update that can be installed on the device. i have downloaded the update.img file from their site and attempted to install it by simply copying the image to the device and rebooting. this obviously didn't work. i then tried to force the update via the recovery console for the android device. again the .img file wasn't found (although its there). again i tried to copy the file into a folder (OTA folder) to see if it picked this up. again failed as it couldn't see the file. giving up I looked at the "about device" and a error flagged up..
"invalid ROM ID (Hannstar 133-europe-1.1.4)!"
I i have very little if any knowledge of OTA Rom files, updating, installing etc. and looking to you experts in hope i can get this puppy back up and running. the system details are below.. (i hope this is of some help). is there another compatible OTA ROM that can be used? is there a set by step guide on installing this? or even a more up to date stock ROM for the device? I've really hit a brick wall with this and getting help from the manufacture is like getting blood out of a stone.
I would appreciate anyone's help right now. thanks in advance guys. really appreciate any help you can give.
ROM
210131123E-V1.1.4-13.3
ROM Version
1.1.4 (23rd Nov 2013 00:00:00:
OTA Updater ID
Hannstar133-europe-1.1.4
UPDATES
Available Updates
Error fetching update info: invalid ROM ID (Hannstar 133-europe-1.1.4)!

Categories

Resources