yashsingh1/xdaforums huggingface dataset:
[T-Mobile LG G3] SonjaMichelle:
The building instructions I was going by came with the T-Mobile source package.

1. Android build
- Download original android source code ( kitkat 4.4.2 ) from http://source.android.com
- Untar opensource packages of LGD851_Kitkat_V10c_Android.tar.gz into downloaded android source directory
a) cat LGD851_Kitkat_V10c_Android.tar.gza* | tar zxvpf -
- And, merge the source into the android source code
- Run following scripts to build android
a) source build/envsetup.sh
b) lunch 1
c) make -j4
- When you compile the android source code, you have to add google original prebuilt source(toolchain) into the android directory.
- After build, you can find output at out/target/product/generic

2. Kernel Build
- Uncompress using following command at the android directory
tar xvzf LGD851_Kitkat_V10c_Kernel.tar.gz
- When you compile the kernel source code, you have to add google original prebuilt source(toolchain) into the android directory.
- Run following scripts to build kernel
a) cd kernel
b) export PATH=$PATH:tools/lz4demo
c) make ARCH=arm CROSS_COMPILE=../prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi- g3-tmo_us-perf_defconfig zImage -j4

* "-j4" : The number, 4, is the number of multiple jobs to be invoked simultaneously.
* lz4demo : More information can be found at "https://code.google.com/p/lz4/"
- After build, you can find the build image(zImage) at arch/arm/boot

3. how to build chromium_lge (vendor\lge\external\chromium_lge\src),
please refer to README.txt at the folder mentioned above.

Not very illuminating is it? Google's android site isn't that much more informative either.
[T-Mobile LG G3] Eliminater74:
Thats what I mean.. its no device tree for the d851, only device tree for the generic arm.. so thats why its got me baffled..

there is a device tree for the LGE/hammerhead and mako.. but nothing persay our device.. which is CM related anyhow..

Im spolied with CM codes, stock is a little confusing to me. Doesnt seem like it should work.. but I guess it does.
[T-Mobile LG G3] :
The code that lg releases as open source will only work on asop source code. To revert a commit use:

git revert commit#

BTW.. Since we re all waiting for the 5.1 data fix I'm looking at other 5.0.2 ROMs to build.
[T-Mobile LG G3] Eliminater74:
After talking to Paul Beeler, I just built Sabermod Toolchain from Source.

Got 4.8 - 6.0 built.......... I used his instructions.. easy build......

I think ill try it out on my Samsung RR build next.......................

BTW, Some dont know who Paul Beeler is, Hes the creator of Sabermod Toolchain..

I have only been talking to him on G+.
[T-Mobile LG G3] phiz118:
OK - last update. I got this to work and everything seems to be running very smooth. The secret was to NOT flash a new kernel. I took the completely stock rom, flashed it. Updated to multirom (skipped kernel here). Installed my Bliss 2.3 backup as secondary. Everything started working. Question - Does a full wipe remove the kernel as well or would a pre-flashed kernel still exist? I believe the last kernel I tried was Tootsie, but it didn't seem to work.
[T-Mobile LG G3] Eliminater74:
Kernel is in boot image.. so if you do a wipe of your boot image then you wipe kernel.. So yes, Full wipe will delete kernel. at least it should..
[T-Mobile LG G3] Eliminater74:
Pac-Rom LP 5.0.2

I am making an attempt to Build Pac-Rom LP 5.0.2 <Noticed I said Attempt>

I tell you what, The device tree and configure is nothing like CM ways. There are many other files in /vender that need to be edited by hand for your device.

Lucky for me there was d800 - d803 which is what I kinda went off of for d851.. I have built many roms before.. but this one is very different compare to others.

Anythow, if it Compile correctly Ill post it up. Pac-Rom is actually a good rom. I think its based off of OMNIRom.. But I cant be sure on that... But im pretty sure it is.

I am really only doing this for something to add to my list of roms on MultiRom. Since nobody builds this rom.

See what I do when I get bored.. I start building things :P
[T-Mobile LG G3] marcdw:
I need to clarify something. In my previous [MENTION=2174433]Skin1980[/MENTION] setup I had SkyDragon as primary, CM11 as secondary on internal storage (it is also my daily driver).

Lollipop ROMs were flashed to a 10GB ext4 partition on SD card. More than enough space to test three ROMs.

