[Q] How to modfify boot.img for dual boot - Android Q&A, Help & Troubleshooting

Hi.i'm a newbie sorry for that. and i'm turkish i dont now english well sorry for that. I'm using dual rom. one is in my internal sd other one is in sdcard (class 10 ). first is booting from default boot. second is booting from recovery(i modified boot.img and flashed as recovery). When i need recovery i'm using my own scripts they can flash boot.img to boot partition or recovery partition. also i modified cwm and twrp for flashing zip to second rom.I want to use this two roms and recovery at the same time but unfortunately there isn't 3 partitions. Can i modify boot.img for asking like "Which rom you want to use?". so i can choose which rom i want to boot.
Sorry for bad english it seems complicated . i hope you understand
Thanks

Related

[Q] some noob's questions

Hi all,
I'm trying to understand how a mobile rom is partitioned and using adb and fastboot i have understood this:
There are 3 partition
-recovery (where work CWM or other recovery software)
I can flash a recovery software via fastboot, righ?
-boot :
I"m not sure of this, but should be the partition of the kenerl? Pls correct me if i am wrong
-other partition:
For system apk ?
This is what i think, pls help me to understand better my rom partitions
After this:
- if i flash i kenerl i modify boot partition (i'm pretty sure of this)
- if i flash a recovery , modify recovery obviously
- if i flash a rom what really modify? Q.Q
Ok last noon question..
How to do a nandroid backup?
it's enough the CWM backup
Or is a backup from adb?
And from adb how to backup ?
It'd enough
"./adb shell backup " ?
How someone have a bit of time to answer to me
Thank u all
Yes, boot is the kernel... When you install a ROM, you modify your /system partition. To make a nandroid backup just use cwm.
Sent from my HTC branded muffin...

[Beginner question]What exactly is the custom boot.img needed to root this phone?

Beginner question
I've already rooted the Redmi using a none-TWRP guide.
But for every other guide there is a mention of: making a custom boot.img either by using Android Image Kitchen, flashing something called Universal boot.img, or flashing different versions of TWRP (alka, cofface) that solves the boot.img problem.
However I haven't found an article that explains what boot.img is and why it's a problem for this phone, since flashing my moto only required TWRP + Supersu. Also, it wasn't mentioned at all in the guide I followed.
Sorry if this is pretty obvious, I'm wondering if I missed a pretty big post somewhere.
UniAyeDee said:
Beginner question
I've already rooted the Redmi using a none-TWRP guide.
But for every other guide there is a mention of: making a custom boot.img either by using Android Image Kitchen, flashing something called Universal boot.img, or flashing different versions of TWRP (alka, cofface) that solves the boot.img problem.
However I haven't found an article that explains what boot.img is and why it's a problem for this phone, since flashing my moto only required TWRP + Supersu. Also, it wasn't mentioned at all in the guide I followed.
Sorry if this is pretty obvious, I'm wondering if I missed a pretty big post somewhere.
Click to expand...
Click to collapse
+99 points for asking this question .
As per my knowledge the main problem lies in the boot.img file of MIUI roms because when you are flashing the TWRP you are messing with phone's orignal partition pattern,the boot.img's of MIUI rom checks evrytime if there is any tampering in phone's partition and as you know by flashing TWRP you tampered already , so as result your phone won't boot and gets in bootloop.
So to solve this problem devs developed some methods either you can make a cooked boot.img and flash it evrytime you get a new update to prevent bootloop,
Or you can flash lazyflasher.zip via twrp evrytime after installing new MIUI rom which will patch boot.IMG itself,
Or you can use cofface based recoveries which have lazyflash patch inbuilt and will patch the boot.IMG file evrytime you flash a MIUI rom.
NVDX11 said:
+99 points for asking this question .
As per my knowledge the main problem lies in the boot.img file of MIUI roms because when you are flashing the TWRP you are messing with phone's orignal partition pattern,the boot.img's of MIUI rom checks evrytime if there is any tampering in phone's partition and as you know by flashing TWRP you tampered already , so as result your phone won't boot and gets in bootloop.
So to solve this problem devs developed some methods either you can make a cooked boot.img and flash it evrytime you get a new update to prevent bootloop,
Or you can flash lazyflasher.zip via twrp evrytime after installing new MIUI rom which will patch boot.IMG itself,
Or you can use cofface based recoveries which have lazyflash patch inbuilt and will patch the boot.IMG file evrytime you flash a MIUI rom.
Click to expand...
Click to collapse
Thanks, clears things up. I think I've heard of tampering before but for some reason it wasn't a problem on the moto.
Is there an article or something I can read?
UniAyeDee said:
Thanks, clears things up. I think I've heard of tampering before but for some reason it wasn't a problem on the moto.
Is there an article or something I can read?
Click to expand...
Click to collapse
Yea i know what you are saying,previously i had xperia devices there wasn't a problem too but xiaomi phones have some diff. Methods i think,actually there is not an article about this thing but i am sure i had read that in some developer's post.
UniAyeDee said:
Beginner question
I've already rooted the Redmi using a none-TWRP guide.
But for every other guide there is a mention of: making a custom boot.img either by using Android Image Kitchen, flashing something called Universal boot.img, or flashing different versions of TWRP (alka, cofface) that solves the boot.img problem.
However I haven't found an article that explains what boot.img is and why it's a problem for this phone, since flashing my moto only required TWRP + Supersu. Also, it wasn't mentioned at all in the guide I followed.
Sorry if this is pretty obvious, I'm wondering if I missed a pretty big post somewhere.
Click to expand...
Click to collapse
Update:
The system is known as "dm-verity"
Which enables verfying boot partiton evrytime a system boots if there is any modification.
It is included after 4.4 kitkat for security purpose.
Miui is using Boot.img with enabled dm-verity check.
So after rooting or flashing twrp phone won't boot.
So,what lazyflasher does is disables it.which is inbuilt part of cofface based recoveries.
Read more on dm-verity:
https://source.android.com/security/verifiedboot/
Custom super su from somewhere which roots boot via patch. Flash with twrp

[F3112/F3116][TWRP][3.0.2-6][PORT] TWRP recovery for XA Dual Sim

Hi all,
I'm happy to share my TWRP 3.0.2-6 recovery, I ported it from the Elephone P9000. It's for Dual Sim only, please don't ask me for other models (Ultra inclued) I don't have enought time to build them all for now.
I think you just have to change the kernel with Carliv Image Kitchen to port it to your phone (never tested with this easy way), use my released recovery for your model as base for porting, same way for Ultra. Please report and share if working
In this version I fixed partition, you are able to backup and restore all 31 partitions ( except for Cache), all ext4 partitions can be mounted rw (be careful at what you are doing!!). And I applied a new theme (multilang).
Unlocking /data with password is not working.
Flash it with Fastboot.
Download:
https://mega.nz/#!9g53VJjC!1d3Aat3FMD9azFb6REFSj266sXkSI78tTetrZWZplQo
See you !
EDIT: Added screenshots
awww cant wait to try :good::good:
btw, do you have any tuts for building custom rom from the stock one?
caosugai said:
awww cant wait to try :good::good:
btw, do you have any tuts for building custom rom from the stock one?
Click to expand...
Click to collapse
No tuts for the XA, you can try some kitchens like "Assayyed kitchen" to edit the rom. Try guides for MTK devices (64bits) or CM/AOSP. But nothing is made for XA, use them as base.
i dont ask for specialized XA, just xperia rom in general
and can i use the same boot.img of xx.73 for the new rom xx.81?
caosugai said:
i dont ask for specialized XA, just xperia rom in general
and can i use the same boot.img of xx.73 for the new rom xx.81?
Click to expand...
Click to collapse
For Q&A other than TWRP 3.0.2-6 release it's here:
http://forum.xda-developers.com/xperia-xa/help/qa-t-template-thread-sony-xperia-xa-t3479938/page1
Thank you
Help...
rrvuhpg said:
Hi all,
I'm happy to share my new TWRP 3.0.2-6 recovery, I ported it from the Elephone P9000. It's for Dual Sim only, please don't ask me for other models (Ultra inclued) I don't have enought time to build them all for now.
I think you just have to change the kernel with Carliv Image Kitchen to port it to your phone (never tested with this easy way), use my released recovery for your model as base for porting, same way for Ultra. Please report and share if working
In this version I fixed partition, you are able to backup and restore all 31 partitions ( except for Cache), all ext4 partitions can be mounted rw (be careful at what you are doing!!). And I applied a new theme (multilang).
Unlocking /data with password is not working.
Flash it with Fastboot.
Download:
https://mega.nz/#!9g53VJjC!1d3Aat3FMD9azFb6REFSj266sXkSI78tTetrZWZplQo
See you !
EDIT: Added screenshots
Click to expand...
Click to collapse
Hi bro, how to boot into recovery on f3116, i use adb and button but i can't, phone restart and not boot into recovery.
ahero123a said:
Hi bro, how to boot into recovery on f3116, i use adb and button but i can't, phone restart and not boot into recovery.
Click to expand...
Click to collapse
HI, it will not boot to recovery if you have a stock boot
Download the rootpack for Dual Sim and flash the boot.img first.
Fastboot commands are:
"fastboot flash boot boot.img"
"fastboot flash recovery recovery.img"
without quotes.
Change the name of the .img if needed.

Convert temporary CWM zip into permanent (modifying boot.img)

Hi all! I need help replacing stock recovery from boot.img with the one contained in the CWM.zip file.
A little introduction:
I just want to install CWM onto miy device (Samsung Galaxy Young TV, S5367, Broadcom BCM21553 chipset) which has no CWM/TWRP recovery made.
This device have the kernel and recovery into one partition (boot) which I can modify by unpacking&repacking the boot.img and flashing through Odin.
The problem is, that only one CWM was made for this device, and it's usable as a temporary session (flashing CWM.zip through stock recovery).
I want to replace the stock recovery contained into the boot's ramdisk with the one in cwm.zip, but how can I do that? I've tried just replacing the files but obviously it didn't work (CWM recovery boots, but shows a lot of mounting-related errors).
Any help is appreciated!

WIFI not toggling on after installing only TWRP

I unlocked bootloader (critical aswell) today and installed twrp on my A3. The device is NOT rooted
Weird thing is I can't use my wifi anymore, anytime I try to toggle it on it just jumps back.
Anyone knows what caused this and how I can fix it?
felloguard123 said:
I unlocked bootloader (critical aswell) today and installed twrp on my A3. The device is NOT rooted
Weird thing is I can't use my wifi anymore, anytime I try to toggle it on it just jumps back.
Anyone knows what caused this and how I can fix it?
Click to expand...
Click to collapse
Did you flash any boot.img when installing twrp? Or after you installed twrp?
If you did that is more than likely the problem. Flash original stock boot.img from the same security patch date as your firmware and flash it in twrp and then flash twrp installer afterwards
It seems your boot.img corrupted. If you format data and wipe dalvik cache data and flash stock rom you will succeed i think
---------- Post added at 10:22 PM ---------- Previous post was at 10:18 PM ----------
https://c.mi.com/oc/miuidownload/detail?device=1900372
download official xiaomi mi a3 rom here. and flash it via pc and you will have brand new stock rom. Try it if you fail i will help you when i have free time
garylawwd said:
Did you flash any boot.img when installing twrp? Or after you installed twrp?
If you did that is more than likely the problem. Flash original stock boot.img from the same security patch date as your firmware and flash it in twrp and then flash twrp installer afterwards
Click to expand...
Click to collapse
I was stupid and thought I did it without a boot image untill I checked all of my commands again.
I used fastboot flash boot twrp-3.3.1-15-laurel_sprout-mauronofrio.img .
My phone was on V10.3.9.0 EUropean. But that image file is for twrp or is it also a boot.img? Not sure if this caused the problem? I'm very new to all of this so how can I find a stock boot.img of that version and how do I flash it again? I feel kinda lost right now.
Anyone can help me out with this?
felloguard123 said:
Anyone can help me out with this?
Click to expand...
Click to collapse
This phone has the recovery inside the boot partition, this is why you need to flash the boot partition, you do not need to flash it again normally, you just flash it to the other slot, boot twrp, go back on the original slot, flash twrp using the .zip file, idk where you should get the boot.img file, but lok online for it, maybe you will find it.
EDIT: https://github.com/AndroidDumps/xia...KQ1.190416.001-V10.3.9.0.PFQMIXM-release-keys
antoine62 said:
This phone has the recovery inside the boot partition, this is why you need to flash the boot partition, you do not need to flash it again normally, you just flash it to the other slot, boot twrp, go back on the original slot, flash twrp using the .zip file, idk where you should get the boot.img file, but lok online for it, maybe you will find it.
EDIT: https://github.com/AndroidDumps/xia...KQ1.190416.001-V10.3.9.0.PFQMIXM-release-keys
Click to expand...
Click to collapse
But what was the my fault here? What did I wrong? Was it the .img file of the twrp or did I install it wrongly? I am very new to this and don't understand why there are 2 slots etc. Sorry for the confusion.
felloguard123 said:
But what was the my fault here? What did I wrong? Was it the .img file of the twrp or did I install it wrongly? I am very new to this and don't understand why there are 2 slots etc. Sorry for the confusion.
Click to expand...
Click to collapse
You installed it uncorrectly, you need to switch slot (because this device have an A/B partition type), flash twrp, boot it, switch to the og slot, flash twrp using the .zip file (so it modify your current boot.img), and done.
This phone will be my first A/B phone, i cant wait to receive it.
But what you didnt is still correct, just not perfect.
antoine62 said:
You installed it uncorrectly, you need to switch slot (because this device have an A/B partition type), flash twrp, boot it, switch to the og slot, flash twrp using the .zip file (so it modify your current boot.img), and done.
This phone will be my first A/B phone, i cant wait to receive it.
But what you didnt is still correct, just not perfect.
Click to expand...
Click to collapse
So twrp has to be installed on both partitions?
I'm not sure if really twrp installed on only one partition could cause Wifi problems.
I would assume that my .img for twrp was faulty.
a
garylawwd said:
Did you flash any boot.img when installing twrp? Or after you installed twrp?
If you did that is more than likely the problem. Flash original stock boot.img from the same security patch date as your firmware and flash it in twrp and then flash twrp installer afterwards
Click to expand...
Click to collapse
and how to do that:{?
i have same problem as yours and searched too many videos on youtube but then i have decided to remove the twrp from the device and no one yet has told me that how to flash twrp in another partition rather i dont know what is the another partition

Categories

Resources