This tutorial is for a macOS device, should work on any UNIX-compatible machine (you will still need to install Android SDK manually). If you’re running Windows, well, replace flash.sh with flash.bat and godspeed.

You need to install the android-platform-tools recipe via Homebrew Cask if you don’t have it installed already.

$ brew tap caskroom/cask
$ brew cask install android-platform-tools

If your device boots into Firefox OS, enable USB debugging on the Flame and check out if adb responds with a device ID.

$ adb devices

If you installed another OS (postmarketOS for example), your device will no longer boot (if you installed the new OS on the SD card) or will boot to the new OS (if you installed it on the device’s internal storage), so you need fastboot mode to flash the new kernel/bootloader. Shut down the Flame (pull out the battery if needed, pop it back in after) and reboot it by pressing Power and Volume down buttons. It should display “Fastboot”. Use an USB cable to connect it to your computer.

Check if the device is connected via fastboot.

$ fastboot devices

Now you can load Firefox OS. Download the last version from Yuval Adam’s website (last working version is v18D_nightly_v5.zip for me, which is Firefox OS 2.6) and unzip it somewhere on your computer.

$ cd v18D_nightly_v5/
$ ./flash.sh

The Flame device should reboot into Firefox OS automagically when done.

Screenshots

Additional info

Getting some information from the device via adb shell is easy.

Linux version

# dmesg | grep "Linux version"
[    0.000000] Linux version 3.4.0-g1e562fa (naoki@naoki-Precision-T1650) (gcc version 4.7 (GCC) ) #2 SMP PREEMPT Mon Dec 21 20:57:55 PST 2015

List all mounted filesystems

# mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=462576k,nr_inodes=115644,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=462576k,nr_inodes=115644,mode=750,gid=1000 0 0
none /sys/fs/cgroup/memory cgroup rw,relatime,memory 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=462576k,nr_inodes=115644,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,size=462576k,nr_inodes=115644,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,relatime,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/fuse /storage/uicc0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/usbotg fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:30 /mnt/media_rw/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

List free space on “disks”

# df
Filesystem               Size     Used     Free   Blksize
/dev                   451.7M   132.0K   451.6M   4096
/sys/fs/cgroup         451.7M     0.0K   451.7M   4096
/mnt/asec              451.7M     0.0K   451.7M   4096
/mnt/obb               451.7M     0.0K   451.7M   4096
/system                412.5M   283.5M   129.0M   4096
/data                    2.0G    45.1M     2.0G   4096
/cache                  70.8M     7.1M    63.7M   4096
/persist                 4.9M     4.0M   852.0K   4096
/firmware               64.0M    31.7M    32.2M   16384
/storage/sdcard          3.8G     8.0K     3.8G   4096
/mnt/media_rw/sdcard     3.8G     8.0K     3.8G   4096

Kernel command line

# cat /proc/cmdline
console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 androidboot.bootloader=L1TC000118D0 androidboot.emmc=true androidboot.serialno=XXXX androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_tianma_tm040ydh65_ili9806c_wvga_video mem=1024m

List of partitions

# cat /proc/partitions
major minor  #blocks  name

 253        0     196608 zram0
 179        0    7634944 mmcblk0
 179        1      65536 mmcblk0p1
 179        2        512 mmcblk0p2
 179        3        128 mmcblk0p3
 179        4         32 mmcblk0p4
 179        5        512 mmcblk0p5
 179        6        500 mmcblk0p6
 179        7      15360 mmcblk0p7
 179        8        500 mmcblk0p8
 179        9       1024 mmcblk0p9
 179       10       1536 mmcblk0p10
 179       11       1536 mmcblk0p11
 179       12     429580 mmcblk0p12
 179       13      32768 mmcblk0p13
 179       14      73728 mmcblk0p14
 179       15      15360 mmcblk0p15
 179       16       1024 mmcblk0p16
 179       17       1536 mmcblk0p17
 179       18          1 mmcblk0p18
 179       19          8 mmcblk0p19
 179       20      10240 mmcblk0p20
 179       21       1024 mmcblk0p21
 179       22       1024 mmcblk0p22
 179       23        256 mmcblk0p23
 179       24         10 mmcblk0p24
 179       25        512 mmcblk0p25
 179       26        500 mmcblk0p26
 179       27        500 mmcblk0p27
 179       28     204800 mmcblk0p28
 179       29    2162688 mmcblk0p29
 179       30    4095983 mmcblk0p30
 179       32        512 mmcblk0rpmb
 

