[Bravo General] skeevydude:
These are the basic steps to port CM7-10.1 & CyanMobile. If there's a choice of roms, choose either the Defy version or the Green Lens version. Only use the Plus version for custom kernels. I say latest in the directions below, and latest should work for a lot of the Defy roms, but due to changes throught the years some roms might need the camera drivers from earlier CM's. This guide should also work for Defy MIUI and its variants as well.

Note: I haven't included the steps to port the custom kernel since the current compiled kernel for the Bravo is out-of-date compared to the Defy. You'll just have to deal with the Defy's capacitive button layout, for now.

CM10.1 Porting -- For the time being, just flash Defy CM10.1 roms as-is without doing any porting. Defy doesn't have working camera or baseband, and those are the main reasons we port. Once the Bravo has a CM10.1 rom, by all means, try to port it :good:

CM7 - CM10 and Variants Porting Guide

1. Download the latest Quarx CM* rom for the Bravo and Defy

2. Open them both up and navigate to system/lib

3. Copy libkobecamera.so, libcameraservice.so, & libcameraclient.so from Bravo to Defy

3a. Some older 7's and CM.com 7's need libcamera.so instead of libkobecamera.so -- rename libkobecamera.so or dig up libcamera.so from an older CM7

4. Delete libbayercamera.so, libsoccamera.so, liboemcamera.so (& libcamera.so if its an older\CM.com 7)

4b. Navigate to system/lib/hw and copy camera.kobe.so from Bravo to Defy

4c. Rename all the files with jordan to kobe -- example -- gps.jordan.so to gps.kobe.so

5. Navigate to /system/etc

6. Delete mot_ise_imager_cfg.bin and cameraCalFileDef5M.bin

7. Copy mot_ise_imager_cfg.bin from Bravo to Defy

8. Navigate to /system/etc/motorola

9. Delete bp_nvm_default and comm_drv & replace with the Bravo's folders (this is the baseband, don't bother is you're gonna use the Baseband Switcher)

10. Modify system/build.prop and /system/etc/media_profiles.xml

Step 3a is for older CM7's and some CM.com CM7's

Steps 4b & 4c are for CM9+

Steps 8 & 9 are optional if the stock Bravo baseband sucks for you and you end up using the Baseband Switcher anyways. Example -- I'm a US ATT user, and the stock US ATT baseband with the sbf sucks for me so I end up using BS and Argentina Basebands :confused:

If you're porting from a non-custom kernel Defy+ rom you have to add in /system/bin/battd and /system/bin/opperofdaemon from the Bravo base rom. Those files are universal in custom kernel roms. Forgetting to add in /system/bin/battd can possible cause a low battery brick. Bravo and Defy share the same battery driver, but Defy+ has a higher capacity battery and different driver.

