[ROOT] Root your LG-G3 easily with PurpleDrake-Lite! [OSX/Linux/Windows!]

Search This thread

thecubed

Inactive Recognized Developer
Aug 19, 2008
1,046
10,458
Austin, TX
Howdy all!

What's this? Read on, dear reader, to discover the magic that is PurpleDrake.

rY0Jco4.png

What is this?

This is a utility to easily root your LG G3 (specific models only). It's a fairly foolproof script that includes all the dependencies you'll need for getting your phone rooted easily.

This is the LITE version. This means that this version will only ROOT your phone. If you have a T-Mobile G3, we'd suggest you look for the full version in this same forum on XDA, since that will root, install TWRP, and prevent your root checker from showing your phone as rooted!

Who made this?

This root is a collaboration between myself (IOMonster), jcase, and autoprime.
Special thanks also to beaups for some initial guidance looking at the vulnerable application.

Is my phone compatible?

The new LG G3 models each are slightly different with regards to rooting and unlocking.

The vulnerability we're exploiting for PurpleDrake has actually been present on quite a few LG phones for some time, and as such this script will automatically detect if your phone is capable of rooting with this method.

To see a matrix of which LG G3 phones are compatible with this root, please see this Google Docs spreadsheet that we've compiled.

When you run this program, your phone will reboot and run a test to see if it's compatible. If the application succeeds, it'll let you know that it's able to permaroot you. If not, it'll fail gracefully and reboot you back to normal Android without having changed anything.

How do I use this?

WE NOW SUPPORT WINDOWS! YAY ME

To start, for either platform you'll need to scroll down to the download section and get the file.

Ensure that your phone is in ADB mode (PTP Mode for everyone but Verizon. Verizon users need to be in "Internet"/"Ethernet" mode)

Linux Instructions (in a terminal!)
  • Extract the file you downloaded...
    tar xvf ~/Downloads/PurpleDrake-Lite_VERSION.tar.gz
  • Mark the application as executable, and run it!
    cd PurpleDrake-Lite
    chmod +x purpledrake_linux.sh
    ./purpledrake_linux.sh

OSX Instructions (just a bit easier)
  • Extract the file you downloaded
  • Double-click on "purpledrake_osx"

Windows Instructions
  • Extract the file you downloaded
  • Double-click on "purpledrake_windows"

The application will guide you through all the steps you need.

You will still need to install SuperSU from the market after installing PurpleDrake. This pack does not include one.

After, be sure to check @autoprime's post for how to disable OTA upgrades! here : http://forum.xda-developers.com/showpost.php?p=54254062&postcount=2

But, what if I don't want to run your script to root?

Well then, I'd be a little hurt, but you can still do everything the script does manually.
Download the package, and extract it. Open a terminal in the main folder of the archive and run these commands:
Code:
adb reboot --bnr_recovery
adb push ./assets/start_restore /temp/start_restore
adb push ./assets/permaroot.bin /temp/start_restore
adb reboot

That will perma-root you, however there's no protection from doing something stupid or the phone being incompatible. Please be careful!

Where do I get this?

WINDOWS/OSX/LINUX VERSION OUT NOW!
- Fixed Windows support
- Fixed OSX ADB issues not detecting phone first try
- Fixed race conditions leading to errors permarooting
- Added 64-bit Linux ADB
Code:
[url]http://downloads.codefi.re/thecubed/lg_g3/purpledrake/PurpleDrake-Lite_R03.tar.gz[/url]

Old version here... (OSX/Linux only)
Code:
[url]http://downloads.codefi.re/thecubed/lg_g3/purpledrake/PurpleDrake-Lite_R01.tar.gz[/url]

Please DO NOT mirror or re-upload the PurpleDrake software to your own site, or any other file host.

If you need drivers for Windows (thanks @autoprime for having these handy!):

Help, it doesn't work!

Post here, let us know what happened and we'll try to help you. DO NOT private message us on XDA or on IRC asking for help. We will not assist privately.

Most questions if not answered here can be answered on #lg-g3 on IRC in Freenode.

Thanks so much! How can I show my appreciation?

