yashsingh1/xdaforums huggingface dataset:
[G3 General] topet2k12001:
Hi [MENTION=2908377]lite72[/MENTION],

Sure thing, I'll add that to the First Post.

The reason why the current version is not cross-platform/multi-platform is because there's a particular Windows executable (.exe) file that has no Linux equivalent (Send_Command.exe). This particular executable gives the ability to root the device while it is in "Download Mode" (it's like LG's implementation of ADB Fasbboot).

As for your concern about publishing sources: ImageprepGUI is largely built on automation of otherwise manual steps that are already found here in XDA - I just added a GUI to it. Respective authors have been credited in the First Post, so you can look up their threads accordingly.

Recently, however, someone in XDA published a Linux port of that Windows executable. This means that I can now work on creating a Linux version of ImageprepGUI. This is something in the pipeline for me.

Take note that software development is not my job; I'm just doing this as a hobby. That being the case, I do not want to do this where my environment puts pressure on me. A hobby is supposed to be something that one enjoys doing during spare time.
[G3 General] lite72:
Thanks for the reply! I understand that this is your hobby, and I'm willing to help if there's anything I can do. Actually I once downloaded the "one click root" .bat and then tried to do the other steps manually on Linux, but then saw that sendcommand windows binary and because I didn't know what it does, I couldn't go on with the procedure. Any link where I could possibly find the Linux port of the executable? I believe many of us is capable of converting the original .bat (or even gui, if *ix people really like that kind of stuff) to something that's executable on Linux, but that Windows binary is the essential part and was then stumbling block atleast for me.
[G3 General] weiweiwu:
i followed the youtube video and the software just keeps closing (crashing) and nothing happens. it auto close after i select the recovery.img. did not ask me to connect my phone.

what's happening?
[G3 General] topet2k12001:
Hi [MENTION=6475859]weiweiwu[/MENTION],

I need more information please. I can't help troubleshoot if that's all the information we have.
[G3 General] RustyPwns:
Can someone link me the correct image files for the Sprint variant G3, the LS990. Combining variants in sub forums is such a terrible idea because everyone is on a different page...

This guide fails to provide the image/boot stack files for the ls990, and no one seems to mention it. Also tried extracting those files from a .tot file but the guide to do so, on the second post on the forum, shows an example for a .kdz file. The imageprepGUI doesn't even acknowledge lollipop users and how to proceed alternate steps because the program assumes you're on kk and using kk image files. Multiple users I searched for using the term LS990 have asked this same question and not a single person has answered. Almost 2 years ago a person uploaded the boot stack for kk, can someone do so for lollipop for the ls990? Downgrading to kk to simply root a huge waste of time when the details should have been provided already.
[G3 General] RustyPwns:
[MENTION=5231281]topet2k12001[/MENTION],

Thank you for devoting the time to write extensively about my concerns.

I suppose the main gripe with this is the lack of comprehensiveness with the projects the community takes. It seems everything is derivative of each other, which necessitates referencing previous contributions by other community members. No single guide is comprehensive, and even I who've had been a part of this community for 6 years will never become used to this problem. The way things are done here is intrinsically frustrating and that's something I believe most people here accept, but not me. The way I was taught, most things can be avoided if things are clear initially. If what you just told me was initially on the first page, I bet this thread would have a lot less pages, imo.

Regarding technicalities now, I will then go ahead and proceed with the execution of the program with the kk bootstack for the ls990. I desire to both root and flash the latest custom recovery and from what you told me, it should work. Now I'll find the latest recovery.img because the downloader in the imageprepgui program does not have the ls990 listed as a selection, it appears that each variant has it's own recovery image. Where to find this is now another question. I'm not sure what's with the discrimination with the sprint variant lol.

Found this: https://dl.twrp.me/ls990/

Is this safe to use? i.e., already bumped?

Thanks for your help
[G3 General] bender_007:
It´s bumped, yes
[G3 General] RustyPwns:
Just about to push start on the program. Thanks!

Update:

Fails after detecting com port. Have USB drivers installed, using oem cable connected directly to usb 2.0 to the mobo. Made sure to check the usb debugging pop up too. On windows 10
[G3 General] RustyPwns:
There seems to be a consistent error across the board with these two root methods for me as well, including this one:

