[G2 Q&A, Help & Troubleshooting] Drachenminister:
[CLARIFICATION] and [CONCLUSION]

I still sense a bit missunderstanding, so I try to clarify what I have found on my phone. (D802.A6DEWH)

The phone came with stock 4.2.2 (d80210d-EUR-XX)

Took the OTA to d80210e-EUR-XX (still 4.2.2)

As there was no rooting done whatsoever the phone showed UNROOTED in download mode

then I rooted only the adb shell by copying over the g2_security file from ioroot as described in the manual method.

As this doesn't trip the root checker phone still showed UNROOTED

I investigated the whole root checker tool stuff using that adb root shell and found out, that there's a process called

rctd

(root checker tool daemon) using two files:

/persist/rct

and

/persist/rct.cfg

/persist/rct is a binary file containing only 4 bytes:

40 42 0f 00

/persist/rct.cfg is a text file and in my case contained:

Not rooted

[g2:0197ec3553924872:4.16]

at this point I made a backup of those two files

then I remounted /system in rw mode knowing that this would probably trip the rct

after that /persist/rct.cfg contained something like

rooted

21.03.2014 19:56
remounted system read/write

[g2:0197ec3553924872:4.16]

and as expected download mode showed ROOTED

then I copied over a file named rct_security containing "forel.lee" as described here http://xdaforums.com/showpost.php?p=45659334&postcount=21 and rebooted

After the reboot the rct_security was gone and download mode showed UNROOTED again

After that I upgraded to 4.4.2 by flashing a kdz for some d802 using the R&D Tool offline mode

as described in method two here http://xdaforums.com/showthread.php?t=2432476

Looking again into download mode it showed ROOTED although it clearly wasn't

I then thought that maybe that was because of the g2_security file still on the phone or maybe the fact that the rom was not made for exactly my device version or the fact that i had used R&D tool.

As I didn't have root then (not even in adb) I could not check the /persist/rct.cfg becaus I couldnt even ls /persist/

So when the update for my phone finally arived in normal LG Support Tool

I first flashed back to 4.2.2 using R&D offline and did a factory reset

download mode showed UNROOTED once more

Then again i updated to 4.4.2 (d80220b-EUR-XX), this time using stock LG Mobile Support tool (as I remember I didn't do a factory restet then)

looking into download mode showed ROOTED like after the first update to KitKat

still without root I couldn't investigate further.

Then root for 4.4.2 arived

Once rooted again I found that at least in my phone there was no process nor binary called "rctd" anymore and also no /persist/rct or /persist/rct.cfg

Then I copied over those two files from my backup from 4.2.2 and after that download mode finally shows UNROOTED once more (despite the fact that this time the phone really is fully rooted)

MY CONCLUSIONS ARE AS FOLLOWS

Download mode only looks into /persist/rct and /persist/rct.cfg and shows ROOTED or UNROOTED acordingly (and ROOTED if the files are missing)

Stock 4.2.2 has rctd so when you flash back a 4.2.2 kdz root is removed and /persist/rct and /persist/rct.cfg get created UNROOTED

Stock 4.4.2 has no rctd (at least when flashed through kdz) and by flashing 4.4.2 kdz /persist/rct and /persist/rct.cfg get erased -> ROOTED because files are missing)

Doing the OTA from 4.2.2 to 4.4.2 maybe just doesent touch the whole /persist partition and therefor leaves those two files the way they where thus stating UNROOTED in 4.4.2 if that has been the case in 4.2.2

If taking the OTA like flashing the kdz too has no rctd then rooting the phone after the OTA should still keep showing UNROOTED in download mode.