yashsingh1/xdaforums huggingface dataset:
[Kindle Fire Android Development] ProfEngr:
would like to tweak bootloader

ok, so I think I have the 6.3 stock/root modded to use the alt locations. Now I need to compile the 1.4.1 bootloader and get my partitions set up.

I'm not sure from the first few posts if the zip files posted do this when flashed or if I have to manually set them up. I'd like to allot an extra 512MB per system partition for some stuff I'm toying with.

How would I go about extracting the code from the zip to edit?
[Kindle Fire Android Development] lelandfried:
When I use the stock/rooted 6.3 (that's in this thread) loaded as my Alternate Boot, my KF unroots itself each morning. It ends up being an otherwise stock KF (no bootloader or TWRP access) with Calendar and .acore FC's constantly. It's unable to connect via adb or KFU.

My only fix is to Reset to Factory Defaults and start the process from scratch.

Does anyone have a stock ROM that flashes to the Alt Boot reliably?
[Kindle Fire Android Development] TahrirSquare:
help!

I installed the extended bootloader it says press the power button to cycle between boot modes but nothing happens, stuck and not going through to anything what can I do?

Edit:problem solved Just used KF utility to change mode to recovery to complete process then normal afterwards.Gave me a little heart attack. :)
[Kindle Fire Android Development] three-p-o:
The alt root that I made? If yes, I think I might know why.

The alt that I made was 6.3. Since then 6.3.1 has come out. If it is updating you to that version at night, it is unrooting your install. Someone needs to come out with a 6.3.1 alt rom to fix your issue.
[Kindle Fire Android Development] ProfEngr:
Is there a 6.3.1 that isn't just an update? That's all I've seen so far.

I also think I'm going to need some guidance getting your github files into a usable format.

Sent from my TBolt with the XDA App using 1 opposable thumb
[Kindle Fire Android Development] three-p-o:
The files are in a usable format. you need to download them using git.

However, you have to install the correct compiler.

http://www.codesourcery.com/sgpp/li...-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

Extract that into /opt/CodeSourcery and then add /opt/CodeSorcery/bin to your path.

Next, in the folder you downloaded the git files, run make omap4kc1_config && make

That will then generate a u-boot.bin

Personally I have never flashed the bootloader using a zip, I have always used fastboot to do it. So someone else will have tell you how to make a zip install. I assume it has something to do with making your own updater-script file to write the bin to the bootloader partition similar to how the boot.bin is done.
[Kindle Fire Android Development] ProfEngr:
Great. That was the part I was missing. I'll load via fastboot, no problem there. Thanks again.

Now I have to wait until I can replace my C: drive in the PC. I think the MBR went Tango Uniform last night. Can't get to the M$ splash screen but maybe every 5th reboot & it's unstable after boot. Just hope I can recover the videos off the other partition via usb adapter.

Sent from my TBolt with the XDA App using 1 opposable thumb
[Kindle Fire Android Development] lelandfried:
MoDaCo has a 6.3.1 AltROM that I'm using without issue.
[Kindle Fire Android Development] ProfEngr:
Stock or modded? I'm just looking for stock launcher/rooted.

Sent from my TBolt with the XDA App using 1 opposable thumb
[Kindle Fire Android Development] barrmulio:
very slightly modded/optimized... worth trying
[Kindle Fire Android Development] three-p-o:
This is his 6.3.1, but I don't see reference to an ALT version. WE might have to make it.

http://xdaforums.com/showthread.php?t=1439916

Edit: Never mind. His download link allows you to cook your own. That's something I have never seen before.
[Kindle Fire Android Development] ProfEngr:
Will check it out when I get the PC shocked back to life.

Sent from my TBolt with the XDA App using 1 opposable thumb
[Kindle Fire Android Development] barrmulio:
No need to cook now

He has two versions to download from that link, one normal, and one setup for FFFE... alt version works great
[Kindle Fire Android Development] ProfEngr:
Generated 4 files: u-boot, u-boot.bin, u-boot.map, & u-boot.srec

So of those 4 the u-boot.bin I would load through fastboot. Great. will try that once I get my partitions lined up the way I want them.

257,704 look like a correct filesize?
[Kindle Fire Android Development] three-p-o:
Hmm. Could be. Did you make any changes? Mine is 257712.

Edit: Hmm. My original that I flashed to my system and have been using is 257720, the rebuild I just did is 257712.

I think you should be fine so long as you followed the directions I posted. If could be slight variations in the toolchains.
[Kindle Fire Android Development] ProfEngr:
To the letter (with a smidge of google search).