http://xdaforums.com/lg-g3/general/guide-root-lg-firmwares-kitkat-lollipop-t3056951

http://xdaforums.com/lg-g3/general/guide-root-method-lg-devices-t3129197

They seem to have a similar script: all push root files, then restart the device, then looks for com port. When it looks for the com port, all three methods fail, and these methods prompt me to then get into download mode to continue. The oneclick v1.3 method gets stuck at 90% after putting it into download mode, as many other users claimed and gave up. The "newest" root method gets a little bit farther. After download mode it attempts to push data again and says complete. So I leave download mode, thankfully I still have download mode and can boot into android, and the device is not rooted. I'm thinking this may be a Windows 10 thing or maybe I OTA updated my new phone too much and LG ruined all methods of rooting by messing with the com ports.

Edit:

http://xdaforums.com/showpost.php?p=57185864&postcount=1

Found the issue. Zero methods work if you recieved any OTA update aside from ZV4. If any Sprint LG G3 (LS990) users are having issues like mine,

http://xdaforums.com/sprint-lg-g3/help/frequently-questions-sprint-lg-g3-t2866690
[G3 General] RustyPwns:
[MENTION=5231281]topet2k12001[/MENTION]

What you said about these methods make sense, here's the output of ports.bat

F:\Downloads\LG_Root>reg query HKLM\hardware\devicemap\SERIALCOMM

HKEY_LOCAL_MACHINE\hardware\devicemap\SERIALCOMM

\Device\Serial0 REG_SZ COM1

\Device\LGANDNETMDM0 REG_SZ COM6

\Device\LGANDNETDIAG1 REG_SZ COM7

F:\Downloads\LG_Root>pause

Press any key to continue . . .

Seems that I used COM7 twice with this method, so the LS990 probably defaults to COM7, once in download mode that is. Also, make a note that LS990 users are unable to use essentially any of these methods if on any OTA update more recent than ZV4, because then those users have to refer directly to the LS990 subforum for workarounds, just so that we don't waste our time debugging nothing for the sake of learning. I do that enough at engineering school.

Again thank you. This is quite the exhaustive hobby you have, I'd pick up fishing if I were you lol. Currently taking microprocessor applications and learning about USART and interrupts, so this is pretty relevant haha.
[G3 General] bender_007:
As for lollipop use this for rooting
[G3 General] topet2k12001:
Hi [MENTION=3093263]RustyPwns[/MENTION],

