[GUIDE] Howto Root LG Motion 4G on Ubuntu Linux (MetroPCS)


  1. Sepero

    Sepero Linux Guru Guide

    I just successfully rooted my LG Motion using Ubuntu Linux, so I figured I'd give some tips for everyone else.


    1. Firstly, read the following guide per it's instructions. (Notice: Don't be a dumbass. Read all instructions before you do anything to your phone)
    2. For convenience, here is the link for downloading the o4xr.zip file and IS11LG_SystemBackupTest.signed.apk file (download the signed.apk file to your phone):
    3. Linux users will use the root-linux.sh script (instead of root.bat) to root their phone. It is located in the o4rx.zip archive.
    4. The root-linux.sh script is screwed up with DOS style endlines. To clean it, you will need to run this command to modify the script:
      Code:
      sed -i 's/\s*$//' root-linux.sh
    5. Also, the script needs to be made executable:
      Code:
      chmod 755 root-linux.sh
    6. Lastly, when it is time to run the script for rooting, it needs to be done with root permissions on your Linux system:
      Code:
      sudo ./root-linux.sh

    Your output should look something like this:
    Code:
    Don't touch the device or unplug while rooting!
    Push files
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    rm failed for /data/local/installbusybox, No such file or directory
    rm failed for /data/local/installbusybox2, No such file or directory
    rm failed for /data/local/root, No such file or directory
    rm failed for /data/local/root2, No such file or directory
    rm failed for /data/local/sysro, No such file or directory
    rm failed for /data/local/sysro2, No such file or directory
    rm failed for /data/local/sysrw, No such file or directory
    rm failed for /data/local/sysrw2, No such file or directory
    rm failed for /data/local/unroot, No such file or directory
    rm failed for /data/local/unroot2, No such file or directory
    rm failed for /data/local/busybox, No such file or directory
    rm failed for /data/local/su, No such file or directory
    rm failed for /data/local/Superuser.apk, No such file or directory
    4974 KB/s (2005736 bytes in 0.393s)
    3731 KB/s (91980 bytes in 0.024s)
    3668 KB/s (996704 bytes in 0.265s)
    rm failed for /data/local.prop, No such file or directory
    Reboot
    
    Congratulations, you should find a new app on your phone named SuperSu



    Additional tips by Levi0187:

    • Download and run the apk on your phone.
    • After running, it will be white and say, "Hello world".
    • Do not exit out from the "Hello world" screen!!
    • Hold down your power button and choose restart.
    • After your phone reboots, plug in usb and choose charge only
    • Type the commands listed above into terminal and once rebooted, you're rooted!!
    Also a note!~ Ubuntu doesn't need to mount or recognize this device in your home folders as it did not mine. Just follow the steps and the terminal will see it and do it's thing.

    Advertisement
  2. plasticarmyman

    plasticarmyman Well-Known Member

    i cannot get my phone to mount on Ubuntu 10.04....any help?
  3. Sepero

    Sepero Linux Guru Guide

    1. You do not need to mount your phone to root it
    2. To mount your phone, you need MTP support, and MTP support is not yet included with Ubuntu by default. Getting support for MTP is outside the scope of this thread.
    3. Instead of screwing with MTP, what I did was installed a wireless file transfer app to my phone. (There are lots, but I think ftp is most popular)
    plasticarmyman likes this.
  4. enigmadroid

    enigmadroid Well-Known Member

    All I did is have adb and run command through terminal. I always use Linux to root as I have never got crappy ass windows to work.
  5. niteridet

    niteridet Member

    yo,
    I tried to change the script, but on ubuntu12.04, where do I save the root-linux.sh file so I can get the cmnd's correct? And also need a more detailed description of how to run this in terminal...I read and did everything wrong even the xda instructions...I Am halfway there though...:what:
  6. Sepero

    Sepero Linux Guru Guide

    Q: where do I save the root-linux.sh file so I can get the cmnd's correct?
    A: You can save it anywhere you like. Just unzip the files somewhere. Then use the terminal to go to that location
    Code:
    cd folder/o4xr/
    While in that directory, you run all your commands there.
  7. niteridet

    niteridet Member

    OK I did that...but I son exactly know how to run those cmnd's
  8. Sepero

    Sepero Linux Guru Guide

    If you copy and paste the errors you're getting, and then I can help you out.
  9. niteridet

    niteridet Member

    Well first off, I'm very oblivious on how to run command propmt or terminal - i don't even know where to start - so i tried a variety of things - but i just get 'file' or 'command' not found type of info.
    Do I have to copy and paste something into this root-linux.sh file before i run it? Well I tried that and i keep having issues with the whole thing - look up my profile and instant messege me on one of my screen names- I could really use some tutoring.
    I tried to root my evo 4g 6 monthes ago - but I never succeeded with that either...
    firstthing i did was copy and paste the (sed -i 's/\s*$//' root-linux.sh) into the terminal and all it does is respond with (user@chrubuntu:$) - am i supposed to edit this into the root-linux.sh file or run it as root? or both?
    then i copy and pasted the (root-linux.sh) file into the terminal, pressed enter and then i get this:
    bash: /home/user/Documents/root-linux.sh: Permission denied
    user@ChrUbuntu:~$
    Am I supposed to log in with my chrubuntu password first?

    So I gave you two examples as to how clueless i am with this linux root method - but i did instal the systembackup.apk onto the phone from my chrubuntu - do i extract all of the .zip files onto my ubuntu or just the root-linux.sh file?
    Like i mentioned before - the author of this thread please messege me on yahoo, or whatever pm me - I just like a faster dialog. thx:confused:
  10. jvillejoe

    jvillejoe Well-Known Member

    One question, how do we unroot using this method? :p
  11. twogbsd

    twogbsd Well-Known Member

    WINE maybe?
  12. jvillejoe

    jvillejoe Well-Known Member

    Not sure if you have figured this out. Save the unzipped o4xr file to your home/user file. Open terminal, type ls hit enter, and see if it shows up on the list of your main directory.

    Once you see the file, type this as follows;

    cd o4xr
    sed -i 's/\s*$//' root-linux.sh
    chmod 755 root-linux.sh
    sudo ./root-linux.sh
    [sudo] password for user: enter password
    Don't touch the device or unplug while rooting!

    After that let it run, and let your phone reboot, and you should be rooted. ;)


    Here is a good tutorial for using terminal.

    https://help.ubuntu.com/community/UsingTheTerminal
  13. jvillejoe

    jvillejoe Well-Known Member


    Going to try and unroot right now. I just want to be able to unroot for what ever reason. ;)
  14. Sepero

    Sepero Linux Guru Guide

    It IS possible to unroot by simply removing the files that were added: /system/app/SURoot.apk /system/xbin/busybox /system/xbin/su (also, the root process leaves a dirty copy of these same files in /data/local/. They are no longer used and can be deleted without consequence)

    But that won't restore any changes that were made to the device by rooted programs. If a root program made changes to the audio, or build.prop, or any system files, then those will remain.

    The only way to guarantee the device is back to a factory state is by flashing a factory firmware on the device. Currently, the only method for doing this is by using the unroot/unbrick guide. And unfortunately, that program is produced by LG and only runs on MSWindows.

    WINE only has support for things like OS library files. It has No support for device drivers, and because of this, it will never work for the purpose of connecting hardware.

    As an alternative, I've tried using the LG software on a VirtualBox of MSWindows. I had all the software installed and it did not work in my testing.

    In the end, my only solution was to borrow the MSWindows laptop of a relative and reset the firmware using their system.
    jvillejoe likes this.
  15. Sepero

    Sepero Linux Guru Guide

    (warning: linux hacker info being leaked in this post)
    There is only one solution I know of for factory restoring without MSWindows. Basically, it would involve getting a nand backup of the /system, prior to being rooted. Or getting a nand backup of the /system soon after being rooted, and hand editing it back into an unrooted state. (both of which are possible, but require an in-depth level of knowledge)

    Once you have an unrooted nand backup of the /system, it's then just a matter of flashing it using the nand restore process.

    But here's the catch, this nand restore process is no good if the device is bricked.
    jvillejoe likes this.
  16. jvillejoe

    jvillejoe Well-Known Member

    Yeah, Wine didn't work. I also tried my VM, and had the same results. I could always barrow a MS box from my brother if I needed. I haven't ran windows in ages. Thanks for the reply. ;)

    I wish company's would start supporting Linux...
  17. jvillejoe

    jvillejoe Well-Known Member

    You could still unbrick via windows though right? Just not in linux because you need the LG program?
  18. Sepero

    Sepero Linux Guru Guide

    Yes
    niteridet and jvillejoe like this.
  19. flbatl

    flbatl Well-Known Member

    I successfully rooted and did everything necessary in a Windows virtual machine....so it does work.
  20. sammyz

    sammyz LG Whiz Kid Guide

    Was the virtual machine running inside of Linux or windows?
  21. flbatl

    flbatl Well-Known Member

    Inside of an Ubuntu 13.04 host running VMWare 9.
    sammyz likes this.
  22. jvillejoe

    jvillejoe Well-Known Member

    How did you get the drivers to install? :confused:
  23. flbatl

    flbatl Well-Known Member

    I disabled auto mounting in Ubuntu and that allows you to take ownership of the phone on the vm. I'm using XP also to make things easier. Create a Z drive to your LG folder and everything should go smoothly.
    sammyz and jvillejoe like this.
  24. jvillejoe

    jvillejoe Well-Known Member

    Sweet, and I also run XP in a vm. Thanks for the tip. ;)
  25. Levi0187

    Levi0187 Well-Known Member

    I encountered this upon entering cd o4xr into terminal

    levi@******** ~$ ls
    Administration Desktop Music out.ogv Software
    broadcom-wl-5.100.138 Documents mypc.ogv Pictures Templates
    broadcom-wl-5.100.138.tar.bz2 Downloads o4xr.zip Public Videos
    levi@******** ~$ cd o4xr
    bash: cd: o4xr: No such file or directory
    levi@******** ~$


    What did I miss?

Share This Page