yashsingh1/xdaforums huggingface dataset:
[G2 General] ktetreault14:
REMEMBER THIS IS AN ALPHA

Original Dual-Boot Patcher Thread http://xdaforums.com/showthread.php?t=2447534

DISCLAIMER: We are not responsible for any issues, problems, or broken phones, which may have come from using any data or information you receive from this thread. Using anything here, will most likely violate your cell phone's warranty or contract. That is also your 100% responsibility, to know, and your responsibilty if you do. If you don't know what you are doing, or you think you do, and you brick your phone, or something POSITIVE OR NEGATIVE changes with your phone, it is all 100% your responsibility. Use the following data, information, and links at YOUR OWN RISK!

YOU MUST REMEMBER TO FLASH A MODEM THAT WILL ALLOW YOUR FIRMWARE BOOT UP IE; LS980(ZV8)(ZVC)

CURRENTLY ONLY LS980 SUPPORTED

VS/LS980 and D802 TESTED

Going To Secondary Rom from Primary {FIRST TIME}

Step 1. Assuming you already have a primary rom setup, patch your .zips using the .apk patcher and reboot into recovery

Step 2a. If you have a device that requires switching modems to boot AOSP and LG firmware do so now

Step 2b. Flash your patched .zips and choose to install as either Dual, or one of 3!!! Multi-Boot-Slots

Step 3. Reboot and Enjoy your multibooted devices!!

Step 4. Go and thank [MENTION=4277844]chenxiaolong[/MENTION] one more time!!

Going back To Primary Rom from Secondary [Vice-Versa]

Method 1: USE IF YOU DONT HAVE TO CHANGE MODEM

Step 1. Go Into Dual-Boot Patcher Apk

Step 2. Click On Primary Rom (If you set your kernel)

Step 3. Reboot

Method 2: USE IF YOU DO HAVE TO FLASH A MODEM

Step 1. Reboot into Recovery

Step 2. Flash the Modem for the rom you wish to boot into

Step 3. Flash the DualBoot Utility from below

Step 4. Choose the rom you wish to boot from the Utility

Step 5. Reboot Into Rom

YOU MIGHT HAVE TO RESTORE A BOOT.IMG TO SWITCH ROMS AS THE FUNCTION IS NOT FULLY DEVELOPED

DOWNLOADS

LG G2 MODEM DOWNLOADS THANKS

[MENTION=2684188]autoprime[/MENTION]

http://downloads.codefi.re/autoprime/LG/LG_G2/G2_modems