Thanks for sending over the output of "ports.bat". Apparently, the "identifier" prefix (LGANDNETXXX) for an LS990 variant is no different from the others, so it's just the Verizon variant that's different (it's LGVANDXXXX for Verizon variants, with a "V").

At this point, I suggest trying the original/manual process: http://xdaforums.com/android/development/guide-root-method-lg-devices-t3049772. This one is for rooting only. Once rooted, installation of TWRP (custom recovery) should be easy.

A lot of users have actually confirmed that root worked for the LS990 using one of the "one-click root" methods: http://xdaforums.com/sprint-lg-g3/general/lollipop-root-method-confirmed-t3050360/page2. But in case it doesn't work for you, I suggest doing it manually. I have inspected/compared all the available "one-click root" methods (and ImageprepGUI as well); they all contain the same general procedure that came from the original/manual method. As to why it works for some computers and not for others is something I have yet to find out, but doing it manually eliminates the variable errors that may have been caused by automation.

If this still does not work for you, then the last resort is to indeed do a full downgrade to Kitkat and then manually flash the Lollipop partitions. This, I believe, is the sure-fire way. Here's the thread once again: http://xdaforums.com/sprint-lg-g3/d...v8-tot-ota-t3030327/post58834858#post58834858.
[G3 General] RustyPwns:
So I downgraded to kitkat, used the much older stump method to root, then flashify twrp called it a day. Now I'm on Marshmallow with CM13. Mission complete.

So for those that these newer methods worked with their LS990's, presumes that they were on an OTA update that allowed for these methods to work, such as ZV4, maybe ZV6. As cited from the sprint forums, OTA updates started screwing with these things and made many rooting methods inoperable. But for those that may have some luck using this, they still need the ls990 kk bootstack, you'll need them. I'll PM you the files since I don't know what's the best way to provide dl links on xda.
[G3 General] doehmen1:
So.... I ran through the whole thing, and now my image files are completely missing and my phone (vs985) will no longer show anything on screen. the funny thing is, I was able to answer a phone call with it like that (i just guessed where the answer swipe area was and it worked) but that does me very little good. Any suggestions?
[G3 General] topet2k12001:
Hi [MENTION=7337617]doehmen1[/MENTION],

There's not much information I can get by with what you described.

1. Did you do this from a freshly flashed device (a.k.a. newly flashed KDZ or TOT)?

2. Android version (i.e. Lollipop, Kitkat, Marshmallow) and LG Firmware please?

3. So you mean that the phone booted to Android but the screen was just black (as you mentioned the phone rang and you were able to answer a call)?

4. When you plug the phone to a PC (with the phone turned on), what happens (please be exact/specific)?

5. Turn off the phone. Plug to a PC, and while plugging in, press/hold the "Volume Up" button. What happens (please be exact/specific)?

5. Turn off the phone. Press/hold "Power" AND "Volume Down". If the screen lights up with an "LG Life's Good" logo, release for one count and press/hold "Power" AND "Volume Down" again. Please describe what happens next (please be exact/specific)?

6. When you used the program, what options did you choose?
[G3 General] bender_007:
He probably was on 5.1.1 (vs985 35). He should seek "downgrade va985 from 35" (Download mode is there although the screen is black)
[G3 General] doehmen1:
First off, thanks a ton for the reply.

1. no I did not have the device newly flashed, i had not tinkered with the phone at all.

2. Version was lollypop, I obviously can't get into the phone to check the firmware version, but according to the properties from my computer it shows 1.0

3. precisely. it is pretty clear to me that it is loading android, as it not only still uses all of my set up ringtones, vibrations, and yes, allows me to answer calls, but the screen is completely black.

Completed both of your number 5's, with each instance it flashed the red light (from the notification light, not on the screen) and vibrated, but that is all. It's interesting to note though that, while plugged in, if I remove the battery it does have the no battery symbol pop up.

6. I selected "I want to download your pre-extracted laf.img and aboot.img files" and "I want to download your 'bump'd' TWRP Custom Recovery" I believe I selected do both (direct)

Thanks again for any help you can give!!!
[G3 General] topet2k12001:
Hi [MENTION=7337617]doehmen1[/MENTION],

How about Item #4?

Also a follow-up question: do you have anything important on the device that you haven't backed up prior?
[G3 General] topet2k12001:
Hi [MENTION=3279781]bender_007[/MENTION],

Yeah, that was my hunch as well from his initial post.
[G3 General] doehmen1:
Oh, sorry, ha. 4. It vibrates, the notification light flashes, it beeps, and the screen stays black. But it does make a firm connection to the computer, by which I still have full access to the phone hd. And no, it's fully backed up
[G3 General] topet2k12001:
Hi [MENTION=7337617]doehmen1[/MENTION],

Thanks for responding. That's what I just wanted to ensure.

In that case, looks like overall the phone is operating fine except for that blank screen. This is the first time I have actually heard of it (or at least first time that someone reported it detailed enough). i would suggest at this point reflashing your device (reflashing = it's like "reformatting" a hard drive and reinstalling the Operating System, for a PC).

There are two (2) available tools: LG Flash Tool 2014 and LGUP. Both are available here in XDA with guides. They pretty much do the same thing although LG Flash Tool has been around longer. But in case you encounter problems with LG Flash Tool 2014, try LGUP. Personally I like LGUP better, as I have been experiencing problems recently with LG Flash Tool 2014 especially now that I'm on Windows 10 64-bit.
[G3 General] doehmen1:
Well, flash tool seems to be a bust, it keeps crashing (I too have win10) so i'll give LGUP a try. Thanks again for the help, I'll keep you posted

---------- Post added at 04:18 AM ---------- Previous post was at 03:52 AM ----------

I lied, I looked up a second opinion on how to use flash tool (on androiding) ran it again, and it worked. for future reference you have to use the built in compatibility mode to run with win8 compatability. thank you SOOOO MUCH
[G3 General] topet2k12001:
Hi [MENTION=7337617]doehmen1[/MENTION],

Glad to hear that. :)

Aside from Windows 10, another reason why I switched to LGUP is because of its ability to flash both KDZ and TOT formats of the firmware. LG Flash Tool 2014 only flashes KDZ so you will have to use another tool for flashing TOT formats. With LGUP I don't have to switch between tools/programs.

Now, should you decide to give ImageprepGUI another try, this time try acquiring aboot.img and laf.img (KITKAT VERSIONS!) beforehand, instead of downloading them. Just to be sure.
[G3 General] Vrable:
Hi,

There's some really good write up in here. I have a few questions.

If there's any new information on what's the minimum number of partitions that needs to be changed to a bump-vulnerable Kitkat bootstack.

And I have a historical question: which versions were vulnerable to bump and which weren't? The first few posts here suggests that it was patched ever since Lollipop but other thread have contradictory information.

If some earlier Lollipop is vulnerable, is it possible to only downgrade to that?

I'm not on Windows and can't use these tools, but I can follow steps otherwise. I'm trying to only get root, although custom recovery would really be nice.

I tried getting root from Download Mode but couldn't remount /system in read-write mode (which is the first step in just about any method I've seen). However, Download Mode does let me write images to partitions, which is why this thread is interesting.

