Boot.Img Question - HTC One S

I've flashed several One S roms with success and I wanted to see if someone could clarify the flashing of the boot.img.
1. If I've done it once, is it necessary that I flash the boot.img each time I flash a new ROM?
2. Some of the ROM pages say that I can skip the boot.img step if I use a TWRP, is that for all One S roms or just the ones which the developers indicate so?
Thanks

The boot image is part of the rom. It contains the kernel and the root file system on which the mmc partitions get mounted.
However, not all devices let you flash the boot image from recovery. (I dont think there is real consensus on the factors: hboot, twrp/cwm, ? but the fact remains that you may not be able to flash boot image from recovery.) So to be safe, it's better to always flash it through fastboot, since this always works.
The best time to do this is right before you boot into recovery to flash your rom, so that the first time it boots is right after you flash your rom.

I flash the boot.img every time even if it isnt necessary . I dont think it is hard to do so better flash safe then fast .

Related

[Q]Question about flashing Roms[Q]

I got the jist of it since I'm coming over from the MyTouch Slide 4G, I already understand how to flash the boot and what not my question is...
Can I flash the boot.img, and then reboot into recovery wipe and flash the zip for the specific Rom? I see in all the instructions it always says wipe flash zip and then reboot into the loader and update the boot.img. Its not that big of a deal the only reason I ask is because I'm just use to flashing the boot image first and then installing the ROM, So I wanted to see if there's a big deal between doing that.

[Q] Question on rooting.(Not bricked lol)

Question on rooting.(Not bricked lol),so about a week ago I got into bootloop because I flashed boot.img when I took it out of the Rom file. I want to know if bootloop is normal when you flash the image file before rezipping the Rom and installing the Rom via teamwin recovery. I'm unrooted and boot is locked so I don't need any help with that. so I just wanted to know if I followed the right process. I have read many threads and never seen anything about bootloop being a normal process when flashing boot.IMG before getting into recovery and installing a ROM. Thanks in advance for anyone providing me an explanation.
WhatTheAndroid? said:
So about a week ago I rooted my phone,got into bootloop because I flashed boot.img when I took it out of the Rom file. I want to know if bootloop is normal when you flash the image file before recapping the Rom and installing the Rom via teamwin recovery. I'm unrooted and boot is locked so I don't need any help with that. so I just wanted to know if I followed the right process. I have read many threads and never seen anything about bootloop being a normal process when flashing boot.IMG before getting into recovery and installing a ROM. Thanks in advance for anyone providing me an explanation.
Click to expand...
Click to collapse
I know it happened for me -- Sometimes it wont enter recovery for me even in the bootloader and I have to Power+Vol Down to get it back into the bootloader. But it makes sense this would be a normal process because if you flash the boot.img without any OS files to load after it will just boot-loop.
Once I get back into bootloader and can get back into recovery and flash the ROM everything goes well after -- although I'm not sure if you would classify this as the "norm" but it certainly happens for me
WhatTheAndroid? said:
Question on rooting.(Not bricked lol),so about a week ago I got into bootloop because I flashed boot.img when I took it out of the Rom file. I want to know if bootloop is normal when you flash the image file before rezipping the Rom and installing the Rom via teamwin recovery. I'm unrooted and boot is locked so I don't need any help with that. so I just wanted to know if I followed the right process. I have read many threads and never seen anything about bootloop being a normal process when flashing boot.IMG before getting into recovery and installing a ROM. Thanks in advance for anyone providing me an explanation.
Click to expand...
Click to collapse
I didn't have a bootloop. Mine just sat on the first htc bootscreen and did nothing. I had to do a simlated battery pull to get it to shut off. Generally I flash the rom in recovery then reboot to fastboot and flash the boot.img. This way you don't have to worry about the bootloop or simulated battery pull.
your just supposed to extract the boot.img not the whole rom. you should never be rezipping anything. if you are on windows i hope your using a real archive utility like 7-zip or winrar. just open the zip and drag the boot.img out which extracts it. flash the boot.img in fastboot then flash the rom in recovery.
getting into recovery from bootloader can be a problem at times but i haven't had this problem once since changing over to twrp 2.3.1.0.

[Q] Flashed boot.img in Fastboot, works - flashed in TWRP, does not work

