[Xiaomi Redmi Note 4 [Snapdragon] ROMs, Kernels, Re] knreddy:
Another Experience sharing with Redmi Note 4 ( 4x )Snapdragon dual boot

Experience sharing:

Working configuration

Prerequisite:

a)	Redmi Note 4 Indian (snapdragon) = Redmi note 4x with MIUI 8x or 9x or 10x with unlocked bootloader

b)	Latest TWRP installed from fastboot

c)	First backup all your data including Internal Storage, then boot to TWRP>WIPE>FOMATE DATA then type 'yes' and tap enter it . you (may ) need to reboot to recovery and the redo above i.e. TWRP>WIPE>FOMATE DATA then type 'yes' and tap enter it .

d )TWRP>WIPE>ADVANCE WIPE > select all except external sd >ok

Procedure Followed:

1)	just after above step d) without any reboot , Installed (from TWRP) lineage-15.0-20171008-MOD-mido.zip

downloaded from

https://androidfilehost.com/?fid=745849072291679534

2)	Installed (from TWRP) magisk 16.7 or above

3)	Installed (from TWRP) lazyflasher-no-verity-opt-encrypt

4)	Rebooted to system (it will take time)

5)	Installed the latest Dual Boot Patcher ( DBP) downloaded from

https://dbp.noobdev.io/

(Go to Settings ==>Installed apps==>All==>Documents==>Enable (incase of MIUI 7.x or MIUI8.x )

Caution on DBP versions :Always latest may not work on old phones / OSes e.g. DualBootPatcherAndroid-9.3.0.r866.g9227f348 is able to produce flashable.zip but not by v9.3.0.r888 or v9.3.0.r912 or v9.3.0.r936 or v9.3.0.r944 or v9.3.0.r952 from the following ROM files. However, Version 9.3.0.r866 was hanging while switching from primary to data-slot at Boot UI(it needs press and hold of power button or wait for 90 sec to restart, where as BootUI by 9.3.0.r944 or 9.3.0.r952 is OK when Data-slot ROM is established by them and the best is DBP version 9.3.0.r463 at least for the following ROMs

6.	Open DBP app and click on ROMs and grant it a root access.

7.	Click yes to update the "Primary Kernel"

8.	Go to "Patch Zip File"

9.	Click on "Add flashable zip"

10)	Choose the required ROM xiaomi.eu_multi_HMNote4X_8.12.20_v10-7.0.zip as data-slot

downloaded from

https://excellmedia.dl.sourceforge..../xiaomi.eu_multi_HMNote4X_8.12.20_v10-7.0.zip

(xiaomi.eu can be installed at Data-slot , where as MIUI 8.x, 9.x, 10.x worked only as Primary)

11.	Click "OPEN

12.	Under partition configuration choose "Data slot”

13.	Enter and ID as "euMIUI463" (or any other name! this I have coined to indicate ROM and DBP versions)

14.	Click on "Continue"

15.	Click on "SAVE"

16.	Click on "Right Mark" to patch the zip file

17.	Wait till the operation to finish

18.	Go to "ROMs"

19.	Click on "Add patched file" to flash it

20.	Click on "Keep the current location"

21.	Flash and wait till the operation to finish

22.	Go to "ROMs" to make sure that the new second ROM is added

23.	Now close the app and re-open it for refreshing

24.	Adding the "Gapps Package"

25.	Go to "Patch Zip File"

26.	Click on "Add flashable zip"

27.	Choose the “open_gapps-arm64-8.0-nano-20181229.zip”

28.	Click "OPEN"

29.	Check and select Data slot , make sure that the ID in step 10 "euMIUI463"

30.	Repeat the steps from 11 to 18

31.	Reboot

32.	Install the DBP again

33.	Choose the primary ROM and reboot

34.	To install boot ui==>Go to settings==>click on install boot ui (it will give you option to boot to which rom on every reboot)(This step is optional)(in order to use 'boot ui' update ramsdisk of both rom)

The Utilities ZIP is a flashable zip in the recovery which is based on AROMA installer which provides basic dual boot system modification tools like changing the current boot ROM or wiping a ROM etc. It is very useful when your device is in boot loop or you want to change your boot ROM using the recovery.

Observation:

1)	BootUI with DBP version 9.3.0.r463 is fully working. However other versions may freeze , if ROM switching is involved [needs pressing the power button till restarts (for approx 12 seconds) and release ] or wait for 90 seconds.