LATEST SNAPSHOT DUALBOOT PATCHER APK[/U [MENTION=4277844]chenxiaolong[/MENTION]

https://snapshots.noobdev.io//

Dual-Boot Switcher.zip Alpha

USE THIS TO SWITCH BETWEEN ROMS:

THANKS [MENTION=4277844]chenxiaolong[/MENTION]

https://drive.google.com/file/d/0B1d_Il6yTO73U3dtUTMwby1hWWc/view?usp=sharing
[G2 General] ktetreault14:
Working rom combinations

LS980:

Me: KitKat Bootloader/Primary-CloudyFLex (ZVC)/Secondary-VanirAOSP (ZV8)

D802:

[MENTION=5500870]vPro97[/MENTION] Bootloader/Primary-CloudyFLex/Secondary-VanirAOSP
[G2 General] ktetreault14:
Testers pm me and we can hangout
[G2 General] ktetreault14:
Tutorials (Eventually)

Patching ROM

[YOUTUBE][/YOUTUBE]

Patching GAPPS

https://docs.google.com/file/d/0B1d_Il6yTO73eHZRbW1SWE9GZUk/edit?usp=docslist_api
[G2 General] ktetreault14:
Just asked permission to put apk downloads in my thread for ease of access. Also asked if it would be possible to use an automatic modem switcher depending on if you are on stock KK or LP ROM which needs jb modem.
[G2 General] vPro97:
Wow this is fantastic! Really great news! I'm stoked. I can't help with testing but this has to be the best thing I have read all day.

I have a D802 and everything (except for 4.2 roms) uns on the KitKat modem, so I think it would be easier for D802 users due to no modem change.
[G2 General] ktetreault14:
exactly!! Im so glad someone has finally commented on this. I am also in the process of seeing about dual-booting roms other than slim. Just have to do a little more work. lol and hopefully lollipop on dualboot
[G2 General] vPro97:
Yeah exactly. Dual booting lollipop and a stable stock rom with great camera and stability would be the ideal scenario. I just don't quite have the time to test it out (well it's mostly if something goes sour) but I'll be waiting for feedback from other people before jumping into it. But once again it's great you found and tried this.
[G2 General] ktetreault14:
No problems at all with the slim ROM that he provided through the automatic apk patcher. Or the gapps. All installed correctly to the correct spots /system/dual/ and /data/dual/ going to be testing lollipop though. I tried doing it myself lol. See how it goes.
[G2 General] vPro97:
Is this dual boot only avaliable for D800? I don't see the option for a D802
[G2 General] ktetreault14:
It shows as only available for d800. As I stated I am using a LS980 and all worked fine, just had to switch modems.
[G2 General] marchino123:
Why don't I use other ROM?
[G2 General] ktetreault14:
Can you be a little more clear to your question please?
[G2 General] marchino123:
Why can't I use other ROM?
[G2 General] wulsic:
Nice this dualbooting although we can replace it with multirom if LG finally unlocks the bootloader or if somebody hacks the bootloader. This reminds me of the lg optimus 2x dualboot method also using a dualboot app switcher.

It's a nice alpha thing but I wont be using it cause 16gb and a full system/internal storage isnt so nice with dualbooting :) but maybe I will look into the script/app later to add more support or update it a bit :]
[G2 General] ktetreault14:
Because any other ROM that isn't SLIMRom isn't directly supported in the apk version of the patcher. It would have to be patched manually. Refer to original Dev thread at top of Op
[G2 General] marchino123:
Thank you for the information
[G2 General] ktetreault14:
Great news! Just patched a 5.0 ROM using the latest snapshot of the apk. Flashing and will report back
[G2 General] ktetreault14:
This is the error I get when patching 5.0 files
[G2 General] ktetreault14:
Mhhh???
[G2 General] tommypacker:
That normally means something is wrong with the updater script.

Not sure if it's different in this case
[G2 General] ktetreault14:
I have no idea when it comes to the updater binary
[G2 General] tommypacker:
Try another 5.0 rom
[G2 General] ktetreault14:
I did and same problem
[G2 General] wulsic:
it's probably a updater-script error or it has something to do with the bootloader version you are on. Are you on Jellybean or on kitkat bootloader:confused:
[G2 General] ktetreault14:
How can I find this out? Sorry I'm new to the LG scene. All I can tell you is that I get into recovery by holding volume down and power.
[G2 General] wulsic:
I am now also going to try that dualboot thing since I made some space, also for the users who want to make it nicer just open the patcher.yaml and edit d800 to d802 or whatever device you are using and also rename the d800 folders to d802 and edit all the files containing d800 to d802, it doesn't matter so much but it's a bit fancier. When I have time I will edit it to have "Support" for more devices and also add compatibility for some other roms maybe since there is also a usefull readme in the patchinfo folder which will guide me a bit so I will try to do that when I have time :good: let's try it out now first for myself or it works.

You can find it out by this, Was your LG G2 running 4.4.2 stock kitkat or 4.2.2 stock Jellybean?

If 4.2.2 jellybean then you are on the right bootloader for loki.

If 4.4.2 stock kitkat did you used autorec to downgrade bootloader and flash twrp?

If yes then you are on jellybean bootloader

If not then you are on the kitkat bootloader

I also see that the dualboot developer is still working on this project :good:

