[Redmi Note 2 Android Development] hachikingrn2:
Thanks!

In fact, I want to compile the ROM from Android source code.

I found @ibilux and @Azizb750 has maintained the Redmi Note 2 kernel, device tree and vendor. From their source code, I have compiled the Lineage 16.0 ROM, it did work on my old RN2. But the battery usage cost too quick. I have compared the Xiaomi official ROM and the Lineage 16.0 ROM in terms of the `build.prop` file, there are lots of configurations missing in the Lineage ROM. The following `build.prop` is from the Xiaomi official ROM:

# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=LRX22G
ro.build.display.id=LRX22G
ro.custom.gitcommit.id=acc13804f321191fd19622445f1e6b453780ebe7
ro.custom.external.version=LLDLM07.1.0_M861
ro.custom.internal.version=LLDLM07.1.0.1.0T30A0801_M861
ro.build.display.id.cta=H3Y_S100_20150801
ro.build.version.incremental=V9.6.3.0.LHMMIFD
ro.build.version.sdk=21
ro.build.version.codename=REL
ro.build.version.all_codenames=REL
ro.build.version.release=5.0.2
ro.build.version.security_patch=2016-12-01
ro.build.version.base_os=
ro.build.date=Wed Aug 1 20:12:08 CST 2018
ro.build.date.utc=1533125528
ro.build.type=user
ro.build.user=builder
ro.build.host=c4-miui-ota-bd15.bj
ro.build.tags=release-keys
ro.product.model=Redmi Note 2
ro.product.brand=Xiaomi
ro.product.name=hermes
ro.product.device=hermes
ro.product.mod_device=hermes_global
ro.product.board=
# ro.product.cpu.abi and ro.product.cpu.abi2 are obsolete,
# use ro.product.cpu.abilist instead.
ro.product.cpu.abi=arm64-v8a
ro.product.cpu.abilist=arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=armeabi-v7a,armeabi
ro.product.cpu.abilist64=arm64-v8a
ro.product.locale.language=en
ro.product.locale.region=GB
ro.wifi.channels=
ro.board.platform=mt6795
# ro.build.product is obsolete; use ro.product.device
ro.build.product=hermes
# Do not try to parse description, fingerprint, or thumbprint
ro.build.description=hermes-user 5.0.2 LRX22G V9.6.3.0.LHMMIFD release-keys
ro.build.fingerprint=Xiaomi/hermes/hermes:5.0.2/LRX22G/V9.6.3.0.LHMMIFD:user/release-keys
ro.build.characteristics=default
# end build properties
#
# from device/xiaomi/hermes/system.prop
#
#
# system.prop for generic sdk
#

rild.libpath=/system/lib/mtk-ril.so
rild.libargs=-d /dev/ttyC0

# MTK, Infinity, 20090720 {
wifi.interface=wlan0
# MTK, Infinity, 20090720 }

# MTK, mtk03034, 20101210 {
ro.mediatek.wlan.wsc=1
# MTK, mtk03034 20101210}
# MTK, mtk03034, 20110318 {
ro.mediatek.wlan.p2p=1
# MTK, mtk03034 20110318}

# MTK, mtk03034, 20101213 {
mediatek.wlan.ctia=0
# MTK, mtk03034 20101213}

#
wifi.tethering.interface=ap0
#

ro.opengles.version=196608
#ro.kernel.qemu=1

wifi.direct.interface=p2p0

# USB MTP WHQL
ro.sys.usb.mtp.whql.enable=0

# Power off opt in IPO
sys.ipo.pwrdncap=2

ro.sys.usb.storage.type=mtp,mass_storage

# USB BICR function
ro.sys.usb.bicr=yes

# USB Charge only function
ro.sys.usb.charging.only=yes

# audio
ro.camera.sound.forced=0
ro.audio.silent=0

ro.zygote.preload.enable=0

# temporary enables NAV bar (soft keys)
# qinhai close NAV bar for cx861
qemu.hw.mainkeys=1

ro.kernel.zio=38,108,105,16
#ro.kernel.qemu=1
#ro.boot.selinux=disable
#ro.kernel.qemu.gles=0

# Disable dirty region for Mali
debug.hwui.render_dirty_regions=false

#qinhai change density 640 to 480
ro.sf.lcd_density=480

# button jack mode & switch for cx861
persist.sys.button_jack_profile=volume
persist.sys.button_jack_switch=0

#default timezone
persist.sys.defaulttimezone=Asia/Shanghai

# add by qin for runin
ro.build.device.ninur=64687

#enable dirac effect for speaker
persist.audio.dirac.speaker=true

#default thermal policy
persist.sys.aries.power_profile=middle

