Patch a ROM for LG G2 d800! ---- Supports Model d800 ONLY! ----
What this is:
This patch can be flashed after flashing a full non-d800 ROM (DO NOT REBOOT AFTER FLASHING A NON-D800 ROM, even into recovery!) It changes the appropriate system files to the d800 variant version, as well as makes the proper build.prop changes. Note: If you use a vs980, ls980, l01f, or f320 specific ROM, there may be additional build.prop changes that need to be made. I didn't add all those because most of the development is on d80* models. Even if it is specific to these other models, patch will likely work just fine.
I took the basic idea from @dev>null (see here) I had previously dumped all of our stock, d80030f partitions. I took those dumps and combined them with the basic gist of this other patch dev>null made.
What changes this makes:
(1) Your entire bootloader is replaced. (a hybrid of 20y and 30f is applied)
(2) Stock lollipop 30f modem/baseband is installed.
(3) Stock lollipop 30f boot image, that has been bumped, is installed.
(4) Variant specific /system files are deleted. Then they are replaced with the d800 30f version of those files.
(1) Boot into recovery, flash your desired ROM. (for my test, I used a d802 ROM) DO NOT REBOOT RECOVERY, DO NOT!!!! If your ROM asks you to reboot after install, DO NOT!!!!!
(2) Flash this patch.
(3) That's it, you're done! It is okay to reboot now.
Note: Some ROMs might replace your /recovery partition, in which case you should re-flash your recovery before rebooting.
Troubleshooting: SELinux / Bootloop
This patch properly sets permissions on the files it replaces. That being said, the boot.img in this patch is set to selinux ENFORCING. This means if the ROM you flashed does not have proper support for selinux to begin with, you'll get a boot loop, or hang on the glowing notification LED. Go yell at your ROM dev to fix it, or flash a boot.img that has selinux PERMISSIVE.
ROMs for models other than d80*
There are some additional build.prop changes that might need to be made if the ROM you want to use is f320/ls980/vs980/l01f. There isn't much development on ROMs specific to those models. I'll probably release a version 2 of the patch, eventually, to make these extra tweaks. However, it should work fine as is! The big exception is l01f ROMs. These ROMs are missing NFC files, so either NFC won't work, or the whole thing won't fail.
July 29, 2015 (v1.5) (LP 5.0.x)
-Do not flash misc partition. Not needed.
-Overwrites MAC addresses and things.
June 23, 2015 (v1.4) (LP 5.0.x)
-If /data/media exists, set the proper permissions and context -DONT use TWRP to wipe Internal Storage after running the patch/fix. If you want to wipe internal, do so BEFORE the patch/fix.
June 23, 2015 (v1.3) (LP 5.0.x)
-Change version number to be same for both files (so skipped v1.2 for permission fixer)
-Updated to latest file_contexts from dorimanx
-FIX!!! - ROM Patch and SELinux Context patch both fix ntcode_listing.sh context
++First boot was hanging on completely clean wipe, d800 does not support context: ubject_r:ntcode_listing_exec:s0
++ntcode file only executes on first boot
++Add build prop tweaks to remove lines that cause execution of ntcode_listing.sh
++In case build.prop tweaks fail and file is executed for some reason, fix its permissions so d800 can execute
June 12, 2015 (LP 5.0.x)
-Permission fixer v1.1
-Fixes a couple of contexts (thanks @dorimanx)
June 11, 2015 (LP 5.0.x)
-Created zip that should fix all SELinux Context and allow boot to ENFORCED mode.
-Posted on my site as "LP ROM SELinux Context Fixer"
-Flash after ROM, ONLY IF SELinux ENFORCE doesn't already work!
June 4, 2015 (v1.2) (LP 5.0.x)
-Added automatic flash of d800 recovery - TWRP 126.96.36.199 (in case ROM overwrote recovery)
++Added a flashable zip containing devnull's permissive boot.
++Removed my permissive boot, it wasn't working right. Sorry!
June 1, 2015 (v1.1) (LP 5.0.x)
-Supports conversion for Stock Lollipop ROMs from any LG G2 variant, except l01f and lgl22.
-I will probably never add support for those two models since development is very minimal on them.
-Also added other flashable zips to easily switch between ENFORCING and PERMISSIVE.
-Replacement files come from Stock Lollipop d80030f.
June 1, 2015 (v1) (LP 5.0.x)
-Fully supports all d80* and f320 ROMs.
-Will do update shortly to add support for converting ls/vs ROMS
-Replacement files come from Stock Lollipop d80030f.
Dont know what but I seem to have done something wrong. I was on Blisspop, flashed Cloudy G2, flashed the patch, flashed permissive. When rebooted the screen showed the LG Logo and then "Security error" below it and shut off. I restored my back up with success but Im wondering what went wrong.
Restored back to stock and flashed the ROM that was tested by OP/Dev and patch and it worked fine. But this ROM doesnt seem to have my APN settings and I cant find them anywhere online =/
i try to install "SRKG2-2-00" rom and when i choose language pack (ISR) in first of the installation
and after i flash the patch it seems to overwrite the language and the result is that i not getting the hebrew lang that i want
is there any way to fix that?
I looked at install script for selecting "ISR" and only difference is which modem is used and the addition of a "cust" partition. d800 does not have a cust partition, I'm guessing that is where the language is. Sorry. You can DL a Hebrew Keyboard though. Google for that
If you want to look inside "cust" file, I am posting RAR. You could probably get hebrew with a couple build.prop tweaks it looks like. (Assuming you can't already just pick it in the settings menu of the phone.)
greetings from Venezuela , great job you have done my thanks to you, patch 1.2 allows me to install the cloudy 3.0? I have this doubt before installing it and what would be the steps , thanks for your time , I hope your answer:good: