[7" Kindle Fire HD Android Development] stunts513:
*** USE AT YOUR OWN RISK! I AM NOT RESPONSIBLE IF THIS SOFTWARE OR SOMETHING ELSE SUDDENLY FRIES YOUR DEVICE. ***

Firefox OS

Download Info:

Latest Build: [2014-05-22] Alpha 2.0 Pre-Release

Links:

Dev-Host: Download

Md5sum: 1b9e59c7af3ef6f481f736c207dce1df

Older Builds:

[2014-05-20]

Links:

Dev-Host: Download

Md5sum: cf1cabaa21cd4b3767449bc7300666b0

[2014-03-12]

Links:

Dev-Host: http://d-h.st/1qH

Md5sum: 8799eafb470354ad0ecc717f0fb3ad88

[2014-02-36]

Links:

Dev-Host: http://d-h.st/gkB

Md5sum: 8c1635cf11375db632b0f5f3f4897737

Ok i have been working on this for a few months and finally got around to uploading my latest build and decided to make this public. This is Firefox OS ported to Kindle Fire HD 7". It is still quite buggy but I believe alpha status sounds about right at this point. Here's some info about this OS in case people want to know the technicalities. This OS is based on AOSP 4.3 using hashcodes cm 10.2 device tree with some modifications. While it is based on AOSP Android, this OS is only based on it in the sense its core is based on android, it has no dalvik virtual machine so don't even bother flashing a gapps package with it, it wouldn't even recognize it inside the OS.

I have to give a big thanks out to Hashcode, for putting up with all my questions in the irc about building rom's considering i'm totally new to compiling an android os, much less troubleshooting the technical things. Also have to give a big thanks to the Mozilla dev's in their irc because they helped me quite a bit in figuring out how to get past the main bug i was having(especially gerard-majax). For those of you who weren't in the testing you would'nt know but the original builds of this would boot up to the firefox boot animation, flash a white screen and then blank. Managed to work around this rather than fix it for now thanks to them, along with answering alot of my questions that are more inside Firefox OS's realm rather than android's. Now that i mentioned that i have to thank all my tester that helped me get this project off the ground by testing the rom out and reporting any bugs, along with just reporting if the latest build worked. These people include but not be limited to: Jserrano56, LinearEquation, Ph0enix_216, r3pwn, viktormax3, trinaldi, south956, and Latonya1. If i left anyone out i'm sorry, i grabbed everyone's names from my sent items rather than browsing the entire thread where everyone volunteered. I will add screenshots as soon as i can.Screenshots added! Sorry for there not being any lockscreen pics, i can't take them because the shortcut for screenshot in Firefox OS is power + home button, and there are no softkeys in the lockscreen for homebutton...

Screenshots:

Now let me list some bugs it has that are currently being worked on to the best of my limited capabilities:

[Pre-2/26]

Battery Gauge doesn't work - Fixed sorta (see new bug below that was caused by fixing this)

[2/26]

Gralloc is disabled because of bug with sgx gpu's so theres some laggyish graphics < Fixed [2014-03-12] (thank you mozilla devs for patching this!)

"Insert SIM Card" message is displayed on drop down menu and lockscreen < I'm looking into this, all i know is i need to figure out how to disable RIL

Camera is broken - now compiles sucessfully but still doesn't work (mediaserv crashes and burns)

Video Playback wont even initiate < still not sure about this problem, trying to look into it- Fixed [2014-05-20]

Issue where device tends to not want to come out of sleep mode unless plugged into charger < Looking into - Fixed [2014-05-20]

Bluetooth isn't working yet - Fixed [2014-05-22]

Miscellaneous GUI glitches < These are more than likely mainstream since version 1.3 was being stabilized until recently.

Charging Loop on lockscreen when charged by usb low power < still looking into this

sdcard is a bit glitchy

mtp isn't working (adb works fine though)

usb connection restarts every so often < probably related to why mtp isn't working

small boot animation < not sure if i should stretch this or fill in the background with blue or see if mozilla devs have a higher res version somewhere

Note that like i mentioned in the bugs, this is based on a 1.4 Pre-Release, which isn't exactly the most stable branch. If you are wondering why i used an unstable branch the answer is simple, 1.3 is based on ICS sources, and i didn't have an ICS device tree to work with. At this point i guess you could say this OS is comparable in a sense to Ubuntu Mobile OS, simply because android is more popular, but as i like odd things i decided to go for it with this ROM, so I will say this, if all you use your Kindle for is email, browsing the web and listening to music, then this ROM would be good for that, it was designed to be Completely html driven. It should run smoother than it does now in the coming updates.

So without further ado let me post some instructions for flashing this ROM:

***Notice*** Please make sure you have at least twrp 2.6.3.1 installed or you may encounter problems.

Download the ROM above and place on sdcard

Boot into twrp

Do a factory reset

Hit Install

Choose the ROM

Reboot

Profit!

Notice: I am looking for developers that would like to help me with this project as i don't know any C++ or C coding, so the bugs i can fix are limited to what i can find that is simple or simple enough in C++ that i can change a string here or there. So please if you aren't busy or are interested i would love some help fixing things.

Now for any developers that are interested here is a small tutorial on how to download and compile this because the process is slightly different than the android setup by a little:

First off i suggest reading the setting up the build environment herethat Mozilla made, but keep in mind some things when following their instructions, their build instructions were designed around the stable 1.3 branch which I'm not using, so certain things like the compiler versions they list are incorrect so for what they call for using as gcc and g++, install the 4.7 version. Another thing they don't mention because i stray from their path is you will in fact need Java, so make sure that's installed. i included a preset .userconfig to specify the correct version of gcc and g++ to be used, if its in a unusual path or something look in the .userconfig file to change it(its in the root folder of the build environment). I also advise setting the ccache higher than they put it at, it usually works at what they set it to but recently i couldn't get it to build until i set it to 5GB. One last thing i haven't automated yet is because this was a non Java using OS the signapk.jar file doesn't get auto-copied to the folder it needs to be in when the otapackage is made so if you ever make clobber or its your initial build remember to

cp tool/update-tools/bin/signapk.jar out/host/linux-x86/framework/signapk.jar

Ok that paragraph appears to be a bit of a mess but i think i put the core info for setting up a build environment in there. Next how to download and set everything up. First off goto the folder you want to set this up in(for me it was my home folder) and run

git clone https://github.com/stunts513/B2G.git

once that is done run this:

./config.sh tate

Now go do something for a few hours because its going to download a lot of data.

Now that it is done downloading there is something important you need to do or it will complain about missing dependencies, go into the frameworks/base/graphics/jni folder and rename Android.mk to Android.mk.disabled or just delete it. I suggest if you want to put this in another name other than your login name on Linux to "export USER=blah". Ok now things get different but simple, run this

./build.sh -jX

where X is the number of physical + logical cores your pc has. Once the build process finishes run

./build.sh otapackage

Once that is done you would think "yay my build is complete", but no it never could be that simple, lemme explain the next steps to do until someone helps me recode some python scripts.

Now that we have a signed apk we need to add some things to it to get it finished because the python scripts need some editing i don't know how to do. Go into the out/target/product/tate folder and open the zip file it created up, add the data folder into it. Now open the META-INF/com/google/android/updater-script and find this line

mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/system", "/system");
package_extract_dir("system", "/system");

right after it add these lines:

mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/userdata", "/data");
package_extract_dir("data", "/data");

and don't forget at the end to add the

unmount("/data");

before the

unmount("/system");

Now that that is over with grab the last command you see outputted in the terminal about running java -jar signapk.jar and modify it so it doesn't have the /tmp directory as the input file, and make the output filename whatever you wish. Tada theres a successful build for ya. if you want to look at it i have this info on my github wiki for b2g in case i either left something out or had extra info on there.

XDA:DevDB Information

Firefox OS, ROM for the Amazon 7" Kindle Fire HD

Contributors

stunts513

ROM OS Version: 4.4.x KitKat

ROM Kernel: Linux 3.0.x

ROM Firmware Required: 2nd bootloader and twrp 2.6.3.1 or higher

Based On: AOSP and a CM device tree

Version Information

Status: Alpha

Created 2014-02-27

Last Updated 2014-05-27