2)	if any flashing is required from TWRP after above process (step 1 to 34) , the file is to be patched first as primary (if flashing is required on primary ROM) or Data Slot with Same ID (above e.g. euMIUI463 ) (if flashing is required on data slot ROM), otherwise we may lose root and BootUI

3)	After above process (step 1 to 34), If we format (TWRP>Wipe> Format>yes> swipe to wipe)we will lose ROM on data slot

4)	After above process (step 1 to 34)If we wipe cache (TWRP>Wipe> Advanced wipe > Cache> swipe to wipe ), we will loose BootUI.

5)	After above process (step 1 to 34)If we wipe Dalvik/ART cache (TWRP>Wipe> Advanced wipe >select Dalvik/ART cache > swipe to wipe ), we will not loose BootUI

Other ROMs

1.	MULTIPRO_MIUI9_8.3.1_MIDO_7.0.zip worked as primary but not as as data-slot

2.	MULTIPRO_MIUI8_7.4.6_MIDO_6.0.zip worked as data-slot / primary (black screen takes long before boot animation, but it is pre rooted)

3. xiaomi.eu_multi_HMNote4X_8.12.20_v10-7.0.zip worked as data-slot / primary

4.	AOSP Extended 5.8 (Android 8.1.0 but old build) at primary & LOS15.0 (Android 8.0) at Data-Slot, but LOS can be switched from AOSP Extended 5.8 (old build) to LOS15.0 but not reverse. However AOSP Extended can be optained by rebooting to recovery and installing DualBootUtilities-9.3.0.r866.zip and switching to primary (BootUI is not compatible, it triggers Bootloader)

But the above is not easy with miui_HMNote4XGlobal_V8.2.4.0.MCFMIDL_b340f1c79f_6.0

or mido_global_images_V10.1.1.0.NCFMIFI_20181029.0000.00_7.0_global possibility under exploration

(prerequisite step –c to be followed , work as primary only)

advantages

1)	Auto boot on charger working on both [by modifying init.rc of boot.img (as experience shared by me or others at somewhere else), it works even after unrooting]

[But if BootUI is installed, primary may not be able to Auto Boot Charge untill init.rc of the additional boot image placed by dual boot patcher at \Internal shared storage\MultiBoot\primary is modified ]

2)	Battery charge limit upper and lower limits are working with selecting charging_enabled (universal) but after installation of some apps, lower limit may not effective,but if lower limit is needed, mcs2018.8.8.zip with charger switch apk (GUI) (now renamed to ACC 2018.12.10 may used but it is not compatible with above apk .

I am using acc with the following configuration capacity=4,101,30-60 #<shutdown,coolDown,resume-pause>

It will shutdown at 4% , it will continually charge because of 101 to next defined level , minimum resume level is 30% and charging stops at 60% .

However minimum level will reset, if we restart the phone.

Note: if charger is connected while the phone is at shut-down level or lower , it will not shutdown . Hence this configuration is useful when phone is shutdown due to low battery level and we connect it to charger and forgot to on the phone, as it it will on the phone in auto when combined with Auto Boot on Charge)

3)	Aptx working (however it is to be enabled by flashing aptx enabler ( as experience shared by me or others at somewhere else), once enabled it works after unrooting also)

4)	ZaZa remote works for learned signals LG TV and Onkyo receiver etc but Airtel will not work, Mi Remote to be installed for airtel.

5)	One Rooted OS (flexible )in regular use, further if any problem is faced with financial apps, it can be switched to Data Slot (non rooted)

6)	BootUI for duel booting

But all TWRP flashable files are to be patched with suitable options with DBP before flashing.

Addnl info: The following camera apps are installed to supplement basic camera of

LOS 15

1) OnePlus port downloaded from

