Developers

Your app can trigger FlashFire to launch and add a Flash ZIP or OTA action by using startActivity with an intent.

Action:
eu.chainfire.flash.action.ZIP

Component:
eu.chainfire.flash/.ui.activity.MainActivity

Extras:
eu.chainfire.flash.extra.NAME (String, required)
eu.chainfire.flash.extra.AUTO_MOUNT (Boolean, optional)
eu.chainfire.flash.extra.RW_MOUNT (Boolean, optional)
eu.chainfire.flash.extra.RESTORE_BOOT_AND_RECOVERY (Boolean, optional)

The NAME extra points to the filename to flash. This file is only accessed directly using root access, so it is no problem for it to be located in your app's private folder under /data. However, the file must be located on the data partition, and the full path must start with /data as well. While you may be able to trick the app into accepting files from other places, flashing will fail on many devices.

Your app is expected to correctly resolve paths from the internal sdcard to the corresponding /data path. Often /sdcard/test.zip resolves to /data/media/0/test.zip, but on older devices it may be /data/media/test.zip, and on other devices it may be something else entirely.

Examples:

am start \
    -a eu.chainfire.flash.action.ZIP \
    -n eu.chainfire.flash/.ui.activity.MainActivity \
    --es eu.chainfire.flash.extra.NAME /data/media/0/test.zip
Intent intent = new Intent("eu.chainfire.flash.action.ZIP");
intent.setComponent(new ComponentName("eu.chainfire.flash", "eu.chainfire.flash.ui.activity.MainActivity"));
intent.putExtra("eu.chainfire.flash.extra.NAME", "/data/media/0/test.zip");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);