Firmware images

# ls /firmware/image/
adsp.b00
adsp.b01
adsp.b02
adsp.b03
adsp.b04
adsp.b05
adsp.b06
adsp.b07
adsp.b08
adsp.mdt
cmnlib.b00
cmnlib.b01
cmnlib.b02
cmnlib.b03
cmnlib.mdt
isdbtmm.b00
isdbtmm.b01
isdbtmm.b02
isdbtmm.b03
isdbtmm.mdt
keymaste.b00
keymaste.b01
keymaste.b02
keymaste.b03
keymaste.mdt
mba.b00
mba.mdt
modem.b00
modem.b01
modem.b02
modem.b03
modem.b04
modem.b05
modem.b06
modem.b09
modem.b16
modem.b17
modem.b18
modem.b19
modem.b20
modem.b21
modem.b22
modem.b23
modem.b24
modem.b27
modem.b28
modem.b29
modem.mdt
playread.b00
playread.b01
playread.b02
playread.b03
playread.mdt
security.b00
security.b01
security.b02
security.b03
security.mdt
tqs.b00
tqs.b01
tqs.b02
tqs.b03
tqs.mdt
wcnss.b00
wcnss.b01
wcnss.b02
wcnss.b04
wcnss.b06
wcnss.b07
wcnss.b08
wcnss.b09
wcnss.mdt
widevine.b00
widevine.b01
widevine.b02
widevine.b03
widevine.mdt

Build properties

# cat /system/build.prop
# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=KOT49H
ro.build.display.id=flame-userdebug 4.4.2 KOT49H eng.naoki.20151216.105618 test-keys
ro.build.version.incremental=eng.naoki.20151216.105618
ro.build.version.sdk=19
ro.build.version.codename=REL
ro.build.version.release=4.4.2
ro.build.date=Wed Dec 16 10:56:35 PST 2015
ro.build.date.utc=1450292195
ro.build.type=userdebug
ro.build.user=naoki
ro.build.host=naoki-Precision-T1650
ro.build.tags=test-keys
ro.product.model=flame
ro.product.brand=qcom
ro.product.name=flame
ro.product.device=flame
ro.product.board=MSM8610
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=t2m
ro.product.locale.language=en
ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=msm8610
# ro.build.product is obsolete; use ro.product.device
ro.build.product=flame
# Do not try to parse ro.build.description or .fingerprint
ro.build.description=flame-userdebug 4.4.2 KOT49H eng.naoki.20151216.105618 test-keys
ro.build.fingerprint=qcom/flame/flame:4.4.2/KOT49H/eng.naoki.20151216.105618:userdebug/test-keys
ro.build.characteristics=default
# end build properties
#
# from device/t2m/flame/system.prop
#
#
# system.prop for msm8610
#

# Use reference RIL for initial bringup
#rild.libpath=/system/lib/libreference-ril.so
rild.libpath=/vendor/lib/libril-qc-qmi-1.so
rild.libargs=-d /dev/smd0
persist.rild.nitz_plmn=
persist.rild.nitz_long_ons_0=
persist.rild.nitz_long_ons_1=
persist.rild.nitz_long_ons_2=
persist.rild.nitz_long_ons_3=
persist.rild.nitz_short_ons_0=
persist.rild.nitz_short_ons_1=
persist.rild.nitz_short_ons_2=
persist.rild.nitz_short_ons_3=
ril.subscription.types=NV,RUIM
DEVICE_PROVISIONED=1
persist.radio.msgtunnel.start=false
persist.radio.atfwd.start=false
# Start in cdma mode
ro.telephony.default_network=5