https://github.com/chenxiaolong/DualBootPatcher/commits/master
[G2 General] ktetreault14:
I did use auto rec
[G2 General] ktetreault14:
Also thank you so much, I can see the potential in this and only wish to learn more about it. I would love to have this fully compatible with the lg g2.
[G2 General] wulsic:
I am also new to the LG G2 scene since coming from a nexus was flashing stuff easily without anything like loki script or bumped boot.img because of the locked bootloader but we will soon see maybe those things disappear I hope.

I also hope that but first I also need to get how it works before I will do all those things and get free time then I will make it. Also good lollipop support is going to be maybe already this month if I see the rate on how the developer commits things.

Hmm so if you are on the old bootloader I wonder why loki fails. Maybe it's indeed some updater-script mistake :confused: well let's first get my dualboot to work

EDIT: I am now trying to patch a Lollipop rom and I will see how it goes, like also mentioned by the developer that it's not guaranteed to boot since he is also still busy with fixing stuff also regarding to the system.new.dat
[G2 General] vPro97:
Woo-hoo, wulsic is on it! I'm following this thread closely!
[G2 General] wulsic:
Lol :D I will look into the sourcecode further tomorrow just because I am curious but it's as far as I have seen easy to add a rom support. He also said that if we want support for another roms/kernels that we should let him know it I don't know or he will do it since it's now more for the S4 but I guess that we will see soon.

[MENTION=4491606]ktetreault14[/MENTION] I know you used slimrom but I was just making a try to see how some things are working and I will try slimrom now. Also about your two modem idea maybe we can get it to work or we must see or we could get the roms to work with the newer modem.

I will see tomorrow or it's really necessary for having multiple LG G2's in the list or that we just must use some unified name instead of d800. Now it seems interesting for me :good: maybe we must also ask just [MENTION=4277844]chenxiaolong[/MENTION] to help us also a bit with it because I think also that he want to be the only contributor to that device tree after all that time he spent on it. I will try to do those things tomorrow and then if chen is not interested then I will edit it and do the necessary stuff to it and give it to him it will look like a squashed commit but I don't know or he wants that.

Edit: I couldnt do much today because of lack of time but I sneak peeked through the sourcecode and I will try to do it tomorrow.
[G2 General] ktetreault14:
Thanks for your help! Can't wait to see how this unfolds. Away from the PC for a few days then I'll be back able to test. Like you said I have no idea with the modem but I think d802 doesn't have to change modems when using AOSP unlike my ls980 and the vs980. When I first dual boot slim I had to change modems when switching roms
[G2 General] ktetreault14:
There has been lots of updates to the app regarding the new block structure for lollipop roms. Going to test again with lollipop running as my primary

EDIT: Here Is the snapshot folder. https://dl.dropboxusercontent.com/u/486665/Snapshots/DualBootPatcher/index.html
[G2 General] marchino123:
Any news?
[G2 General] ktetreault14:
Actually yes. [MENTION=4277844]chenxiaolong[/MENTION] said that he would add support for ls980. I think it is still up to us to patch the roms because his still worked in the beginning. So there definitely is a way. I suggest to ask for your device model to be supported in which you need to give him the block partitions (ie:dev/block/etc.) And he would probably gladly add support. He is very nice, used to use on my S4. I'm actually on the very first page of his thread lmao ???
[G2 General] wulsic:
[MENTION=4491606]ktetreault14[/MENTION] when you are on the first page then you knew this indeed for a longer time but I think that we must also look at the G3 multirom version whivh they've made because its as far as I have seen easy to port all the sourcecodes because as far as I have seen everything was compatible. When I have more free time I will compile it. I am thinking or I should use patrick.kt's device trees and update it or just begin clean on a updated device tree. I will checkout later or Blastor got his sourcecode which he is using for his recovery on github or that if he could share it if it isnt on git yet but first I gotta finish learning.
[G2 General] ktetreault14:
Indeed that would be another valuable option
[G2 General] vPro97:
I'm looking forward to this and I really can't explain how excited I get everytime I hear something new about this.

