Converting factory images to recovery-flashable zips - Nexus 5 Q&A, Help & Troubleshooting

Hi,
I want to try L developer preview with multirom, but I need to convert the factory image to a normal zip which can be flashed trough recovery.
Can anyone point me to a tutorial on how to do that?

As a linux user I would use smg2img to convert the system image to raw then I would mount that as ext4 and extract the folders and put them in an existing flashable zip.
Sent from my Nexus 5 using Tapatalk

Bronto9 said:
Hi,
I want to try L developer preview with multirom, but I need to convert the factory image to a normal zip which can be flashed trough recovery.
Can anyone point me to a tutorial on how to do that?
Click to expand...
Click to collapse
you would need to build/compile it like everyone else does.

I thought that someone mentioned yesterday in one of the 1,000s of I/O threads, that MultiRom wouldn't be supported yet bc it is kernel based or someting like that. Not sure what the kernel is on the L, but you may want to ask the MultiRom devs if this is even possible at this point before you flash and get into toruble. Saves you some headache, hopefully.
Edit: @rootSU @simms22
We seem to be all on the same page here. lol. Good work guys. :highfive:

Yes, do not flash to MutliROM.
http://forum.xda-developers.com/showpost.php?p=53699487&postcount=1204

Just an update, you can flash to MultiROM now.
http://forum.xda-developers.com/showpost.php?p=53707461&postcount=1213

rootSU said:
As a linux user I would use smg2img to convert the system image to raw then I would mount that as ext4 and extract the folders and put them in an existing flashable zip.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
And then we end up with around 3 "ROM" threads of the same thing in Development section lol

danarama said:
As a linux user I would use smg2img to convert the system image to raw then I would mount that as ext4 and extract the folders and put them in an existing flashable zip.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I also want to know about this. Can you give some guides? Also I want to know is it possible to flash my custom building from aosp?

popoalex said:
I also want to know about this. Can you give some guides? Also I want to know is it possible to flash my custom building from aosp?
Click to expand...
Click to collapse
Somethign like this:
http://muzso.hu/2012/08/10/how-to-p...nd-userdata.img-from-an-android-factory-image

Related

ADB And other questions

Hello. I've used ADB to extract from the system folder the hole files of my android. I would like to know if is possible for me to make a ROM from there.
Also i would like to ask if i can use the META-INF and boot.img wich is on other roms into this one, in order to create a zip file ready for use of flasshing. Thanks
jgcaap said:
Hello. I've used ADB to extract from the system folder the hole files of my android. I would like to know if is possible for me to make a ROM from there.
Also i would like to ask if i can use the META-INF and boot.img wich is on other roms into this one, in order to create a zip file ready for use of flasshing. Thanks
Click to expand...
Click to collapse
It may be possible but certainly not recommended.
This is actually no different than taking the /system folder from the rom that you had flashed.
The best way is compiling your rom from source (which of course requires Linux).
The problem with using another rom's boot.img is that the kernel and drivers may not necessarily match those called by those in /system which may cause a lot of errors and instability that is assuming you can get it to boot.

[Q] How to make a zip to install apk on recovery mod?

Hi there, i read some thread about this, but really i dont understand what to do for make a flasheable zip...
Can someone take a moment for this request...
Thnx in advanced for read this
blackgf said:
Hi there, i read some thread about this, but really i dont understand what to do for make a flasheable zip...
Can someone take a moment for this request...
Thnx in advanced for read this
Click to expand...
Click to collapse
wassup, well i think your talking about different things. The apks can be installed any time in the system. the files for a flashable system in recovery mode are system.img.
Now some apks can be intalled by comand promp pushing by code but i really dont remember the exact code lol. But i think is over here in the xoom forum.
now some apks in zip mode just need to be stored no zipped, instead of check the option "compress" look for the one named "Store" that makes a file zip but the files are inside uncompresed, that why most of people can't install apks at first.
hope this helps in something.
See ya!
I think you are looking at how to make your own flashable zips for CWM.
This link here from MODACO was like the first result in google.:
http://android.modaco.com/topic/344906-how-to-create-a-flashable-zip-for-cwm/
It's a pretty decent guide, and it will allow you to install apk's from CWM if you don't want to install them normally.
not too sure but...
I think there is a new program in the Dev. board called fruitcake maker. Says it backs open boot.img and system.img and rolls it into an update.zip . I don't know if that's what you're really looking for.
intensus said:
wassup, well i think your talking about different things. The apks can be installed any time in the system. the files for a flashable system in recovery mode are system.img.
Now some apks can be intalled by comand promp pushing by code but i really dont remember the exact code lol. But i think is over here in the xoom forum.
now some apks in zip mode just need to be stored no zipped, instead of check the option "compress" look for the one named "Store" that makes a file zip but the files are inside uncompresed, that why most of people can't install apks at first.
hope this helps in something.
See ya!
Click to expand...
Click to collapse
Thnx for your replay, yes, i see the adb commands in some threads but i really want to do my flashable zips for CWM.
Delgoth said:
I think you are looking at how to make your own flashable zips for CWM.
This link here from MODACO was like the first result in google.:
http://android.modaco.com/topic/344906-how-to-create-a-flashable-zip-for-cwm/
It's a pretty decent guide, and it will allow you to install apk's from CWM if you don't want to install them normally.
Click to expand...
Click to collapse
Thnx man this is what i need! i try to search in some threads and forums but i didnt know how to search.