Hey guys, thanks for all the previous help i've gotten from here.
Here's the deal, I have a 2.2, rooted and unlocked ATT HOXL. I flashed the SU binary and have root and everything. I'm on the stock 2.2 ROM.
Do you need to install a different ROM before flashing the kernel? If so, then I will wait until this download finished for CleanROM. If not, then continue below..
I flashed the boot.img for ElementalX-3.1 in Fastboot (Fastboot 1.14), rebooted phone like normal, phone came up, kernel is showing in the information page on the phone, it is running at 1.7ghz. That's fine, but then I realized I had never gotten any installer or anything. So, I went into recovery to flash the whole ZIP file. Go to reboot the phone and it hangs on boot after the first HTC logo.
I tried flashing the boot.img, then rebooting to recovery, and flashing the ZIP, then clearing the cache, and then rebooting. Still hangs. I am able to go into recovery and restore a backup if I need to, so at least my phone isn't dead, but I want to do this.
I also tried installing the ZIP, then rebooting into Fastboot and flashing the img, and then booting the phone up normal.
So as it sits now, I have the Kernel installed from ONLY the boot.img, I did not run the ZIP.
Do I need to flash a stock kernel in Fastboot, and then try just flashing the whole thing in TWRP? From what I have read, the steps for flashing the kernel on 1.14 is:
1. Flash boot.img
2. Reboot to recovery
3. Flash ZIP
4. Clear cache
5. Reboot phone as normal
Are those the correct steps? Do I need to flash a stock kernel before trying this again, or can I just start from square one, as if I were using a stock kernel?
Thanks
You can't flash kernels from recovery on the higher hboot. You have to fastboot them or use the flash image GUI app.
Some ROMs/kernels use a script that works around that, but not all do.

Mate 9 Pro recovery boot and other confusions

Hi
I'm itching closer and closer to rooting my m9p.
I've been through a slew of threads by now, but the pro part is still toying with me a bit.
So far I assume:
I can use the TWRP 3.1.0-1 by Tkkg1994 and will hopefully have adb and/or sideload support with that(?) as I have no OTG.
If I (only) flash a recovery from fastboot, test adb and do nothing else, I should be able to flash back the original recovery / boot up the system as normally?
I have the additional files needed after a wipe of /data, but was it Magisk first and then the two files or the two files and then Magisk?
If you want, you can test this one for me: https://mega.nz/#!59NREbCQ!zxZPmVB4F2Cy9R-0rRWdUeb4uZmdmgKHCxTYcbHdKS4
Yes, you will be able to flash back stock recovery and boot up normally, just use fastboot to flash back stock recovery.img. You will have to extract it from your firmwares update.app.
it doesn't matter if you do Magisk first, then public/hw.
It only matters that you flash Public before HW, public wipes /data/hw_init/ by default so if you flash HW first everything in there gets wiped when you flash public.

[Recovery Release] Working TWRP for Sony L1 (G3311 Single SIM others to be confirmed)