With the current setup there is no patched stock kernel. So I have AICP LP 5.0.2 as primary, CM11 secondary. SkyDragon is now on external partition. However, SkyDragon (installed from backup) uses about 7GB. No room for testing other ROMs now.

If I want to flash something new I'll have to replace the primary.

AICP has now moved to LP 5.1, as well as some others.

Is it possible to use LP 5.1 ROMs as primary? Will any of the patched kernels work with 5.1?

The questions are mostly for the future. No immediate plans to go to 5.1 yet (I have enough troubles with 5.0.x).

My insistence on keeping a stock-based kernel on hand is getting in the way of my flash-a-holic tendencies. ?
[T-Mobile LG G3] Eliminater74:
No Patch stock, Because I havent messed with anything related to stock yet, I think some other person was playing around with it though,

Anyhow, To answer your question about 5.1, Since CM hasnt really fixed the data error, I havent patched a 5.1 kernel yet..

To answer your other questions, Let me explain with my testing..

I am told that CM 12.0 kernel will compile on LP 5.1 , But what you cant do, is take a already Compiled LP 5.0.2 Kernel and patch it into a LP 5.1 rom.. you will get Boot Loops.. Trust me. I already tried..

and Vise versa...

But I guess you can take kernel from cm-12.0(lp 5.0.2) and compile it under the cm-12.1(LP 5.1) and it will work. Patching is very easy to do. I already did all the leg work on the patch that creates

the Kexec Hardboot.. So No problem in patching a 5.1 kernel.. As of matter of fact I just created 3 new patches that allow gcc5 and gcc6 to be used. Testing I am doing now......

If you want a 5.1 patched kernel. I can do that quickly.. When I get the time. I just didnt see the need for it yet till data works 100%

But if you need it, let me know and ill make it for you......

doesnt take long to create kernel/boot images.. about 20 mins on LGE and 10 mins on samsung..

so doing a breakfast d851 then a mka -j16 bootimage shouldnt take long...................
[T-Mobile LG G3] Eliminater74:
MultiRom Update Coming Soon:

I now know why some had problems and others didnt. Not only the black G3's have 5 system ram locations and the white having 4,

But the bootloaders make a huge differents on memory location settings. After I upgraded to 10R bootloader, my memory locations

where different from my 10C.. As I used 0x0ff00000 before. Now I need to try and find one more compatible with everyone elses.

I will test run a few locations and see if they work for me.

Some I might be trying:

0x80000000
0x21900000

thats just a few Ill test run, I do need testers once again,

I need tester with following nfo:

version firmware, 10C, 10M, 10R, 20B

Color of phone blk or wht

and if possible cat /proc/iomem

I need the first 10 lines of that (which is only system ram and kernel code and data) Nothing personal..

If I could get that nfo, would be nice. I havent updated this program in a while since it worked good for me.. But now, I need to since my locations changed and

alot of my roms are not booting anymore..

Again: I need people willing to help me out here.................
[T-Mobile LG G3] marcdw:
Okay, assuming I have the correct info...