flashable zip to apk??

i am newbie so dont mind if i ask silly questions since i dont know much about this apk and flashable zips. i want to install sony xperia s keyboard on my tf300 , there is a flashable zip for that available , so my doubt is
is there any way that we can convert the flashable zip into apk so that we can install it directly as an app on side loading without rooting or bl unlocking etc stuff.??
[email protected] said:
i am newbie so dont mind if i ask silly questions since i dont know much about this apk and flashable zips. i want to install sony xperia s keyboard on my tf300 , there is a flashable zip for that available , so my doubt is
is there any way that we can convert the flashable zip into apk so that we can install it directly as an app on side loading without rooting or bl unlocking etc stuff.??
Click to expand...
Click to collapse
That's a good question. I'm not familiar with development, but I will make a guess that it is not possible - reason I say that is I found even with root, coping files to /system resulted in error, even after setting the mount as read-write. Flashing can put files in there without actually getting into the os so that might be why its not possible, but someone else feel free to clarify further.
Sent from my ASUS Transformer Pad TF300T using xda app-developers app
you should have the apk in the zip file. But when you put it in the system app folder by hand you also have to give the apk the needed rights. So its beter you choose the simple flash a zip way.

[Q] Going from Franco's Kernel to experimentalX Kernel

Hi there
I've got a quick question: Right now I'm using Franco's Kernel with the stock 4.4.2 ROM. I also want to test experimentalX (i heard it's a tad snappier). Is it correct that instead of flashing from Franco directly to experimentalX, I install the stock kernel again with TWRP. After that i can flash to experimentalX.
I also use Xposed with a few modules. Is that going to be a problem?
Cheers!
2mnyshp said:
Hi there
I've got a quick question: Right now I'm using Franco's Kernel with the stock 4.4.2 ROM. I also want to test experimentalX (i heard it's a tad snappier). Is it correct that instead of flashing from Franco directly to experimentalX, I install the stock kernel again with TWRP. After that i can flash to experimentalX.
I also use Xposed with a few modules. Is that going to be a problem?
Cheers!
Click to expand...
Click to collapse
Yes You can directly flash experimental X from FRANCO kernel ...
Try yourself and tell us whether it gives a problem or not ?!!! :sly:
Sent from my Nexus 5 using Tapatalk
ok thanks! I'll try it this evening
rahil3108 said:
Yes You can directly flash experimental X from FRANCO kernel ...
Try yourself and tell us whether it gives a problem or not ?!!! :sly:
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
2mnyshp said:
Hi there
I've got a quick question: Right now I'm using Franco's Kernel with the stock 4.4.2 ROM. I also want to test experimentalX (i heard it's a tad snappier). Is it correct that instead of flashing from Franco directly to experimentalX, I install the stock kernel again with TWRP. After that i can flash to experimentalX.
I also use Xposed with a few modules. Is that going to be a problem?
Cheers!
Click to expand...
Click to collapse
You can be sure about flashing the stock boot.img first simply looking at the zip of your already installed kernel.. If the zip includes boot.img file you should flash the stock boot.img first, then your new custom kernel.
if the zip just includes kernel.img then you can flash your custom kernel over it safely.
Xposed isn't related to the kernel flashing, it won't cause any issue
Inviato dal mio Nexus 5 utilizzando Tapatalk
Hi,
Have you read the OP of ElementalX kernel?
NOTE: If you have been using a different custom kernel, please reflash your ROM without wiping data prior to installing this kernel. This will ensure you have all the necessary system files and that customizations from other kernels do not interfere.
Click to expand...
Click to collapse
With Francisco's kernel some system files are modified so better is to dirty flash your rom or at least the stock kernel before...
Just in case for the stock kernel: http://forum.xda-developers.com/showthread.php?t=2518816.
EDIT: too late...
OK, that's the way I would've done it; I put the stock kernal zip on my phone, flash that with TWRP and after that flash ElementalX. I'm not sure about the dirty stock rom flash: Can i just extract the system.img from the official android hammerhead download, put the img on my phone and flash that over my current rom?
Sorry for these trivial questions but the answers to such topics in other threads are sometimes a bit unclear.
Re,
If you have already flashed the stock kernel (so the boot.img) it should be enough... But Francisco's kernel rename some system files like /system/lib/hw/power.msm8974.so or /system/bin/thermal-engine-hh so with a dirty flash of your current rom all the files are replaced (and you won't loose anything, just wipe Dalvik cache and cache partition, just in case then reflash your rom).
Check if the files I mentioned don't have a .bak extension (with a file explorer follow the path above), if not all is fine. If yes, and if you are convenient, delete the .bak extension by yourself.
If you are not convenient with this (I mean delete some extension in system files), dirty flash your rom, reboot (as always just in case, to be sure, etc...), flash your new kernel... And you're good to go!
viking37 said:
Re,
If you have already flashed the stock kernel (so the boot.img) it should be enough... But Francisco's kernel rename some system files like /system/lib/hw/power.msm8974.so or /system/bin/thermal-engine-hh so with a dirty flash of your current rom all the files are replaced (and you won't loose anything, just wipe Dalvik cache and cache partition, just in case then reflash your rom).
Check if the files I mentioned don't have a .bak extension (with a file explorer follow the path above), if not all is fine. If yes, and if you are convenient, delete the .bak extension by yourself.
If you are not convenient with this (I mean delete some extension in system files), dirty flash your rom, reboot (as always just in case, to be sure, etc...), flash your new kernel... And you're good to go!
Click to expand...
Click to collapse
Thanks! And for the dirty flash i can use the System.img which i extracted with TWRP after i cleaned the dalvic cache, right?
2mnyshp said:
Thanks! And for the dirty flash i can use the System.img which i extracted with TWRP after i cleaned the dalvic cache, right?
Click to expand...
Click to collapse
Re
I don't understand what you mean here, you are on full stock rom? You have not flashed a rom from a zip file?
viking37 said:
Re,
If you have already flashed the stock kernel (so the boot.img) it should be enough... But Francisco's kernel rename some system files like /system/lib/hw/power.msm8974.so or /system/bin/thermal-engine-hh so with a dirty flash of your current rom all the files are replaced (and you won't loose anything, just wipe Dalvik cache and cache partition, just in case then reflash your rom).
Check if the files I mentioned don't have a .bak extension (with a file explorer follow the path above), if not all is fine. If yes, and if you are convenient, delete the .bak extension by yourself.
If you are not convenient with this (I mean delete some extension in system files), dirty flash your rom, reboot (as always just in case, to be sure, etc...), flash your new kernel... And you're good to go!
Click to expand...
Click to collapse
viking37 said:
Re
I don't understand what you mean, you are on full stock rom? You have not flashed a rom from a zip file?
Click to expand...
Click to collapse
yes, stock 4.4.2 only with a custom kernel (franco's as of now)
Yes, or at least just take a look at the files I mentioned following the path with a file explorer to see is there is still not the .bak extension. And after flashed ElemantalX kernel, obviously.
As far as I know it should be the only modified system files, I mean renamed since in Francisco's kernel they are not used, that "could" caused issues...

[Q] How to create a Google Apps flashable zip from the stock ROM ?

From CM Gapps page it says
It is possible to perform a "backup" of the Google Apps on your device and then "restore" them, but this does take additional steps which are not covered here.
Click to expand...
Click to collapse
I'd like to know how can I do this.
I've searched all across the forum but had no luck. It looks like some kind of trade secret.
I know that it's not just a matter of pulling the apk files. Because I can see that the zip has .apk, .jars, .so, configuration and certificate files.
I'm guessing this is done by extracting the files from a system.img.
But how is this done?
Is there some script available to build a gapps zip from a system.img file?
Another thing is that my OnePlus phone doesn't has an official LP update yet (although CM12 and their gapps work fine) so I suspect this would have to be done using the stock ROM of another device, maybe a Nexus. Is this correct?
Any help is appreciated.
Thanks

Categories

Resources