Thanks!
[G3 General] rk2612:
You need to downgrade and Bump some partitions only if you need custom recovery. If you want only root on Lollipop, then you can do without downgrading.

At the heart of this method (beneath the windows GUI) are some scripts that can executed over adb on Linux / Mac but what I think can't be done is one critical step that requires the use of send_command.exe which is obviously a windows executable.

If you're on Lollipop and want only root, them install the Kingoroot app (kingoapp.com) and then you could replace it with SuperSu (search these forums for guides already published).

---------- Post added at 06:36 AM ---------- Previous post was at 06:23 AM ----------

A quick Google search suggest that there might be a python script to replace send_command.exe. Haven't used it but give it a try: http://jacobstoner.com/qcdlcomm.py

---------- Post added at 06:45 AM ---------- Previous post was at 06:36 AM ----------

And this seems even better:

http://www.ez-pg.com/tooldocs-lg-download-mode-laf.html

Will try this and ssee if it works.
[G3 General] topet2k12001:
yup, I have mentioned the Linux version (port) of send_command in Page 85 (post #849) of this thread: click me!

That second link you gave though...that's very interesting. I'll try it out too.

The first link (qcdlcomm.py) - I have already tried it, but it is giving issues when the device is on Android Marshmallow. In other words, I have to revert to either Kitkat or Lollipop so that I can get it to work without problems. Let's see how we can integrate that second tool into what I'm currently working on for ImageprepGUI.

EDIT: the person who made the tool (from the second link) also posted a thread herein XDA: http://xdaforums.com/android/software-hacking/tool-lg-download-mode-laf-t3285946
[G3 General] Vrable:
Thanks for the replies!

I was already using this one. It seems work fine in sending commands. However, all the scripts for rooting start out by mounting /system in read/write mode.

For example, this one

http://xdaforums.com/lg-g3/general/guide-root-method-lg-devices-t3129197

runs

mount -o remount,rw /system
/busybox umount /system
/busybox mount -w /dev/block/platform/msm_sdcc.1/by-name/system /system

The first line fails because SELinux denies permission (even to root).

But in my case, /system is still mounted as read-only after this step (despite passing the -w switch here) so naturally all future attempts to write to /system fails.

Edit: I forgot to mention that I was trying to avoid using Kingoroot because I read somewhere that Kingoroot is really hard to remove afterwards, like malware. I don't suppose anyone has the source for that one?
[G3 General] topet2k12001:
Hi [MENTION=7350938]Vrable[/MENTION],

I think we should start out by asking about your LG G3 variant and what Android version you are trying to root (also please specify the exact firmware version, not just Kitkat/Lollipop/Marshmallow). If it's Lollipop or lower there shouldn't be problems.

You are correct: all current rooting methods attempt to mount /system in r/w mode. However, things have changed since Marshmallow. That's why newer approaches to rooting are called "systemless rooting" (even SuperSU already employs this approach).

By the way, ImageprepGUI already has both rooting approaches included (both the one you linked and the other versions). The one you linked is what I called "Direct" approach/method and is actually a little different from all the other available methods (and all those other available methods are based off the same original/manual script); the older approach is what I called "Script" approach/method in ImageprepGUI (yes, I know technically they're both scripts - I just couldn't think of a name to distinguish them at that time).

If it's Android Marshmallow, currently there's no way to root it if you flashed a full KDZ unless you do so with KingRoot, which like you, I also don't like. You will have to create a TWRP-flashable zip (consisting of system.img and a modified boot.img where SElinux is disabled or set to permissive, and also "bump'd" or signed with a Kitkat digital signature). Having said that, this implies that the device is previously rooted while it was running in Lollipop or Kitkat (although at this point in time, just start with Lollipop - no need to downgrade further to Kitkat).

If your LG G3 variant is a D855 (the "International" variant), there's already a thread that has a pre-rooted, TWRP-flashable zip (Marshmallow). Same with the D858HK. Both threads are available here in XDA.
[G3 General] PIErSq51:
So if there's no way to root marshmallow on the LG G3 would it make sense to downgrade to lollipop to make this option available or you wait until marshmallow has a sure way to root?
[G3 General] Vrable:
Hi [MENTION=5231281]topet2k12001[/MENTION],

Good idea. My LG G3 is a D852 20G running Android 5.0.1 (so Lollipop), build LRX21Y.

Although I shouldn't need, its quite interesting that "systemless rooting" is possible. I wouldn't mind giving that a try if there are "manual" steps described somewhere.

If its something I haven't seen yet, I wouldn't mind trying the second method if I can just read the commands off the script somewhere.

I think the ones I've already tried are named PurpleDrake, New method and Newer method (the one I linked to) so I don't think you need to worry about how you named them! They didn't work because mounting /system in r/w never happened.

I'm still wondering what KDZ is. It sounds like some kind of partition image bundle but I haven't seen it made explicitly. If I can avoid a downgrade first, that would be nice since it feels less risky than trying to flash multiple partitions and hope it works without being able to really check (except maybe for some checksums, but the default has partitions overwriting each other so often that its hard to tell).
[G3 General] topet2k12001:
Hi [MENTION=7350938]Vrable[/MENTION],

Thanks for the information.

So long story short, you can't root your D852 running Lollipop 20G because the currently-available rooting methods don't seem to mount your /system partition as r/w - which they're supposed to and I have personally seen work (as well as others in the "newest root" thread, also running 20G Lollipop on their D852's too).