Sent from my TBolt with the XDA App using 1 opposable thumb
[Kindle Fire Android Development] three-p-o:
Maybe its because I'm over tired and my son just woke me up.. but Huh?
[Kindle Fire Android Development] ProfEngr:
Followed your directions. Just had to google a couple basics since I haven't run linux in a few years.

Might be the weekend before I can repartition & flash.

Sent from my TBolt with the XDA App using 1 opposable thumb
[Kindle Fire Android Development] gregory99mar:
After running fastboot shell and attempting to flash it it says,

error: cannot load u-boot.bin

Any thoughts?

I'm on windows 7
[Kindle Fire Android Development] three-p-o:
What is the command you entered? Also, was the uboot.bin file in the folder you ran the command from?
[Kindle Fire Android Development] RazorChrist:
I tried this dual bootloader out, it's actually very cool. Wish it had the splash screens that FFF v1.4 has, but I think someone already mentioned that on Page 2. Anyway, I was just wondering...if I installed the dual bootloader, then ran a primary rom and secondary rom, but wanted to wipe everything and start fresh so I could install just one primary rom...what all would I need to wipe/format? Does just running a Factory Reset from TWRP enough? The only reason I'm asking is because the secondary rom uses a 2nd partition to install to. Just want to make sure normal wipe/format will wipe that out as well, so that it's usable space again. Thx.
[Kindle Fire Android Development] eldarerathis:
First backup your SD card partition. Next get your partition layout back to stock by rebooting into fastboot and using:

fastboot oem format

Then you can reboot into recovery, do a factory reset, reformat your SD card partition, and install a new ROM. You can also install a new (single boot) bootloader either before or after running the 'oem format' command.

Also, sorry this has been somewhat neglected. I do intend to merge Hashcode's changes into my branch, but the hard drive in my Linux machine died recently. I had been in the market for a new laptop anyway, so I got a new one last week and my old one will become my new Linux box. Once it's all set up again I plan to do a little more work on this, but I don't have any ETAs at this point.
[Kindle Fire Android Development] PowSniffer0110:
Merge that **** brotha :) been waiting for dual boot with hash like updated boot
[Kindle Fire Android Development] three-p-o:
I already did it, but you would have to know how to build it.

Also I had to disable one of the screens due to the size of the compiled bin.
[Kindle Fire Android Development] seishuku:
Use gziped images, they're much smaller than the rle encoded ones.
[Kindle Fire Android Development] RichMD:
I currently have FFF 1.4A installed but I would like to have dual-boot with the fixes merged. Could you post how to do this?

Also, is it possible to set the alt ROM to be the default if you don't press the button at all when powering on? I want to have the Modaco ROM which allows the Kindle lending library, etc as the default (in the ALT partition) so it is easy for my kids, etc. I would like to install other ROMs that aren't packaged for an ALT partition. Is that possible?
[Kindle Fire Android Development] AustinFire:
Thats a good idea! +1
[Kindle Fire Android Development] three-p-o:
You will need to do this on Linux, unless you know how to do it another way. I used Ubuntu.

Download the source code to my merged code. I called it 1.4.1 as it merges hashcode's updates and eldarerathis' dual boot code.

git checkout https://github.com/MarcT/mt_u-boot.git

You have to install the compiler.

http://www.codesourcery.com/sgpp/li...-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

Extract that into /opt/CodeSourcery and then add /opt/CodeSorcery/bin to your path.

Next, in the folder you downloaded the git files, run

make omap4kc1_config && make

That will then generate a u-boot.bin that can be flashed in fastboot.

Take my merged code from github and change the boot order. It's open source, so you can do whatever you want.

Kind of, but you have to make the modifications yourself if the packager didn't already do it. Read the development version of this post for instructions.