build.prop before and after (using Quarx's CM10.1 as a reference, but the exact same changes are needed for every rom)

to make it easy to see the changes, top is untouched, bottoms changed lines are bold with the specific change italicized

BEFORE

# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=JOP40G
ro.build.display.id=cm_mb526-userdebug 4.2.1 JOP40G eng.quarx.20130208.185431 test-keys
ro.build.version.incremental=20130208
ro.build.version.sdk=17
ro.build.version.codename=REL
ro.build.version.release=4.2.1
ro.build.date=Fri Feb 8 18:56:33 OMST 2013
ro.build.date.utc=1360324593
ro.build.type=user
ro.build.user=quarx
ro.build.host=debian
ro.build.tags=release-keys
ro.product.model=MB526
ro.product.brand=MOTO
ro.product.name=MB526_DFP
ro.product.device=umts_jordan
ro.product.board=jordan
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=Motorola
ro.product.locale.language=en
ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=omap3
# ro.build.product is obsolete; use ro.product.device
ro.build.product=umts_jordan
# Do not try to parse ro.build.description or .fingerprint
ro.build.description=umts_jordan_emara-user 2.3.6 4.5.1-134_DFP-132 1317968148 release-keys
ro.build.fingerprint=MOTO/MB526_O2DE/umts_jordan:2.3.6/4.5.1-134_DFP-132/1317968148:user/release-keys
ro.build.characteristics=default
ro.cm.device=mb526
# end build properties
#
# system.prop for jordan
#

rild.libpath=/system/lib/libril-moto-umts-1.so

rild.libargs=-d /dev/ttyS0

ro.sf.lcd_density=240

# Default network type.
# 3 -> GSM/WCDMA (auto mode, according to PRL)
ro.telephony.default_network=3

# old ril switchs: signalstrength,facilitylock,datacall,icccardstatus,skipbrokendatacall
ro.telephony.ril.v3=skipbrokendatacall,signalstrength
ro.telephony.ril_class=MotoWrigley3GRIL

# The interfaces to get DNS data from when using mobile data
# Comma-separated
#mobiledata.interfaces=rmnet0,rmnet1,rmnet2,rmnet3,rmnet4,gannet0
mobiledata.interfaces=rmnet0

# wlan interface
wifi.interface = wlan0
softap.interface = wlan0
wifi.ap.interface = wlan0

# Time between scans in seconds. Keep it high to minimize battery drain.
# This only affects the case in which there are remembered access points,
# but none are in range.
wifi.supplicant_scan_interval=60

# The OpenGL ES API level that is natively supported by this device.
# This is a 16.16 fixed point number
ro.opengles.version = 131072

# Enable Jpeg HW decoder for images > 300 kb (disabled, buggy)
jpeg.libskiahw.decoder.enable=0
jpeg.libskiahw.decoder.thresh=300000

# Disable Jpeg HW encoder
jpeg.libskiahw.encoder.enable=0

# Forbid format of these partitions in mount menu :
ro.cwm.forbid_format=/misc,/devtree,/config,/boot,/recovery,/pds,/system

# Tell UsbService that we're using Usb.apk
ro.usb.use_custom_service=1

# use 1% battery steps
persist.sys.one_percent_batt=1

#Place files named by process names in /data/local/hwui.allow/ (or use HWA Selector app)
hwui.use.blacklist=true

# CpuGovernorService (require ondemand cpu governor)
dev.pm.dyn_samplingrate=1

dalvik.vm.heapstartsize=5m
dalvik.vm.heapsize=48m

# Default usb config
persist.sys.usb.config=mass_storage,adb

#=========================================================================================
# Note about persist.xxx properties :
#
# Don't edit values in this file, they are only used to set the default values on upgrade
# use setprop tool if you want to change them.
#=========================================================================================
# LED charging indicator mode
# off = keep LED off during charging
# white = white LED for 'charging', green LED for 'charged'
# rgb = mixed yellowish LED for 'charging', green LED for 'charged'
persist.sys.charge_led=white
# Brightness scaling of the button backlight
persist.sys.button_brightness=100
# use default multitouch configuration
persist.sys.multitouch=2
# enable ADB
persist.service.adb.enable=1
#=========================================================================================

#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.rommanager.developerid=cyanogenmodnightly
keyguard.no_require_sim=true
ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html
ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html
ro.com.google.clientidbase=android-google
ro.com.android.wifi-watchlist=GoogleGuest
ro.setupwizard.enterprise_mode=1
ro.com.android.dateformat=MM-dd-yyyy
ro.com.android.dataroaming=false
ro.cm.version=10.1-20130208-NIGHTLY-mb526
ro.modversion=10.1-20130208-NIGHTLY-mb526
ro.config.ringtone=Orion.ogg
ro.config.notification_sound=Deneb.ogg
ro.config.alarm_alert=Hassium.ogg
ro.media.capture.flip=horizontalandvertical
ro.com.google.locationfeatures=1
ro.telephony.call_ring.multiple=false
ro.telephony.call_ring.delay=3000
ro.media.dec.jpeg.memcap=20000000
dalvik.vm.lockprof.threshold=500
dalvik.vm.checkjni=false
dalvik.vm.dexopt-data-only=1
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=512k
dalvik.vm.heapmaxfree=2m
ro.carrier=unknown
ro.url.safetylegal=http://www.motorola.com/staticfiles/Support/legal/?model=MB525
ro.media.capture.maxres=5m
ro.media.capture.flash=led
ro.media.capture.flashIntensity=41
ro.media.capture.torchIntensity=25
ro.media.capture.classification=classE
dalvik.vm.dexopt-flags=m=y
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt

AFTER

# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=JOP40G
[B]ro.build.display.id=cm_[I]mb520[/I]-userdebug 4.2.1 JOP40G eng.quarx.20130208.185431 test-keys
[/B]ro.build.version.incremental=20130208
ro.build.version.sdk=17
ro.build.version.codename=REL
ro.build.version.release=4.2.1
ro.build.date=Fri Feb 8 18:56:33 OMST 2013
ro.build.date.utc=1360324593
ro.build.type=user
ro.build.user=quarx
ro.build.host=debian
ro.build.tags=release-keys
[B]ro.product.model=[I]MB520[/I][/B]
ro.product.brand=MOTO
[B]ro.product.name=[I]MB520[/I]_DFP[/B]
[B]ro.product.device=umts_[I]kobe[/I][/B]
[B]ro.product.board=[I]kobe[/I][/B]
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=Motorola
ro.product.locale.language=en
ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=omap3
# ro.build.product is obsolete; use ro.product.device
[B]ro.build.product=umts_[I]kobe[/I][/B]
# Do not try to parse ro.build.description or .fingerprint
ro.build.description=[B]umts_[I]kobe[/I][/B]_emara-user 2.3.6 4.5.1-134_DFP-132 1317968148 release-keys
ro.build.fingerprint=[B]MOTO/[I]MB520[/I]_O2DE/umts_[I]kobe[/I][/B]:2.3.6/4.5.1-134_DFP-132/1317968148:user/release-keys
ro.build.characteristics=default
[B]ro.cm.device=[I]mb520[/I][/B]
# end build properties
#
[B]# system.prop for [I]kobe[/I][/B]
#

rild.libpath=/system/lib/libril-moto-umts-1.so

rild.libargs=-d /dev/ttyS0

ro.sf.lcd_density=240

# Default network type.
# 3 -> GSM/WCDMA (auto mode, according to PRL)
ro.telephony.default_network=3

# old ril switchs: signalstrength,facilitylock,datacall,icccardstatus,skipbrokendatacall
ro.telephony.ril.v3=skipbrokendatacall,signalstrength
ro.telephony.ril_class=MotoWrigley3GRIL

# The interfaces to get DNS data from when using mobile data
# Comma-separated
#mobiledata.interfaces=rmnet0,rmnet1,rmnet2,rmnet3,rmnet4,gannet0
mobiledata.interfaces=rmnet0

# wlan interface
wifi.interface = wlan0
softap.interface = wlan0
wifi.ap.interface = wlan0

# Time between scans in seconds. Keep it high to minimize battery drain.
# This only affects the case in which there are remembered access points,
# but none are in range.
wifi.supplicant_scan_interval=60

# The OpenGL ES API level that is natively supported by this device.
# This is a 16.16 fixed point number
ro.opengles.version = 131072

# Enable Jpeg HW decoder for images > 300 kb (disabled, buggy)
jpeg.libskiahw.decoder.enable=0
jpeg.libskiahw.decoder.thresh=300000

# Disable Jpeg HW encoder
jpeg.libskiahw.encoder.enable=0

# Forbid format of these partitions in mount menu :
ro.cwm.forbid_format=/misc,/devtree,/config,/boot,/recovery,/pds,/system

# Tell UsbService that we're using Usb.apk
ro.usb.use_custom_service=1

# use 1% battery steps
persist.sys.one_percent_batt=1

#Place files named by process names in /data/local/hwui.allow/ (or use HWA Selector app)
hwui.use.blacklist=true

# CpuGovernorService (require ondemand cpu governor)
dev.pm.dyn_samplingrate=1

dalvik.vm.heapstartsize=5m
dalvik.vm.heapsize=48m

# Default usb config
persist.sys.usb.config=mass_storage,adb

#=========================================================================================
# Note about persist.xxx properties :
#
# Don't edit values in this file, they are only used to set the default values on upgrade
# use setprop tool if you want to change them.
#=========================================================================================
# LED charging indicator mode
# off = keep LED off during charging
# white = white LED for 'charging', green LED for 'charged'
# rgb = mixed yellowish LED for 'charging', green LED for 'charged'
persist.sys.charge_led=white
# Brightness scaling of the button backlight
persist.sys.button_brightness=100
# use default multitouch configuration
persist.sys.multitouch=2
# enable ADB
persist.service.adb.enable=1
#=========================================================================================

#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.rommanager.developerid=cyanogenmodnightly
keyguard.no_require_sim=true
ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html
ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html
ro.com.google.clientidbase=android-google
ro.com.android.wifi-watchlist=GoogleGuest
ro.setupwizard.enterprise_mode=1
ro.com.android.dateformat=MM-dd-yyyy
ro.com.android.dataroaming=false
[B]ro.cm.version=10.1-20130208-NIGHTLY-[I]mb520[/I]
ro.modversion=10.1-20130208-NIGHTLY-[I]mb520[/I][/B]
ro.config.ringtone=Orion.ogg
ro.config.notification_sound=Deneb.ogg
ro.config.alarm_alert=Hassium.ogg
ro.media.capture.flip=horizontalandvertical
ro.com.google.locationfeatures=1
ro.telephony.call_ring.multiple=false
ro.telephony.call_ring.delay=3000
ro.media.dec.jpeg.memcap=20000000
dalvik.vm.lockprof.threshold=500
dalvik.vm.checkjni=false
dalvik.vm.dexopt-data-only=1
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=512k
dalvik.vm.heapmaxfree=2m
ro.carrier=unknown
ro.url.safetylegal=http://www.motorola.com/staticfiles/Support/legal/?model=MB525
[B]ro.media.capture.maxres=[I]3m[/I][/B]
[B][I]ro.media.capture.flash=led --- [I]Delete this line[/I]
ro.media.capture.flashIntensity=41 --- [I]Delete this line[/I]
ro.media.capture.torchIntensity=25[/I][/B] --- [I]Delete this line[/I]
[B]ro.media.capture.classification=[I]classA[/I][/B]
dalvik.vm.dexopt-flags=m=y
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt

media_profiles.xml needed change

This disables support for 720p videos and 848x480 wide screen (16x9) recording since we can't record at those resolutions with the Bravo driver.

'Sometimes videos can be recorded in 848x480 (16x9) using the Defy libsoccamera.so driver, but we lose the ability to take photos (panorama still works). I've only tested 16x9 video on CM10. Just flash an unchanged Defy rom to test if it'll work with CM9 or CM10.1

media_profiles.xml before any changes are done, with the required changes

<!-- <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
<Video codec="m4v"
bitRate="10000000"
width="1280"
height="720"
frameRate="24" />

<Audio codec="aac"
bitRate="96000"
sampleRate="16000"
channels="1" />
</EncoderProfile>[B] [I]-->[/I] (select and cut this) [/B]

<EncoderProfile quality="high" fileFormat="mp4" duration="30">
<Video codec="m4v"
bitRate="6000000"
width="848"
height="480"
frameRate="24" />

<Audio codec="aac"
bitRate="96000"
sampleRate="16000"
channels="1" />
</EncoderProfile> [B](and paste it here)[/B]

What it should look like afterwards

<!-- <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
<Video codec="m4v"
bitRate="10000000"
width="1280"
height="720"
frameRate="24" />

<Audio codec="aac"
bitRate="96000"
sampleRate="16000"
channels="1" />
</EncoderProfile>

<EncoderProfile quality="high" fileFormat="mp4" duration="30">
<Video codec="m4v"
bitRate="6000000"
width="848"
height="480"
frameRate="24" />

<Audio codec="aac"
bitRate="96000"
sampleRate="16000"
channels="1" />
</EncoderProfile> [B]-->[/B]