[Recovery][Script] TWRP and CWM recoveries for ANY custom ROM - Sony Xperia M

For now, you can use Recovery-in-FOTA images! It is better solution, but if it doesn't work for you, you can still use this script.
I am proud to present you recovery script for installing TWRP or CWM recovery on any custom ROM.
Usage:
Download zip with prefered recovery, place it to your sd-card or to internal memory and flash it via your current recovery. Yes, it is very simple. Note: if you want to install it on CM12, which comes with CM recovery, flash it right after flashing ROM or kernel (if kernel doesn't contain working recovery).
Everything is doing on your own risk, so i am not responsible if your device gets bricked or if your cat gets pregnant.
How it works?
Package contains recovery ramdisk, binaries for unpacking and repacking boot image and shell script. Script copies you current boot image (boot.img), runs binary for unpacking it, extracts files from ramdisk, replaces recovery-ramdisk.cpio (which is you recovery) with one in zip, then script packs ramdisk and boot image with already replaced file and flashes new boot.
Thanks to:
@FindYanot for helping with script and linux commands (half of work is done by him)
@Noel Macwan for base for this script (I used his script and binaries for replacing zImage as base for mine, you can find his works here)
@JustArchi for compiling TWRP 2.8.3.0 for our device in ArchiDroid 3.0.1.1
So, the choice is yours.

Download
Download it now and use whenever you want.
PhilZ zip is broken and it recovery is too buggy on new kernels, so don't download it. Choose TWRP or CWM, they work good.
Download from ftp >>>

Reserved

CWM works
I tested CWM script on last fxp build CM12 ROM, it works

PhilZ recovery availabe now!
Download
Choose PhilZ-recovery.zip

FindYanot said:
PhilZ recovery availabe now!
Download
Choose PhilZ-recovery.zip
Click to expand...
Click to collapse
PhilZ is broken, CWM and TWRP worked. log in attachment

Remorcer said:
PhilZ is broken, CWM and TWRP worked. log in attachment
Click to expand...
Click to collapse
I'll try to fix it soon, thanks for report and logcat.

I fixed PhilZ zip, but recovery by itself has screen split bug, so I didn't upload fixed version, we'll remove it until someone fixes it.

How do i install it?

strianugraha said:
How do i install it?
Click to expand...
Click to collapse
Flash via recovery.

sd-ext support in twrp
I know you can access sd-ext card via terminal command or via adb but no problem to add it to GUI
Here is change to ramdisk-recovery.cpio for sd-ext support in twrp:
Code:
--- etc/twrp.fstab.old
+++ etc/twrp.fstab
@@ -6,3 +6,4 @@
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB OTG";storage;wipeingui;removable
+/sd-ext auto /dev/block/mmcblk1p2 flags=display="SD-Ext";storage;wipeingui;removable

Does it work on sony Xperia z3 operating cm12?

LeonidasTurk said:
Does it work on sony Xperia z3 operating cm12?
Click to expand...
Click to collapse
I replied you in private messages, just give me boot.img's with CWM and TWRP recoveries from any custom (not based on stock) ROM.

hi guys.i downloading both recovery but after i want install in recovery of cm, error and say E/: can not install.how to install this recovery on beta3 cm12?

xp7 said:
hi guys.i downloading both recovery but after i want install in recovery of cm, error and say E/: can not install.how to install this recovery on beta3 cm12?
Click to expand...
Click to collapse
CM Recovery doesn't flash zip's, use repacked kernel. BTW, I will post recovery-in-FOTA images soon (it is strange that no one made these for our device). It is better then recovery-in-boot images, because it stays untouched after kernel flashing.

jkkk88 said:
I know you can access sd-ext card via terminal command or via adb but no problem to add it to GUI
Here is change to ramdisk-recovery.cpio for sd-ext support in twrp:
Code:
--- etc/twrp.fstab.old
+++ etc/twrp.fstab
@@ -6,3 +6,4 @@
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB OTG";storage;wipeingui;removable
+/sd-ext auto /dev/block/mmcblk1p2 flags=display="SD-Ext";storage;wipeingui;removable
Click to expand...
Click to collapse
I will look for this if will have enough time.

2All
There is some better solution than this script. Read this thread for more info.

cucumber09 said:
I will look for this if will have enough time.
Click to expand...
Click to collapse
Here you have it for CWM.
Code:
--- etc/recovery.fstab.old
+++ etc/recovery.fstab
@@ -10,6 +10,7 @@
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc wait,check,en
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,barrier=1 wait,c
+/dev/block/mmcblk1p2 /sd-ext auto defaults recoveryonly
/devices/platform/msm_sdcc.3/mmc_host/mmc1 auto auto defaults wait,voldmanaged=sdcard1:auto
And illustration for twrp...

What is difference b/w ur threads script and fota man?

imdkiller said:
What is difference b/w ur threads script and fota man?
Click to expand...
Click to collapse
Script repacks your kernel with new recovery. You need to flash it after every update. Recovery-FOTA replaces your FOTAKernel image without touching your kernel, so you need to flash it just once.

Related

*REQUEST* Firerat's Custom MTD Partitions (resize Data,System and Cache)

can any dev. make this happen for our EVO 4G please? I included a link to the thread were the mod is. This mod enables a person to decide how big the partitions in their phone should be. (ei system, data, cache, etc). Its awesome but I just have it on my hero which i gave to my brother and it wouldn't hurt that everyone could have more space for apps on their phone.
Thanks everyone!!!
http://forum.xda-developers.com/showthread.php?t=754805
I found a dmesg for your evo
# dmesg|awk '/0x.+: "/{ print }'
Code:
<5>[ 4.290466] 0x00003f360000-0x00003ff60000 : "wimax"
<5>[ 4.305419] 0x00003ff60000-0x000040000000 : "misc"
<5>[ 4.306518] 0x000004240000-0x000004740000 : "recovery"
<5>[ 4.312377] 0x000004740000-0x0000049c0000 : "boot"
<5>[ 4.315979] 0x0000049c0000-0x00001a7c0000 : "system"
<5>[ 4.730438] 0x00001a7c0000-0x0000247c0000 : "cache"
<5>[ 4.916748] 0x0000247c0000-0x00003f360000 : "userdata"
it has an extra partition to the g1 ( wimax )
see below for working version v1.5.7
Sounds really great! Thank you, Firerat.
But FR-CustomMTD-v1.5.6-Evo4G.zip is not downloadable to me. The site says its set to private.
Firerat said:
FR-CustomMTD-v1.5.6-Evo4G.zip
that zip contains
73d5ba178ffd702c9b963e9de9b4d5bc FR-recovery-v1.5.6-Evo4G-CustomMTD_S.zip
f468aefb7ad1f86b24c0156fb81a36c2 FR-boot-v1.5.6-Evo4G-CustomMTD_S.zip
89b4e67b87f5337e19c2d7dc95e87055 FR-remove-v1.5.6-Evo4G-CustomMTD_S.zip
Click to expand...
Click to collapse
ywjkid said:
Sounds really great! Thank you, Firerat.
But FR-CustomMTD-v1.5.6-Evo4G.zip is not downloadable to me. The site says its set to private.
Click to expand...
Click to collapse
oops,
http://www.mediafire.com/?0ae7y9sekpb3s
b74d178e7ed698879b555123ea494377 FR-recovery-v1.5.7rc1-CustomMTD_S.zip
331c1b31bbc007fa7c3a9ff01c9301dd FR-boot-v1.5.7rc1-CustomMTD_S.zip
ab946b6b9aa83554c452d3d5face18d4 FR-remove-v1.5.7rc1-CustomMTD_S.zip
its a generic version, which _should_ suit all devices with msm_nand
it collects every partition from dmesg
few little bits I want to do, then I'll bump it up to v2
RC1 is not working for me. After flashing FR-recovery-v1.5.7rc1-CustomMTD_S.zip, my RA-recovery 1.8 is broken and generates errors like
E: Can't find MISC:
E: Can't mount CACHE:recovery/command
E: Can't mount CACHE:recovery/log
E: Can't open CACHE:recovery/log
Firerat said:
oops,
http://www.mediafire.com/?0ae7y9sekpb3s
b74d178e7ed698879b555123ea494377 FR-recovery-v1.5.7rc1-CustomMTD_S.zip
331c1b31bbc007fa7c3a9ff01c9301dd FR-boot-v1.5.7rc1-CustomMTD_S.zip
ab946b6b9aa83554c452d3d5face18d4 FR-remove-v1.5.7rc1-CustomMTD_S.zip
Click to expand...
Click to collapse
ywjkid said:
RC1 is not working for me. After flashing FR-recovery-v1.5.7rc1-CustomMTD_S.zip, my RA-recovery 1.8 is broken and generates errors like
E: Can't find MISC:
E: Can't mount CACHE:recovery/command
E: Can't mount CACHE:recovery/log
E: Can't open CACHE:recovery/log
Click to expand...
Click to collapse
Ok, I think I see the problem
Not at home right now,
But in the mean time you should be able to flash the remove zip and return to stock
Looks like a copy paste fail and I'm excluding userdata what I shouldn't be
May also be escaping when I shouldn't be
If you have problems flashing the remove zip you can mount cache manually via adb shell
( you can also flash_image a standard recovery.img via adb shell )
Thanks. Just reflashed recovery and restore the nandroid and everything is fine. I am glad there is no permanent damage done. Cannot wait for the working version!
Firerat said:
Ok, I think I see the problem
Not at home right now,
But in the mean time you should be able to flash the remove zip and return to stock
Looks like a copy paste fail and I'm excluding userdata what I shouldn't be
May also be escaping when I shouldn't be
If you have problems flashing the remove zip you can mount cache manually via adb shell
( you can also flash_image a standard recovery.img via adb shell )
Click to expand...
Click to collapse
ywjkid said:
Thanks. Just reflashed recovery and restore the nandroid and everything is fine. I am glad there is no permanent damage done. Cannot wait for the working version!
Click to expand...
Click to collapse
new version here
http://www.mediafire.com/?7w9sh54lm3mwi
9074fde94c8e534585da4adaa5e59e14 FR-AutoMTD_partitionPatcher_v1.5.7.tar.bz2
919db3e671d0688af9824f37b16ccc87 FR-boot-v1.5.7-CustomMTD_S.zip
05828d98920540c711e06abe5028388f FR-recovery-v1.5.7-CustomMTD_S.zip
changed the 'remove' option
to revert to the stock MTD layout set system size to 0 in mtdpartmap.txt and flash the recovery patcher
e.g.
echo "mtd 0" > /sdcard/mtdpartmap.txt
Great! now the recovery error is gone and the mod is working on my EVO, beautifully. More than 600M for /data. Thank you so much, Firerat. You're the best!
Code:
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 207.4M 0 207.4M 0% /dev
tmpfs 207.4M 0 207.4M 0% /mnt/asec
/dev/block/mtdblock4 240.0M 195.1M 44.9M 81% /system
/dev/block/mtdblock6 637.6M 374.7M 262.9M 59% /data
tmpfs 8.0M 4.0K 8.0M 0% /app-cache
/dev/block/mtdblock6 637.6M 374.7M 262.9M 59% /cache
PS. It seems /cache and /data now share the same space. It is new to me. Does that mean there is only one size need to specify in mtdpartmap.txt?
Firerat said:
new version here
http://www.mediafire.com/?7w9sh54lm3mwi
9074fde94c8e534585da4adaa5e59e14 FR-AutoMTD_partitionPatcher_v1.5.7.tar.bz2
919db3e671d0688af9824f37b16ccc87 FR-boot-v1.5.7-CustomMTD_S.zip
05828d98920540c711e06abe5028388f FR-recovery-v1.5.7-CustomMTD_S.zip
changed the 'remove' option
to revert to the stock MTD layout set system size to 0 in mtdpartmap.txt and flash the recovery patcher
e.g.
echo "mtd 0" > /sdcard/mtdpartmap.txt
Click to expand...
Click to collapse
ywjkid said:
Great! now the recovery error is gone and the mod is working on my EVO, beautifully. More than 600M for /data. Thank you so much, Firerat. You're the best!
Code:
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 207.4M 0 207.4M 0% /dev
tmpfs 207.4M 0 207.4M 0% /mnt/asec
/dev/block/mtdblock4 240.0M 195.1M 44.9M 81% /system
/dev/block/mtdblock6 637.6M 374.7M 262.9M 59% /data
tmpfs 8.0M 4.0K 8.0M 0% /app-cache
/dev/block/mtdblock6 637.6M 374.7M 262.9M 59% /cache
PS. It seems /cache and /data now share the same space. It is new to me. Does that mean there is only one size need to specify in mtdpartmap.txt?
Click to expand...
Click to collapse
you still need to specify size of cache , the minimum is 2mb
on your phone /cache is actually a bind mount of /data/cache
its there if anything needs to use it, for instance your rom may want to put dalvik-cache in /cache/dalvik-cache
it will actually be on /data, the advantage is that you can make better use of what was free space on /cache
That's indeed a nice advantage. A million thanks. Now I can throw everything in the phone storage without worrying about the space.
Firerat said:
you still need to specify size of cache , the minimum is 2mb
on your phone /cache is actually a bind mount of /data/cache
its there if anything needs to use it, for instance your rom may want to put dalvik-cache in /cache/dalvik-cache
it will actually be on /data, the advantage is that you can make better use of what was free space on /cache
Click to expand...
Click to collapse
Noob tutorial
THIS IS SO COOL. THANK YOU SO MUCH FIRERAT.
Hope this mod helps everyone. Just like it is helping me
Thanks anyone.
TUTORIAL FOR NOOBS
In TERMINAL:
1. for Fresh Evo 3.4.0.1: echo "mtd 210 3" > /sdcard/mtdpartmap.txt *****(you can do less than 210 for cm6 if you desire)*****
2. adb shell reboot recovery
In RECOVERY MENU
1. nandroid backup
2. wipe data/factory reset
3. wipe cache
4. wipe Dalvik-cache
5. flash fr-recovery.zip
6. wipe data/factory reset
7. wipe cache
8. wipe Dalvik-cache
In TERMINAL
1. adb shell reboot recovery
In RECOVERY MENU
1.2*. IF YOU GET A CACHE ERROR DO NOT ALARM IT MEANS SOMETHING WENT WRONG. ALL YOU NEED TO DO IS WIPE DATA, CACHE, AND DALVIK-CACHE AND FLASH fr-recovery.zip and then when it finish flashing - adb reboot recovery - from terminal
1.3** IF YOU DID NOT GET THE ABOVE ERROR GO TO STEP 2
2. flash ROM (or nandroid backup)
3. flash app (I.E. cm6 google apps)
4. flash kernal (if one)
5. flash fr-boot.zip
6. reboot
7. DONE!!! AND ENJOY THANKS TO FIRERAT (DONT FORGET TO THANKS HIM)
If you want to update/install a kernal
In TERMINAL
1. adb shell reboot recovery
In RECOVERY MENU
2. wipe cache
3. wipe Dalvik-cache
4. flash KERNAL
5. flash fr-boot.zip
6. reboot
7. Sit and let EVO turn on
*****for reset partitions--- echo "mtd 0" > /sdcard/mtdpartmap.txt**** (IF YOU WANT TO GO BACK TO STOCK) and flash the FR-AutoMTD_partitionPatcher then flash any ROM you want or NANDROID BACKUP
+++IF I DID ANYTHING WRONG UP THERE FEEL FREE IN CORRECTING ME +++
mrcamposd said:
THIS IS SO COOL. THANK YOU SO MUCH FIRERAT.
Can anyone post a tutorial for noobs?
Or is this the same as for the HERO?
Hope this mod helps everyone. Just like it is helping me
Thanks anyone.
Click to expand...
Click to collapse
I can confirm the process is the same as for the HERO.
mrcamposd said:
THIS IS SO COOL. THANK YOU SO MUCH FIRERAT.
*****for reset partitions--- echo "mtd 0" > /sdcard/mtdpartmap.txt**** (IF YOU WANT TO GO BACK TO STOCK) and flash the FR-AutoMTD_partitionPatcher then flash any ROM you want or NANDROID BACKUP
Click to expand...
Click to collapse
How do I flash this? It doesn't show up in the list of zip files in recovery. I tried renaming it and extracting it but it doesn't look like it's in a flashable format.
antiphon said:
How do I flash this? It doesn't show up in the list of zip files in recovery. I tried renaming it and extracting it but it doesn't look like it's in a flashable format.
Click to expand...
Click to collapse
i think you just need to rename the file's extension to xxxxx.zip (because .zip's are the one you flash in recovery), but then again I have not used that file. So not responsible for damages or anything. Try it at your own risk buddy.
mrcamposd said:
*****for reset partitions--- echo "mtd 0" > /sdcard/mtdpartmap.txt**** (IF YOU WANT TO GO BACK TO STOCK) and flash the FR-AutoMTD_partitionPatcher then flash any ROM you want or NANDROID BACKUP
+++IF I DID ANYTHING WRONG UP THERE FEEL FREE IN CORRECTING ME +++
Click to expand...
Click to collapse
FR-AutoMTD_partitionPatcher , is linux shell script to shoehorn the boot patcher into a rom zip ( so the end user dosn't need to flash the boot patcher , its automagic ) ,, you don't really need it
to get back to stock layout,
do the mtd 0 thing
nand backup
flash the recovery patcher
format system cache and data ( I recommend clockwork recovery )
reboot
nand restore ( providing the backup will fit stock ! )
flash boot patcher
your done
Note, v1.5.7b is newer
Had this working well on my Hero, so I'm looking forward to putting this on my new Evo as well!
Doesn't Calkulin have an evo version posted?
Sent From My HTC Evo 4G Using Tapa Talk Pro!

ext4 extraction from system.sin issues

Hi,
As you probably know, ext4 image can be extracted from system.sin but cannot be mounted. When trying to mount it, it fails with :
[ 1476.821582] EXT4-fs (loop0): bad geometry: block count 262144 exceeds size of device (144631 blocks)
I open this thread just to share what I did around the issue and maybe have some helpful quotes about it
Here is what I did (under linux)
# First create an zero filled file. Size is system partition size (262144 blocks of 4096 each)
dd if=/dev/zero of=/home/xperia/virtualfs bs=4096 count=262144
# Attach file to loopback
sudo losetup /dev/loop0 /home/xperia/virtualfs
# Format it with same features as system partition on phone
sudo mkfs.ext4 -O has_journal,^ext_attr,^dir_index,^flex_bg,^huge_file,resize_inode,filetype,extent,sparse_super,large_file,^uninit_bg,^dir_nlink,^extra_isize -v /dev/loop0
# Write extracted system.sin.ext4 extracted image to loopback
sudo dd if=system.sin.ext4 of=/dev/loop0
# Mount filesystem
sudo mount /dev/loop0 /mnt
It can be mounted and I can have folder structure but I can't work with files. Editing default.prop gives me a non readable file.
But we can go a step ahead as we can now mount the image.
Still some issues have to be worked out.
The poit is, why we cant mount system.img on ICS but we can on GB?
maybe someone can contact with sony t oask
im extracting the .sin to .img like always but its impossible to mount.. what are you using to extract the .sin to a .ext4?
BTW, thanks for the info, i've been trying to modify system.img since ICS appeared.
EDIT: of, ext4 can be extracte with flashtool ~.~
maybe we need to read something from system.partinfo
Yakandu said:
The poit is, why we cant mount system.img on ICS but we can on GB?
maybe someone can contact with sony t oask
im extracting the .sin to .img like always but its impossible to mount.. what are you using to extract the .sin to a .ext4?
BTW, thanks for the info, i've been trying to modify system.img since ICS appeared.
EDIT: of, ext4 can be extracte with flashtool ~.~
maybe we need to read something from system.partinfo
Click to expand...
Click to collapse
Yes Flashtool can extract image from system.sin.
partinfo is partition information used by loader in flashmode to identify where to flash image on phone. (Something like start nand address of system partition)
so, any ideas why ext4 cant be mounted? maybe its encrypted or something..
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Yakandu said:
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Click to expand...
Click to collapse
This solution is already known
But my goal is to be able to mod a system partition without having to flash it before. And more, understand why extracted system image cannot be mounted and how to work this out
oh, ok xD
i didnt know that solution, its new for me
Yakandu said:
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Click to expand...
Click to collapse
Have you already tried flashing this img on your device? I have already tried this solution twice but didn't succeed (@Spectre51 that's why I haven't replied your PM yet). system.img was succesfully created but I got boot loop when I flashed it on my device.
Hi Androxyde,
I figured it out, basically we have to dig further in sin format as new ext4 sins skips part of the file. See my thread for more details.
PS: Thanks for flashtool, it's a great tool!
LeTama
letama said:
Hi Androxyde,
I figured it out, basically we have to dig further in sin format as new ext4 sins skips part of the file. See my thread for more details.
PS: Thanks for flashtool, it's a great tool!
LeTama
Click to expand...
Click to collapse
:good:

[Q] After restart doesnt start

Hi,
About a month I used rom AR and I was aware of her faults (which yesterday revealed that it is not true), that when I restart, phone must be connected to the pc, and start bootloader via fastboot and the Command Promt flash boot.img dissected from ROM. Fortunately ROM, stable, so I followed all the time does not restart.
Yesterday I got a taste for change (and I wanted to get rid of the problem) and I downladed at first 4.4 ROM from xda taktik then 4.3JB and finally cyangen mod 7.2 Problem unfortunately stayed at all the same. When restarting HTC logo flashes and then turns off the display and starts "black" will flash this is over, unless we do the above procedure via the bootloader.
Does anyone an idea how to fix it?
Thnx
Have you format system + data + cache in mount and storage after wipe data cache and dalvik cache? Try this, if not success I think the only way is download the latest ruu and run it. You will be go back to stock. And we can use tools to root and flash custom recovery.
Sent from my Desire HD using Tapatalk
@Pilsner12 what the state of your phone bootloader..?, is that just unlocked with s-on..?, or already s-off..?, and what a custom recovery you used..?
if your phone is just unlocked with still s-on...did you already flashing a boot.img from the rom.zip that you already installed..?
to JJeamy:
bootloader is s-on, with touched clockworkmod 5.8.1.5, ROM cyanogen mod 7.2
if I standartly restart phone, didnt start. I must connect phone to pc, run bootloader, than fastboot and from pc via command prompt "send" boot.img (prepared from cm7.2) than phone restart and start correctly.
to pauleversham:
I will try it again (but I thing everythning expect SD card was formated, wiped, etc..) If I run RUU rom, I lost root permision, or is it possible get rooted RUU?
Pilsner12 said:
to JJeamy:
bootloader is s-on, with touched clockworkmod 5.8.1.5, ROM cyanogen mod 7.2
if I standartly restart phone, didnt start. I must connect phone to pc, run bootloader, than fastboot and from pc via command prompt "send" boot.img (prepared from cm7.2) than phone restart and start correctly.
to pauleversham:
I will try it again (but I thing everythning expect SD card was formated, wiped, etc..) If I run RUU rom, I lost root permision, or is it possible get rooted RUU?
Click to expand...
Click to collapse
so...you mean that you've already/ always flashing boot.img from the rom.zip itself after installing the rom from recovery...and that's mean your phone already can booting normally..right...?, so where's the problem exactly..?
anyway..if the problem you asked is...why you must always do a flashing boot.img manually after installing any new custom rom to boot normally is bacause you're still had s-on flag on your bootloader..that's why bootloader can't give permission to a custom recovery for flashing boot partition..
if you wanna running RUU...then you should be relocked your bootloader first..and that's mean your will return to the stock..so to rooting it again...you must unlocking your bootloader again..
Everytime, when I flash new rom, I have to flash boot.img. I know that. But problem is when I only restart phone, I need to flash boot.img otherwise phone doesnt start.
Today I find out:
- in clockworkmod I try to make a backup. Everything went great (back up boot image, recovery, system, data, android secure, cache) , but at the end I got a message: "No sd-ext found. Skipping backup of sd-ext."
Before AR rom I had many other roms and backing up and restarting without flashing wors fine.
The last hint which you give me is my last solution. I wouldnt lose my root privileges. I had a lot of trouble to get it..
Pilsner12 said:
Everytime, when I flash new rom, I have to flash boot.img. I know that. But problem is when I only restart phone, I need to flash boot.img otherwise phone doesnt start.
Today I find out:
- in clockworkmod I try to make a backup. Everything went great (back up boot image, recovery, system, data, android secure, cache) , but at the end I got a message: "No sd-ext found. Skipping backup of sd-ext."
Before AR rom I had many other roms and backing up and restarting without flashing wors fine.
The last hint which you give me is my last solution. I wouldnt lose my root privileges. I had a lot of trouble to get it..
Click to expand...
Click to collapse
maybe you can try it to installing and using a different custom recovery..like 4ext or twrp..
I would like to try use another custom recovery, but how I can Unistall cwm ? I didnt find any manual..
Pilsner12 said:
I would like to try use another custom recovery, but how I can Unistall cwm ? I didnt find any manual..
Click to expand...
Click to collapse
you don't need to uninstall it..just flashing a new one (like twrp or 4ext) through fastboot..then cwm will be replaced with that..
JJeamy said:
you don't need to uninstall it..just flashing a new one (like twrp or 4ext) through fastboot..then cwm will be replaced with that..
Click to expand...
Click to collapse
could you please post link, where is .zip file. I found only programs on market or .apk..
Are you booting the boot.img or flashing it? Also, recoveries are not zips, they are imgs.
Pilsner12 said:
could you please post link, where is .zip file. I found only programs on market or .apk..
Click to expand...
Click to collapse
This is a link for 4ext touch recovery here.., extract this zip file first to get recovery.img file
This is a link for TWRP touch recovery here..
just flash this recovery.img file through fastboot.. "fastboot flash recovery the_name_of_recovery.img"
JJeamy said:
This is a link for 4ext touch recovery here.., extract this zip file first to get recovery.img file
This is a link for TWRP touch recovery here..
just flash this recovery.img file through fastboot.. "fastboot flash recovery the_name_of_recovery.img"
Click to expand...
Click to collapse
Thank you for links, recovery is alerady fleshed, but problem is not fixed.
(btw: 4ext looks gorgeous )
here is log:
Starting recovery on Thu Feb 20 20:57:47 2014
framebuffer: fd 3 (480 x 800)
Welcome to 4EXT Recovery Touch
by madmaxx82
Preparing boot.. 0I:start load volumes..
Preparing boot.. 0 Preparing boot.. 0 Preparing boot.. 0I:st.f_bsize: 4096
Preparing boot.. 0 Preparing boot.. 1I:st.f_bsize: 4096
Preparing boot.. 1I:st.f_bsize: 4096
Preparing boot.. 1 Preparing boot.. 1 Preparing boot.. 1I:st.f_bsize: 4096
Preparing boot.. 2recovery filesystem table
=========================
0 /tmp ramdisk (null) (null)
1 /recovery emmc /dev/block/mmcblk0p21 (null)
2 /boot emmc /dev/block/mmcblk0p22 (null)
3 /cache ext3 /dev/block/mmcblk0p27 (null)
4 /data ext3 /dev/block/mmcblk0p26 (null)
5 /sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
6 /system ext4 /dev/block/mmcblk0p25 (null)
7 /system_lib ext3 /dev/block/mmcblk0p28 (null)
I:end load volumes..
I:Completed outputting fstab.
Irocessing arguments.
Preparing boot.. 2I:Checking arguments.
Command: "/sbin/recovery"
ro.build.date=Sat Nov 10 16:53:16 CET 2012
ro.build.date.utc=0
ro.product.model=Desire HD
ro.product.brand=htc_wwe
ro.product.name=htc_ace
ro.product.device=ace
ro.product.board=spade
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=HTC
ro.product.locale.language=hdpi
ro.product.locale.region=
ro.board.platform=msm7x30
ro.build.product=ace
ro.com.android.dateformat=MM-dd-yyyy
net.bt.name=Android
ro.serialno=SH18KRX02893
ro.baseband=26.14.04.28_M
ro.carrier=HTC-GER
ro.bootloader=2.00.0029
init.svc.choice_fn=stopped
init.svc.offmode_charging=running
init.svc.detect_key=running
init.svc.adbd=running
init.svc.recovery=running
ext.version="1005.8.0"
ext.feature.version_check=yes
ext.build=0
ext.edition=ng
Ireparing..
Preparing boot.. 2Irep sys1: 0
Preparing boot.. 2Ireparing.. fin
Preparing boot.. 2 Configuring settings..
Your configuration settings:
Using button backlights level: 80
Restore: MD5Sum checks: enabled
Backups: generate MD5Sums: enabled
Backups: mode: tar
Backups: exclude /cache: disabled
Backups: exclude dalvik-cache: disabled
Backups: include lib: enabled
Preserve theme: enabled
Hide useless directories: disabled
Haptic feedback: enabled
Haptic feedback strength: 28
Timezone: configured
Using 24h-hour time format
I:theme propok
Recovery is ready..
I:have tz_data
I:Checking for extendedcommand...
I:Skipping execution of extendedcommand, file not found...
Irocessing 4EXT Control file...
4EXT Recovery Updater v2.4.6b
Processing..
Mounting sdcard..
I:Backup path: /sdcard/clockworkmod/backup/2014-02-20-00.05.02_CyanogenMod7.2.0ace
I:Backup mode: custom
Calculating space needed..
Space needed to complete: 654 MiB
Free space on your sdcard: 8264 MiB
Backing up boot image...
Including /system/lib
Backing up system_lib...
backup mode: tar
Backing up system...
Writing 4EXT info for filesystem ext4
Backing up data...
Writing 4EXT info for filesystem ext3
Backing up .android_secure...
Backing up cache...
Writing 4EXT info for filesystem ext3
Generating md5 sums...
tar: removing leading '/' from member names
-- Installing: /sdcard/Download/4EXT_Recovery_Touch_v1.0.0.6_RC1.zip
Finding update package...
I:Update location: /sdcard/Download/4EXT_Recovery_Touch_v1.0.0.6_RC1.zip
Opening update package...
Installing update...
Installation aborted.
Critical error! Installation aborted!
Canceling pending actions and booting UI
Pilsner12 said:
Thank you for links, recovery is alerady fleshed, but problem is not fixed.
(btw: 4ext looks gorgeous )
here is log:
Click to expand...
Click to collapse
what do you mean problem is not fixed..?, is that you mean you can't installing 4ext recovery..?, or problem about installing custom rom..?
JJeamy said:
what do you mean problem is not fixed..?, is that you mean you can't installing 4ext recovery..?, or problem about installing custom rom..?
Click to expand...
Click to collapse
Problem is if I want restart, or Start phone, I have to connect phone to pc, go to fastboot, and via command prompt send to phone boot.img prepared from my custom rom.
Othervise phone didnt start.
Pilsner12 said:
Problem is if I want restart, or Start phone, I have to connect phone to pc, go to fastboot, and via command prompt send to phone boot.img prepared from my custom rom.
Othervise phone didnt start.
Click to expand...
Click to collapse
that's weird thing..i think there's something wrong with your phone partition..
maybe you wanna try it to return your phone to the stock first by running a RUU..to fix that problem...after that
you can tried to fully rooting again for gaining s-off using AAHK2 script by Phiber2000 from here..
JJeamy said:
that's weird thing..i think there's something wrong with your phone partition..
maybe you wanna try it to return your phone to the stock first by running a RUU..to fix that problem...after that
you can tried to fully rooting again for gaining s-off using AAHK2 script by Phiber2000 from here..
Click to expand...
Click to collapse
Thank you for help, and link with this rooting instruction. I will do that in next week, becouse of time and I will let you know how it ends.
Pilsner12 said:
Thank you for help, and link with this rooting instruction. I will do that in next week, becouse of time and I will let you know how it ends.
Click to expand...
Click to collapse
So yesterday I ran RUU and now restart bug is fixed. I am happy for it!
But I have respect from rooting process. Last time it takes me a lot of weeks..
Please help me!!! i'm italian and i don't speak very well english Language
My HTC Desire hd don't start!!!!!!!!
I have CWM TOUCH 5.8.0.0
In starting my HTC Desire HD is blocked in white screen with green logo HTC
When i start RUU....... .exe (much version) the installation fail: error 140
I hope in you!!!!!!!!!
I have too Asus Padfone 2: with FRAMAROOT :good::good::good::good::good:
Please help me for my HTC Desire HD
I append in this post 4 images of my HTC DHD
Bacchione said:
Please help me!!! i'm italian and i don't speak very well english Language
My HTC Desire hd don't start!!!!!!!!
I have CWM TOUCH 5.8.0.0
In starting my HTC Desire HD is blocked in white screen with green logo HTC
When i start RUU....... .exe (much version) the installation fail: error 140
I hope in you!!!!!!!!!
I have too Asus Padfone 2: with FRAMAROOT :good::good::good::good::good:
Please help me for my HTC Desire HD
I append in this post 4 images of my HTC DHD
Click to expand...
Click to collapse
Please help me

[Multi Boot] Boot Menu

Multiboot for Sony Xperia Z1
How to install boot menu
- download bootmenu_honami.rar, extract folder "bootmenu" to the your internal storage
- put boot.img or kernel.elf to the mainrom folder, make sure thats the same kernel like your primary rom (aka main rom)
- download bootmenu.img from attachment, flash bootmenu.img using fastboot commnd: fastboot flash boot bootmenu.img
Since your bootmenu folder not contain settings.ini (you runing bootmenu at a first time) that will be created easily. You need to complete main step aka main rom creation:
1. (mainrom creation) reboot into bootmenu, chose "patch...", navigate to bootmenu, navigate to mainrom, select mainrom.zip package (make sure boot.img or kernel.elf is the same like your current main rom kernel, and make sure boot.img is in folder mainrom), select mainrom.zip and click "yes". Main rom will be added into boot menu entry. Now reboot again into boot menu and you will see new menuentry, chose these menu to boot into your primary rom!
2. (other roms creation - you can do only if you completed main rom step) reboot into bootmenu, chose "patch...", principe is diferent (there is 2 steps):
- step 1: chose rom zip you want to patch, patch them
- step 2: reboot again into boot menu (new rom entry will be displayed), select these rom to boot, on led blinking press to boot into cwm, now you are in cwm of these rom, now navigate to the same folder where is your package, you will find zip with appended name "patched.zip", chose these patched zip to install trought these recovery, you are done!
If something fail, make sure look into bootmenu folder into main script aka "multiboot.sh", try to fix-improve something Enjoy!
WARNING:
- NEVER RENAME FOLDERS OR ZIP ARCHIVES TO HAVE SPACE IN NAME SINCE BOOTMENU WILL NOT WORK!!! INSTEAD OF WRITING SPACE " " WRITE "_" SOMETHING_LIKE_THIS" !
- there is possibility for your partitions of the main rom to get overwriten if multiboot.sh fail to patch these rom you going to patch, just to let you know! Two click solution is in testing stage so there is probably a lot of bugs! I am not responsible if you lost your private data! So guys if you willing to help, I am waiting. Things need to be improved in multiboot.sh !
Here is full source code of the my bootmenu project -> https://github.com/munjeni/bootmenu_z1_and_z1c
Public License for BOOTMENU and for my Auxiliary Work
You can Distribute my source without my Permissions. Distribution should include my XDA name 'munjeni' and Link to this 'BOOTMENU' thread in your Credits sections/About sections and Properly Visible to Human Eyes. If you use our source and have them modified, you need to make them public to everyone!!! If you not propertly use my source and you not give proper credit, and you not share your modified source code which is based on my source code, I will find you and I will report your post!
And... If You Like my BOOTMENU... Remember to Press...Thanks button
Credits
- @abbychauhan first one who helped me in testing boot menu, thanks!
- @krabappel2548 for kernel with kexec! I have used his kexec kernel in our boot menu for Z1, thanks!
- @HypoTurtle for sugestions, thanks!
- @DooMLoRD for opening my eyes since I had a wrong kernel on my local hard drive
- @SafiXS , @Chocolatetrain, @ntmohammad ...sory if I forgot someone, thanks to all for testing!
"Post Updated on 22/06/2014"
MultiBoot Totally Simplified (Noob Friendly)
Whole Multiboot Procedure for better understanding..
We will do this in two parts procedure as Follows -
Part 1 -
First we will do the mainrom creation. "Mainrom" - The ROM which is Currently installed on your phone.
1. First Download bootmenu_honami.rar, extract folder "bootmenu" to your Phone's Internal storage
2. Put boot.img or kernel.elf (Of the ROM which is Currently installed on your phone) to the mainrom folder (its in the bootmenu folder) of extracted rar file,
make sure thats the same kernel i.e, boot.img or kernel.elf like your primary rom of yours which is currently installed
boot.img - you can extract it from the ROM zip file or Custom Kernel zip file eg. ROM.zip or Doomloards Kernel zip
Kernel.elf - U ll have to convert kernel.sin from ROM zip file to kernel.elf via Flashtool (It has got option to do that)
3. Download bootmenu.img from attachment, flash bootmenu.img using fastboot commend: fastboot flash boot bootmenu.img
4. Reboot into bootmenu, choose "patch...", navigate to mainrom folder (it has to be in the internal memory, inside the folder bootmenu),
select mainrom.zip package (make sure boot.img or kernel.elf is the same like your current main rom kernel, and make sure boot.img or kernel.elf is in folder "mainrom" ),
select mainrom.zip and click "yes". Main rom will be added into boot menu entry.
Now reboot again into boot menu and you will see new Entry Mainrom and Mainrom - CWM, choose Mainrom from Multiboot Menu to boot into your primary rom or Choose mainrom - CWM to go into mainrom Recovery
Part 2 -
Other ROMs creation - You can do it only if you completed main rom step)
1. Reboot into bootmenu, chose "patch...",
2. Navigate to Second ROM ZIP file
(Keep it anywhere in External Memory Card Because you wont be able to access Internal Memory of your Phone via another ROM Recovery due to change of Partitions, All ROMs will be installed on Internal Memory),
Choose ROM zip you want to patch, patch them
3. Reboot again into boot menu (new ROM entry will be displayed), go into ROM - CWM to go into Recovery of the particular ROM,
Now you are in Recovery of New ROM, Go to install ZIP (Installation of ROM) and
navigate to the same folder where you kept the ROM ZIP file (on External Card Memory),
you will find a new zip with appended name "patched.zip",
chose these patched zip to install trough the Recovery,
4. Flash C6902 fix, if u have C6902 Device (keep it On External Memory too),
5. Boot into ROM then Do a REBOOT and again go to Secondary ROM - CWM
6. Flash Gapps (keep it On External Memory too)
7. Flash Any Mod or anything if you wanted to flash for Your ROM (keep it On External Memory too)
Except Custom Kernels or Something that will wipe bootmenu.img ( Its WIP you can check out the Conversations on Page 48/49/50 )
8. Do Reboot
9. In Bootmenu Select the Newly installed ROM.
You are done!
Enjoy!
Common Questions -
1. How many ROMs I can Install?
Answ - http://forum.xda-developers.com/showpost.php?p=53236187&postcount=399
2. How to go from One ROM Partation to Another ROM Partation via File Explorer?
Answ - http://forum.xda-developers.com/showpost.php?p=53318812&postcount=476
3. How to get kernel.elf?
Answ - http://forum.xda-developers.com/showpost.php?p=53234909&postcount=384
and http://forum.xda-developers.com/showpost.php?p=53234988&postcount=386
and http://forum.xda-developers.com/showpost.php?p=53235075&postcount=387
4. How to take Screenshot of CWM?
Answ - http://forum.xda-developers.com/showpost.php?p=53229901&postcount=358
and http://forum.xda-developers.com/showpost.php?p=53230193&postcount=362
5. We get ROM updates now and then how do we do it? If we want to remove The Whole Multiboot Thing or a ROM from Bootmenu and to uninstall it completely from our phone then what is the procedure?
Answ - http://forum.xda-developers.com/showpost.php?p=53076327&postcount=277
and http://forum.xda-developers.com/showpost.php?p=53077937&postcount=281
6. Stock Based ROMs ask to flash the Stripped FTF via flashtools in the END, if we keep Stock based ROMs as Secondary ROMs then how will it work then, it will wipe other ROMs Kernal and bootmenu kernal?
Answ - Its Hard but http://forum.xda-developers.com/showpost.php?p=53150024&postcount=325
and http://forum.xda-developers.com/showpost.php?p=53150187&postcount=326
7. Power Off Charging?
Answ - http://forum.xda-developers.com/showpost.php?p=53144286&postcount=322
8. The partition made by Multi Boot for other ROMs is very small, Why is that? Can it be increased?
Answ - http://forum.xda-developers.com/showpost.php?p=53116039&postcount=313
and http://forum.xda-developers.com/showpost.php?p=53118687&postcount=316
and http://forum.xda-developers.com/showpost.php?p=53118722&postcount=317
9. I want to change the name of "mainrom" and Secondary ROM names in boot menu?
Answ - http://forum.xda-developers.com/showpost.php?p=53107296&postcount=307
10. Gapps on Primary ROM?
Answ - http://forum.xda-developers.com/showpost.php?p=53027261&postcount=240
11. Main ROM Update / MainROM Kernal Change?
Answ - http://forum.xda-developers.com/showpost.php?p=53565558&postcount=571
Complicated and not for noobs, but hope some one do it for you if you are confused! Seccond tut will be more complicated since all ramdisks need to be moded specialy for every each android which you going to boot. I will try to explain
munjeni said:
Complicated and not for noobs, but hope some one do it for you if you are confused! Seccond tut will be more complicated since all ramdisks need to be moded specialy for every each android which you going to boot. I will try to explain
Click to expand...
Click to collapse
Ya this thread really need a helpful Dev. Who will answer all questions.. And Of course not for noobs.. I think i ll scratch my head all night..
Sent from my Micromax A110Q using Tapatalk
@munjeni Is this same as XGo Muilti Boot?That is very harder to install.
Sent from my C6903 using XDA Premium 4 mobile app
Awesome work :good:
Could you please give me some instructions on how to add your multiboot to a host kernel when building from source?
I'm working on a kernel for the z1, and I have krabappel's kexec patch implemented.
Androguide.fr said:
Awesome work :good:
Could you please give me some instructions on how to add your multiboot to a host kernel when building from source?
I'm working on a kernel for the z1, and I have krabappel's kexec patch implemented.
Click to expand...
Click to collapse
Simple extract ramdisk and make boot.img with your kernel! I will upload new version now, version v1.1 (support for booting from booth internal and external sdcard)! Since booting from extrernal sdcard sause some lags if sd cards is not "best speed", recomended is booting from internal sdcard since performance is the same like booting from regular boot! Wait a moment, going to upload new version in next 10 minutes! When I get more free time I will give you preconfigured menu entry with installed CM11 into file partitions so you can multiboot them without needs for lookig into our tutorials, you will simple extract them and boot
New version of the bootmenu is out, enjoy!
Changelog:
- support for booting from booth internal or external sdcard
- fixed bug with reboot timer when there is no rom in settings ini or when there is no bootmenu folder
I'll try to release the multiboot I was working on. It is a lot easier for users then all this editing probably
Sent from my C6903 using xda app-developers app
krabappel2548 said:
I'll try to release the multiboot I was working on. It is a lot easier for users then all this editing probably
Sent from my C6903 using xda app-developers app
Click to expand...
Click to collapse
We all will be very thankful to u
Sent from my Xperia Z1 using Tapatalk
krabappel2548 said:
I'll try to release the multiboot I was working on. It is a lot easier for users then all this editing probably
Sent from my C6903 using xda app-developers app
Click to expand...
Click to collapse
How you think to make that simple? Since external partitions is needed, allso since standard flashable zips will allso need to be modified in updater-script, allso since ramdisks need to be modified, all fstabs need to be modified, DTB need to be appended propertly to the zImage in order to boot them with kexec... a lot of other things, I think easy method is not possible definitely! Maybe a am wrong?
I have 2 ideas now for my boot menu:
- create 3 partitions (probably will open a new thread for sharing diferent partitions layout, for example cache 50mb, cache 100mb, cache 150mb, cache 200mb, system 500mb, system 1gb, system 1.6gb, data 500mb, data 1gb, data 2gb...) so after compresing them to rar size of the archive will be ~100mb
- or maybe we can implement on the fly partitions creation by the updter-script
Problem will be kernel and ramdisk since it need modification. Maybe we can ask devs to include ramdisk and kernel for multiboot in his posts.
I am out of ideas, but I think we need to make automated tool for these things. If you guys have idea please comment!
Tool needed:
- tool for extracting boot image and making zImage-dtb
- tool for extracting ramdisk, making changes needed for boot from loop device, compresing modified ramdisk
- tool for partitions creation with defined size and defined path for puting them to defined folder
- tool for entry in settings.ini creation
Partition creation is easy. There is few steps to create file based partition:
1. first of all - how to calculate size of the partition:
Simple using calculator. Formula is: (size * 1024 * 1024) / 4096
Foe example: you want 500mb partition, ok, formula is: (500 * 1024 * 1024) / 4096
So command for making them with adb will be:
adb shell
mkdir /data/media/0/bootmenu/folder_you_want
dd if=/dev/zero of=/data/media/0/bootmenu/folder_you_want/system.ext4 bs=4096 count=count_from_your_calculation
dd if=/dev/zero of=/data/media/0/bootmenu/folder_you_want/data.ext4 bs=4096 count=count_from_your_calculation
dd if=/dev/zero of=/data/media/0/bootmenu/folder_you_want/cache.ext4 bs=4096 count=count_from_your_calculation
Click to expand...
Click to collapse
2. get UUID of the system partition (need for step 3):
blkid /dev/block/platform/msm_sdcc.1/by-name/system
Click to expand...
Click to collapse
3. format created partiton:
losetup /dev/block/loop1 /data/media/0/bootmenu/folder_you_want/system.ext4
losetup /dev/block/loop2 /data/media/0/bootmenu/folder_you_want/data.ext4
losetup /dev/block/loop3 /data/media/0/bootmenu/folder_you_want/cache.ext4
mke2fs -T ext4 -O has_journal,ext_attr,resize_inode,filetype,extent,sparse_super,large_file,uninit_bg -U paste here your UUID -I 256 /dev/block/loop1
mke2fs -T ext4 -O has_journal,ext_attr,resize_inode,filetype,extent,sparse_super,large_file,uninit_bg -U paste here your UUID -I 256 /dev/block/loop2
mke2fs -T ext4 -O has_journal,ext_attr,resize_inode,filetype,extent,sparse_super,large_file,uninit_bg -U paste here your UUID -I 256 /dev/block/loop3
tune2fs -o journal_data_writeback /dev/block/loop2
tune2fs -o journal_data_writeback /dev/block/loop3
losetup -d /dev/block/loop1
losetup -d /dev/block/loop2
losetup -d /dev/block/loop3
Click to expand...
Click to collapse
Partitions created easily
Note:
These things must be done while you are in bootmenu since I am not sure if mke2fs, blkid and tune2fs tool is available while you are on android! So you can done that in bootmenu via adb!
CWM ramdisk modifications
all fstabs need to be modified, for example fstab.qcom:
Code:
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,encryptable=footer,length=-16384
remove line:
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
Click to expand...
Click to collapse
changed:
Code:
/dev/block/loop1 /system ext4 ro,barrier=1 wait
/dev/block/loop3 /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check
/dev/block/loop2 /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,encryptable=footer,length=-16384
In etc you can see another recovery.fstab, change them like you done for qcom.fstab!
init.rc:
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct D001
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
on boot
ifup lo
hostname localhost
domainname localdomain
Click to expand...
Click to collapse
add:
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct D001
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
on fs
wait /dev/block/platform/msm_sdcc.1/by-name/userdata
mkdir /sde
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata /sde rw wait
exec /sbin/losetup /dev/block/loop1 /sde/media/0/bootmenu/cm11/system.ext4
exec /sbin/losetup /dev/block/loop2 /sde/media/0/bootmenu/cm11/data.ext4
exec /sbin/losetup /dev/block/loop3 /sde/media/0/bootmenu/cm11/cache.ext4
on boot
ifup lo
hostname localhost
domainname localdomain
Click to expand...
Click to collapse
red line "cm11" mean that you have created cm11 folder in boot menu and use these folder for example for booting into cm11! On these "cm11" folder you have created partitons, ramdisks, kernel...etc!
munjeni said:
Problem will be kernel and ramdisk since it need modification. Maybe we can ask devs to include ramdisk and kernel for multiboot in his posts.
Click to expand...
Click to collapse
Yes that will do some work for the people.. Atleast Custom Kernal Devs can include it.
Sent from my Xperia Z1 using Tapatalk
ROM ramdisk modifications
For example CM11 ramdisk.
when you unpack cm11 boot.img, when you unpack ramdisk you will notice 2 ramdisks, one is rom ramdisk and one is recovery ramdisk (ramdisk.cpio and ramdisk.recovery.cpio). Look into previous post for CWM ramdisk modification.
Modification for ROM ramdisk (ramdisk.cpio):
init.rc file:
look for line "mkdir /system", added one line before these line: "mkdir /sde"
fstab.qcom:
the same like you done on CWM ramdisk!
init.qcom.rc:
look for lines:
on fs
mount_all ./fstab.qcom
setprop ro.crypto.fuse_sdcard true
Click to expand...
Click to collapse
add:
on fs
wait /dev/block/platform/msm_sdcc.1/by-name/userdata
mkdir /sde
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata /sde rw wait
exec /sbin/losetup /dev/block/loop1 /sde/media/0/bootmenu/cm11/system.ext4
exec /sbin/losetup /dev/block/loop2 /sde/media/0/bootmenu/cm11/data.ext4
exec /sbin/losetup /dev/block/loop3 /sde/media/0/bootmenu/cm11/cache.ext4
exec /sbin/e2fsck -y /dev/block/loop2
exec /sbin/e2fsck -y /dev/block/loop3
mount_all ./fstab.qcom
setprop ro.crypto.fuse_sdcard true
Click to expand...
Click to collapse
red line "cm11" mean that you have created cm11 folder in boot menu and use these folder for example for booting into cm11! On these "cm11" folder you have created partitons, ramdisks, kernel...etc!
updater script in rom zip modification
For example you want to install cm11 in multiboot, ok, download an rom, for example download CM11 by FXP or one by Cyanogenmod, open zip, find, open and modify updater-script and change all lines:
1. for system:
Code:
.........."/dev/block/platform/msm_sdcc.1/by-name/system"............
change to:
Code:
.............."/dev/block/loop1"..............
2. for userdata:
Code:
............."/dev/block/platform/msm_sdcc.1/by-name/userdata"............
change to:
Code:
..........."/dev/block/loop2"................
3. for cache:
Code:
........"/dev/block/platform/msm_sdcc.1/by-name/cache"..........
change to:
Code:
..........."/dev/block/loop3"...........
4. for boot:
Code:
.........."/dev/block/platform/msm_sdcc.1/by-name/boot".........
change to:
Code:
............"/dev/null"...........
Note:
To understand this step. You doing these modifications since you going to install rom to partitions which you created on your internal sdcard! For example: if you not modify ramdisk, your rom will be installed to your phone partitions instead of one created by you! So to install rom to partitions which you have created, you must modify updater script to point installation to install rom into partitions which you created earlier instead of intalling them to regular partition! If you install rom to regular partitions that mean you will overwrite your main rom and bootmenu, so you will boot into cm11 on reboot instead of buting into multiboot! Hope thing clear?
Creating menuentry for new rom in multiboot (boot menu) settings.ini
Since you created partitions, since you modified ramdsiks, since you created kernel (sorry I removed post entry related to kernel modification... I will instruct you later!), since you modified rom zip which you want to install... you are ready for flashing! Before flashing rom to partitions, you need to add menu entry in settings.ini of the bootmenu!
How to add new rom entry to boot menu:
For example you created all partitons in .../bootmenu/cm11 folder
For example you have system.ext4, data.ext4, cache.ext.4, initrd.gz (modified cm11 ramdisk), and Zimage-dtb (modified CM11 zImage) in cm11 folder
Ok now you can add menuentry to setting.ini:
[rom-1]
menutitle=CM11
kernel=/data/media/0/bootmenu/cm11/zImage-dtb
ramdisk=/data/media/0/bootmenu/cm11/initrd.gz
cmdline=no_need_anymore
Click to expand...
Click to collapse
You are done! Title you have defined in "menutitle" will be displayed in boot menu!
Now you need to boot into cm11. When you boot into cm11 you will get "timing for recovery boot, led light!", if everything is propertly modified in all of the things you will get lucky to see led light where you need to pres volume button to get into recovery! If you enter into cm11 recovery that mean that you are in sucess , Ok now install your modified rom zip package (in these step cm11 will be installed to partitions which you have created earlier) and you are done! Reboot and enjoy cm11 in multiboot! The same steps is for all roms which you want in multi boot! Max roms is 10!
Not for noobs but hope our things is clear now for experienced users?

