Page 1 of 8 1234 ... LastLast
Results 1 to 25 of 188
Like Tree3Likes
  1. Thread Author  Thread Author    #1  
    dishe's Avatar

    Posts
    236 Posts
    Global Posts
    245 Global Posts

    Default Idiots Guide to Rooting and Custom ROMs, Optimus S Edition

    ...the tutorial for the rest of us!

    First, I do not take credit for any of the information contained here. A great big shout out to Beezy, KsmithinNY, drellisdee and all the others who have spent countless hours sharing their intimate knowledge of the inner workings of our devices. Without them, none of this would be possible.
    In fact, most of this post is the result of copy and pasting their respective threads, and I highly recommend you visit the original source for more detailed information (I will try to make sure to link all sources in the text).

    I'm writing this because I felt like newbies have a lot to take in the first time, especially if this is their first Android handset. I'm no expert and I'll be the first to admit that I'm still learning this myself. So, if any of you seasoned Android veterans find anything to be incorrect here, please let me know!

    Now, on to the good stuff!


    So, you want to flash a custom ROM, but don't even know where to start? No problem. This tutorial is for YOU.
    Throughout the tutorial I will try to explain in detail what each thing is and why it is necessary, but it is not important for you to understand in order to perform the process. These details will be written in red italics, and don't worry if you don't get it. You won't have to- its just FYI and good to understand.

    ----------------

    Here is the process in a nutshell (I will go into more details in the posts that follow if you find the original threads too daunting):
    1)Root your phone. (original thread here) Needed to allow access to critical system areas.

    2)Back up any user data you wish to save and/or restore to new rom (App data, such as what Angry Birds level you're on, call logs, etc. are going to be cleared. If you want to keep them, there are plenty of apps to choose from. I recommend Titanium Backup, there is an excellent free edition in the Market).

    3)Install custom recovery (original thread here) This is a modified system menu that allows you to "recover" a rom that never actually existed on your phone before. That is, to install a custom rom, this tool is used to trick the system into thinking its recovering to an official release. Aside from ROM flashing, it also allows you to save the entire contents of your phone, user data and all, to an image that can be restored later if you get cold feet and want to turn back. Cool, huh?

    4)Put ROM on SD card and reboot the phone into custom recovery to install it.

    5)If you backed any data up (user data, etc), you can start restoring it now.

    ----------------

    That's really all there is to it. If you've already visited those threads and still not sure what you're getting into, relax!
    In the next couple of posts I will explain in great detail what you need to do!
    Last edited by dishe; 12-14-2010 at 02:00 AM.
    Thanked by 23:
    + Show/Hide list of the thanked
    djspade likes this.
  2. Thread Author  Thread Author    #2  
    dishe's Avatar

    Posts
    236 Posts
    Global Posts
    245 Global Posts

    Default

    The detailed version...

    NOTE: I WILL NOT BE HELD RESPONSIBLE FOR BRICKING YOUR PHONE. Proceed at your own risk.

    ---------------

    Section 1: Root your phone.
    This is needed because we will be running code that will modify the protected areas of the system. The only way to access those areas is to do it with root access.
    For more information on this process, you can find the original thread by KSmithinNY here (http://forum.androidcentral.com/lg-o...optimus-s.html). There is also a video walkthrough link from iamlilysdad in that thread as well.
    Also interesting to note that there is an easy one-click way to do this called Z4root, which doesn't require any shell commands or tools installed on the desktop (It used to be in the market, but appears to have been recently pulled- original XDA thread containing file can be found ). However, you'll need to use the shell and have all this installed for the next steps, so you might as well install them now and root the old fashioned way to get a feel for it.

    Note: For the purposes of this tutorial, I assume you are using a Windows PC. If using a Mac, I recommend mfldmike's excellent tutorial for rooting on his mac (with screenshots), found here.

    1) You'll first need to install all of the following (if you haven't already):
    1.a) Java Runtime Environment
    1.b) Google's Android Software Development Kit . We recommend you install this on the root of your computer so the path is C:\android, since that will be important to the commands entered later.
    1.c) Drivers for the LG phone installed on your computer. Instructions from gbhil to do that can be FOUND HERE.
    These are basically the tools needed to connect to your phone as a developer. In other words, if you were to develop your own Android apps, you'd use these tools to test and debug a real world example on your phone. No, you're not going to have to become a developer to flash roms! The reason we do this is because you will need to issue commands directly to the phone, using a nifty little command line tool called Android Debug Bridge (ADB). Think of it like a remote command line to the linux system driving your phone. Pretty useful stuff.

    The next set of steps are from the original thread by KSmithinNY, found here.


    1.d) Download the root exploit files found at the bottom of the original thread here (called OptimusRoot.zip).
    Download it, unzip it, and put the 3 files inside in your android-sdk-windows\tools folder created from installing the SDK in 1.b above.

    2) Once everything from step 1 is installed, plug your phone into your PC with the USB cable.

    3) Make sure the phone is charge only (don't mount as USB drive) and USB debugging is enabled. (Find this in Menu > Settings > Applications > Development > check mark USB debugging)

    4) Launch the SDK manager, should be something like C:/Android-sdk-windows SDK Manager

    5) Open a CMD window and type each of the following lines, one by one:
    (Tip: You can paste text into a cmd window in most versions of windows by right-clicking anywhere inside the window)

    cd c:\wherever-your-sdk-tools-folder-is (mine for example is C:\android\tools however in the new SDK, I think for gingerbread 2.3, the correct directory would be "Platform Tools", and not just "tools". See what you have on your directory))
    adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage
    adb push su /data/local/tmp/
    adb push busybox /data/local/tmp/
    adb shell
    chmod 4755 /data/local/tmp/rageagainstthecage
    chmod 4755 /data/local/tmp/busybox
    cd /data/local/tmp
    ./rageagainstthecage (let things sit a couple minutes (2), your phone will disconnect from the computer and you'll be removed from your ADB session)
    adb shell This should return a "#" symbol instead of a "$" symbol. If it does you're good. If not go back and start from the beginning of step 5
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
    cd /data/local/tmp
    ./busybox cp su /system/bin
    ./busybox cp busybox /system/bin
    cd /system/bin
    chmod 4755 su
    chmod 4755 busybox
    exit
    exit

    Congratulations, you just used the ADB command line tool to load the software needed to root your phone. That's wasn't so scary now was it? In the future, if you would like to enter some ADB commands, all you have to do is plug in the phone like this again, navigate to the directory that houses the SDK, and type ADB again.
    Now that the exploit is in place, all you have to do is designate who/what has root access, which brings us to the next bit:

    If you are unable to get the # and finding yourself frustrated, you could always download z4root and do it the one click way. It was important that you have all this stuff installed and setup working for later.

    6) Go to the android market on your phone and download "Superuser"(free). The developer will be listed as ChainsDD.

    DONE! Your phone is rooted! And you used the ADB command line to do it! On to part 2, Backing up!

    ----------------

    Section 2: Backing up user data
    As I mentioned above, the custom recovery tool (explained in the next section) will allow you to do a dump of the entire contents of your phone's memory (also known as a NAND backup). This is great because you'll be able to revert back if you decide to go back to a stock ROM. The problem, however, is that you can't recover user data into a new ROM with that backup. That backup can only restore the entire contents of your old NAND, including the original ROM. So, if you want to take anything with you, call logs, text messages, user data in apps, you need a specific program to do that. I personally used the free edition of Titanium Backup, which will allow you to do a full backup of your apps and data, and restore them one by one afterwards. There are also specific apps you can use to backup/restore your call logs or SMS, but I found that Titanium can handle most of the data I was interested in.

    This entire section is optional, as you can choose to start with a fresh slate and that is your own prerogative.

    On to Section 3, Custom Backup!
    Last edited by dishe; 01-03-2011 at 10:55 AM.
  3. Thread Author  Thread Author    #3  
    dishe's Avatar

    Posts
    236 Posts
    Global Posts
    245 Global Posts

    Default

    Section 3: Custom Recovery
    The original thread for this can be found here.

    1) You need two files, flash_image.zip and recovery-RA-GNM-thunderc-s-1.1.0.img.zip, both of which can be found towards the bottom of the original thread. Copy them to the root of your SD card.

    2)Plug in the phone like we did in Section 1, and open up the ADB shell (like we did before- enter the cmd, navigate to where your SDK is installed, and type adb shell).
    Check your display to see if Superuser is asking you to grant permission to have root access to the commands coming in. Make sure you click to allow it if it asks. You should be greeted with a # prompt (If not, the prompt is not being granted root access and something is wrong).

    3)Enter the following commands:
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
    cat /sdcard/flash_image > /system/bin/flash_image
    chmod 755 /system/bin/flash_image
    mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak
    mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system
    flash_image recovery /sdcard/recovery-RA-GNM-thunderc-s-1.1.0.img
    reboot recovery

    That's it! You've replaced LG's default recovery menu with a custom one. This custom one will allow you to backup/restore nand and flash custom roms made by the users. Great. Now what? Well, lets a pick a ROM and load it up in the next section!

    -------------

    Section 4: Copying ROM file and using Custom Recovery

    The most popular rom for our device so far is the ThundeROM, which can be found here.

    4)Pick a ROM you would like to flash, for example ThundeROM, and copy the entire zip file to your storage card root (do NOT unzip it!).

    5) Reboot phone into recovery by powering off, then press and hold vol_down + home + power and release keys at LG splash.
    You should be greeted by something that looks like this:


    6)Navigate the options on the custom recovery using the vol up and down keys, and menu button to select. It is recommended that you first select Backup/Restore and do a full Nandroid backup, so that if all else fails you can restore your phone to this point later.

    7) Scroll down to WIPE and wipe each of the following clean:
    -Data
    -Cache
    -Dalvik

    7)After that, scroll down to Flash zip from SD card, and select the correct file using the menu key for enter again.

    8) Reboot

    Congratulations. You have successfully flashed a ROM.
    You can now open up the market and download Titanium Backup again (or whatever you used for your user data backup), then use that to restore your other apps and user data.

    If you have any questions about the process or get stuck, I'll help with whatever I can, but please keep in mind that the original threads are a much better source of information than I am. The purpose of this thread is simply to have everything you need in one place, so a newbie can read it linearly. I would recommend that appropriate questions go in their respective threads. Still, if I wasn't clear about any of the steps, let me know and I'll do what I can to make it more understandable.

    Enjoy your phone!
    Last edited by dishe; 12-14-2010 at 02:37 AM.
    Thanked by 18:
    + Show/Hide list of the thanked
  4. #4  
    cmags's Avatar

    Posts
    265 Posts
    Global Posts
    263 Global Posts
    ROM
    CM7

    Default

    Great timing with this. It will be very helpful later today when I tackle this. Thanks for taking three time to put it together!
  5. #5  
    mike9670's Avatar
    DROID Master

    Posts
    787 Posts
    Global Posts
    791 Global Posts
    ROM
    4.1.1

    Default

    Thanks!!!!!!! I plan on trying this over Christmas vacation when I have time to play around.
  6. #6  

    Default

    well, I've gotten to the command prompt part. i copy and paste [adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage] and all I get is error: device not found.

    yeah, I need help :/ I reinstalled the drivers also, so Idk whats wrong..
    Last edited by wade70592; 12-14-2010 at 08:18 AM.
  7. #7  

    Default

    Quote Originally Posted by wade70592 View Post
    well, I've gotten to the command prompt part. i copy and paste [adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage] and all I get is error: device not found.

    yeah, I need help :/ I reinstalled the drivers also, so Idk whats wrong..
    Look at my reply in the "Sticky"
    "aliter ictus diversis folks"
  8. #8  

    Default

    it didnt help that much at all really, It still says devices not found, and I've uninstalled and reinstalled the drivers so many times already
  9. Thread Author  Thread Author    #9  
    dishe's Avatar

    Posts
    236 Posts
    Global Posts
    245 Global Posts

    Default

    Quote Originally Posted by wade70592 View Post
    it didnt help that much at all really, It still says devices not found, and I've uninstalled and reinstalled the drivers so many times already
    Ah, new SDK moved that stuff in Platform-tools instead of just tools, huh? Updating rooting instructions above. Ksmith should update his as well, I'll send him a note.

    Get it working now?
  10. #10  

    Default

    Well, I got all the way past the $ signs, but then i entered adb shell and kept getting the $ instead of # so now idk what to do besides start over again
  11. #11  

    Default

    Quote Originally Posted by wade70592 View Post
    Well, I got all the way past the $ signs, but then i entered adb shell and kept getting the $ instead of # so now idk what to do besides start over again
    I'm not going to chase you from thread to thread to thread lol.

    Please use and stick to 1 thread for this process and I'll continue to assist.
    [CENTER][URL="https://plus.google.com/u/0/+KPSmith/posts"]Follow me on Google +
    Thanked by:
    dishe 
  12. Thread Author  Thread Author    #12  
    dishe's Avatar

    Posts
    236 Posts
    Global Posts
    245 Global Posts

    Default

    Quote Originally Posted by wade70592 View Post
    Well, I got all the way past the $ signs, but then i entered adb shell and kept getting the $ instead of # so now idk what to do besides start over again
    Yes, it took me probably 4 attempts before the $ turned into a #. I did the same commands over and over, finally it took. I think it helps to keep the SDK manager window open in the background.

    If all else fails, you can try the one-click Z4root app in the market, and then continue with section 2 of my guide. The point of doing the root the long way was just to make sure you have the drivers and SDK working so that you can ADB shell, and to familiarize yourself with the process. You don't have to actually complete it this way if you got that far, IMO.

    Good luck!
  13. #13  

    Default

    I'm just gonna stay on this one lol, there should really be a chat system of some sort? but yeah, I've done all the steps and I still get $ ?
  14. Thread Author  Thread Author    #14  
    dishe's Avatar

    Posts
    236 Posts
    Global Posts
    245 Global Posts

    Default

    Quote Originally Posted by wade70592 View Post
    I'm just gonna stay on this one lol, there should really be a chat system of some sort? but yeah, I've done all the steps and I still get $ ?
    Off topic, but agreed. On XDA and PPCGeeks, the most useful day for me was the day I found the developers' IRC chat. As I understand it, KSmith and Beezy don't really do chat. :/
    They do enough for us already, though. I think asking them to sit all day in a chat room might be much.
    thmper likes this.
  15. #15  

    Default

    yeah, I see what you mean. well, i dont really know what to do about these "$" I'm trying everything!
  16. Thread Author  Thread Author    #16  
    dishe's Avatar

    Posts
    236 Posts
    Global Posts
    245 Global Posts

    Default

    Quote Originally Posted by wade70592 View Post
    yeah, I see what you mean. well, i dont really know what to do about these "$" I'm trying everything!
    Look at my suggestions from 2 posts ago. It doesn't always work the first time, keep starting the commands over and eventually it should take. Or, cheat and do it the short way now that you get how it is supposed to work.
  17. #17  
    Bone_Enterprise's Avatar

    Posts
    101 Posts
    ROM
    Hyperdragon, ThundeROM

    Default

    An mIRC/Chat client would be way more complex to deal with than something that is threaded and topic centralized like forums are.
    In a scenario like that you would have multiple dozens of people in one place all going on with diffrent conversations and someone asking for help about something would just get lost in the wall of text that would constantly be passing by, and make it more so confusing for the person seeking assistance.
    .:[ Official LegoROM Mirror ]:.
    .:[ Official ThundeROM Mirror ]:.
    "The Digital Generation Lives On"
  18. #18  

    Default

    Quote Originally Posted by dishe View Post
    Look at my suggestions from 2 posts ago. It doesn't always work the first time, keep starting the commands over and eventually it should take. Or, cheat and do it the short way now that you get how it is supposed to work.
    I already rooted w/ z4root i just wanted to check to see if it really worked. but yeah now on to custom recovery I guess
  19. Thread Author  Thread Author    #19  
    dishe's Avatar

    Posts
    236 Posts
    Global Posts
    245 Global Posts

    Default

    Quote Originally Posted by wade70592 View Post
    I already rooted w/ z4root i just wanted to check to see if it really worked. but yeah now on to custom recovery I guess
    Don't forget to install the Superuser app in the last step of rooting. I'm not sure if z4root does this for you or not. Make sure when you type into the shell, you grant it superuser access via the app. It should prompt you.


    Quote Originally Posted by Bone_Enterprise View Post
    An mIRC/Chat client would be way more complex to deal with than something that is threaded and topic centralized like forums are.
    In a scenario like that you would have multiple dozens of people in one place all going on with diffrent conversations and someone asking for help about something would just get lost in the wall of text that would constantly be passing by, and make it more so confusing for the person seeking assistance.
    Actually, it works really well for them and was a great way for all the great minds to collaborate together when someone is having a specific problem. If it pertains to other people, the threads were updated. But it IS time consuming, and I lost many a work day just chatting with other devs.
  20. #20  
    Nick7's Avatar
    Brick Master

    Posts
    1,039 Posts
    ROM
    CM7

    Default

    For the root section I would suggest z4root. Much easier, plus it auto installs super user.
  21. #21  
    simon.ponder's Avatar

    Posts
    442 Posts
    Global Posts
    443 Global Posts
    ROM
    Bugless Beast Nightly

    Default

    Quote Originally Posted by wade70592 View Post
    Well, I got all the way past the $ signs, but then i entered adb shell and kept getting the $ instead of # so now idk what to do besides start over again
    What ended up working for me was this. My phone would cycle through the adb connection twice after running the exploit. If you have notifications volume on your phone turned up, you should hear it. After I heard the first cycle, I typed: adb shell in the command prompt, and that's when I got the #.

    I had tried probably thirty times, before figuring out I needed to fire the command at that time. Hope it helps...
    Thanked by:
    dishe 
  22. Thread Author  Thread Author    #22  
    dishe's Avatar

    Posts
    236 Posts
    Global Posts
    245 Global Posts

    Default

    Quote Originally Posted by Nick7 View Post
    For the root section I would suggest z4root. Much easier, plus it auto installs super user.
    Nick, agreed, but if you look at my post you'll see the reason I went with the "long way" is because you'll need adb later. Might as well get used to the tools now since you'll need to get ADB shell working either way.
  23. #23  
    Nick7's Avatar
    Brick Master

    Posts
    1,039 Posts
    ROM
    CM7

    Default

    Quote Originally Posted by dishe View Post
    Nick, agreed, but if you look at my post you'll see the reason I went with the "long way" is because you'll need adb later. Might as well get used to the tools now since you'll need to get ADB shell working either way.
    Good call. I forgot about having to learn that stuff, It has been a while.. Anyways, thanks for the guide, we really needed one on this board.
  24. #24  
    shortyjacobs's Avatar

    Posts
    446 Posts
    ROM
    Stock

    Default

    I know we have craptons of stickies already, but I think this should be one of them, (especially now that I see the forum's been reorganized and subfoldered).
  25. #25  

    Default

    Guys we have to nip this in the bud real quick....

    It's not a vote kind of thing. If something is sticky worthy, I'll stick it. In the interim i need to go back and remove comments like "sticky" as they don't contribute to the topic at hand. People don't want to read that comment when theyre looking for answers to rooting and roming.

    I know you cant see my PM box but if i sticky everything that someone says "sticky" or PM's me about then you'd have 2 pages of stickies before you even get to the forum.

    When information is important it should be stuck so it doesnt dominate the forum but let me be the judge, ok? If something should be a sticky, PM me, don't clutter the OP's page.

    Thanks in advance. I'm sure the OP's appreciate the cooperation as well so their thread can stay on topic.
    [CENTER][URL="https://plus.google.com/u/0/+KPSmith/posts"]Follow me on Google +
Page 1 of 8 1234 ... LastLast

Tags for this Thread

Posting Permissions

B