[Motorola Photon Q 4G LTE] mionica:
Hi guys,

for those of us who are waiting for at least the M1 of CM12 before switching lanes, I did a build of Carbon (and a few of CM11, previously) for our Photons.

This is an odexed ("user", not "userdbg") build, running on the cm-12.1 kernel branch and using the latest available f2fs_tools. It also features a modified init which can use either f2fs or ext4 for /cache and /data - so switching to f2fs is highly recommended, but not mandatory. Superuser is included.

This is esentially for those who switched to CM12 just for f2fs; it's miles faster than cm12, and a bit more responsive that the old official cm11 nightlies.

A word of warning. TWRP's "change filesystem" function formats the partition (PhilZ does too, but at least it makes that explicit).

So what you want to do when switching from an ext4 ROM is,

before you begin: copy everything in the internal sdcard somewhere on the external sdcard; this is needed, since the "internal sdcard" is actually a folder in /data;

in TWRP, begin by creating a backup of /data (that saves everything except the "internal sdcard" and /cache - that's why you need step #1);

do the FS change for both /data and /cache

restore the /data backup, on the freshly formatted /data partition; ignore the "different filesystem" warning, it's inconsequential;

install the ROM;

once you booted the phone, copy back the old contents of the internal sdcard

You only need to do this when you change filesystems, which will be exactly once if you like my ROMs :) And obviously, if you don't, you have to use the exact same procedure before flashing an ext4 ROM, if you don't want to lose data.

Though, in all fairness, I'd recommend flashing this cleanly - unless you're upgrading from an ext4 Carbon build.

A note on the radio

I have included a tool called radio-tool (of my own design) that allows people to enable/disable the US GSM lock and individual network bands;

if you're having the SIM mod, and are from, or have business in, the US, you can use it to kill the CDMA and Sprint LTE bands altogether, as well as to enable US GSM bands and disable the US GSM lock;

the source code is here

Use (as superuser)

radio-tool [dbg] [{+|-}opt [...]]

where opt is one of

uslock - US GSM lockout

cdma - CDMA bands (CDMA800 / CDMA1800 / CDMA2000 1xEV-DO)

usgsm - US GSM/HSPA bands (GSM850, GSM1900, WCDMA850, WCDMA1900)

eugsm - EU GSM/HSPA bands (GSM900, GSM1800, WCDMA900, WCDMA2100)

sprlte - Sprint LTE (LTE25, 1900)

vzwlte - Verizon LTE (LTE13, 700)

Download:

ROM: CARBON-KK-UNOFFICIAL_f2fs-20150526-moto_msm8960.zip

Recoveries: TWRP-2.8.6.0-20150526-f2fs-moto_msm8960_jbbl-xt897.img, PhilZ-6.59.0-20150520-crkk_f2fs-moto_msm8960_jbbl-xt897.

You do not need to use a su app with this; but if you want to, please use the latest SuperSU. Attempting to use a different, or older, su app could result in no radio.

Changes from stock Carbon:

alternative mount points support - this enables the ROM to work with either f2fs or ext4 for /data and /cache

tuned mount settings - kickass speed with both ext4 and f2fs

256MB of lz4-compressed swap space (zram0)

built on gcc-4.8-sabermod

build.prop tweaks - this defaults to GSM/WCDMA - plus a few radio and network tweaks;

added a few goodies that are present in CM builds (Term, Apollo, Calendar, CMWallpapers, VideoEditor, plus the cmdline utils);

removed the stats and the update apps (for obvious reasons)

added Romanian (programmers) keyboard support in Asanti Keypad

built with: twrp 2.8.6.0, cm12.1 kernel, cm12.1 f2fs-tools, cm12.1 e2fsprogs, cm12.1 exfat, cm12.1 fuse.

(this will allow me to pick up any improvements in kernel, file systems, and recovery, with great ease :D )

Quirks:

MTP doesn't start by default in TWRP, despite the fact that it claims to be enabled; disable and re-enable MTP, and it will work

in PhilZ' mount menu, entries for cache and data are duplicated; this is cosmetic - mounting and umounting works just fine, regarless which of the two entries for each partition you choose

.

Older, CM11 vanilla builds:

Download:

cm-11-20150427-UNOFFICIAL_f2fs-moto_msm8960_jbbl.zip - repo syncs, builds with TWRP, uses branch cm-12.1 of the kernel, uses latest available f2fs-tools

Use latest SuperSU with any of the CM ROMs - older, or different, su apps might make the radio not work.

NOTE. These ROMs are actually moto_msm8960_jbbl, so they should work on all devices for which official moto_msm8960_jbbl builds did, as long as they're still on the JB bootloader (jbbl) and you have a device-specific recovery that supports f2fs. A suitable PhilZ touch for non-xt897's can be found on the AtrixHD thread, courtesy of @palmbeach05, or you could use PhilZ-6.59.0-20150506-crkk_f2fs-moto_msm8960_jbbl-mb866 (note, despite the -mb866 suffix, it should work on any moto_msm8960_jbbl device except xt897).

The current repo is available here

. To use,

repo init -u https://github.com/mionica/android.git -b cr_kk_gcc-4.8

repo sync

. build/envsetup.sh

breakfast carbon_moto_msm8960_jbbl

edit the .repo/local_manifests/roomservice.xml, changing the device project for android_device_motorola_moto_msm8960_jbbl to

<project path="android" name="mionica/android_device_motorola_moto_msm8960_jbbl" remote="mionica" revision="cr_kk_xt897" />

repo sync again

finally, (cd vendor/carbon && ./get-prebuilts).

After you do that, you're good to go - (optional) configure ccache (if it's your first build), (optional) enable ccache, choosecombo, then mka carbon 2>&1 | tee BUILD.LOG.

If you're not sure how to do any of these, either just use the provided ROM, or search on youtube for "building CyanogenMod" - that should help, I know it helped me :D Anyway, this thread is not the right place for learning how to build Android.