https://drive.google.com/file/d/0B8CVLsJGOgyTRVNWVS1BQTFkaVU/view?usp=drivesdk

2) Manual camera (it has auto also) downloaded from

https://drive.google.com/open?id=0B8...WJROTNxQ0NXVzQ

Topic:

https://xdaforums.com/redmi-note-4/themes/one-plus-5-camera-port-redmi-note-4-7-0-t3656125

Both cameras are working with most of options enabled on Lineage OS 15 (installed over MIUI 10 mido firmware )

OnePlus port appears to be superior over Manual camera

3) Bacon camera works on euMIUI463 in full manual mode as default app does not have manual aperture.

Caution on camera flashable zip mods: Do not flash MIUI Camera …Mods…zip especially from TWRP as they may not work on Samsung sensor and if we flash uninstaller to remove them, phone may not boot. Even we cannot delete their files from location, we have to reflash the ROM.

Caution on upgrading DBP: latest version may not be suitable always as DBP is common to many phones and OS versions. It may be better not to update DBP, when present version is working satisfactorily. DBP version 9.3.0.r463 is stable for this phone and OS

Nandroid Backup and Restoration

CAUTION on Backup and restore: any data on internal drive like photos, messages etc or even Data or settings or configurations of apps, if they are saving just on visible area of internal drive (which is visible to user without root ) will be lost.

A) Backup

1) Wipe out other ROMs if already installed since they will not work but occupy space.

(Dual Boot Patcher >Options(3 horizontal lines at RHS top) > ROMs >Options of ROM to be wiped (3 vertical dots)>Wipe ROM > select all like System, Cache, Data, Dalvik Cache and MultiBoot files > OK)

2) Install all general android applications optionally (e.g. addnl camera , WPS Office, Cam scanner, Repligo reader, Translate, Maps, Light flow, Call recorder, User dictionary Plus, etc) which do not update very frequently (generally non financial) and open them to check functionality.

3) Boot to Recovery (TWRP)

4) Backup > select System, Vendor, Data, Cache, Boot and Persist

Select storage at MicroSD or USB OTG

(it may be around 4GB based no apps installed for LOS15.0)

It may take around 500 seconds

5) Boot to system

6) Now install ROMs e.g. Data-slot ROM

(Dual Boot Patcher >Options(3 horizontal lines at RHS top) > ROMs > in App Flashing > +>Add patched file>select patched ROM>……….as described above

7) Now Reboot to Data-Slot ROM

8) Install all general android applications optionally (e.g. addnl camera etc) DND, which do not update very frequently (generally non financial) and open them to check functionality.

9) Reboot Back to Primary ROM

10) Back up Data-slot ROM

(Dual Boot Patcher >Options(3 horizontal lines at RHS top) > settings > Change Backup directory > Browse to your favorite folder generally on External MicroSD

Dual Boot Patcher >Options(3 horizontal lines at RHS top) > ROMs >Options of ROM to be Backed up (3 vertical dots)>Backup ROM > select all like System, Cache, Data, Dalvik Cache and MultiBoot files > OK)

It takes some time.

B) Restoration

1) Boot to TWRP Recovery

2) Touch on Restore > select Back up > swipe to restore

(Select System, Vendor, Data, Cache, Boot and Persist) it may take 180 seconds

3) Boot to system

Cancel at Dual Boot Patcher Boot UI>Switch ROM> Primary (it may be default )

4) ROM restore from Dual Boot Patcher

(Dual Boot Patcher >Options(3 horizontal lines at RHS top) > ROMs > in App Flashing > +>Add backup>select backup file (if it says no back up file , go to settings and select backup location) >ok> select all like System, Cache, Data, Dalvik Cache and MultiBoot files > select Data Slot (to be selected suitably based on what is backed up) >enter an id (I have entered eumiui463) >OK>touch on Tick of Restore Backup)

5) update ramdrive

( Dual Boot Patcher >Options(3 horizontal lines at RHS top) > ROMs >Options of ROM whose ramdrive to be updated (3 vertical dots)> touch Update ramdrive,

6) check by rebooting each ROM after getting successful ramdrive updation.

It is only experience sharing , hence no credit or responsibility.