• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

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

Sepero

Linux Guru
Aug 26, 2010
963
594
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.
 
i cannot get my phone to mount on Ubuntu 10.04....any help?

  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)
 
  • Like
Reactions: plasticarmyman
Upvote 0
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.
 
Upvote 0
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:thinking:
 
Upvote 0
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:thinking:

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
 
Upvote 0
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 maybe?
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.
 
  • Like
Reactions: jvillejoe
Upvote 0
(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.
 
  • Like
Reactions: jvillejoe
Upvote 0
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.

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...
 
Upvote 0
(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.

You could still unbrick via windows though right? Just not in linux because you need the LG program?
 
Upvote 0
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

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?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones