Flash boot.img with update.zip? - Android Software/Hacking General [Developers Only]

I am making a rom and I would like to flash the filesystems all to ext2 first
And then flashing my ROM files... Is this possible in some way?
Can I flash a boot.img within a update.zip?

Related

How do you switch ROMs?

Is it simply wipe /data /system or do we have to do something like on the captivate and return to stock first?
How about if we switch kernels etc - does the process change?
Thanks
psufan5 said:
Is it simply wipe /data /system or do we have to do something like on the captivate and return to stock first?
How about if we switch kernels etc - does the process change?
Thanks
Click to expand...
Click to collapse
When switching ROMs, the easiest way is to do it with ClockworkMod Recovery. You download the .zip of the ROM you want to your SD card, boot to recovery, wipe data, cache (this step is only necessary when going from one ROM to another, not if you're just updating a ROM), and dalvik cache, choose install zip from SD card, point to the .zip you downloaded and install. If you have a kernel you want to install, then you boot after you flash the ROM, reboot to recovery, and flash the kernel .zip from cwm recovery

[DEV]Dualboot 2013-05-12 - concept for all 2nd-boot roms and new CM10.1 SDCARD rom

After a lot of testing it is time to present "new" way to use dualboot on defy.
How it works.
Stock and custom roms can support different ways to boot a rom. 2nd-init, 2nd-boot and stock.
For dualboot we need 2nd-boot. First we use 2nd-boot to run TWRP recovery from quarx. With TWRP we can mount sdcard as /system.
With a "modded" update script we can install system files to a sdcard partition.
For this you will need 3 primary partitions on your sdcard. First partition fat32, secound partition min. 512 Mb ext3 and 3rd partition min 512 max 2048 Mb. (You can use MiniTool Paritition wizard Home edition http://www.partitionwizard.com/ to create this partitions)
You need to change the /meta-inf/com/google/android/updater-scipt:
NAND
Code:
mount("ext3", "EMMC", "/dev/block/mmcblk1p21", "/system");
ext3 partition, it is the 2nd partition
Code:
mount("ext3", "EMMC", "/dev/block/mmcblk0p2", "/system");
To install the modded zip you have to run the TWRP.
After TWRP boots you can install the "modded" rom zip.
Now we need to install files to boot sdcard rom from your NAND bootmenu.
For this we have to edit the ramdisk from /system/bootmenu/2nd-boot/ramdisk and create a update.zip that install new files to NAND /system.
You have to edit all /system and /data mount points. They have to match with sdcard.
On NAND /system use /dev/block/mmcblk1p21 and /data /dev/block/mmcblk1p25
For SDCARD /system use /dev/block/mmcblk0p2 and /data /dev/block/mmcblk0p3
I use Cygwin (http://www.cygwin.com/) and boottools to edit ramdisk. (sorry can`t remember where i download it)
Now you can boot your rom from sdcard. It is like 2nd-boot.
ROM DEVS can use Aroma Installer to support nand and sdcard install with one zip.
For CM10.1 i edited all files and you can try it.
Check my skydrive folder. /Mobile Phone/CM10.1-2nd-system-for-MS2Ginger
How to install CM10.1 SDCARD if you are running MS2Ginger 5.0
1. install TWRP View attachment 2nd-system-TWRP-NAND.zip
2. set default boot (bootmenu) to 2nd-system
3. reboot --> TWRP should boot now
4. install cm-10.1-20130511-NIGHTLY-mb526-sdcard-gapps.zip
5. reboot to bootmenu and run custom recovery
6. install 2nd-system-boot-cm10.1-2013-05-11.zip
7. reboot and cm10.1 should boot now.
To switch between NAND and SDCARD boot change only default boot in bootmenu.
What sd card are you running this second rom from? class 4 or class 10?
Minimum class 4.
second 10.1 rom from system on sd card running fun!
done it all over again
reserved
reserved
Any idea how we have to change ramdisk to boot a traditional linux distro from sdcard that works with boot folder instead of the android bootmenu folder?
Just changing hbooot config file to the appropriate kernel and init files?
extracting the ramdisks works fine..., putting them back together seems to go wrong
what command do you use to get them fine again?
use packrmadisk
walter79 said:
use packrmadisk
Click to expand...
Click to collapse
Hi Walter, could this work in milestone 2 too?
Enviado desde mi XT925 usando Tapatalk 2
Can I have cm7.2 along with cm10 with this method?

[Q] RECOVERY boot img

I have boot.img file but the format is gosave, how to convert to img file format so that i can flash in my andriod!! help plss thanks

[Q] Save files before flashing

In windows, I'd use a partition; in android, are there any folders (like /boot?) that are not deleted after I flash factory images (wiping data obviously)?
I'd like to know this because I have a lot of music, and don't want to have to re-copy it to my phone every time I flash it. (unfortunately N5 does not support sd cards)
My intention was to copy the music to /smth, will it get wiped?
sfs15 said:
In windows, I'd use a partition; in android, are there any folders (like /boot?) that are not deleted after I flash factory images (wiping data obviously)?
I'd like to know this because I have a lot of music, and don't want to have to re-copy it to my phone every time I flash it. (unfortunately N5 does not support sd cards)
My intention was to copy the music to /smth, will it get wiped?
Click to expand...
Click to collapse
There are only 1 partition which has a filesystem and does not get wiped after the factory reset. But it is only a 16 mb partition with a free space of 10 mb. It is mounted as /persist
bitdomo said:
There are only 1 partition which has a filesystem and does not get wiped after the factory reset. But it is only a 16 mb partition with a free space of 10 mb. It is mounted as /persist
Click to expand...
Click to collapse
No way to chance its size? I really need to backup my music somewhere in the phone and not have to copy it back every time!
sfs15 said:
No way to chance its size? I really need to backup my music somewhere in the phone and not have to copy it back every time!
Click to expand...
Click to collapse
There is, but complicated. Because of its location on the emmc you have to edit 6-8 partitions or more. And if there is something which uses the emmc in raw mode and not by the partitions then you could have problems. You will also lose the ability to flash stock rom.
The whole thing is unecessary if you are using twrp recovery and not cwm, because twrp will not fotmat the /data partition. It will just remove every folder and file except the /data/media/0 folder which contains all the files you have on the internal storage.
bitdomo said:
There is, but complicated. Because of its location on the emmc you have to edit 6-8 partitions or more. And if there is something which uses the emmc in raw mode and not by the partitions then you could have problems. You will also lose the ability to flash stock rom.
The whole thing is unecessary if you are using twrp recovery and not cwm, because twrp will not fotmat the /data partition. It will just remove every folder and file except the /data/media/0 folder which contains all the files you have on the internal storage.
Click to expand...
Click to collapse
You mean that if I install twrp recovery and then flash a stock factory image ( or for instance cyanogenmod 12) I won't lose /data/media/0 folder anymore?
sfs15 said:
You mean that if I install twrp recovery and then flash a stock factory image ( or for instance cyanogenmod 12) I won't lose /data/media/0 folder anymore?
Click to expand...
Click to collapse
No.
If you do factory reset in twrp then it will not delete that folder. It will not protrect you if you flash stock rom with fastboot with wipe.
bitdomo said:
No.
If you do factory reset in twrp then it will not delete that folder. It will not protrect you if you flash stock rom with fastboot with wipe.
Click to expand...
Click to collapse
Flashing without wipe will keep my applications and everything, so it's usually just useless ( not worth ); and flashing with wipe will delete any folders. Are you saying there's no way :/
sfs15 said:
Flashing without wipe will keep my applications and everything, so it's usually just useless ( not worth ); and flashing with wipe will delete any folders. Are you saying there's no way :/
Click to expand...
Click to collapse
Listen. If you use TWRP and do WIPE in TWRP it will not delete /data/media/0 folder. So with twrp you can flash roms with wipes without worrying to lose your music and pictures.
If you flash stock rom with fastoot you lose everything.
If you flash rom with wipe in cwm you lose everything.
bitdomo said:
Listen. If you use TWRP and do WIPE in TWRP it will not delete /data/media/0 folder. So with twrp you can flash roms with wipes without worrying to lose your music and pictures.
If you flash stock rom with fastoot you lose everything.
If you flash rom with wipe in cwm you lose everything.
Click to expand...
Click to collapse
Nice! This is very useful, I didn't know it was possible to flash factory images through a recovery; so I'll just have to move my music there and it'll stay forever. Just asking now, what will happen to the recovery (which should be stored in /recovery?) if I flash with fastboot, will it get wiped aswell? Thank you so much for your answers
sfs15 said:
Nice! This is very useful, I didn't know it was possible to flash factory images through a recovery; so I'll just have to move my music there and it'll stay forever. Just asking now, what will happen to the recovery (which should be stored in /recovery?) if I flash with fastboot, will it get wiped aswell? Thank you so much for your answers
Click to expand...
Click to collapse
That /data/media/0 folder is the folder of the internal storage. So your music is already there. To flash stock rom in twrp recovery you will need a flashable zip version of the stock rom. These does not contains recovery image so twrp will persist.
You cant flash stock rom from google's site in twrp.
bitdomo said:
That /data/media/0 folder is the folder of the internal storage. So your music is already there. To flash stock rom in twrp recovery you will need a flashable zip version of the stock rom. These does not contains recovery image so twrp will persist.
You cant flash stock rom from google's site in twrp.
Click to expand...
Click to collapse
Ah well it's not a solution then.. The /recovery folder gets wiped with fastboot -w?
sfs15 said:
Ah well it's not a solution then.. The /recovery folder gets wiped with fastboot -w?
Click to expand...
Click to collapse
Its complicated. That recovery folder if it exists, on stock roms there arent any folder called recovery, is a temporary folder. It is extracted from the kernel's ramdisk. As the its name says it is a ramdisk so if you turn off your phone it is gone and all its content.
Get a stock rom in a flashable zip. Do a wipe in twrp and flash the stock rom.
bitdomo said:
Its complicated. That recovery folder if it exists, on stock roms there arent any folder called recovery, is a temporary folder. It is extracted from the kernel's ramdisk. As the its name says it is a ramdisk so if you turn off your phone it is gone and all its content.
Get a stock rom in a flashable zip. Do a wipe in twrp and flash the stock rom.
Click to expand...
Click to collapse
Yeah, I think I'll do so, thanks a lot

Convert a TWRP Backup Ext to a F2FS compatible Format (Android 5.1.1) ?

Hi,
I use a Stock 5.1.1 Android Rom on my S6 Edge LDU with some selfmade modifications (Debloat, Kernel Upgrades etc.).
Flashed a new Kernel (F2FS compatible) but my Rom seem's to be not compatible with F2FS because it get's always stuck on Boot Loop.
I tryed the following way:
Create a Flashable Zip -> http://forum.xda-developers.com/showthread.php?t=2746044
And converted it to F2FS -> http://forum.xda-developers.com/galaxy-s2-plus/development/linux-ext-to-f2fs-rom-converter-t2840303/page2
...but i always get the Device not Compatible error...
Is there anyway to Convert my TWRP Backup to a F2FS compatible format ?
Thanks
http://forum.xda-developers.com/showthread.php?p=55476692
Sent from my SM-G920W8 using Tapatalk
As far as I know, probably not. F2fs is a type of flash file system, you can format partitions with this type of file system which would be specific to that partition. Because when you back up from twrp, the backup isn't in a particular flash file system format, it's not a partition to be able to convert it plus going from one flash file system to another completely wipes the that partition.
Sent from my SM-G920F using XDA-Developers mobile app
Yeah, I wasn't really sure what the point was. The backup's an archive of files, and making it a flashable zip doesn't make it a ROM. Files will restore to whichever FS is on the device.
Sent from my SM-G920W8 using Tapatalk

Categories

Resources