[Q] help installing ucyan cm 12

yesterday . i downloaded this ucyan cm 12 for my xperia s . and every time when i try to install this rom through CMW and TWRP i get this error
warning: no file_contexts detected filesystem ext4 for /dev/block/mmcblk0p12
and cmw freezes after this error ....
please help .... how to fix this error ?????????????????????????????
P.S : english is not my native language so ignore my mistakes
I have ALMOST the same issue:
I get:
detected filesystem ext4 for /dev/block/mmcb1k0p12
And it's here forever.
Update: After waiting a LOOONG time, I got this:
"ApplyParsedPerms: 1setfilecon of /system/lost+found to ubject_r: system_file: s0 failed: Operation not supported on transport endpoint set_metadata_recursive: some changes failed"
Error executing updater binary in zip ...
Click to expand...
Click to collapse
Re
Maybe first of all you two write the steps performed for flashing Lollipop Roms? I've tried all the Lollipop Roms compiled for SXS and nor,ally I used to do this way:
1. TWRP recovery (but CWM also worked)
Install TWRP recovery in FOTA partition using Terminal apk provided your phone is running on 4.1.2. kernel supporting TWRP recovery. Flash kernel from ROM zip file prior entering TWRP (this step helps avoiding an error like "update binary...").
2. In TWRP recovery - Advanced - wipe everything but sdcard. In Mount section unmount everything but sdcard.
3. Flash the ROM and wipe Cashe&Dalvik
4. Flash appropriate GAPPS, wipe Cashe&Dalvik and reboot.
that's all

Categories

Resources