The G3 multirom seems to be the best option. I don't blame Patrik for not making it run flawlessly on our device since he doesn't own one. Having a locked bootloader doesn't quite make it easier either. I have a lot of faith in you guys and I'm sure we'll eventually make it.
[G2 General] ktetreault14:
Well he just updated it for d800 and ls980 :D
[G2 General] wulsic:
Nice, I will try it soon again once. I will try to make tomorrow also some progress on multirom cause I am a bit messy and lost my folders so I will start over again. Or somebody else must also be making this what would be great cause I am taking the time with much tings :silly:
[G2 General] ktetreault14:
Oh No. Lol if you need a multirom tester Let me know. Trying out the Patcher now
[G2 General] ktetreault14:
With [MENTION=4277844]chenxiaolong[/MENTION] help we are very close for dual-boot patcher to work on this device. Loki and all
[G2 General] vPro97:
Great news. Wouldn't using bump be better, don't you think?
[G2 General] ktetreault14:
Updated Op!! :D
[G2 General] marchino123:
D802?
[G2 General] ktetreault14:
Test802?
[G2 General] marchino123:
I don't know how do
[G2 General] ktetreault14:
It works thanks to vPro97 for testing d802. If you need more info check the videos in op or head over to original thread for more information
[G2 General] marchino123:
Thank you

---------- Post added at 08:39 PM ---------- Previous post was at 08:38 PM ----------

Can it lunch when the phone is off?
[G2 General] vPro97:
I tested it, and it works for the D802! But as of now, I can't seem to figure out exactly how to SWITCH between the two ROMs. So be patient, this is work in progress and softbricking the phone is a natural part of this game. Be patient, I'm confident that [MENTION=4491606]ktetreault14[/MENTION] will get this up and running within the next week or so since all that's practically left is just to make it switch.
[G2 General] marchino123:
What ROM are you using?
[G2 General] vPro97:
CloudyFlex 2.8/Vanir (5.0.2)
[G2 General] marchino123:
Do you switch rom with phone on?
[G2 General] vPro97:
Well once this project is done, you should be able to switch with the phone ON. It's not like multiboot where it prompts you which OS you want to use every time you boot up the phone. If you want to choose before booting up, you can go into recovrey and flash a zip file that allows you to choose.
[G2 General] marchino123:
But this function work?
[G2 General] vPro97:
Which function?
[G2 General] marchino123:
Switch ROM when the phone is booting
[G2 General] vPro97:
No, not yet. This is an alpha.
[G2 General] marchino123:
Definitly this project can replace multirom

---------- Post added at 09:21 PM ---------- Previous post was at 09:12 PM ----------

And for different kernel?how to do?
[G2 General] ktetreault14:
Read the Op. Read the other OP.
[G2 General] vPro97:
Great news! I was able to switch from secondary ROM to primary ROM, but unable to do it vice versa.

In the Dual Boot utility apk, choose primary ROM.

Reboot to recovery, restore your boot.img (that you backed up)

Reboot!

The thing is, since I don't have a backup of my boot.img for lollipop, I'm still looking for a way to get into lollipop.
[G2 General] marchino123:
Why the second ROM don't lunch?
[G2 General] tropenfrucht:
I'm on D802 and can switch between ROMs (LiquidSmooth KK and Vanir LP) without a problem.

Steps I've done:

1. Install app on primary ROM.

2. In the app choose "Set Kernel" and set as primary

3. Patch zip files and reboot to recovery

4. Install zip files via recovery and reboot

5. Boot into secondary ROM, open app, choose "Set Kernel", set as secondary

Now if I open the app and "choose ROM" and reboot I can switch from primary to secondary and vice versa.

[MENTION=5500870]vPro97[/MENTION] and [MENTION=5506262]marchino123[/MENTION]