#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.miui.version.code_time=1524672000
ro.rom.zone=2
ro.miui.ui.version.code=7
ro.miui.ui.version.name=V9
ro.com.google.ime.themes_dir=/system/etc/gboard_theme
ro.com.google.ime.theme_file=xiaomi_theme_20171222.zip
persist.sys.job_delay=true
persist.sys.mcd_config_file=/system/etc/mcd_default.conf
persist.sys.perf.debug=true
persist.sys.whetstone.level=2
ro.setupwizard.mode=OPTIONAL
ro.com.google.gmsversion=5.0_r5
drm.service.enabled=true
ro.com.android.dateformat=MM-dd-yyyy
ro.carrier=unknown
persist.tone_relative_volume=80
ro.mediatek.chip_ver=S01
ro.mediatek.version.release=ALPS.L0.MP6.V3.18_LCSH6795.LWT.L_P228
ro.mediatek.platform=MT6795
ro.telephony.sim.count=2
persist.radio.default.sim=0
persist.radio.multisim.config=dsds
persist.md.perm.checked=to_upgrade
persist.gemini.sim_num=2
ro.gemini.smart_sim_switch=false
ril.specific.sm_cause=0
bgw.current3gband=0
ril.external.md=0
ro.mtk_cam_lomo_support=1
ro.btstack=blueangel
ro.sf.hwrotation=0
ril.current.share_modem=2
curlockscreen=1
ro.mediatek.gemini_support=true
persist.mtk.wcn.combo.chipid=-1
persist.mtk.wcn.combo.coredump=no
service.wcn.driver.ready=no
fmradio.driver.enable=1
ril.first.md=1
ril.flightmode.poweroffMD=1
ril.telephony.mode=0
dalvik.vm.mtk-stack-trace-file=/data/anr/mtk_traces.txt
mediatek.wlan.chip=MT6630
mediatek.wlan.module.postfix=_mt6630
ril.read.imsi=1
ril.radiooff.poweroffMD=0
ro.xm_international=1
ro.mediatek.version.branch=L0.MP6
ro.mediatek.version.sdk=4
ro.mtk_gemini_support=1
ro.mtk_lossless_bt_audio=1
ro.mtk_bessurround_support=1
ro.mtk_gemini_enhancement=1
ro.mtk_wapi_support=1
ro.mtk_bt_support=1
ro.mtk_wappush_support=1
ro.mtk_agps_app=1
ro.mtk_voice_unlock_support=1
ro.mtk_voice_contact_support=1
ro.mtk_matv_analog_support=1
ro.mtk_wlan_support=1
ro.mtk_gps_support=1
ro.mtk_omacp_support=1
ro.mtk_bt_fm_over_bt=1
ro.mtk_search_db_support=1
ro.mtk_dialer_search_support=1
ro.mtk_dhcpv6c_wifi=1
ro.have_aacencode_feature=1
ro.mtk_oma_drm_support=1
ro.mtk_widevine_drm_support=1
ro.mtk_eap_sim_aka=1
ro.mtk_fm_recording_support=1
ro.mtk_flv_playback_support=1
ro.mtk_send_rr_support=1
ro.mtk_emmc_support=1
ro.mtk_tetheringipv6_support=1
ro.mtk_phone_number_geo=1
ro.mtk_shared_sdcard=1
ro.mtk_enable_md1=1
ro.mtk_flight_mode_power_off_md=1
ro.mtk_aal_support=1
ro.mtk_ultra_dimming_support=1
ro.mtk_miravision_support=1
ro.mtk_miravision_image_dc=1
ro.mtk_wfd_support=1
ro.mtk_wfd_sink_support=1
ro.mtk_wfd_sink_uibc_support=1
ro.mtk_wifi_mcc_support=1
ro.mtk_sim_hot_swap=1
ro.mtk_thumbnail_play_support=1
ro.mtk_bip_scws=1
ro.mtk_cmcc_ft_precheck_support=1
ro.mtk_world_phone=1
ro.mtk_perfservice_support=1
ro.mtk_owner_sdcard_support=1
ro.mtk_cta_set=1
ro.mtk_antibricking_level=2
ro.mtk_zsdhdr_support=1
ro.mtk_cam_mfb_support=0
ro.mtk_slow_motion_support=1
ro.mtk_lte_support=1
ro.mtk_umts_tdd128_mode=1
ro.mtk_cam_mav_support=1
ro.mtk_cam_vfb=1
ro.mtk_rild_read_imsi=1
ro.sim_refresh_reset_by_modem=1
ro.mtk_external_sim_support=1
ro.mtk_live_photo_support=1
ro.mtk_motion_track_support=1
ro.mtk_slidevideo_support=1
ro.mtk_bg_power_saving_support=1
ro.mtk_bg_power_saving_ui=1
ro.have_aee_feature=1
ro.sim_me_lock_mode=0
ro.mtk_voice_extension_support=1
wfd.dummy.enable=1
ro.mediatek.project.path=device/xiaomi/hermes
ro.cit.nonrootbuild=true
persist.sys.labtest_flag=false
persist.sys.dalvik.vm.lib.2=libart.so
ro.malloc.impl=dlmalloc
dalvik.vm.isa.arm64.features=default
dalvik.vm.isa.arm.features=default
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt
ro.product.first_api_level=21
ro.miui.has_real_blur=1
ro.miui.has_handy_mode_sf=1
fw.max_users=5
ro.product.mod_device=hermes_global
ro.config.sms_received_sound=FadeIn.ogg
ro.config.sms_delivered_sound=MessageComplete.ogg
ro.com.android.mobiledata=false
ro.product.manufacturer=Xiaomi
ro.config.elder-ringtone=Angel.mp3
ro.com.android.dataroaming=false
persist.sys.mitalk.enable=true
persist.enable_task_snapshots=false
sys.miui.shutdown.waittime=500
persist.sys.watchdog_enhanced=true
ro.config.ringtone=Ring_Synth_04.ogg
ro.config.notification_sound=pixiedust.ogg
ro.config.alarm_alert=Alarm_Classic.ogg
ro.product.cuptsm=XIAOMI|ESE|02|01
persist.power.useautobrightadj=true
keyguard.no_require_sim=true
ro.com.google.clientidbase=android-xiaomi
persist.sys.miui_feature_config=/system/etc/miui_feature/lite.conf
dalvik.vm.heapgrowthlimit=128m
dalvik.vm.heapmaxfree=8m
dalvik.vm.heapminfree=512k
dalvik.vm.heapsize=256m
dalvik.vm.heapstartsize=8m
dalvik.vm.heaptargetutilization=0.75