Since this was a collaboration project, proceeds that are made from this root will be split between amongst us so we can purchase a Sprint test phone to root (as it's currently not rooted).

If you'd like to donate to us, click the "Donate to me" button on the left sidebar under my name, and be sure to enter a comment to let us know that you're donating towards the PurpleDrake project.

Thanks again!
 
Last edited:

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,642
11,919
Disable OTA:

Open LG Hidden Menu (3845#*851#) --> WLAN Test --> OTA Setting --> OFF
*Replace "851" with your devices model number, 850, 852, 855 etc...

Look, instead of rushing to take an OTA to get the latest software.. think for a moment.
We do no know if the bootloader will stay "unlockable" in future updates. OTA's can update not only software..
but the boot stack as well.. enabling features to block downgrades.. close exploits.. and all sorts of fun stuff.

so.. instead of taking an OTA.. wait for the files to get posted so we can look at things first.. possibly only updating /system, /boot, /modem (maybe tz/rpm)
without updating the rest of the boot stack. ya... do that. Plan on making a lil thread on this soon to make things easier.

EFS Backup:

Code:
[FONT="Arial Narrow"][B]Backup EFS after jailbreaking your G3. EFS is split into 2 partitions modemst1 and modemst2. 
img files will be on root of internal sdcard. Save the .img files somewhere else besides the sdcard... email, cloud, etc..[/B]

I have made a new thread on EFS backup and restore which can be found [URL="http://forum.xda-developers.com/lg-g3/development/efs-lg-g3-efs-backup-restore-t2907329"]HERE[/URL].
[/HIDE]
[B][SIZE="5"]Restoring Stock / Remove root flag:[/SIZE][/B]
[HIDE]
Download the tmo .tot file and use lg flash to restore it to stock. itll format everything on internal sdcard so backup anything u may need off it.

T-Mmobile firmware can be found [URL="http://downloads.codefi.re/wolfgart/LG_G3/D851"]here[/URL]. Thanks to [user=608699]@wolfgart[/user] for the files and [user=1157052]@thecubed[/user] for codefire hosting. 

*Step by step picture guide - [url]http://imgur.com/W83hMPE[/url]
 
install the drivers.
put phone into Download Mode (power off. unplug USB. pull battery. put battery back in. press/hold Volume Up then plug in USB cable.)
In Windows Device Manager set the phones serial COM port to #41. (*see picture guide for help)
Install LG Flash. In "C:\LG\LG Flash" folder delete megalock dll. Replace with .dll below.
new megalock dll - [url]http://bit.ly/1cQADXm[/url] (this site includes a "download manager.. UNCHECK THE BOX before downloading dll file.)
Run LG Flash in the "C:\LG\LG Flash" folder. Select korean factory if asked.
When LG Flash opens you will see a box to select firmware and dll.
Select LG Flash (.dll).
Select (.tot)
Hit OK (*see picture guide for help)
Hit yellow start button. If you get Milkyway error click ok. LG Flash will then run a crc check on the tot file. Takes a bit. 
After crc check finishes unplug the phone. plug phone back in. it should now be seen in LG Flash and start flashing. 
Phone will reboot when finished. You may end up on a screen with s "2"... let it sit there for a minute or two. 
If stuck on "2" try unplugging the usb cable from the phone.. wait 10 seconds.. then plug the usb cable back in. now wait 30 seconds and hopefully it changes to a "3"
Once the phone says "3" you can unplug the USB.. remove the battery and plug back in.. boot back up... you are now 100% stock. 
[/HIDE]
 
Last edited:

cnn888

Senior Member
Dec 13, 2008
842
107
can someone explain if there are any differences between towelroot, ioroot and purpledrake? the end result is the same, no?
 

markfm

Senior Member
Mar 27, 2013
501
173
Thanks for the awesome work, devs!

Has anyone figured out what the hidden menu code is for the vzw vs985, to be able to turn off ota? Plugging in "985" for the model number doesn't work.

Will there be a method to turn off/reset root counter for those of us who used IOroot?
 

jdellingson7

Senior Member
May 15, 2010
176
24
Phoenix
Hidden menu for Verizon?

ioroot is better :)


much thanks to iomonster jcase and dees_troy. glad i could play a part in this rad-ness.

I would be careful taking OTA's.. wouldnt want to lose an unlock(too early to say..)

Disable OTA:
Open LG Hidden Menu --> WLAN Test --> OTA Setting --> OFF

(This worked on LG G2.. hopefully work on G3 but won't be confirmed until OTA comes out)

Hidden menu = 3845#* then model then #.. so 3845#*851# --> 3845#*850# --> 3845#*855# etc etc



EFS Backup:

Code:
[FONT="Arial Narrow"][B]Backup EFS after jailbreaking your G3. EFS is split into 2 partitions modemst1 and modemst2. 
iimg files will be on root of internal sdcard. Save the .img files somewhere else besides the sdcard... email, cloud, etc..[/B]

[B]Backup:[/B]
adb shell
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst1 of=/sdcard/modemst1.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst2 of=/sdcard/modemst2.img

[B]Restore:[/B]
adb shell
su
dd if=/sdcard/modemst1.img of=/dev/block/platform/msm_sdcc.1/by-name/modemst1
dd if=/sdcard/modemst2.img of=/dev/block/platform/msm_sdcc.1/by-name/modemst2[/FONT]

Is there a different method for the Verizon models? I tried this but could not access the menu.
 

packhex

Senior Member
Apr 6, 2010
113
5
Thanks !!! Good work!!!!
Works with D855 10g on os x


Enviado desde mi LG-D855 mediante Tapatalk
 

epikvision

Member
Jul 25, 2012
13
0
Los Angeles
Works on the F400S. Probably the easiest thing I have ever done in my life.

Is there a way to check root on LG G3 though? I don't see the SU app, though I can use Titanium Backup without a problem.
 

marty331

Senior Member
Jun 29, 2011
829
249
Dallas, TX
Yeah....I learned how to read! :) Had the waiting for device issue on Ubuntu, figured it out on the other thread.
 
Last edited:

MarvinFS

Inactive Recognized Developer
May 11, 2010
188
14
Ekaterinburg
Guys,
who tried this method with European D855 (3/32) model with E/F/G fw's but also taking a TWRP from the thread with full package?
[ROOT / TWRP][D851 ONLY] Root/TWRP your TMO LG-G3 with PurpleDrake!
some say it's for D851 only, is it true?
Who tried it on D855? Does it work?
 

john0699

Senior Member
Aug 13, 2013
214
31
Kundl / Austria
Guys,
who tried this method with European D855 (3/32) model with E/F/G fw's but also taking a TWRP from the thread with full package?
[ROOT / TWRP][D851 ONLY] Root/TWRP your TMO LG-G3 with PurpleDrake!
some say it's for D851 only, is it true?
Who tried it on D855? Does it work?

The d855 have a locked bootloader, that's why it will not work!! No recovery for us, at the moment!! We have to wait.

Gesendet von meinem LG-D855 mit Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 361
    Howdy all!

    What's this? Read on, dear reader, to discover the magic that is PurpleDrake.

    rY0Jco4.png

    What is this?

    This is a utility to easily root your LG G3 (specific models only). It's a fairly foolproof script that includes all the dependencies you'll need for getting your phone rooted easily.

    This is the LITE version. This means that this version will only ROOT your phone. If you have a T-Mobile G3, we'd suggest you look for the full version in this same forum on XDA, since that will root, install TWRP, and prevent your root checker from showing your phone as rooted!

    Who made this?

    This root is a collaboration between myself (IOMonster), jcase, and autoprime.
    Special thanks also to beaups for some initial guidance looking at the vulnerable application.

    Is my phone compatible?

    The new LG G3 models each are slightly different with regards to rooting and unlocking.

    The vulnerability we're exploiting for PurpleDrake has actually been present on quite a few LG phones for some time, and as such this script will automatically detect if your phone is capable of rooting with this method.

    To see a matrix of which LG G3 phones are compatible with this root, please see this Google Docs spreadsheet that we've compiled.

    When you run this program, your phone will reboot and run a test to see if it's compatible. If the application succeeds, it'll let you know that it's able to permaroot you. If not, it'll fail gracefully and reboot you back to normal Android without having changed anything.

    How do I use this?

    WE NOW SUPPORT WINDOWS! YAY ME

    To start, for either platform you'll need to scroll down to the download section and get the file.

    Ensure that your phone is in ADB mode (PTP Mode for everyone but Verizon. Verizon users need to be in "Internet"/"Ethernet" mode)

    Linux Instructions (in a terminal!)
    • Extract the file you downloaded...
      tar xvf ~/Downloads/PurpleDrake-Lite_VERSION.tar.gz
    • Mark the application as executable, and run it!
      cd PurpleDrake-Lite
      chmod +x purpledrake_linux.sh
      ./purpledrake_linux.sh

    OSX Instructions (just a bit easier)
    • Extract the file you downloaded
    • Double-click on "purpledrake_osx"

    Windows Instructions
    • Extract the file you downloaded
    • Double-click on "purpledrake_windows"

    The application will guide you through all the steps you need.

    You will still need to install SuperSU from the market after installing PurpleDrake. This pack does not include one.

    After, be sure to check @autoprime's post for how to disable OTA upgrades! here : http://forum.xda-developers.com/showpost.php?p=54254062&postcount=2

    But, what if I don't want to run your script to root?

    Well then, I'd be a little hurt, but you can still do everything the script does manually.
    Download the package, and extract it. Open a terminal in the main folder of the archive and run these commands:
    Code:
    adb reboot --bnr_recovery
    adb push ./assets/start_restore /temp/start_restore
    adb push ./assets/permaroot.bin /temp/start_restore
    adb reboot

    That will perma-root you, however there's no protection from doing something stupid or the phone being incompatible. Please be careful!

    Where do I get this?

    WINDOWS/OSX/LINUX VERSION OUT NOW!
    - Fixed Windows support
    - Fixed OSX ADB issues not detecting phone first try
    - Fixed race conditions leading to errors permarooting
    - Added 64-bit Linux ADB
    Code:
    [url]http://downloads.codefi.re/thecubed/lg_g3/purpledrake/PurpleDrake-Lite_R03.tar.gz[/url]

    Old version here... (OSX/Linux only)
    Code:
    [url]http://downloads.codefi.re/thecubed/lg_g3/purpledrake/PurpleDrake-Lite_R01.tar.gz[/url]

    Please DO NOT mirror or re-upload the PurpleDrake software to your own site, or any other file host.

    If you need drivers for Windows (thanks @autoprime for having these handy!):

    Help, it doesn't work!

    Post here, let us know what happened and we'll try to help you. DO NOT private message us on XDA or on IRC asking for help. We will not assist privately.

    Most questions if not answered here can be answered on #lg-g3 on IRC in Freenode.

    Thanks so much! How can I show my appreciation?

    Since this was a collaboration project, proceeds that are made from this root will be split between amongst us so we can purchase a Sprint test phone to root (as it's currently not rooted).

    If you'd like to donate to us, click the "Donate to me" button on the left sidebar under my name, and be sure to enter a comment to let us know that you're donating towards the PurpleDrake project.

    Thanks again!
    75
    Disable OTA:

    Open LG Hidden Menu (3845#*851#) --> WLAN Test --> OTA Setting --> OFF
    *Replace "851" with your devices model number, 850, 852, 855 etc...

    Look, instead of rushing to take an OTA to get the latest software.. think for a moment.
    We do no know if the bootloader will stay "unlockable" in future updates. OTA's can update not only software..
    but the boot stack as well.. enabling features to block downgrades.. close exploits.. and all sorts of fun stuff.

    so.. instead of taking an OTA.. wait for the files to get posted so we can look at things first.. possibly only updating /system, /boot, /modem (maybe tz/rpm)
    without updating the rest of the boot stack. ya... do that. Plan on making a lil thread on this soon to make things easier.

    EFS Backup:

    Code:
    [FONT="Arial Narrow"][B]Backup EFS after jailbreaking your G3. EFS is split into 2 partitions modemst1 and modemst2. 
    img files will be on root of internal sdcard. Save the .img files somewhere else besides the sdcard... email, cloud, etc..[/B]
    
    I have made a new thread on EFS backup and restore which can be found [URL="http://forum.xda-developers.com/lg-g3/development/efs-lg-g3-efs-backup-restore-t2907329"]HERE[/URL].
    [/HIDE]
    [B][SIZE="5"]Restoring Stock / Remove root flag:[/SIZE][/B]
    [HIDE]
    Download the tmo .tot file and use lg flash to restore it to stock. itll format everything on internal sdcard so backup anything u may need off it.
    
    T-Mmobile firmware can be found [URL="http://downloads.codefi.re/wolfgart/LG_G3/D851"]here[/URL]. Thanks to [user=608699]@wolfgart[/user] for the files and [user=1157052]@thecubed[/user] for codefire hosting. 
    
    *Step by step picture guide - [url]http://imgur.com/W83hMPE[/url]
     
    install the drivers.
    put phone into Download Mode (power off. unplug USB. pull battery. put battery back in. press/hold Volume Up then plug in USB cable.)
    In Windows Device Manager set the phones serial COM port to #41. (*see picture guide for help)
    Install LG Flash. In "C:\LG\LG Flash" folder delete megalock dll. Replace with .dll below.
    new megalock dll - [url]http://bit.ly/1cQADXm[/url] (this site includes a "download manager.. UNCHECK THE BOX before downloading dll file.)
    Run LG Flash in the "C:\LG\LG Flash" folder. Select korean factory if asked.
    When LG Flash opens you will see a box to select firmware and dll.
    Select LG Flash (.dll).
    Select (.tot)
    Hit OK (*see picture guide for help)
    Hit yellow start button. If you get Milkyway error click ok. LG Flash will then run a crc check on the tot file. Takes a bit. 
    After crc check finishes unplug the phone. plug phone back in. it should now be seen in LG Flash and start flashing. 
    Phone will reboot when finished. You may end up on a screen with s "2"... let it sit there for a minute or two. 
    If stuck on "2" try unplugging the usb cable from the phone.. wait 10 seconds.. then plug the usb cable back in. now wait 30 seconds and hopefully it changes to a "3"
    Once the phone says "3" you can unplug the USB.. remove the battery and plug back in.. boot back up... you are now 100% stock. 
    [/HIDE]
    13
    Hey guess what?

    Windows support is up!
    Fixed OSX bugs!
    aaaand I included a 64-bit ADB binary that should fix Linux not detecting the phone!

    Let me know how it goes!
    7
    hi,
    (...) when i download SuperSU i get that there are no SU Binary installed.
    Answer is quite simple: you did not get root access to the system. You are not rooted. On why you did not get root, I don't have an answer. The screenshot from script you ran unfortunately does not show, if on the way something might went wrong but the script did not notice and/or did not care. I for example failed to root 10N, it's quite possible that PurpleDrake doesn't work anymore and got fixed.

    besides the custom Rom,it's possible to install the official LG LL KDZ?
    Of course. Any KDZ compatible with your device can be flashed. You will lose root of course and will not be able to regain it while on unrooted Lollipop.

    Does anyone know if someone is working on a solution to root the 5.0 stock ROM?
    Two possible answers, as there are principally two ways to obtain root: a) and b) :p

    Read on:
    a) Exploit a weakness in current Android code; this weakness would be common to all devices running this code, no matter if TouchWiz (Samsung), Optimus UI (LG), Sense (HTC), Sony's XPERIA devices, ...
    b) Exploit a weakness of a specific device, be it a weakness of the/a specific Android build specific to this device, a hole in the bootloader, recovery, you name it.

    1. to a) This is what towelroot did. A vulnerability in the kernel code allowed towelroot to virtually root any device running an affected kernel. So many, many devices were rootable this way, of course once the hole was closed in the kernel source, as soon as a device ran the newer kernel code, it was immune to towelroot. So all devices which received an update were eventually immunized.
    2. to b) This is what virtually all rooting methods for the G3 do. They exploit one or the other vulnerability of the G3, a specific build of android on the G3, a specific recovery etc etc.

    So the final answer to your seemingly simple request, which in the end is not as simple as you possibly thought:
    As followup to 1 and a) There are probably, in this very moment, quite a handful of developers, trying to penetrate the current Android code to find a point of attack. This will get more and more difficult though, as Android is hardened from version to version. In case a hole in the current 5.x line of code (Lollipop) can be found and successfully exploited, a method like towelroot will be released and quite a few devices and very likely also many of the devices scheduled to receive Lollipop anytime soon now, will be rootable. The hole will quite possibly be quickly fixed though, and future devices won't be affected anymore as well as current devices, receiving an update to the base code, fixing the hole.
    As a follow up to 2 and b) with a handful of high-profile devs, more or less the main responasbles for all previous rooting methods for the G3, having left the G3 scene, coupled with a lacking influx of new developers probably mainly due to the age of the device, no, theres is probably no one working on getting "native" root for the G3 on Lollipop.

    This leaves us with mainly three scenarios:
    - the current one: downgrade to Kitkat, obtain root, get bump, flash a Lollipop-build of your choice through the bumped recoveries available.
    - There might be a rooting method for the new LG Flex 2 which will be found anytime in the future and which turns out to be compatible with the G3.
    - There might be a rooting method for Lollipop in general, which also works on the G3.

    Thats pretty much your options right now. I don't think I forgot anything.
    6
    Thank you! @thecubed & PurpleDrake

    this guide help my very much! (with pic & every thing)
    http://www.androidrootz.com/2014/07/how-to-root-lg-g3.html

    and hope this will help too: (Unroot for OTA using LG PC Suite & it Clear the "ROOTED" to "UNROOTED" on the DM)

    http://forum.xda-developers.com/lg-g3/general/guide-unroot-ota-using-lg-pc-suite-pc-t2802286
    -
    http://forum.xda-developers.com/showthread.php?t=2715114

    While this is indeed a very helpful picture guide, please don't download PurpleDrake from this person's website. I've asked that my files not be mirrored elsewhere, and this guide has disregarded my request.
    There's no way to know if the guide creator has added any additional software to PurpleDrake that could compromise either your computer or your phone. Please only download from the sources listed in the OP of this thread.

    Thanks!