Requirements:
1. Bootloader Must Be Unlocked.
2. Have a backup of your working Magisk Patched boot.img saved to your External SDcard.​A little INFO:
The Sony L1 recovery seems to be disabled by SONY for some unknown and Probably stupid reason.
I have tried all ways to get the TWRP and Stock recovery to boot up from the fotakernel partition (recovery) but TWRP and even the stock recovery refuse to boot.
Anyway to cut a very long story short I am releasing this TWRP which is 95% functional and needs to be flashed to the boot partition
Working Method/flow:
Make sure you have a Back up of your working Boot.img "You know the one you used to root the device in the first place".
For ease of use You can use this app by XDA dev @wanam (Thread here) app on playstore Here You can also use this app to flash the v5-twrp-l1.img to your "boot" partition or you can go old skool and use dd (Via adb shell) or use the Magisk patched_boot.img you first rooted with..
Make SURE to Copy this working boot.img to your External SDcard.
When you require TWRP flash the downloaded TWRP to your boot partition using Fastboot (cmd's below) or the above app then reboot
You will now boot to TWRP.
Do what you need to do in TWRP.
IMPORTANT:
Remember Just before you leave TWRP go to INSTALL choose your external SDCard choose "image" from the install screen find your boot.img and select "boot" with the little radio button.
Once flashed choose reboot system.
Now when you boot you will be back to normal :good:
Things Not Working:
1. You will not be able to mount encrypted data therefore you would need to FORMAT your data and then leave it unencrypted.
SuperSU and Magisk will disable forceencrypt for you.
2. Does not Charge or show battery % so I don't know if it's actually charging. (Probably Qnovo battery module used by sony)
It will probably work on all variants but I am not able to test that.
It's use is for backups and restores wipes and installs for which it seems fully functional. :good:
Install Instructios.
Boot to the bootloader then
Code:
fastboot flash boot v5-twrp-l1.img
Then
Code:
fastboot reboot
Download HERE v5-twrp-l1.img
Hi @bigrammy!! I have it booting ok, obviously encryption is not working! I was able to do a backup but couldn't boot back into system, just keeps going back to twrp! I had to flashi the patched 3313 boot image from another post to get back into system! Good work though! Tested on g3311
Chronic2k13 said:
Hi @bigrammy!! I have it booting ok, obviously encryption is not working! I was able to do a backup but couldn't boot back into system, just keeps going back to twrp! I had to flashi the patched 3313 boot image from another post to get back into system! Good work though! Tested on g3311
Click to expand...
Click to collapse
:laugh:
Ok maybe I should update the OP as it seems it's not really clear enough that obviously the boot is replaced by the recovery.
Method would be make sure you have a Back up your working Boot.img You know the one you used to root the device in the first place.
You can also use dd (Via adb shell) or a app from the playstore or better still use the Magisk patched_boot.img .
Copy this working boot.img to your External SDcard.
When required flash the recovery to your boot partition using Fastboot then reboot
You will now boot to TWRP.
Do what you need to do in TWRP.
Then just before you leave TWRP go to INSTALL choose your external SDCard choose "image" from the install screen find your boot.img and select "boot" with the little radio button.
Once flashed choose reboot system.
Now when you boot you will be back to normal :good:
OP Updated let me know if it's clearer to understand now.
Thanks for reporting back. :good:
I'll give it a go! Many thanks! Just one question though. How do I enter recovery mode from then on? Is it still power down, power and volume down yeah?
Chronic2k13 said:
I'll give it a go! Many thanks! Just one question though. How do I enter recovery mode from then on? Is it still power down, power and volume down yeah?
Click to expand...
Click to collapse
I don't think you have really read or understood the OP
You are only ever flashing the "boot partition".
When you need to use TWRP you flash the TWRP.img to the boot partition and when your done you flash back your boot.img again to the boot partition as in the OP.
BTW Have you ever been able to enter the STOCK recovery using Power and Volume Down or using any commands
My phone could not enter the STOCK recovery at all let alone a custom one and since no one ever replied to my question about this I assumed this was the case for everyone as many sony devices from 7.0 had the recovery disabled?
I'm unable to get into stock recovery too!
So,
If we don't have a Recovery partition maybe we can
Create one...
Tutorial in here
https://iwf1.com/how-to-re-partitio...-all-options-included-change-size-fs-type-etc
I'll try it if i have time.
I tested twrp 2 times
Worked every time.
I've tried to install superSu.zip via twrp, looked all right, rebooted the phone and now it's in bootloop for over 2 hours...
It's getting hotter... i ca't turn it off
The only thing that works is keeping Power and Volume Up pressed and it looks restarting...
What can i do to revive it safely?
alegatorul said:
I tested twrp 2 times
Worked every time.
I've tried to install superSu.zip via twrp, looked all right, rebooted the phone and now it's in bootloop for over 2 hours...
It's getting hotter... i ca't turn it off
The only thing that works is keeping Power and Volume Up pressed and it looks restarting...
What can i do to revive it safely?
Click to expand...
Click to collapse
Mate you really need to be careful unless you really know what your doing
You will likely brick the phone if you continue to blindly mess with re-partitioning and the like.
If you were in TWRP which was flashed to the boot partition as directed in the OP then flashing the supersu.zip will simply modify your TWRP.img not your boot.img since TWRP is living in the boot partition at the time you run the .zip hence your looping.
This device has bootloader issues since it will not allow the booting of another partition except "boot" recovery, fotakernel, rdimage, all tested all failed to boot the TWRP recovery and stock recovery.
There is another method used by some sony devices but this will need to be heavily modified for this MediaTek SoC and will require a lot of study and script re-writes.
Spending all this time on a device that's pretty much obsolete before it was launched since it's not planned to receive oreo and Sony 90% locked down the bootloader is kinda futile so use the phone for what it is then throw it in the bin when done in a year or two.
Mate, you are right
Hi, please make recovery for L1 G3312 i hope you can do it.
tweak8 said:
Hi, please make recovery for L1 G3312 i hope you can do it.
Click to expand...
Click to collapse
I think this one may very well work for the dual SIM also so please try it and then report back with some actual details.
eg: bootloader status, firmware version, your region, etc etc.
Thanks.
Works great on the G3113 model, thank you for developing this! Now hoping to find a custom rom to install via .zip.
This "HERE v5-twrp-l1.img" is working in my Xperia L1 G3312.
But, after installing TWRP, phone does not get into boot normally. Everytime it boots into recovery mode. I think that it needs separate twrp partition. This twrp is overwriting the main boot. If anyone can make separate partition for TWRP recovery. This problem will be solved.
Hello. I ignored all your post like a retard and basically just went to the last step to flash the image. The twrp works but it wouldn't boot into normal mode but just boot to twrp everytime so I downloaded some random boot image I saw online and installed it. Now it's just stuck in the sony logo and won't even turn off. Is there anything I can do or is it rip for good?
dumb person said:
Hello. I ignored all your post like a retard and basically just went to the last step to flash the image. The twrp works but it wouldn't boot into normal mode but just boot to twrp everytime so I downloaded some random boot image I saw online and installed it. Now it's just stuck in the sony logo and won't even turn off. Is there anything I can do or is it rip for good?
Click to expand...
Click to collapse
No it's only the boot.img Flash the boot.img in this thread https://forum.xda-developers.com/xperia-l1/how-to/root-l1-g3313-magisk-t3693350 if you can get into fastboot that is.
If not then use FlashTool to flash the stock boot.sin and system.sin only. That should get you working again.
This "HERE v5-twrp-l1.img" is working in my Xperia L1 G3312.
But, after installing TWRP, phone does not get into boot normally. Everytime it boots into recovery mode. I think that it needs separate twrp partition. This twrp is overwriting the main boot. If anyone can make separate partition for TWRP recovery. This problem will be solved.
In twrp mode, I can do everything smoothly..... but phone does not get into boot normally..... After installing stock boot again, phone boot into normally, but twrp has gone completely..... So, it is clear that boot & twrp partition overwrites each other due to no separate partition.... So, we need separate partition for boot & twrp.... then everything will be solved...
bigrammy said:
No it's only the boot.img Flash the boot.img in this thread https://forum.xda-developers.com/xperia-l1/how-to/root-l1-g3313-magisk-t3693350 if you can get into fastboot that is.
If not then use FlashTool to flash the stock boot.sin and system.sin only. That should get you working again.
Click to expand...
Click to collapse
I downloaded the boot from the link you posted and flashed it. Now it phone works again. Many thanks!!
riadjblicd said:
This "HERE v5-twrp-l1.img" is working in my Xperia L1 G3312.
But, after installing TWRP, phone does not get into boot normally. Everytime it boots into recovery mode. I think that it needs separate twrp partition. This twrp is overwriting the main boot. If anyone can make separate partition for TWRP recovery. This problem will be solved.
In twrp mode, I can do everything smoothly..... but phone does not get into boot normally..... After installing stock boot again, phone boot into normally, but twrp has gone completely..... So, it is clear that boot & twrp partition overwrites each other due to no separate partition.... So, we need separate partition for boot & twrp.... then everything will be solved...
Click to expand...
Click to collapse
Yes but Sony Disabled the recovery partition (fotakernel) by design so you can not boot from it.
The OP is clear about the need to flash the TWRP to your boot partition and the reason I also give full instruction in the workflow/method but people simply don't read anymore it seems. :crying:
TWRP can be injected into the boot.img so you can boot normally or boot TWRP using the volume keys at boot time but I can't be bothered working on this since Sony are not going to update the Android Version.
While the phone is OK I have far better phones to spend my time on at the moment.
how to backup boot.img without root? if its impossible then how do i root this phone?

Categories

Resources