According to baseband info you posted in pac-rom thread I have 10M (my original firmware was 10C, never took an OTA but I've used various stock-based ROMs up to 10R. The currently installed SkyDragon is 10M).

Black D851.

iomem info...

00000000-059fffff : System RAM

00008000-00ec592b : Kernel code

0100e000-0140633b : Kernel data

0d700000-0f9fffff : System RAM

0ff00000-5fffffff : System RAM

80000000-dd7fffff : System RAM

dd900000-dd9fffff : System RAM

f920c100-f92fbfff : f9200000.dwc3

f9824900-f9824a9f : mmc0

f9864900-f9864a1b : mmc1
[T-Mobile LG G3] Eliminater74:
I am glad you posted that, Yea I compared that with 10C and 10R and its very different.

Looks like 0x0ff00000 would be a good location for you.. Current version should still work for you. ( Does it? )
[T-Mobile LG G3] GeroP1985:
127|root@d851:/ # cat /proc/iomem

00000000-059fffff : System RAM

00008000-00dea6f7 : Kernel code

00f0e000-0131147b : Kernel data

0d700000-0f9fffff : System RAM

0ff00000-5fffffff : System RAM

80000000-dd7fffff : System RAM

dd900000-dd9fffff : System RAM

f920c100-f92fbfff : f9200000.dwc3

f9824900-f9824a9f : mmc0

f9864900-f9864a1b : mmc1

Black, Running 20b firmware on Blisspop 3.1 with Furnace Kernel
[T-Mobile LG G3] Eliminater74:
Remember: Modem does not change the system ram locations.. Only the bootloaders do.

So baseband has no effect as to where your memory locations are..

if you updated your stock bootloader to 10C, 10M, 10R, 20B

I updated mine from 10C to 10R, and there was a differents.

This is mine after flashing 10R bootloader:

00000000-059fffff : System RAM = 95 megs
00008000-00deccc3 : Kernel code *** This is 20B: 00008000 - 00dea6f7
00f0e000-0130c47b : Kernel data *** This is 20B: 00f0e000 - 0131147b
0d700000-0f9fffff : System RAM = 225 megs
0ff00000-217fffff : System RAM = 267 megs
21900000-5fffffff : System RAM = 563 megs
80000000-dd9fffff : System RAM = 1.5 gigs
f920c100-f92fbfff : f9200000.dwc3
f9824900-f9824a9f : mmc0
f9864900-f9864a1b : mmc1

Very close to the 20B bootloader that the person above posted.. Only thing that seem different

from the 20B is the kernel code and data, but everything else seems the same.

So we can now say that 10R and 20B bootloaders are pretty much the same. and

that means I should be able to come up with the correct location

for anyone running 10R or 20B per say..........
[T-Mobile LG G3] joemossjr:
my phone has been stuck on restoring system for 40 minutes now after installing blisspop 3.1 as primary and using secondary and nandroid backup of stock im on at 14 gb ntfs partition
[T-Mobile LG G3] Eliminater74:
If you could please explain as to what stock rom version and send recovery.log that you can copy it over with MultiRom or in recovery (if it didnt work and you had to abort it).

Pretty much, without logs I cant even begin to understand what problems your having......

Just need a little more details.
[T-Mobile LG G3] joemossjr:
its a nandroid backup of stock lp from tmobile and its still running right now restoring system im downloading mokee and am going to try to install that if this doesnt work
[T-Mobile LG G3] Eliminater74:
I dont think I even had any luck with stock LP.. I tried that some days ago on a backup.. Ill look into it though some more.. find out why.. I think its memory locations. im working on that now.
[T-Mobile LG G3] marcdw:
Oh yes, it does work. Quite well. The 4/12 version and the one before it (4/09 I think).
[T-Mobile LG G3] Eliminater74:
I uploaded D851 Flashable Bootloaders 10C, 10M, 10R, 20B

Each file has:

aboot.img

dbi.img

factory.img

laf.img ( which is really your download mode )

rpm.img

sbl1.img

tz.img

*** I havent flashed any of thees yet, I just created the updater-script and put the ssh1 checksum ***

All files are extracted from genuine kdz files...............

Link is posted in multirom Thead: Testing Download Section

PS: I dont know if the script works or not, As I said, I havent tested them. Please let me know if works or not.

The image files are genuine, but I could have forgotten some ";" at the end of a line and caused script to abort.

So, Use at your own risk...... I only did this because, so many people talking about bootloaders this and bootloaders that. ect ect ect..

SO at least you can switch between them now. I run 10R bootloader. which all memory locations are the same as 20B except for kernel data and code..
[T-Mobile LG G3] Eliminater74:
Important Update: ​

All builds relating to CM 12.1 ,after the 17th of April Will not work as secondary roms.......

<SpotComms> I didn't really want to make a issue on GitHub, but every CM12.1 rom after the 17th fails to boot as a secondary ROM due to LZ4 transparent compression that they recently enabled.
* SpotComms has quit (Client Quit)
<Elimin8er> That isnt fully true.. I have seen some 5.1's that do boot as secondary Blisspop3.1 for example on LGE G3 D851.. I know I have built many 5.1 roms that wont boot on secondary.. but with alot of messing around with locations, you can get them to boot.
* olafh_ (~olafh@p4FF48BC8.dip0.t-ipconnect.de) has joined
<Elimin8er> Tassadar, have you heard of that issue that he was just talking about ??
* olafh has quit (Ping timeout: 245 seconds)
<Tassadar> what, about cm or what you're saying:
<Tassadar> ?
<Elimin8er> Tassadar, he was saying that CM 12.1 which is LP 5.1 doesnt boot on secondary anymore since the 17th do to some kernel compression they have enabled
<Tassadar> he didn't say which device
<Elimin8er> they all seem to be like that. because the same goes with mine also
<Elimin8er> I can boot all the 5.0.2's ad below but none of the 5.1's
<Tassadar> that's hardly gonna be the same problem
<Elimin8er> by playing with the memory locations in kexec_mem__min I was able to get it to boot.. but boot screen just looped over and over
<Tassadar> what the actual ****
<Tassadar> CM is using lz4 compression for /system files
* Makalak (~Makalak@unaffiliated/makalak) has joined
<Elimin8er> Tassadar, I take it thats a bad thing? or am I miss reading you.
<Tassadar> well it breaks my ****)
<Tassadar> I wonder if it actually has some benefit or if they're just being difficult

