Android OS Forum banner
1 - 1 of 1 Posts

34 Posts
Discussion Starter · #1 ·
[adiv=ipsBox clear][adiv=ipsBox_container ipsPad][adiv=ipsLayout ipsLayout_withright ipsLayout_bigright clearfix][adiv=ipsLayout_content][adiv=ipsLayout_right][adiv=ipsPad ipsSideBlock]File Name: Heimdall One-Click Packager- Make your own cross-platform, java executable jar files
File Submitter: AdamOutler
File Submitted: Today, 10:45 AM
File Category: Hardware
[aurl=/files/download/81-/]Download[/aurl][aurl=]Changelog[/aurl][aurl=/index.php?app=downloads&module=post&section=submit&do=edit_main&id=81]Edit Mod[/aurl][/adiv][/adiv][adiv=ipsLayout_content]Introduction
Heimdall One-Click is a open-source stack of software intended to eliminate our dependence on Odin and provide an unrivaled safe method to perform a complete flash of a device. Heimdall One-Click will work on any device which Heimdall covers. Heimdall One-click and Heimdall One-Click Packager can be used to distribute custom or stock firmware upgrades or downgrades currently on most Samsung devices. Each of the sections in this post could be an entire post on its own. I want to consolodate this information into a single area here on XDA.

Heimdall One-Click is a project which I have been perfecting for months. After 147 revisions I feel it is time to release. It is my hope that the use of this software will enable users to safely flash and understand what is going on while they are flashing firmware. Heimdall One-Click is based on Heimdall by Benjamin Dobell.

The basic outline goes like this...
  1. Obtain firmware
  2. Use Heimdall frontend to package a tar.gz
  3. Select your tar.gz file with Heimdall One-Click. Your final package will be a executable cross-platform JAR file for redistribution which will deploy everything needed to flash your ROM.

It's really that simple. See the Downloads and Source section. I will now discuss how everything works in depth.

You have the power to damage your device and others! Several times during the development cycle I had asked myself if it was ethical to release a packager. A lack of skill can easily brick a device. Building a flashable package is a skill and I do not want to see any One-Click Nukes released into the public. So I want to set some rules-of-thumb:
1. If you are unsure, do not package bootloaders into a distribution.
2. If you are going to package bootloaders, include boot.bin, Params.lfs, Sbl.bin and repartitioning option should be checked.
3. Always flash the firmware from Heimdall-Frontend before creating a one-click. Never assume it will work.
4. Please watch this video in its entirety before attempting to package a one-click.

Heimdall & Heimdall Frontend

Heimdall is a cross-platform open-source tool suite used to flash firmware (aka ROMs) onto Samsung devices. Heimdall is an "upstream package" contained within Heimdall One-Click. Heimdall is Maintained by Benjamin Dobell from Glass Echidna. Heimdall has its own discussion thread here:
Heimdall Frontend allows a graphical user interface for flashing firmware, packaging and deploying Heimdall tar.gz files. It also provides several additional tools. Heimdall Frontend has its own discussion thread here:

Heimdall One-Click Packager

Heimdall One-Click packager is a tool which will take a Heimdall tar.gz file and package it into a Heimdall One-Click. Heimdall One-Click Packager is an open-source cross-platform(win/linux/mac) program with no dependencies. After execution, the user selects a tar.gz package for one-click and the program:

1. Decompresses firmware.xml from tar.gz
2. Deploys an empty one-click java jar.
3. Writes the Tar.gz and firmware.xml into the one-click jar thereby creating a new one-click executable firmware package.

Heimdall One-Click

Heimdall One-Click's job is simple; it deploys firmware with one click while keeping the user informed. Heimdall One-Click is an open-source cross-platform(win/linux/mac), dependency installing, easy-to-use, automation tool which can install firmware onto a device in download mode. Heimdall One-Click's operation is very simple from the outside, but the operation is very complex inside. See source code for more information. Heimdall One-Click has several safety features built in which make it the safest method of deploying firmware to any compatible device.

Why use Heimdall One-Click over Odin or other methods of software distribution?
  • Heimdall is Open-Source software. Without Open-Source software we would not have android or custom ROMs. Open-Source developers should support and expand the work of other Open-Source developers.
  • Odin is closed source and propritary. Not only is the application proprietary, but the drivers are also proprietary. Open-Source developers do not support Closed-Source work as it is a hindrance to development.
  • Heimdall supports Open-Source Tar.GZ compression which ensures file integrity and provides higher compression than zip formats. A 500 megabyte ROM can compress to less than 200 megabytes.
  • Heimdall can restore operation to a device which does not even have access to recovery mode. Heimdall does not require the kernel to be operational, it works at a higher level in the Secondary Bootloader.
  • A Heimdall One-Click is a single executable file which contains everything needed to flash a ROM.
  • A Heimdall One-Click works on Windows, Linux or Mac OS-X.
  • A Heimdall One-Click is not a final output format. Once you make a One-Click, the contents are not lost forever. The ROM package contained within can be unzipped using your favorite archive program, modified and redistributed.