# Skip /sys/power/wait_for_fb_* nodes and
# force FB to be always on
debug.sf.fb_always_on=1
debug.composition.type=dyn
debug.gralloc.map_fb_memory=0
debug.hwc.dynThreshold=1.5
dalvik.vm.heapsize=36m
dev.pm.dyn_samplingrate=1

ro.hdmi.enable=true

#system props for the MM modules

media.stagefright.enable-player=true
media.stagefright.enable-http=true
media.stagefright.enable-aac=true
media.stagefright.enable-qcp=true
media.stagefright.enable-fma2dp=true
media.stagefright.enable-scan=true
mmp.enable.3g2=true
media.aac_51_output_enabled=true
#37491 is decimal sum of supported codecs in AAL
#codecs: AVI AC3 ASF AAC QCP DTS 3G2 MP2TS
mm.enable.qcom_parser=37491

# VIDC: debug_levels
# 1:ERROR 2:HIGH 4:LOW 0:NOlogs 7:AllLogs
vidc.debug.level=1

#
# system props for widevine
#
persist.gralloc.cp.level3=1

#
# system props for the data modules
#
ro.use_data_netmgrd=true

#system props for time-services
persist.timed.enable=true

#
# system prop for opengles version
#
# 196608 is decimal for 0x30000 to report version 3
ro.opengles.version=196608

#
# System props for telephony
# System prop to turn on CdmaLTEPhone always
telephony.lteOnCdmaDevice=1

#
#snapdragon value add features
#
ro.qc.sdk.audio.ssr=false
##fluencetype can be "fluence" or "fluencepro" or "none"
ro.qc.sdk.audio.fluencetype=none
persist.audio.fluence.voicecall=true
persist.audio.fluence.voicerec=false
persist.audio.fluence.speaker=true

# Reduce Background apps limit
ro.sys.fw.bg_apps_limit=20

# System property for cabl
ro.qualcomm.cabl=1


# system prop for NFC DT
ro.nfc.port=I2C

#
#DASH video streaming
#Specify max allowed resolution/bandwidth for representations
#Set allowed avsync window during playback
#
persist.dash.max.rep.resolution=1280*720
persist.dash.max.rep.bandwidth=4000000
persist.dash.avsync.window.msec=100

tunnel.audio.encode = false

#use VERY_HIGH_QUALITY for audio resampler
af.resampler.quality=4
ro.config.low_ram=true

#Buffer size in kbytes for compress offload playback
audio.offload.buffer.size.kb=32

#8x10 does not support tunnel av playback
#this prop should be set to false all the time
av.offload.enable=false

#enable voice path for PCM VoIP by default
use.voice.path.for.pcm.voip=true
#
#System property for FM transmitter
#
ro.fm.transmitter=false

#enable dsp gapless mode by default
audio.offload.gapless.enabled=true


#
# ADDITIONAL_BUILD_PROPERTIES
#
dalvik.vm.heapstartsize=5m
dalvik.vm.heapgrowthlimit=48m
dalvik.vm.heapsize=128m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=512k
dalvik.vm.heapmaxfree=2m
keyguard.no_require_sim=true
ro.com.android.dataroaming=true
ro.com.android.dateformat=MM-dd-yyyy
ro.config.ringtone=Ring_Synth_04.ogg
ro.config.notification_sound=pixiedust.ogg
ro.vendor.extension_library=/vendor/lib/libqc-opt.so
persist.radio.apm_sim_not_pwdn=1
ro.moz.omx.hw.max_width=1280
ro.moz.omx.hw.max_height=720
ro.carrier=unknown
ro.config.alarm_alert=Alarm_Classic.ogg
persist.radio.multisim.config=dsds
ro.moz.devinputjack=1
ro.moz.nfc.enabled=true
ro.moz.ril.0.network_types=gsm,wcdma
ro.moz.ril.1.network_types=gsm
ro.moz.ril.emergency_by_default=true
ro.moz.ril.numclients=2
ro.moz.ril.subscription_control=true
org.bluez.device.conn.type=array
persist.sys.dalvik.vm.lib=libdvm.so
dalvik.vm.lockprof.threshold=500
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt