Extract .zip Android ROM - Android Q&A, Help & Troubleshooting

This is most likely a really newbie question..
But does anyone know how I can extract the .zip ROM file from an Android phone. The best I could find were people that were doing a backup of there phone (I don't know if they are .zip or not). But I want to somehow extract the .zip from the phone and be able to flash like a custom ROM.
Thanks in advance!

Sparrow40k said:
This is most likely a really newbie question..
But does anyone know how I can extract the .zip ROM file from an Android phone. The best I could find were people that were doing a backup of there phone (I don't know if they are .zip or not). But I want to somehow extract the .zip from the phone and be able to flash like a custom ROM.
Thanks in advance!
Click to expand...
Click to collapse
I understand what you are looking for, but there is not a way to do that. The backup and restore method would be as close as you could get, but the method to backup leaves the various partitions in .img file formats which the custom recovery (has to be a custom recovery like ClockWorkMod, TWRP, etc) would be able to read, copy, and restore. Does the same thing that you are looking for, just in a different way.

es0tericcha0s said:
I understand what you are looking for, but there is not a way to do that. The backup and restore method would be as close as you could get, but the method to backup leaves the various partitions in .img file formats which the custom recovery (has to be a custom recovery like ClockWorkMod, TWRP, etc) would be able to read, copy, and restore. Does the same thing that you are looking for, just in a different way.
Click to expand...
Click to collapse
If I am unable to extract a .zip of the ROM, how do I work on the ROM and do things like port it?
All the websites I look at say to download the .zip, but my phone (JiaYu G4s) doesn't have a ROM available. The closest would be the JiaYu G4; which to my (very small) knowledge is no good to me because the internals are all different.

That's one of the major downsides to having a phone that isn't supported by the manufacturer or the dev community. Technically, the manufacturer is supposed to release the source code per GPL, but most of the ones that use MediaTek chips never do.
http://www.xda-developers.com/android/have-you-paid-your-linux-kernel-source-license-fee/
I'm not sure how devs that work on those devices do it...
Edit: Found it
http://phonegist.blogspot.com/2014/02/how-to-make-stock-rom-of-mediatek.html

es0tericcha0s said:
That's one of the major downsides to having a phone that isn't supported by the manufacturer or the dev community. Technically, the manufacturer is supposed to release the source code per GPL, but most of the ones that use MediaTek chips never do.
http://www.xda-developers.com/android/have-you-paid-your-linux-kernel-source-license-fee/
I'm not sure how devs that work on those devices do it...
Edit: Found it
http://phonegist.blogspot.com/2014/02/how-to-make-stock-rom-of-mediatek.html
Click to expand...
Click to collapse
So, by following the steps on the link provided. I actually am able to create a .zip from the ROM installed on the phone?

That's the idea. I dunno if that one is compatible with your chipset, but you will have to find the version that does and should be able to get started.

Related

[Q] Installing updates after rooting?

So, I've used Revolutionary to S-off and root, but now there's a system update (I assume for the security vulnerability that was found a week or two ago). I'd like to install this update, but it just fails when I try... Does anyone know how to turn it into a flashable zip, or will I have to un-s-off/root, update, then re-s-off/root?
A hotfix for the vulnerability is not out yet - you tought HTC is that fast But if you can find it you can remove /system/app/HtcLoggers.apk from your rooted Flyer (with an app like File Expert that can mount partitions like /system).
Since you are still stock you might have been offered an incremental update, but I guess soon you will want to flash a custom ROM that already includes it anyway.
Lucas0511 said:
A hotfix for the vulnerability is not out yet - you tought HTC is that fast But if you can find it you can remove /system/app/HtcLoggers.apk from your rooted Flyer (with an app like File Expert that can mount partitions like /system).
Since you are still stock you might have been offered an incremental update, but I guess soon you will want to flash a custom ROM that already includes it anyway.
Click to expand...
Click to collapse
It appears there's a new update today, and it's only about 4.5 megs - I think HTC may actually be that fast
I really don't want to install a ROM, I just want stock with root (to help with development)... Any suggestions appreciated!
To answer my own question, I downloaded the OTA on the device, then I used adb to copy it to my computer (it's in /sdcard/downloads/). I edited the zip so that it wouldn't flash the recovery (there's a recovery.img in firmware.zip inside the OTA zip - remove it), copied it to the external SD card, then flashed it via ClockworkMod (it won't update via the HTC updater).
Something to make sure of, you MUST be running stock - it patches files rather than reinstalls them, so this will fail if there are any differences. This includes build.prop. You can make any changes you like after flashing of course.
Don't forget to backup before doing anything of course! Another warning, ClockworkMod fails silently if your SD card doesn't have enough room for the backup, so make sure you have plenty of space beforehand too!
Hope this helps someone.
Cwiiis said:
To answer my own question, I downloaded the OTA on the device, then I used adb to copy it to my computer (it's in /sdcard/downloads/). I edited the zip so that it wouldn't flash the recovery (there's a recovery.img in firmware.zip inside the OTA zip - remove it), copied it to the external SD card, then flashed it via ClockworkMod (it won't update via the HTC updater).
Something to make sure of, you MUST be running stock - it patches files rather than reinstalls them, so this will fail if there are any differences. This includes build.prop. You can make any changes you like after flashing of course.
Don't forget to backup before doing anything of course! Another warning, ClockworkMod fails silently if your SD card doesn't have enough room for the backup, so make sure you have plenty of space beforehand too!
Hope this helps someone.
Click to expand...
Click to collapse
Removing the recovery.img? I've rezipped everything and it's only 510kb now, surely that cant be it?
Recovery.img's are large files it was just a minor updat to probably fix a couple internal things nothing major. It was a small file at 4mb already.
Hy
Can you please upload the edit-update?
Thanks
ric242 said:
Hy
Can you please upload the edit-update?
Thanks
Click to expand...
Click to collapse
Will do once i'm home!
adaimespechip said:
Will do once i'm home!
Click to expand...
Click to collapse
Thanks! Might be able to make it into a flash able zip.
Cwiiis said:
To answer my own question, I downloaded the OTA on the device, then I used adb to copy it to my computer (it's in /sdcard/downloads/). I edited the zip so that it wouldn't flash the recovery (there's a recovery.img in firmware.zip inside the OTA zip - remove it), copied it to the external SD card, then flashed it via ClockworkMod (it won't update via the HTC updater).
Something to make sure of, you MUST be running stock - it patches files rather than reinstalls them, so this will fail if there are any differences. This includes build.prop. You can make any changes you like after flashing of course.
Don't forget to backup before doing anything of course! Another warning, ClockworkMod fails silently if your SD card doesn't have enough room for the backup, so make sure you have plenty of space beforehand too!
Hope this helps someone.
Click to expand...
Click to collapse
Thanks for the helpful guidelines...
Just a quick question and pardon me since I am a newcomer to Android universe. What do You mean when You say stock?
Thanks again...
BTY
HTC_Flyer / Revolutionary / CWM

[Q] Creating boot.img for Galaxy S Advance

I hope this IS the thread for asking questions..haha...
Firstly I'm a noob at Android developing, but I'm willing to learn..So I just got myself a Samsung Galaxy S Advance, and I'm going to try to root it myself.. But I'm quite buffled with the firmwares that I downloaded at samfirmware for this phone, cos the file inside are quite different from what we always see, listed like this:
cache.img.md5
system.img.md5
hidden.img.md5
kernel.bin.md5
modem.bin.md5
And there is also this file (SS_DL.dll) which I don't know how to use.. for rooting, I'm supposed to find the boot.img and modify some files in it, but I have no idea where to look for it... I suspected it would be in the kernel.bin, or compiled from that file, but that would be out of my knowledge... Is there anyone who can point me to the right direction?
So far i have been trying to decompile the system.img to get their NAND imgs using unyaffs and unyaffs2, but both are not working (segmentation fault and file is not multiple of 2048 + 64 or something)... Is there any other way for me to extract boot.img from the files above?
I have decompiled system.img with dsixda kitchen, to get system files, but I don't know how to get boot.img (kernel). I think it is in the kernel.bin file, but the kitchen can't decompile it. I've been asking around how to get boot.img from this phone but nobody gives me any answer. If we somehow manage to get boot.img and decomple it, we can than make insercure kernel, which could be used for rooting the phone.
Here is the guide for rooting Samsung Galaxy S I9070 Advance.
http://software2tech.com/2012/05/01/root-galaxy-s-advance-i9070/#more-18866
There is one problem though, the most important files, that we need, haven't been uploaded yet. I've already searched this group on facebook, and nwrite them to publish those files (kernels), but there was no answer. So I doubt that they even have those rooted kernels. Maybe you could write them too, and lets hope that they will publish kernels soon!
I think they don't really have the rooted kernel.. Cos Samsung haven't even release the opensource k kernel yet.. But yeah, right now I'm stuck.. I have been trying almost every possible way to create the boot.img, including unyaffs and unyaffs2, but keep getting errors... If we can just ask the guys at rootzwiki to port CWM recovery for us, but maybe they need rooted source too..
This would be great if they could build us CWM recovery. I don't think they need kernel source they just need stock recovery, but to get stock recover.img from our phone we need to know here is located. I have pull partitons layout from the phone, but unfortunatly it doesnt tell anything useful. You can see it in the attachment.
whoa...that is great...maybe that could help...i will try to check with other phones, cos it might be that one of this partitions would contain boot.img as well as recovery.img... how exactly you extract this information, using kitchen, perhaps? haha...
No my phone used to be rooted, until I have upgrade it to new firmware (stupid me I know, but I had test firmware before, and had quite few bugs). And I've pulled this from system partition (in /proc folder). But you can also get it with this:
adb shell
cd proc
cat partitions
I can provide some other files, that might be useful. We just need some help from experienced developers, but so far no help was offered. I've been starting threads all over the place, but nothing .
In the attachment are all the files that might help some developer to get us recovery working!
well, after searching throughout the web, I'm starting to think that without the opensource kernel from samsung, it might be quite impossible for us to root this phone... every other imaginable ways to make these system or boot images seemed to require root access... so far samsung had done a very well job in patching those root exploits...
kilsmap said:
well, after searching throughout the web, I'm starting to think that without the opensource kernel from samsung, it might be quite impossible for us to root this phone... every other imaginable ways to make these system or boot images seemed to require root access... so far samsung had done a very well job in patching those root exploits...
Click to expand...
Click to collapse
Yeah I think you are right, but I wish you wer not . Well no we have to wait for samsung to release source code of the kernel.
Ok source code for kernel is now available!!! You can download it from opensource.samsung.com. I will make a thread later, with mirror links! Now lets compile that sh*** !
hahahahaha...at last...i was checking that site every few hours...this would make it!!
I've just made a thread on XDA:
http://forum.xda-developers.com/showthread.php?p=25782811#post25782811
If you managed to compile it before me please PM . I'm just installing linux, but I won't be able to continue until tommorow, cause I do this on work computer .

Adding CWM to my tablet?? (poss dev question)

I have a Zenithink Z282 C91 upgrade tablet on a custom rom and a custom kernel running 1.2ghz with a 2GB recovery data partition, is there a way to add cwm recovery to it?
have you downloaded the cwm app? if you have try installing from there?
or maybe check check around to see if cwm has been ported to your device yet, if its not you may have to do that yourself or ask one of the friendly devs round here
It doesn't work off the app. I can't seem to find that anyone has done it either. How hard is it to do yourself?
Ben36 said:
It doesn't work off the app. I can't seem to find that anyone has done it either. How hard is it to do yourself?
Click to expand...
Click to collapse
im not a dev so im not entirely sure, but i think you might be able to download a zip of cwm for a similar tablet and manually push the files to the right places in your root folders yourself?
so:
1) download a cwm zip for a similar tablet.
2) extract to a folder on your computer.
3)push the files using adb into the correct folders on the root of your device(or use an app such as es file explorer)
whitest0rm said:
im not a dev so im not entirely sure, but i think you might be able to download a zip of cwm for a similar tablet and manually push the files to the right places in your root folders yourself?
so:
1) download a cwm zip for a similar tablet.
2) extract to a folder on your computer.
3)push the files using adb into the correct folders on the root of your device(or use an app such as es file explorer)
Click to expand...
Click to collapse
I don't mean to offend, just inform..but you can't push files into a directory on the device to give it a custom recovery, there's actually a hidden 'recovery' partition that stores what basically amounts to a stripped down kernel, a basic menu and some utilities. In most cases, due to the type of storage and layout of the storage, the recovery has to be specifically made for the device in question, which usually requires that the manufacturer complies with GPL and gives out the kernel source code.
if two given devices are 'close enough' and use the same hardware and mapping, a custom recovery can be used on both devices, but that's not usually the case. your best bet is to check in the development forums for your given tablet to see if a recovery is available, or if someone is working on one.
I did a quick google search and didn't find any custom recoveries for the zenithink, but I really don't know much about the tablet to begin with so I may have searched incorrectly.

