What would happen if you flashed a recovery zImage to bml7? Or a rom zImage to bml8? Would it mean 3 finger booting takes you to rom, and normal boot is to recovery?
Theoretically, but I think there would be a size problem right? Most zimages are 5mb, and I think the recovery image is smaller, probably not a problem though. Why would you want it that way?
malcolmXman said:
Theoretically, but I think there would be a size problem right? Most zimages are 5mb, and I think the recovery image is smaller, probably not a problem though. Why would you want it that way?
Click to expand...
Click to collapse
Because it'd be cool, and another one of the billion ways to dual boot lol. Flashing a recovery kernel to bml7 for some reason (i think) makes it boot the default recovery (bml8). And then flashing a rom kernel to bml8 makes it boot into the recovery included in the rom (i think). Im gonna play with this a little more
Ok recovery is smaller then 5mb, sorry, I was thinking kernel DOH. And I see what your doing now, that may work.
ugothakd said:
What would happen if you flashed a recovery zImage to bml7?
Click to expand...
Click to collapse
For stock ROMs, zImage and recovery.bin are actually identical, and the contents of bml7 and bml8 are the same.
When the phone is powered normally, the bootloader loads the bml7 kernel and tells init to run init.rc, which boots Android as usual. In contrast, when the phone is three-finger powered, the bootloader loads the bml8 kernel and tells init to run fota.rc, which boots recovery.
Note that if you do a recovery reboot while running Android (e.g., "adb reboot recovery") the kernel writes a value to /mnt/.lfs/param.blk that tells the bootloader to load the bml7 kernel with recovery.rc, which also boots recovery.
I don't think the behavior of init is any different with regard to handling init.rc or fota.rc. So what you could do is make a kernel with init.rc and fota.rc switched in the initramfs. If you flash this to both bml7 and bml8, it should do what you want which is boot recovery "normally" and three-finger boot Android.
Very interesting
Posted by Mr. Z's Epic 4G Touch+Keyboard
mkasick said:
For stock ROMs, zImage and recovery.bin are actually identical, and the contents of bml7 and bml8 are the same.
When the phone is powered normally, the bootloader loads the bml7 kernel and tells init to run init.rc, which boots Android as usual. In contrast, when the phone is three-finger powered, the bootloader loads the bml8 kernel and tells init to run fota.rc, which boots recovery.
Note that if you do a recovery reboot while running Android (e.g., "adb reboot recovery") the kernel writes a value to /mnt/.lfs/param.blk that tells the bootloader to load the bml7 kernel with recovery.rc, which also boots recovery.
I don't think the behavior of init is any different with regard to handling init.rc or fota.rc. So what you could do is make a kernel with init.rc and fota.rc switched in the initramfs. If you flash this to both bml7 and bml8, it should do what you want which is boot recovery "normally" and three-finger boot Android.
Click to expand...
Click to collapse
I am glad you are still around here mkasick. You are a fountain of knowledge. I almost always learn something new whenever you post.
Sent from my SPH-D700 using xda premium
JohnCorleone said:
I am glad you are still around here mkasick. You are a fountain of knowledge. I almost always learn something new whenever you post.
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
I don't think fountain of knowledge describes it....maybe atlantic ocean of knowledge
As soon as I have time I'm going to do exactly was you said and switch fota.rc with init.rc. then flash it to bml 8 and 7 then see what happens.
sent from my epic 4g. with the key skips.
I hope it all goes well for you.
Posted by Mr. Z's Epic 4G Touch+Keyboard
mkasick said:
For stock ROMs, zImage and recovery.bin are actually identical, and the contents of bml7 and bml8 are the same.
When the phone is powered normally, the bootloader loads the bml7 kernel and tells init to run init.rc, which boots Android as usual. In contrast, when the phone is three-finger powered, the bootloader loads the bml8 kernel and tells init to run fota.rc, which boots recovery.
Note that if you do a recovery reboot while running Android (e.g., "adb reboot recovery") the kernel writes a value to /mnt/.lfs/param.blk that tells the bootloader to load the bml7 kernel with recovery.rc, which also boots recovery.
I don't think the behavior of init is any different with regard to handling init.rc or fota.rc. So what you could do is make a kernel with init.rc and fota.rc switched in the initramfs. If you flash this to both bml7 and bml8, it should do what you want which is boot recovery "normally" and three-finger boot Android.
Click to expand...
Click to collapse
It did exactly that! I wish I could thank you more than once...I can't wait to mess around now
Related
Someone PM'ed me about this and I finely got around to doing it. I do not have
a Galaxy Tab and when I try to test it on my Vibrant I cannot navigate the menu
buttons are not mapped correctly.
I am fairly certain that it will work, just cant test to make sure. If it turns out
that it works anyone is welcome to use it and can even use my install script
which can be found here.
http://forum.xda-developers.com/showthread.php?t=833423
if it does work you will not have to flash a modified kernel to use Clockwork.
just rename JMG_recovery to recovery and replace bin/recovery in the script
directory.
The attached file is not flashable!!!
it contains a modified JMG recovery an IDA disassembler database
file and a text file with the patch offsets and the patch data. and
is intended for testing and development purposes only.
Thank you!
Well, I tried that, or let me first explain to you what I tried.
I copied the supplied 'recovery' file, replacing the existing /system/bin/recovery .
Then I flashed RomManager's recovery. As this JMG is a EURO-based rom, and Rommanager does not support EURO ROM option for ClockWorkMod, I choosed Tmobile (which my tab is). Maybe this was the mistake.....???
Then I rebooted into recovery and it still shows Samsung Recovery 3e.
I was not sure what to do with the code you supplied and the installation process you offered - but the description was clear to only replace the recovery file, and that is what I did.
Did I miss something?
Thanks for your help anyway - let me know and I can test for you, anytime.
Hope I am not making a total fool of myself. I realized that you did not say anything about ClockWorkMod, but all the other recovery-image-replacements offer access to CWM so I assume this would to. I guess I was wrong.
bert269 said:
Well, I tried that, or let me first explain to you what I tried.
I copied the supplied 'recovery' file, replacing the existing /system/bin/recovery .
Then I flashed RomManager's recovery. As this JMG is a EURO-based rom, and Rommanager does not support EURO ROM option for ClockWorkMod, I choosed Tmobile (which my tab is). Maybe this was the mistake.....???
Then I rebooted into recovery and it still shows Samsung Recovery 3e.
I was not sure what to do with the code you supplied and the installation process you offered - but the description was clear to only replace the recovery file, and that is what I did.
Did I miss something?
Thanks for your help anyway - let me know and I can test for you, anytime.
Hope I am not making a total fool of myself. I realized that you did not say anything about ClockWorkMod, but all the other recovery-image-replacements offer access to CWM so I assume this would to. I guess I was wrong.
Click to expand...
Click to collapse
once you are in the Samsung's recovery select reinstall packages if clockwork
works like on the Vibrant then the device will appear to reboot back into the
Samsung recovery if you get this far then the posted file works, if you select
reinstall packages again then clockwork should launch assuming you have
busybox installed and every thing else works like it does on the Vibrant.
untermensch said:
once you are in the Samsung's recovery select reinstall packages if clockwork
works like on the Vibrant then the device will appear to reboot back into the
Samsung recovery if you get this far then the posted file works, if you select
reinstall packages again then clockwork should launch assuming you have
busybox installed and every thing else works like it does on the Vibrant.
Click to expand...
Click to collapse
When i select 'reinstall packages' nothing happens, it does not reboot back into Samsung recovery.
Where will Clockwork recovery come from, from the recovery file that I copied into /system/bin ?
It does not seem to work for me
untermensch said:
once you are in the Samsung's recovery select reinstall packages if clockwork
works like on the Vibrant then the device will appear to reboot back into the
Samsung recovery if you get this far then the posted file works, if you select
reinstall packages again then clockwork should launch assuming you have
busybox installed and every thing else works like it does on the Vibrant.
Click to expand...
Click to collapse
When i select 'reinstall packages' nothing happens, it does not reboot back into Samsung recovery.
Where will Clockwork recovery come from, from the recovery file that I copied into /system/bin ?
Thank you for sharing.
I guess it works.
I was not unable to flash GT-P1000-CSC-MULTI-OXXJK2 ## before, it would say "signature check failed".
I replaced the recovery in the bin folder and ran the script.
Now i am able to use above CSC file.
a1jatt said:
Thank you for sharing.
I guess it works.
I was not unable to flash GT-P1000-CSC-MULTI-OXXJK2 ## before, it would say "signature check failed".
I replaced the recovery in the bin folder and ran the script.
Now i am able to use above CSC file.
Click to expand...
Click to collapse
Thank You!
The code for the signature check is the same for all the Samsung devices I have
looked at, just the offsets are different. So once I find it I can do the mod in my
sleep.
I also just did an md5 check on the JMG and JME recovery and they are the same
so I bet this will work on most of the firmware versions out there.
bert269 said:
When i select 'reinstall packages' nothing happens, it does not reboot back into Samsung recovery.
Where will Clockwork recovery come from, from the recovery file that I copied into /system/bin ?
Click to expand...
Click to collapse
the recovery I asked to be tested is the Samsung recovery, when you select
reinstall packages Samsung's recovery looks for a file on the SD card called
update.zip. When/if that file is found recovery then loads a public key file from
/res/keys which is in the kernel ram file system, this is why you need to flash a
modified kernel to use Clockwork because someone has to change the key to
the same one used to sign Clockwork. once the public key is loaded Samsung's
recovery check's the signature of update.zip. if the private key used to sign the
package does not match the public key loaded from /res/keys you get the
"signature check failed" message.
Clockwork recovery is the update.zip on the SD card.
the modification I made to Samsung's recovery disables signature checking and
will allow you to install unsigned packages.
i need this file cause everytime installing CSC always failed verification signature failed
but i don't understand how to use this file
can you give me explain tut details?
i don't have recovery clockwerk
my system recovery (3e)
Very nice ! Thanks for sharing the hex-edit offsets !
Extra instructions:
http://forum.xda-developers.com/showthread.php?p=11289885#post11289885
still problem with signature
root, copy/overwrite "recovery" /system/bin
then run script
then installing CSC
but still failed
what wrong?
very2 tired work with this
I'm actually using this patched 3e recovery in my custom initramfs now
(At this stage, I'm not interested in ClockWorkMod 3.0 recovery for my self-built kernel...I tried it a few times, but didn't find it useful)
3e bricked my tab lastnight, had to return it to tmo and play it off as a battery defect.
i only tried because clockworkmod gets me stuck at the last adb command step
Used Clockwork, but I used Odin to flash the kernel afterwards and now I'm not sure what file system it's using. Can I check what it's using anywhere?
Thanks!
Connect to your PC and open adb shell, or download a terminal emulator, and type:
mount
If you see EXT4, it's EXT4. If you see RFS, it's RFS.
If you flashed a stock kernel via Odin, however, and your phone is working, it's RFS. Additionally, if it's CWM2.5 you have, not CWM3, it's RFS.
Also the first time you boot into Clockwork if it is 3.x it will start the conversion process to EXT4. It takes a few minutes for that so it is hard to miss.
There doesn't appear to be anyone that has this problem, and I wasn't able to find anything in the development forum for CWM.
Per what everyone says, can't format /data or "factory reset" in CWM due to some sort of partition thing.
1. I boot to CWM
2. I go to mounts and storage and unmount /data
3. I plug the usb into the computer
4. Open Command Prompt and go to the adb directory
5. Enter Command adb shell and opens ~# at least that is what it looks like
6: I type "/sbin/mke2fs_static -t ext4 -b 4096 /dev/block/mmcblk0p30"
7: the response "/sbin/sh: /sbin/mke2fs_static: not found"
What am I doing wrong?
Edit: I figured it out. I ended up having to reinstall practically everything. But it worked
1 Loaded backed up rom from cwm
2 reinstalled adb
3 copied the backup recovery image back to it's original place.
4 factory reset
5 copy the cwm back
6 boot to recovery mode
7 adb commands work!!!
edit: I really should learn better grammar. I cleaned the wording up a bit.
edit2: I solved my own problem
The command not being recognized was a result of not having the latest CWM from bytecode installed. He updated it from his initial release to add support for these commands. Glad you figured it out! It can be frustrating when stuff like that happens.
Personally I'm avoiding CWM all together at this point. It's been almost a month with not a single problem (besides the BT incident) with no CWM installed, no boot loops, no reboots. There is something seriously wrong with current CWM...
[email protected] said:
Personally I'm avoiding CWM all together at this point. It's been almost a month with not a single problem (besides the BT incident) with no CWM installed, no boot loops, no reboots. There is something seriously wrong with current CWM...
Click to expand...
Click to collapse
You are right, i brick my phone today.
I was lucky that Bell change it for a brand new.
Rom development is not that safe with a so bad recovery...
HO!NO! said:
You are right, i brick my phone today.
I was lucky that Bell change it for a brand new.
Rom development is not that safe with a so bad recovery...
Click to expand...
Click to collapse
Indeed, but I have been ok since not touching /data via CWM. The manual format of /data works fine. I have flashed my own ROM zips over 20 times without issue.
Sent from my LG Nitro HD
[email protected] said:
Personally I'm avoiding CWM all together at this point. It's been almost a month with not a single problem (besides the BT incident) with no CWM installed, no boot loops, no reboots. There is something seriously wrong with current CWM...
Click to expand...
Click to collapse
I still feel CWM is a very important safety net if anything goes serious wrong ( I saw there is some download mode, but I still feel cwm is much easier to use than download mode).
For example, if you phone /system messed up, how do you fix, you only have download mode, right? If you have cwm, you will have one more option.
HO!NO! said:
You are right, i brick my phone today.
I was lucky that Bell change it for a brand new.
Rom development is not that safe with a so bad recovery...
Click to expand...
Click to collapse
I saw these unfortunately case several times in this forum, even though I never met for my self ( I following instructions never touched /data), so when you say brick, what happen exactly? Can you boot into cwm?
gte460z said:
The command not being recognized was a result of not having the latest CWM from bytecode installed. He updated it from his initial release to add support for these commands. Glad you figured it out! It can be frustrating when stuff like that happens.
Click to expand...
Click to collapse
I figured I just had a bad install. Because I think the version was the same...
but anyway, it was most definitely a fun experience.
I love CWM if it weren't for CWM I wouldn't be able to reset my phone. Which was way necessary...porting a new rom over existing data instead of a clean system caused some really interesting errors.
adb shell
umount /data
/sbin/mke2fs_static -t ext4 -b 4096 /dev/block/mmcblk0p30
/sbin/e2fsck_static -y /dev/block/mmcblk0p30
its working on LG SU640,you can try
I have looked through other similar threads on this forum, and believe that I may have bricked my phone.
Fed up with the ICS kernel sent OTA from T-Mobile, I decided to build the GB kernel from the Samsung website. After extracting the boot files from the backup given from the CWM recovery tool, I rebuilt it, and repackaged it into the new boot image.
Booting into recovery mode, I attempted to flash the new image. The command I used was
Code:
flash_image boot new_boot.img
Which gave me the following error:
Code:
flash_image failed with error: -1
I read several threads regarding the error, and found that I may need to reference the boot partition directly. Assuming that the partition scheme is the same between devices, and carriers, I determined that /dev/block/mmcblk0p2 was the boot partition.
I executed
Code:
cat /dev/block/mmcblk0p2
from the adb shell, and compared the output with the contents of the new_boot.img, and confirmed that it is in fact the correct partition.
However, executing
Code:
flash_image /dev/block/mmcblk0p2 new_boot.img
returned the same error as before. Up until this point, I had no problems with the error. It allowed be to boot normally, nothing being changed.
Figuring I'd scrap the idea for another day, I decided to reboot. I noticed that it too an unusually long time to reboot. From which, I received no response. the device refused to boot. Holding the powerbutton did not work, trying to boot it in recovery/download mode did not work.
I removed the SIM and SD card, to make sure there were no lingering files or links that could be interfering with the boot process. I also removed the battery, in order to remove any lingering charges that could by interfering as well.
My first question is really just a confirmation of whether or not it is truly bricked, and to determine the degree of bricking that has occured.
My second question is what steps can I take to solve this? I've seen a couple of threads about people using a JTAG device, but I am unfamiliar with it.
If necessary, I can send it to T-Mobile, but would rather not if it's not required.
You tried to flash a Gingerbread kernel on ICS?
Sent from my SAMSUNG-SGH-T989 using xda app-developers app
Sorry, I misspoke. I originally attempted to flash GB after receiving ICS from the T-Mobile OTA, which is when I first encountered the error. After that, I tried doing the same with the ICS kernel, following the same process I used the first time, received the error, was able to boot no problem, tried again, at which point it failed (when I referenced the boot partition directly)
What is the exact role of "stack override" file in the boot process? Why is it flashed into the system partition? And why kindle refuses to boot freedom bootimg even with 8.1.4 u-boot?
It makes it so the device doesn't overwrite the custom boot partition with the stock boot partition.
Any details? I think disabling OTA updates does what you said. I suppose "stack" file's purpose is somewhat different.