Thursday, June 22, 2017

rooting - How to root the LG Optimus 4X (LG-P880)?


I just got a brand new LG Optimus 4X. Feeling naked without the privacy protection offered by apps like LBE Privacy Guard, and missing good backup solutions like Titanium Backup (and no, Carbon Backup cannot really compete here), I want the device rooted.


How can that be achieved?



Answer



In fact, I never had an Android device where this was that easy to achive! Our friends at XDA-Developers offer a guide and the necessary tools in this thread. Having a "Microsoft free zone" and "only" running Linux machines (yeah, even the Android ones run a Linux kernel), I was able to follow up those steps with a little adaption here and there -- and so I will sum up the results for Windows and Linux users as well:


Preparation


First you need to download the required tools, all of them available at the linked XDA-Developers thread:



Having everything downloaded, some additional steps are necessary at your computer:




  • Windows users only: Unzip and install the drivers

  • Linux users: Make sure adb is able to detect the device (check with adb devices). If it's not, see at the end of this answer for some hints.

  • Everybody: Copy IS11LG_SystemBackupTest.signed.apk to your Optimus (e.g. after connecting it via USB in MTP mode, copy the file to the internal SDCard)

  • Everybody: Create a new directory, unzip o4xr.zip there, and change into this directory.


The rooting process



  1. On your Optimus, go to Settings→Security and make sure "Unknown Sources" is TICKED (i.e. contains a checkmark)

  2. Go to Settings→Developer Options and enable "USB Debugging"

  3. Now install IS11LG_SystemBackupTest.signed.apk (e.g. use a file explorer to find and "launch" it)


  4. Open the "SystemBackupTest" app you just installed. Nothing spectacular will happen, so don't be disappointed here.

  5. Hold the power button and choose "Power off and restart".
    When you can see the lock screen, you may notice that the phone is running very slowly, this is normal.

  6. Once the device is fully started up again, connect it to your computer with an USB cable. Make sure the phone is in "Charging Only" mode.

  7. On your PC, open a terminal (Linux) resp. command (cmd.exe, Windows) window and change into the directory you've extractedo4xr.zip` into.
    (on Windows, you may need admin privileges: right click, run as administrator. On Linux it did fine for me without superuser/root permissions)

  8. Now run the rooting script:

    • Windows users: type root followed by the enter key

    • Linux users: type ./root-linux.sh, also followed by the enter key


    • Any Mac users? Type ./root-mac.sh, also followed by the enter key. Don't worry, it won't root your Mac/Linux machine (Windows users: it is unlikely to root your box, either :)



  9. DO NOT DISCONNECT YOUR PHONE WHILE THE SCRIPT RUNS! Wait while it does its job. During that process, the phone will reboot automatically a couple of times. The script will inform you about this in your command/terminal window. Once the command/shell prompt returns, the misdeed is accomplished :)

  10. Now uninstall SystemBackupTest from your Optimus. Do not launch it again at this state, or you might have to start over from step 5 :)

  11. On your phone, open up Google Play Store and search for "SuperSU". Update the app when prompted, then open it. Press OK to update the SU binary.


You now have root and can safely restore the "Unknown Sources" and "USB debugging" settings back to how you had them! Congratulations! Next steps are to install Titanium Backup, LBE Privacy Guard, and all the other things you might need and which require root!




Hint for Linux users to get adb recognize your Android device



These steps should work with all Android phones. The example data of course should exactly fit the LG Optimus P880 this question deals with.



  1. open a terminal window, and make yourself root (sudo su -)

  2. enter the following command: lsusb. Note the output in your mind.

  3. connect your device with USB Debugging enabled using an USB cable.

  4. again issue the lsusb command. Now it should output an additional line which has to be the just connected Android device. For the LG Optimus P880, this should read like:
    Bus 002 Device 103: ID 1004:61a6 LG Electronics, Inc.
    1004 is the vendor ID for LG, 61a6 the device ID of the P880 in USB Debugging mode.

  5. use your favorite editor (still in root mode!) and open /etc/udev/rules.d/51-android.rules (if no such file exists, simply create it). Add the below lines (first line is optional), and then save the file.

  6. restart the UDEV daemon: service udev restart



Now you just need to disconnect your device. When reconnecting it for the next time, adb will see it -- as you can confirm with the adb devices command. So here are the lines for your /etc/udev/rules.d/51-android.rules file:


#LG Optimus X4 P880
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1004", ATTRS{idProduct}=="61a6", MODE="0666" GROUP="androiddev", SYMLINK+="android%n"

No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...