Now that will explain why you will have problems getting 5.1 to work as secondary roms.
[T-Mobile LG G3] arjuna_:
Just switched from d851 to d850 due to data issues from T-Mobile. Any thoughts about porting your MultiRom over to the other LG G3 devices? This was great on d851!!!
[T-Mobile LG G3] marcdw:
Regarding the CM LZ4 compression, that reminds me of what sort of happened around March. Prior to that LP 5.0.x ROMs worked just fine with [MENTION=2174433]Skin1980[/MENTION]'s multirom but then CM added the compression to the kernel. Pretty much requiring flashing an alternate kernel.

Now they're messing around again. Notice how most headaches point back to CM? *sigh*
[T-Mobile LG G3] Eliminater74:
Porting it, Is no problem, But isnt the D850 have a locked Bootloader? I dont know nothing about that bump stuff, If your bootloader is unlocked, I can port it over with no problem.

I have got the porting business down pretty good, all it really takes is to know your phone and basic understanding of all the options and switches which I have done enough experimenting with to know what works and what

doesnt work. But if you can fill me in on the bootloader stuff Ill port it over,, it wouldnt take long. the D850 uses all the same files as the D851 just separate /device/lge/d851 and /device/lge/d850 device dir's

yea alot of people are complaining about it.... I have been working with Tassadar on this, he said I should be still be able to get multirom to work with them, Just gota find the right memory location to use

which is a huge guess game right now....... I have compiled over 15 version with dif memory locations. and only a few came close to working. but getting a 5.1 to work. I have only got blisspop3.X to work.

None other then that.

Pluss, I need testers..
[T-Mobile LG G3] marcdw:
DELETED (oops)
[T-Mobile LG G3] arjuna_:
I'm not quite as knowledgeable as you about this. [MENTION=2174433]Skin1980[/MENTION] has his old version of multirom from January available for both d855 and d850. I was under the impression that Bump! essentially made the phone an unlocked bootloader just without the official unlocked bootloader.

Don't know if its possible at all without an officially unlocked bootloader but would love if you got time to look into it. I'm not a Dev so I don't know what you are or are not able to do just throwing out the request!!! Thanks a lot!!!!
[T-Mobile LG G3] Eliminater74:
That reminds me of a Britney spears song, Oops I did it again. No I dont listen to that kinda music.

the device android_lge_g3-common which goes with android_device_lge_d851 d850 d855 ext ext ext. Has the bump folder in it.. its jut a script.

turn it on with enable_bump := true in the device folder.. I did look into this..... If multirom already over there, then why dont you use that one?

Ony dif is, I have the more updated version and mine also allows stock roms as secondary, while his doesnt. and you will get more kernel panics with his

since hes using an older version of the patch along side some crazy memory locations..........

I think he uses 0x20000000 while I used 0x0ff00000..

I will look into it.. I got so many things im doing at once.. Im still trying to find the right mem location for the 10R bootloader,

since all the bootloaders change memory locations for system ram.,
[T-Mobile LG G3] arjuna_:
Yeah you're a beast that's got a lot on his plate. I just like getting the updated stuff and yours is just built better overall. Please whenever you get the chance take a look at it.
[T-Mobile LG G3] Eliminater74:
can you give me your /proc/iomem

I need the fist 10 lines of it.. for your D850....

just text edit or drop to terminal or however you feel works.

and I need /proc/iomem

That file is nothing personal, its only a list of all memory locations..

Im looking for your system ram's and kernel data and code.

Without that I cant port over multirom. because im not going to play guessing games. as I already do with all the bootloader changes over here.

So get that info to me ASAP.
[T-Mobile LG G3] arjuna_:
Sent it to you via PM
[T-Mobile LG G3] Eliminater74:
Update:

