[GUIDE] Port firefox OS to Nexus 4 + Galaxy 2 Dual Boot

Search This thread

Apph3x

Member
Feb 17, 2014
31
5
Worcs
How To Install Firefox OS on a nexus 4 and dual boot.



XDA-Developers member pureexe has created an Image that will help you to port Firefox OS to your Google Nexus 4. Here is the list of what works and what doesn’t works:

What Works:
– Wi-Fi
– Data
– Phone Calls
– Contact Import
– GPS
– SMS/MMS
-Some Sensors (Light+Gyroscope+Acceleration)
-ADB

Does NOT Work:

– Camera
-MTP/PTP
– A lot of other things

How To Flash
Step 1: First connect your device to PC (desktop/laptop) via USB and make sure that USB debugging enabled on your device.

Step 2: Now to be on safe side create a Nandroid backup from recovery its because if something goes wrong then you can easily backup all your data.

Step 3: After creating backup, now download the ROM (FFOS_mako_********.zip) file and place these files on the SD card of the phone.

Step 4: Now switch off the phone and boot the phone into Recovery mode.

Step 5: Assuming you are in the Recovery mode and now you have to wipe the full data on your device. To do this, you have to click on “Wipe Data/Factory Reset” option. As soon as you click on “Wipe Data/Factory Reset” option a new screen pop-up where you have to click on “Yes” option.

Step 6: After wiping out all the data on your device you have to wipe the cache & the dalvik cache also.

Step 7: Now go to “install zip from SD card” option and click on “select zip from SD card”. After selecting the option “select zip from SD card” you have to choose the ROM file.

Step 8: After performing all the correctly in step 7 you have to clear the cache and & dalvik cache again.

Step 9: Now, go to “Install zip from SD card” option and click on “Select zip from SD card”. After selecting the option “Select zip from SD card”, you have to choose the optional file like home app or server module

Step 10 : Assuming you have performed all the steps correctly, now simply reboot your device and it will boot into Firefox OS.

How to dual boot: ONLY FOR GALAXY S2
Warning: This procedure doesn't really work anymore. It only works with Android 4 (Ice Cream Sandwich) and Siyah Kernel v 5.0.1. Later versions of either won't work. Consider this guide archived, and use it at your own risk.

If you want to test B2G from time to time but continue using Android as your main OS and you have a Samsung Galaxy S2, you can choose to install B2G in a separate partition (which is already present on the phone) and choose where to boot into when your device starts.

Prerequisites
In order to dual boot Android and B2G, you have to meet these prerequisites:

You have to have built B2G for the Galaxy S2
You have to download the Siyah kernel v. 5.0.1 for the Galaxy S2
You need the tool simg2img, that you get automatically if you build B2G following the guide on MDN
You need the heimdall tool, best if version 1.3.1 as you may encounter problems with version 1.3.2
One-time operations
There are several operations to do in order to get a working dual boot. The following ones need to be done the first time only.

In order to use heimdall without requiring root access, you should create a file called android.rules (the portion of the name before the .rules extension is arbitrary) and place it in /etc/udev/rules.d. The file should contain a line line the following:

Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
In order to activate this rule, you should restart udev:

Code:
sudo service udev restart
and then unplug and replug in the phone. The above rule will also allow adb to access the SGS2 without requiring root privlidges.

Flashing the Siyah kernel

The Siyah kernel is mandatory for the dual boot, because it is this kernel that manages it. Once you have downloaded and decompressed the tar file, you'll be left with a file named zImage. In order to flash it on your phone you have to follow these steps:

Switch off your phone
Reboot in download mode (press together volume down + home + power buttons and then, when asked, volume up button)
Use heimdall to flash the kernel with the following command (your phone needs to be connected to your PC):
heimdall flash --kernel /path/to/zImage
Once the kernel is flashed the phone will reboot.

Preparing the B2G rom environment

Once you've installed the Siyah kernel, it's time to use its functions to prepare the environment to install your B2G image in the secondary partition. Follow these steps:

Switch off your phone
Reboot in recovery mode (press together volume up + home + power buttons)
In the CWMR Touch interface, go to dual-boot options -> Wipe 2ndROM data/cache -> Yes - Wipe. This operation will take some time
Once the operation is finished, select Go Back and then reboot system now to reboot your phone. If you check, inside the internal SD card of your phone you'll now have a .secondrom directory with inside two files named cache.img and data.img.

B2G update operations
The following operations need to be done every time you build a new version of B2G.

In order to simplify command line instructions, it's advised to copy all needed files in a same folder of your choice. These are the files that need to be copied inside the folder:

Code:
simg2img, found in B2G/out/target/product/galaxys2/system/bin/
system.img, found in B2G/out/target/product/galaxys2/
userdata.img, found in B2G/out/target/product/galaxys2/
Once you have all the files in one place, do the following:

Create a data.img file out of the sparse file userdata.img. You can do it with the following command:
Code:
simg2img userdata.img data.img
Put the data.img file on your phone's .secondrom folder. You can do this either by enabling file storage mode on your phone and connecting it to your PC or, if you have USB Debug active, you can use adb:
adb push /path/to/data.img /sdcard/.secondrom/data.img
Switch off your phone
Reboot in download mode (press together volume down + home + power buttons and then, when asked, volume up button)
Use heimdall to flash B2G firmware inside the second partition:
heimdall flash --hidden system.img
Once the flash is finished, your phone will reboot and at boot time you can boot into your second rom (the B2G one) by pressing the home button during the bootloader countdown. If everything has gone right, once you've finished booting B2G you'll have a black screen on your phone. You now have to install Gaia.

Note: Depending on how you want to test B2G, you may not want to put a new data.img file on the phone every time you update B2G, as it will wipe all of your preferences, installed applications and in general pretty much everything you've done while using B2G.
Boot operations
The following operations need to be done every time you boot inside B2G.


Unfortunately, there's no simple way to put Gaia inside the system.img B2G image, and it get lost when you switch off your phone, so you'll need to install Gaia again every time you boot inside B2G. To install Gaia, type the following on a console after you've booted your phone inside B2G (so you have a black screen) and have connected your phone to your PC:

cd B2G/gaia
GAIA_DOMAIN=foo.org make install-gaia
After the upload of Gaia is completed, on your phone's screen the B2G interface will appear.

Dual Boot With Nexus 4 :
Original Link Here

Text Steps :
-Download FFOS.zip file
-Go to TWRP recovery
-Go to advanced, MultiROM, add ROM
-Select android, and don't share kernel
-Select next, then select zip file
-Select the FFOS.zip file
-After that go to list ROMs, pick FFOS, select flash zip, and flash the addons you want
-Reboot to multiboot
-Select FFOS and boot it
-Wait about 2 minutes
-You're now booted to FFOS
BTW FFOS stands for firefox OS


Downloads :
FFOS image Here




Contributors + Complier
pureexefor image and steps
Mozilla (for Dual Boot 1)
Riro Zizo for dual boot 2
Me, for putting all this stuff together!
 
Last edited:

Apph3x

Member
Feb 17, 2014
31
5
Worcs
Updated

UPDATE BASE LAYER 4.3

What Works:
- Wi-Fi
- Data
- Phone Calls
- Bluetooth
- Camera (Rear Camera & Front Camera)
- Video Record
- GPS
- SMS/MMS
- MUSIC (Mp3 & ogg decoder working)
- USB tethering
- WIFI tethering
- Video HQ decoder
- Sensor (Light+Gyroscope+Acceleration)
- ADB
- A lot of thing

Does NOT Work:
-MTP/PTP


Download
http://xdaforums.com/devd...ct/dl/?id=3793
 

Top Liked Posts