Easiest, most portable, and foolproof method of flashing
Heimdall One-Click has been designed to be the easiest, most portable and foolproof method of flashing. The requirements are that the user knows how to put their device into "Download Mode" and that the user has Java installed on their computer.

Heimdall One-Click contains:
  • A deployable and unpackable firmware located in /com/adamoutler/heimdalloneclick/
  • Installer routines
  • Windows Drivers
  • Windows C++ Redistributable Package
  • Windows Heimdall binary
  • Linux32 Debian package
  • Linux64 Debian package
  • Mac OS-X Installation package

You can find a repository of prepackaged ROMs here at the Team Komin website: Please note, some of these were packaged during beta testing so not all of them are high quality builds.

Obtaining firmware
Before you can package a ROM for distribution, you must have firmware to package. Here are two methods of obtaining firmware.

Obtaining firmware from a live device
The following commands can be used on most Samsung Android devices to make a backup of everything but bootloaders. Bootloaders must be obtained from official builds and cannot be pulled off a working device after you have finished developing.
  1. Open a terminal to your device (terminal emulator or QuickSSHD, or adb shell)
  2. Enter the following commands into the terminal
    su<br />
    #Remove the target folder if it is present<br />
    rm -r -f /sdcard/firmwarepackage<br />
    #Write all zeros to data partition to zero flash memory until the partition is full<br />
    dd if=/dev/zero of=/data/big_zero bs=1048576<br />
    #Remove the zerod out dummy file<br />
    rm -r -f /data/big_zero<br />
    #Mount The /system folder as RW so we can read and write to it<br />
    mount -o remount,rw /system /system<br />
    #Drop all zeros into a file on the /system partition until it is full<br />
    dd if=/dev/zero of=/system/big_zero bs=1048576<br />
    #Remove the zerod out dummy file<br />
    rm /system/big_zero<br />
    #Make our folder to write the firmware package onto the SDCard<br />
    mkdir /sdcard/firmwarepackage<br />
    #Begin transfer of all relevant blocks to sdcard<br />
    dd if=/dev/block/stl9 of=/sdcard/firmwarepackage/factoryfs.img bs=4096<br />
    dd if=/dev/block/bml7 of=/sdcard/firmwarepackage/zImage bs=4096<br />
    dd if=/dev/block/stl10 of=/sdcard/firmwarepackage/dbdata.img bs=4096<br />
    dd if=/dev/block/stl11 of=/sdcard/firmwarepackage/cache.img bs=4096<br />
    dd if=/dev/block/bml12 of=/sdcard/firmwarepackage/modem.bin bs=4096<br />
    #Done<br />
    echo done<br />
  3. copy the files from your sdcard in the firmwarepackage folder to your desktop/laptop computer.
    Never mount an RFS filesystem to your computer Your computer is not equipped to handle the RFS filesystem. All permissions data will be lost and the filesystem will be rendered useless.
  4. Using Heimdall Frontend, you can download the part.pit from the options tab to obtain the partition tables for custom ROM use.
  5. Use Heimdall frontend to package a tar.gz
  6. Use Heimdall One-Click Packager to make a One-Click

Obtaining firmware from Odin packages
You will need a base firmware package to obtain bootloaders for your device. Firmware can be obtained from several sites. Some of the more common are:
It is important that these firmwares be verified on your own device before distribution.

Recommended Distribution Instructions
Once you have verified that your package has been made correctly, you will want to distribute it. Here is a recommended blurb which I have found to be effective from multiple tests. Replace "MY ROM" with your ROM name and MYROM.COM with your download link.
  1. You will need Java installed on your computer Do you have java?
  2. right click and open with Java
  3. Put your device in "Download Mode" and click the flash button
  4. Problems? Enter "Recovery Mode" and select "factory reset"
Download MY ROM!

<br />
[ list=1]<br />
[ *]You will need Java installed on your computer [url=]Do you have java?[/url]<br />
[ *]right click and open with Java<br />
[ *]Put your device in "Download Mode" and click the flash button<br />
[ *]Problems?  Enter "Recovery Mode" and select "factory reset"<br />
[/list]<br />
[ size=4][ url=MYROM.COM]Click here to Download My ROM![/url][/size]
Downloads and Source
Heimdall One-Click Packager:
Heimdall Frontend:

Heimdall One-Click Source Code:
Heimdall one-Click Change Log:Change Log:
Heimdall Source Code:

Conclusion and Disclaimer
The source and applications are released under the MIT License. I have provided these resources at no cost to you without warranty. I will not be held liable. It is up to you to use these programs responsibly.

Heimdall One-Click saw its first appearance as "One-Click UnBrick". Since then, it has been tested and distributed as part of UnBrickable Mod, restoration back to stock, and upgrading firmware in the following threads:

We are looking to expand Heimdall to work on more devices. We need devices to work with. Please see for more information[/adiv][/adiv][/adiv][/adiv][/adiv]
1 - 1 of 1 Posts