Did you set kernel in secondary ROM as secondary? On the first try I forgot it and could not change from primary to secondary, had to reflash the rom.
[G2 General] marchino123:
Cloudy g3 don't lunch after the patch
[G2 General] tropenfrucht:
What are your primary and secondary ROMs?

Haven't tested stock-based ROMs by now, only AOSP.
[G2 General] marchino123:
I use ressurection remix
[G2 General] vPro97:
It's the locked bootloader that's teasing us and making it hard to switch between LG/AOSP. Yes! I did set primary ROM and kernel and secondary ROM and kernel. But yet I can't switch back.

I'm convinced that the reason you can switch effortlessly is because you're using an AOSP/AOSP combo.
[G2 General] tropenfrucht:
Primary or secondary?

D802?

Baseband KK or JB?
[G2 General] marchino123:
Primary

---------- Post added at 01:28 PM ---------- Previous post was at 01:08 PM ----------

I've tested too with vanirAOSP but it hasn't lunched
[G2 General] vPro97:
Ok Dual Boot is now working for me on D802! I can boot both CloudyFlex 2.8 and Vanir (5.0.2) and switch between them!
[G2 General] KyPbP:
If works for D802, D803 and then will work. Where the modified TWRP for dualboot here or not needed? and what the kernel can be used? I want to check on the D803
[G2 General] marchino123:
How have you done?
[G2 General] abdel12345:
This is awesome. I love aosp Roms but I can't stand the terrible cameras on them. If I could run a lollipop ROM then reboot into stock for events when I know I'll need the camera that would be awesome. Hope to see vs980 support in the near future :)

Sent from my VS980 4G
[G2 General] vPro97:
Now this might actually work on other models as well!

Anyway, here's the guide for DUAL BOOT on the D802!

Please hit the thanks button if this helps!

Requirements:

This has only been tested on D802. If you decide to try another model, go ahead but I cannot be held responsible for any damage!

The basic knowledge of how to go into recovery using buttons combination - you will surely brick one or two times!

Latest TWRP (I use blastagators 2.8.4.0 TWRP - other models may suffice)

Installed a primary ROM (can be Stock LG, Cloudy ROM - whatever)

On the Jelly Bean bootloader (not all lollipop ROMs come with Render kernel and there's currently no way of flashing Render kernel on top of the secondary ROM).

Downloaded your secondary ROM of choice, GApps, SuperSU.

A file manager.

YOU HAVE BEEN WARNED.

Instructions

Boot your primary ROM and Install Dual Boot Patcher APK.

Tap "Choose ROM" - tap Primary - tap Set Kernel - tap Primary - tap continue.

In the patcher, choose 'Patch Zip File'

In the dropdown where it says 'jflte (Samsung Galaxy S4)' Choose *lgg2 (LG G2)'

Tap to choose file from file manager, and choose 'File way'

First, patch the ROM.

Then Gapps (make sure you untick 'Has Boot Image')

Then SuperSU (make sure you untick 'Has Boot Image')

Reboot to recovery. Make a backup of your boot partition. THIS IS IMPORTANT!

Flash the patched ROM, patched Gapps and patched SuperSU and install them to secondary. Once finished, Reboot.

Wait till the new ROM boots up. Set up your new ROM, then install the Dual Boot Patcher again.

Tap Choose ROM - tap secondary - tap Set Kernel - tap Secondary - tap continue.

Reboot to recovery

In Recovery, take a backup of the new boot partition.

You're set!

DO NOT FORGET EITHER OF THE BOOT PARTITION BACKUPS! THEY'RE NECESSARY FOR SWITCHING

To swap ROMS

Now this includes a bit of a hassle, but it's perfectly doable!

Load into ROM, you are most likely on the secondary now.

Open Dual Boot utilities APK.

Choose ROM - tap primary.

Reboot to recovery and restore the first boot partition that you backed up earlier! Reboot System and you'll boot into your primary ROM!

To reboot into the lollipop ROM/Secondary ROM, Open Dual Boot Patcher APK, Choose ROM, tap secondary, reboot to recovery and restore the backup of your second boot partition (the one you took after installing the secondary ROM).

Warnings

If you Choose the other rom in the APP without restoring your boot partition, you'll boot up the ROM you were using before.

If you install a custom kernel on the SECONDARY ROM, you'll get the Secure Booting error. Just go into recovery with buttons combination and restore your boot partition. You can install custom kernels on primary ROMS without any problems.

If you have any questions, feel free to ask. Please click thanks, my fingers are hurting :P​
[G2 General] ktetreault14:
Can I throw this in Op? Credits given?
[G2 General] tropenfrucht:
One is KK AOSP (KK base) the other LP AOSP (JB base) so kernels are not exchangeable.

I'm gonna try with CloudyG2 as secondary when i'm at home and can use the desktop patcher. patching 1.2 gb takes ages on the phone ;)
[G2 General] KyPbP:
Sorry, but when will work to switch between firmware by simply selecting a Dual-Boot Switcher