[Q] create flashable zip from rom dump?

DEVICE: LG REVOLUTION (VS910V6)
MY RECOVERY PARTITION IS GONE, BUT I DID FIND A ROM DUMP OF THE SHIPPING ROM FOR MY DEVICE. ITS A ZIP FILE. IS THERE SOME WAY THAT I CAN SOMEHOW CREATE A FLASHABLE ZIP FROM THE DUMP FILE TO BE ABLE TO FIX MY PHONE? MY PHONE IS PRETTY OLD. I HAVE TRACKED DOWN A HANDFUL OF DIFFERENT FILES FOR MY PHONE AND I WOULD HAVE FLASHED ANY OF THE OTHER POSSIBILITIES OF COMPATIBLE ROMS, FACTORY FIRMWARE, ETC. THE PROBLEM WITH THAT IS FOR EVERY FILE I FOUND THE DOWNLOAD LINK FOR, IT'S OUTDATED AND DOENS'T WORK ANYMORE. SO I'M HOPING THERE MIGHT BE A POSSIBILITY GOING THIS ROUTE.....? ANY SUGGESTIONS WOULD SURELY BE APPRECIATED!! :fingers-crossed:

Ported Roms for k-Touch in TWRP = invalid zip file!?

Hey all,
So I downloaded hexagon OS for mt6580 and LineaseOS13 for mt6580.. of course installing them gives me a bootlop since they are not ported for the K-touch i10... so I followed a guide to replace the files in those custom roms with the required ones from the stock rom to get them to work. zipped them up, put the zip on the phone, and twrp gives me the "invalid zip file" error when trying to flash them...
help?
@SaucemanBangorang
Isn't the error message "Invalid Zip File Format"?
0
Seppppx said:
1. You used the wrong compression method (most likely.)
You need to set the compression method to "store"
2. Don't port ROMs. Build them from source as they were intended to be. It is much easier to build them than port.
Click to expand...
Click to collapse
Thanks for replying.
I did something dumber, when it zipped, it put the files into a folder, hence the error, re-zipped so it wouldn't do that, and it installed, but the roms of course don't work despite porting them.
2. Building the rom from source sounds way beyond me. Porting meant coping files from the stock rom to the custom rom.. is building a rom easier than that? I actually hate this iteration of the i10 I was given, since it is actually weaker and less functional than my i9.. so I just wanted to see if a better rom would at least make it a usable phone.. I already spent hours flashing and rooting just to get past the stupid trojans/spyware that were installed on the phone.. irritates me that I would have to spend even more time building a rom for it.. especially when it's not a popular phone and said no rom would be of no use to anyone.

Categories

Resources