I have talked to [MENTION=3418703]Tasssadar[/MENTION] about getting our device compatible with the MultiRommgr app thats in the playstore. That will let you reboot into any rom straight from the app.

and alot more..........
[T-Mobile LG G3] marcdw:
Strange happenings today. Using three ROMs.

PAC-ROM (primary)

CM11 (secondary, internal, daily driver)

MoKee (secondary, external)

PAC and MoKee are configured, apps in place, accounts set. All was good.

Decided to try 5.1 ROMs. Go through the normal procedure to add a ROM. Select external location and flash AICP latest. Reboot.

AICP is not on boot menu. Hmm. Re-flash.

ROM shows up in boot menu. Select it and am told I need a kexec kernel.

Realization that AICP had been flashed over my PAC-ROM. Feh!

Flashed kexec patched kernel and headed back to the secondary AICP.

AICP booted and ran just fine as a secondary with its own kernel. No mobile data, no terminal to try "killall rild", etc.

Deleted ROM.

Next test, Candy5 5.1. People say data works here, so...

Add ROM to external location, paying attention to output. Again, ROM flashes over primary. Flash again and it goes where it should.

Re-flash kexec kernel.

Candy5 brings up a black screen. Okay, let's flash Furnace kernel since so many say it works well with some 5.1 ROMs.

Again, paying attention to twrp output I see kernel flashed to internal/primary. Flash again and it flashes to Candy5.

Candy5 now makes it to the starting phase but then loops (NFC stopped, system ui stopped, boot animation [repeat]).

With the above flashing issues I then recalled that after installing MoKee I flashed gapps, booted into the ROM and found no gapps. They had been flashed to the primary instead.

It would seem that twrp/multirom is not changing mounts at times. My primary got "overwritten" four times.

Was able to redo PAC-ROM and gapps (dirty) but still had to fix up a few things.

Quite strange and potentially serious. For the primary anyway.

?
[T-Mobile LG G3] Eliminater74:
I so wished you kept logs, Because [MENTION=3418703]Tasssadar[/MENTION] says without logs he cant do anything...

I do know that do to some compression thing all the 5.1 roms after the 17th based on CM are having issues if they are on secondary rom...

Im working on a fix right now.. There are a few updates to twrp that might should fix the problems your having.. I just havent goten around to posting it.

I am just now compiling it. Other people with other devices have complained as well.

But plz, get me some logs, so I can post them to [MENTION=3418703]Tasssadar[/MENTION]..
[T-Mobile LG G3] marcdw:
Roger that. Will reproduce and get that for you.

EDIT: Today's flashing session wouldn't mess up on me. AICP (twice), Candy5, MoKee update but they all flashed properly.

With MoKee I reflashed Xposed and the output did not show that it was using the MoKee mount point. At that point I saved the recovery.log before going back to Xposed.

May or may not have been a failure (won't know until I boot into my primary).

Now I just have to fond out how to get the log to you. Using Tapatalk right now.
[T-Mobile LG G3] marcdw:
Another update. Tried to add BlissPop v3.2 (5.1.1). It flashed a bit too quickly. When listing ROMs it did not show up which means it flashed to the primary position.

I saved the log again. From the last post the recovery.log showed up on my SD card. After the second save I went to view it and noticed nothing different. Checked in internal storage and found a much smaller log only showing the BlissPop stuff.

Now for the good news. Added the ROM again and it is running fine as a secondary on external partition. Mobile data seems to be working fine.

Now I'm gonna do it again with gapps.

On second go around the same thing. ROM was flashed to primary first. Next flash it went to right place.

BlissPop is running nice and smooth with gapps in place.

New log file is small compared to the first one.
[T-Mobile LG G3] Eliminater74:
This message is reply to you, but really for everyone else as well,

I had the same problem withe blisspop 3.0+ as well, took 2 flashes for it to come up on the list.....

Second, for some reasons, lp 5.1 roms are having problems as secondary since the 17th, do to CM enable some LZ compression thats causing twrp not work correctly as well as MultiRom.

Now the good news:

I decided to port TWRP/Multirom Device files over to LP build environment and after doing so, the recover.img went from 12 megs to 15 megs. since it was LP. the higher the OS the bigger the images.

anyhow, all the stuff that didnt work on 4.4.4 works now. the Vibration now works. seems more stable.. So

Ill get an update out and you can give that a try...... Just give me time to get it out..

I now port to the D850 device as well. (By request)

PS: where is the LOG file ??

Can you send them.