You will need a working rom kitchen to do this. I again used Ubuntu.
[Kindle Fire Android Development] ProfEngr:
I had to do a little googling on how to install a few things (couldn't get git to work) and set up vbox for ubuntu on my pc, but it didn't take very long to get compiled. mostly it's knowing what commands to throw at the thing.

You had an interesting idea about booting to the "stock" rom in Atl as default. I might make another u-boot with that config.

I still haven't repartitioned for dual boot yet. Need to test chainfire's usb mount app further. With that small of a /media partition I need external storage to function semi-reliably for my intended use.

Sent from my TBolt with the XDA App using 1 opposable thumb
[Kindle Fire Android Development] RichMD:
Thanks,

I will try your instructions. My last comment was basically saying that I want to install ROMS (that aren't packaged for ALT) to the Primary partition which shouldn't be a problem but still have the Modaco ROM in the ALT partition set as default. Basically, if I can fumble my way through compiling and figuring out how to set the default to the alt partition then I think I will be set.

If you have already compiled the code for 1.4.1 and dual-boot though, why not post what you have for others to use? Many people would use it I'm sure but maybe I'm missing some reason that wouldn't work? If you don't want to post it because you aren't certain it won't cause problems then I understand that.
[Kindle Fire Android Development] ProfEngr:
I would lean toward the last comment in your post as a good reason. Bet the last thing three-p-o needs/wants are a bunch of people complaining about the bin file bricking their toy. I compiled my own, so I have no one to blame but myself if it "blows up." The process for me was fairly simple; except for finding a direct link/icon to click on to get a cmd window from the gui in ubuntu.

Sent from my TBolt with the XDA App using 1 opposable thumb
[Kindle Fire Android Development] three-p-o:
I did it for myself, I'm not an official developer in any sense of the word.

That and it sounds like eldarerathis is going to make an official merger of the 2.

But, yes, I don't want to have to deal with helping people who brick their devices.

If they are smart enough to be able to compile if, they should be smart enough to help themselves recover from a failure.

Also, if they do brick it, they have Ubuntu already installed, so getting them to use the fire kit should be really simple.
[Kindle Fire Android Development] three-p-o:
Rich,

If you want to change the boot order adjust the following part of the code.

if(fastboot_wait_power_button_abort == 0){
printf("Normal boot\n");
s = getenv ("bootcmd");
}
if(fastboot_wait_power_button_abort == 2){
printf("Booting alternate boot partition\n");
s = getenv ("altbootcmd");
}

This is in common/main.c

Change the bootcmd and altbootcmd and that will reverse the boot order so that the alt is the primary. However, the splash screen will identify normal boot as the alt boot. I don't think that's a big deal for you though.
[Kindle Fire Android Development] ProfEngr:
What would happen if you swapped the 0 and 2?
[Kindle Fire Android Development] RichMD:
Thanks!

I just need to get ubuntu up and running on a Oracle box VM and I will try this out.
[Kindle Fire Android Development] three-p-o:
LOL, that is simpler
[Kindle Fire Android Development] ProfEngr:
Ok, now that I have the otg flash drive ironed out it's time to tackle dual boot. Wish me luck tomorrow. :eek:

Sent from my TBolt with the XDA App using 1 opposable thumb
[Kindle Fire Android Development] ProfEngr:
**Happy Dance**

:victory::victory::victory:

Am now dual booting my Kindle with MoDaCo Gr9.2 altrom & NRG 6/23 (take2).

As far as I can tell, I didn't lose anything (except the go launcher backup) on the /sdcard partition in the process.

Compiled u-boot from three-p-o's github

loaded the new u-boot via fastboot

did a fastboot oem dualformat

checked the partitions with parted (looked good)

skipped the sdcard format step :rolleyes:

rebooted into recovery and flashed the zip to format the alt locations

flashed the MoDaCo altROM

restored my nandroid of NGR

tested both boot options

The only issue I see so far is with the bootloader. It doesn't always register the button presses to step through the list. Overall (only 10min post-flash) I'm a happy camper.
[Kindle Fire Android Development] three-p-o:
Yeah, the button press issue is prevalent in the original sources of both eld and hash, since hash used eld's code :P thats to be expected. I think eld commented on this in his initial release though.
[Kindle Fire Android Development] ProfEngr:
Just commented because I didn't notice it until my build from source.
[Kindle Fire Android Development] TahrirSquare:
When you say "reformat SD card" do you mean just "wipe SD card" from TWRP? Thanks
[Kindle Fire Android Development] RichMD:
I believe that is correct. Once your kindle is partitioned back to stock via the oem format then a "wipe sd" in TWRP is formatting your sd.

Eldarerathis, I hope your plans to get linux running on your old laptop are going well. I want to dual-boot my kindle but am waiting patiently for your planned update including hash's fixes and your dual-boot code.:fingers-crossed:
[Kindle Fire Android Development] eldarerathis:
I got it set up today, and (mostly) configured the way I want it. I also merged Hash's changes into my tree locally and everything compiles without issue. Now I need to figure out how to handle the splash images and make a few more changes to add the fourth boot menu option, then test everything.
[Kindle Fire Android Development] AustinFire:
Sweet! Glad to hear it's coming along! :D
[Kindle Fire Android Development] RichMD:
Hi elarerathis,

First, I want to say thanks for all the work you have done so far. I don't want to ask for an ETA so instead I just want to confirm you are still working on the updated dual-boot version. If not, then I will take a crack at learning how to compile 3-po's merged code, etc.
[Kindle Fire Android Development] TahrirSquare:
altrom-factory-reset.zip is used to do a factory reset/wipe of the alternate partition when you flash it in TWRP.
[Kindle Fire Android Development] anantshri:
Hi all,

i have been using this dual boot method since the start however my initial setup is

Primary : Default Kindle ROM

Secondary : trial rom's

i have recently started using JellyBean Rom as secondary rom however now i feel the need that JB should be my default.

that brings me to the thread. has anyone tried using stock ROM as secondary OS in this bootloader.

are there any issues i should be aware off.
[Kindle Fire Android Development] ProfEngr:
No issues here so far.

Sent from my Thunderbolt using one opposable thumb.
[Kindle Fire Android Development] ProfEngr:
Three-p-o posted directions earlier on how to compile your own 1.4.1 from a vmbox session of Ubuntu if you're feeding your oats. It looks very close to 1.4a. And is working great on my fire with modaco 9.2alt & nrg from.
[Kindle Fire Android Development] three-p-o:
Thanks for the props.

Anyway, once Eld releases his version I think I might pull mine down. There will be no need for it at that point.
[Kindle Fire Android Development] ProfEngr:
True. But I was impatient :beer:

Sent from my Thunderbolt using one opposable thumb.
[Kindle Fire Android Development] smirkis:
u should post a compiled version.
[Kindle Fire Android Development] xolanir:
I 2nd that motion!
[Kindle Fire Android Development] smirkis:
my n7 shows up tomorrow n I wanna dual boot this now as a household drvice lol
[Kindle Fire Android Development] raiderep:
Me three. ..

Sent from my EVO
[Kindle Fire Android Development] ProfEngr:
Ok. When I get a free minute at work. Will be posted with the usual "this could break everything and knock the earth off its axis" disclaimer. And I'm not qualified to provide support if it doesn't work as you hope.

Sent from my Thunderbolt using one opposable thumb.
[Kindle Fire Android Development] three-p-o:
Me neither.. use it at your own peril
[Kindle Fire Android Development] ProfEngr:
Use at your own risk!!!!!

Ok, here it is. All I can say is that it works on mine. Sometimes it doesn't register the first button press on the boot screen after the green LED dims.

No warranties or guarantees expressed or implied. IF your Kindle bursts into flame or otherwise behaves in an unexpectedly odd manner, I can't help you. I take zero responsibility for any damage to you, your psyche, your device, or the environment due to the use of this binary.

That said, good luck and enjoy if it works for you.

EXTRACT THE BIN FROM THE 7z. DO NOT TRY TO FLASH THE 7z. BAD THINGS CAN/WILL HAPPEN!

Edit: checksums

md5: 940d28bebbba2ea9376f1fbfa420b387

sha1: 30b5a5b16c6657e7481cbdf1f1d4068771afef31
[Kindle Fire Android Development] three-p-o:
For those that don't know, extract the 7z, the bin is inside. Don't need you trying to flash the 7z to your device. Hash had a few people attempt to flash the zip if I recall. One of the reasons I didn't want to release was things like that. I thought that if you could compile it yourself, you were smarter than the average bear.
[Kindle Fire Android Development] ProfEngr:
oh crap. good point. Will edit the post. That's what I get for trying to save a few bytes and posting important things before lunch. :silly:
[Kindle Fire Android Development] barrmulio:
another confirmation here that the bin works great...i wasn't close to a computer with working adb/fastboot so i just edited hash's 1.4a zip with ProfEngr's bin and the updater-script with the new sha1sum, then flashed in twrp 2.2 -

all testing worked well - i was already on FFF-E 1.2

-primary rom (cm10 jellybean) worked fine

-boot to recovery worked fine from primary rom and menu

-secondary rom is modaco gr9 which booted fine too

ProfEngr - your advisory forgot to mention their firstborn may turn into slime, a wormhole may open in their basement, or a 60 foot android robot may crush their town....
[Kindle Fire Android Development] ProfEngr:
ROTFLMAO

It was my first attempt. Lack of creativity I guess. But I'll remember to add those items next time.
[Kindle Fire Android Development] xolanir:
So just to be clear, all hell will break loose if I screw things up? Okay no pressure then. Then as a point of clarity, so I need smirkit or gscript to install the bootloader or am I supposed to use adb fastboot? Thx :confused:

---------- Post added at 10:42 AM ---------- Previous post was at 10:17 AM ----------

Just a quick question on how you edited the updater-script? I edited hash's 1.4a bin w/Prof's bin by switching them out and then zipped it back up. Was that all I needed to do?
[Kindle Fire Android Development] raiderep:
I am grateful you posted that prof, I am in school and don't have the time right now to dive into it as much as I would like too. And all disclaimers are well understood ;)

Sent from my EVO
[Kindle Fire Android Development] ProfEngr:
Yes, flash the same way as u-boot.bin from OP in this thread.

Then follow the directions for dualboot formatting. I skipped formatting the sd card, but that was an oops on my part. However, the world is still spinning as far as I can tell.

Sent from my Thunderbolt using one opposable thumb.
[Kindle Fire Android Development] barrmulio:
For clarity and the benefit of others, if you're already on v1.2 of of FFF-E with roms, and switch to the v1.4, your roms stay intact, only the bootloader changes.

---------- Post added at 08:41 PM ---------- Previous post was at 08:37 PM ----------

flashable zips contain a file in meta-inf/com/google/android called updater-script that contains the tasks performed when you run that zip in recovery

in this case, you need to replace the bin in the /cache folder, and then edit the updater-script to perform a sha1sum check with the correct checksum for ProfEng's file, along with the changing the filename

often, when you unzip and rezip the file will not longer work in recovery, you need to inject by drag/dropping the files by keeping the zip open in whatever program you're using to see the zip (archive manager, winrar, winzip, etc)
[Kindle Fire Android Development] ProfEngr:
All I did was compile the source(?) that three-p-o provided. And I had help from him and others doing that.

Sent from my Thunderbolt using one opposable thumb.
[Kindle Fire Android Development] :
is there a 1.4a version of this?
[Kindle Fire Android Development] three-p-o:
Yes, I called it 1.4.1. It is the one that Prof provided compiled a few posts ago.

---------- Post added at 05:49 PM ---------- Previous post was at 05:43 PM ----------

I merged Hash's 1.4a and Eld's 0.2 code together using modified images from the 1.4a build a month or 2 ago. This became known as 1.4.1.

I provided this source code to both Hash and Eld in their respective posts and to anyone who wanted to compile it on their own. I did not provide a pre-compiled version because I didn't want to have to provide support for it. I thought, if you could compile it, you are smart enough to know how to fix a screw up. Prof wanted to use it so I gave him some steps to follow to compile it. That is what you downloaded today.

With the exception of making one change, all this code was written by Eld and Hash.
[Kindle Fire Android Development] smirkis:
just make sure you guys double check the md5! a borked bootloader is no fun to fix. thanks for posting it ProfEngr
[Kindle Fire Android Development] three-p-o:
Funny that... The one that Prof made is different from the one I made for myself. Never mind the MD5, his file size was smaller than mine by a byte or 2. After discussing it between ourselves, the only thing we could think of is slight differences in the toolchains each of us used to compile.
[Kindle Fire Android Development] xolanir:
I need some help. I've successfully installed the dualboot bootloader, and have Modaco gr9.1 installed as the altrom, but for the life of me, after installing JB as the other ROM, the KF gets stuck in a bootloop. Does anyone know what I could be doing wrong? Thx in advance for the help.
[Kindle Fire Android Development] three-p-o:
I could tell you to search, but even I'm not sure which thread it is in.

Eld mentioned to me a while back that he had an issue with using the 3.0 kernel on the alt rom partitions. Not sure if he ever figured that out or not. It could be your kernel is configured wrong for alt rom install and it tries to boot back to the primary and blows up. I know when I was testing how to create an alt rom that's what happened to a few of my attempts.

Who created the JB alt rom? Ask them if they have tried it and confirmed it works.

Personally I use JB as my daily and the KF 6.3.1 rom as my alt.
[Kindle Fire Android Development] wiseson:
Can somebody make a video of how you do it with twrp
[Kindle Fire Android Development] xolanir:
As of right now, Modaco is installed as the altrom, but when I try to install JB as the main daily Rom, it installed fine but reboots into a bootloop. :confused:
[Kindle Fire Android Development] ProfEngr:
Wow, amature day for me so far. I'll generate an md5 for the .bin when I can get back on the laptop.

Sent from my Thunderbolt using one opposable thumb.