Previously used for S4 i9505. very convenient
[G2 General] tropenfrucht:
Did you try this order

Install Dual Boot patcher - tap Set Kernel - tap Secondary - tap continue

and then

Choose ROM - tap Primary

As far as I know choose ROM is only for switching from one ROM to the other with next reboot. If you choose ROM before you set you secondary Kernel, that could be the problem.

On my first try i forgot to set the secondary Kernel and after I switched to primary and from the primary ROM back to the secondary ROM it didn't boot.
[G2 General] vPro97:
We'll you're partially right. Rotation doesn't work on the lollipop ROM due to the sources being JB while Cloudyflex is KK based, but that's literally the only thing that isn't working. And I'm using STOCK LG based ROM with LP AOSP rom. Of course the kernels aren't exchangeable.

But hey! That might be why render kernel isn't working!

That's the ideal situation, but this is still in alpha.

No i didn't! However I'll try that.
[G2 General] ktetreault14:
No modified twrp needed. Only the patcher apk
[G2 General] abdel12345:
If vs980 testers are needed I can test but sadly not until weekend as I need my phone for school stuff. If Friday comes and still need a tester pm me.

Sent from my VS980 4G
[G2 General] vPro97:
Upon closer inspection, it seems like we don't really need to choose ROM in dual boot app. We just need to restore the boot partition for the specific ROM. I'm sure somebody can make an app that can flash the boot partition backup and reboot for easy ROM switching.

Those of you who use DORIMANX OTA by [MENTION=1559352]Diechel[/MENTION] know, that the app opens a openrecovery script which flashes the correct file. Here we just need two files! The primary ROM boot partition backup and secondary ROM boot partition backup. And every time we flash a new kernel, we simply make a new backup and move it into the folder.
[G2 General] tropenfrucht:
Tried to install Cloudy G2 as secondary, but it didn't boot. I guess it's because of the Aroma installer. And I think you can't flash bumped Kernel, because boot.img is patched and after patching it ins't bumped any more (got security boot error after flashing bumped kernel).

I'm trying to get my primary ROM copied to the dual slot and if working back it up. So I could test installing Cloudy G2 unpatched as Primary and afterwards restoring the Back up of the dual slot. Don't want to set up my actual ROM completely from scratch ;)
[G2 General] vPro97:
I doubt it's bump. Try installing cloudyg3 2.1 as secondary? If it won't boot either, it could be something with the LZ4 compression that's used in the kernel.
[G2 General] tropenfrucht:
I tried dori's kernel which is bumped. If i patch it through the app and flash it I get security error like on an unbumped / unlokied kernel. If i flash the unpatched kernel there is no security error. It makes sense, as the patcher changes the boot.img so that it boots system from system/multiboot/dual/system. And after the changes it isn't bumped anymore.

Testing a bit more now ;)
[G2 General] vPro97:
So the patcher supports loki but not bump?