[How-To] Manual Rooting of LS670ZVJ from Mac OS X

mato_thito

New member
May 21, 2012
1
3
0
Visit site
This guide is a walkthrough of sfhub's excellent guide from a Mac user new to Android rooting and flashing. I'm assuming rudimentary knowledge of UNIX terminals. If you don't know how to
Code:
cd
or
Code:
ls
, go look that up real quick.


A bit of background, I got my Optimus S a little under a year ago running software version ZVD. At the time, it worked great compared to the dumbphone it replaced and became my new favorite piece of technology.

Enter the dreaded ZVH update. As many around these forums know, around Christmastime in 2011, Sprint and LG teamed up to release an update to the Optimus S software. Why? The Optimus S was still running Android 2.2 Froyo while most devices were on Android 2.3 Gingerbread or later. As the consumers begged for Gingerbread, LG and Sprint rushed out an update.

This update was awful. It broke a lot of features on the phone and made many customers angry. I regretted updating, and I regretted putting my girlfriend's phone through the update as well.

This April, the ZVJ update was released, fixing most if not all of the problems the ZVH update caused. Because of this, I was reminded of how capable my entry-level smartphone truly is.

Wanting to unleash its potential, I scoured the Internet looking for information about rooting. Most rooting guides are for Windows PCs. Understandable, considering the role of Windows in the consumer market and the programming world. The problem here is that I had at my disposal one sluggish Mac Mini grudgingly running Snow Leopard.

Here's where the fun begins.

Every worthwhile interaction between a computer and an Android phone beyond basic USB/Bluetooth capabilities happens through the Android Debug Bridge (ADB). Normally, this is run through the Command Prompt (cmd.exe). I had never heard of the UNIX Terminal in the OS X Utilities folder being able to do ADB. But Esau Silva had.

Mini-tutorial: ADB Mac Installation
(How to set up ADB (Android Debug Bridge) in Mac OSX ? Esau Silva)

As Esau puts it "In OSX, ADB just works, as simple as that."
  1. Download the Android SDK. Put it somewhere you can find it. Install it by running "Android" in the tools folder. Get the Android SDK Platform-tools when it asks you what you want to install. That's the one thing you need.
  2. Now that ADB is in the platform-tools folder, we want to let Mac OS X know that. Follow Esau's steps below to creating an environment variable. Or else later steps won't work. Period.
  • Open Terminal
  • Type
    Code:
    cd ~
    this will take you to your home directory
  • Type
    Code:
    touch .profile
    this will create a hidden file named profile
  • Type
    Code:
    open -e .profile
    this will open the file you just created in TextEdit
  • In the file, type
    Code:
    export PATH=${PATH}:/[I]pathToTheAndroidSdkFolder[/I]/android-sdk-mac/platform-tools
  • Save file, close TextEdit, Quit Terminal, and Relaunch Terminal
If you did this all right, hooking your phone up to your computer (probably in USB Debug mode, do that anyway) and typing adb devices into the terminal will list the serial number of your phone back to you.

Now that adb and your phone are talking, you're set to break things. I went to to androidcentral.com's forums and looked around at what I could find.

Eventually I found HydroROM, a pretty looking 2.3.3 fork of the stock ZVJ code. (How pretty? This pretty.) The problem here is that every guide I went to says "must be rooted to start doing this." So to get HydroROM, I needed rooted ZVJ, which needed rooted ZVD.

Not-so-mini-tutorial: Rooting ZVJ the long way

I'm completely new to this whole deal, so straying off the beaten path of the forums was out of the question. No sense bricking my phone when I could have just followed directions. Unfortunately, this meant downgrading first.

Step 1: Downgrade from Sprint site. (See this forum post)

When Sprint realized that they had ruined a bunch of phones, the published the ZVD update with directions on how to flash the downgrade yourself. Follow these steps, you get back to ZVD. Clean and simple.

Step 2: Root ZVD

Rather than think about this step, I downloaded Gingersnap, an automated utility that performs the Gingerbreak hack. You really just connect your phone and click the Root button. Easy as pie.

Step 3: Flash ZVJ

By this point I'm following a forum guide step by step, but I got stuck on almost every step. The first step, download the ZVJ update.zip, I got stuck on because of my OpenDNS settings blocking P2P/File Sharing sites. So, after unsuccessfully setting new settings, I gave up and used foxfi to turn my phone into a hotspot. Works like a charm, but works so charmingly that Sprint blocked it from the Play Store. Get it from their website instead if you're interested.

Once you've got the update.zip, move it to the SD Card root.

At this point make sure USB Debugging is on and turn USB Storage off. You're about to flash a different recovery to your phone. Which still counts as stock, so changing the baseband of your radio and all of that still works.

Download ZVH/ZVJ recovery. Get to its folder in Terminal (cd, cd, cd) and run the install script ("
Code:
./install.bat
"). Next, fire up an adb shell (with the similarly named command). Type
Code:
su
(and remember to allow Superuser on you phone if you've never done it. Su opens a prompt on your phone. Have an unlocked screen!). Then, run three fun lines of code (the # is the prompt):

Code:
# cd /sdcard/000root
# /system/bin/sh install-vh.sh
# reboot recovery
From here, you should be at the recovery screen, able to choose to apply the update.zip just like you did before with ZVD. Use the menu to reboot, and ZVJ is flashed. Unrooted. Sigh.

Step 4: Root ZVJ

This step took me the longest because I got stuck in some scripts that probably worked great in Windows.

Factory reset, according to the guide we're following, works great here!

Grab the zvhroot zip. It claims to install with its bat file to the SD card. This didn't work for me. In the unzipped zvhroot folder, copy the contents of the copy2sd folder to the root of the SD card. Yes, you want the update.zip and the new 000root folder.

Reboot into recovery and try to flash that new update.zip. You'll get an error that gets you stuck in the installer. WE WANT THIS. Get into an adb shell and type (remember, the # is the prompt, don't type those):
Code:
# cd /sdcard/000root
# /system/bin/sh install-root.sh
This installs persistent root. Success. We are rooted!

Remember all the files we copied over by hand? There was also an install file of a custom recovery that is used to install custom ROMs like HydroROM. That step was cakewalk compared to the rooting process. Check it out on the original post by sfhub for more.

So now, I have a rooted, ROM'd phone, and I love it. I hope this posts points you in the right direction if you're caught between the cult of Mac and the allure of rooting your Optimus.