I have inspected the scripts in all available root methods (otherwise I wouldn't be able to come up with ImageprepGUI) and they're all the same (they should be since they all emanated from an original set of steps), so I can tell you that there's nothing left hidden or nothing that you haven't seen yet, seeing as you have done a good amount of research.

In ImageprepGUI, the only thing that users don't see is how I coded the GUI part of the program, which doesn't influence/affect those scripts in any way. Other than that, ImageprepGUI is transparent in the sense that if a user navigates to the installation folder, one can see the scripts involved be it rooting the device, "bumping" the bootloader, installing custom recovery, and even which partitions are written/overwritten.

Have you tried doing this again from a freshly-flashed (or reflashed) device? Doesn't matter if you reflash it to 20G Lollipop, since all the available rooting scripts are already proven to work in Lollipop. It's just that I think there are some other variables introduced to your device that is causing the problem. So, rooting from a freshly-reflashed device eliminates any variables introduced (tweaks, Xposed, encrypting the device, etc.).

My reasoning is that all other users of your same LG G3 variant, with the same firmware version (20G), have attested that the rooting methods worked for them. If rooting "from scratch" is something you haven't done yet, I suggest give it a try. Sometimes it's easier this way. Personally, I do it that way too...start from scratch (meaning reflash) and the first thing I always do, before any changing of settings/installation of apps/tweaking the device is to root it and install custom recovery.

I wouldn't call reflashing as "downgrading" (as long as your reflashing the same firmware version - 20G), to me it's more apt to call it "reformatting" the device. Since it's "reformatting", please ensure that you save important files beforehand.

I'm making a Linux version of ImageprepGUI as mentioned in recent posts, but it may have to wait. I'll see what I can do to expedite, but it's currently Holy Week where I live and it's well-observed in the country. For now, what I can do to help you is to try to replicate rooting (from a freshly-flashed LG G3) purely using Linux.