Halium reference rootfs¶
Once you have built the system.img from the android tree, you can download and install the rootfs using the
halium-install script from the halium-scripts repository.
First, boot your device into its bootloader. This is normally done by holding Power+Volume Down, but it can be different on each device.
Next, simply execute the following command:
fastboot flash boot [path/to/]hybris-boot.img
If you’re in BUILDDIR,
hybris-boot.img will be located at
Install hybris-boot.img on Samsung devices¶
Samsung devices cannot be flashed using fastboot. Instead, the device needs to be brought into “Download Mode”. This can be achieved in two ways:
By manually by pressing Vol-Down, Home and Power button until the green warning text appears. Then press Vol-Up as instructed.
By issuing the command:
adb reboot download
Once in download mode the necessary tool depends on platform:
On Windows, proceed with the Odin flashing tool which takes image files wrapped in tgz format.
On Linux, use the Heimdall flashing tool. Heimdall, when used in command line mode, can handle plain .img files.
On recent devices, only newer versions of Heimdall should be used. Ubuntu´s ppa holds an older version of Heimdall. Do not use this. Instead, build it from source:
git clone https://github.com/Benjamin-Dobell/Heimdall.git
For building instructions, consult the README.
Note: Often you will find instructions on Samsung ROMs saying that you need to obtain a PIT file before flashing a device. This is not required and could in fact soft-brick your device. The PIT file is the partition table and is only required when repartitioning. This is normally not necessary and using downloaded PIT files is risky.
Heimdall will always reboot by default after flashing. Using the –no-reboot option will leave the connection in a strange state. Therefore, after flashing a .img file it is not possible to immediately push a second one. Also, Heimdall is incapable of rebooting directly into recovery mode.
The command for flashing is:
heimdall flash --BOOT hybris-boot.img
Install rootfs and system.img¶
Currently the latest rootfs is available at bshah’s personal server: Link
You can use the halium-install script as below, when the device is connected in recovery mode:
halium-install <path to rootfs tarball> <path to android system.img>
This will do the following:
- Convert the rootfs tarball into ext2 rootfs.img
- Convert system.img into the ext4 mountable image from android sparse image.
- Push the both images to /data partition