Tagged: G2x

Installing ClockworkMod Recovery on G2x from Linux

October 1, 2011 Posted by mitch | android, G2x | 0 Comments

I said I was going to write about my experiences with this... and never came back to it. I've been running custom ROM's since my first post about rooting my G2x. However, I honestly was a little unsure about the whole process so I didn't want to write about the other bits. I went back through and upgraded ClockWorkMod Recovery again, this time it was a little less unnerving so, I will write down my steps here.

First... I'm following bits from this xda thread

I downloaded the rar file and pulled out the bits needed for ClockWorkMod (CWM) 5.0.2.0, so I could flash it from linux. I originally had a script that I used to flash this... my appologies I don't remember where, nor do I want to claim it as my own... I will include it however at the bottom of this post. Anyway, here goes. After grabbing the files above and the nvflash bin and a script, I put all of this in a CWM-5.0.2 directory

mitch@kraven:~/g2xroot/CWM-5.0.2$ ls -l
total 5008
-rw-r--r-- 1 mitch mitch 3563520 2011-09-06 20:58 CWM-5020.img
-rw-r--r-- 1 mitch mitch 4080 2011-04-21 00:40 E1108_Hynix_512MB_H8TBR00U0MLR-0DM_300MHz_final_emmc_x8.bct
-rw-r--r-- 1 mitch mitch 1024992 2011-04-21 12:00 fastboot.bin
-rwxr-xr-x 1 mitch mitch 125 2011-10-01 15:59 flash-recovery.sh
-rwxr-xr-x 1 mitch mitch 526131 2011-10-01 15:58 nvflash


Before running the script, you need to connect your phone, follow these steps: 

  • pull the battery on my phone 
  • plug USB cable in laptop 
  • Hold Volume Up AND Volume Down 
  • *WHILE* holding #3, plug in USB to phone

This should result in a PCI connection to your phone... Your phone will not do anything.


mitch@kraven:~/g2xroot/CWM-5.0.2$ lspci
....
15:00.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)
15:00.4 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 11)
15:00.5 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 11)

From there, you run the flash-recovery.sh script.


mitch@kraven:~/g2xroot/CWM-5.0.2$ ./flash-recovery.sh 
Nvflash started
rcm version 0X20001
System Information:
chip name: unknown
chip id: 0x20 major: 1 minor: 3
chip sku: 0xf
chip uid: 0x02884207417fe4d7
macrovision: disabled
hdcp: enabled
sbk burned: false
dk burned: false
boot device: emmc
operating mode: 3
device config strap: 0
device config fuse: 17
sdram config strap: 0

downloading bootloader -- load address: 0x108000 entry point: 0x108000
sending file: fastboot.bin
/ 1024992/1024992 bytes sent
fastboot.bin sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully
sending file: CWM-5020.img
| 3563520/3563520 bytes sent
CWM-5020.img sent successfully


At this point... you phone will be showing a "software upgrade is in progress" screen...
even after it completes... the above output took around 15 seconds to play out... and they say you can
unplug right after this.. I left it pluged in for another 30 seconds... cause it makes me nervous... (probably
unfounded...)

Download files here


Rooting my G2x from Ubuntu

June 9, 2011 Posted by mitch | android, G2x, root-android, ubuntu | 0 Comments

Since my only desktop is my work Lenovo ThinkPad running Ubuntu 11.04, and the bulk of the articles out there reference Windows... I did find a few articles articulating how to root the T-Mobile G2x, but I thought I'd do a full write up here over what exactly I did to root my G2x and will do a followup with flashing a CyanogenMod Nightly to it as well.

First, I downloaded the latest Android SDK from Google

I extracted the tarball and renamed it to androidsdk in my home directory:

$ tar -zxvf Downloads/android-sdk_r11-linux_x86.tgz
$ mv android-sdk-linux_x86 androidsdk


I then added the following to my .bashrc file and load it into your environment variables


$ export PATH=${PATH}:$HOME/androidsdk/tools:$HOME/androidsdk/platform-tools
$ source .bashrc


The directory, platform-tools, will not exist yet, and you will need to download the Android SDK Platform-tools. To do this, you will run the command


$ android


This will startup a GUI, click Available packages -> Android Repository -> Android SDK Platform-tools, revision 5 (Revision may be updated... this was the version when I did this)

Click Install Selected wait till finished and close.

Now, we need to update udev to setup the proper device permissions for when we connect our phone.


$ sudo echo 'SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"' >> /etc/udev/rules.d/51-android.rules


the idVendor string is unique per manufacturer, there is a list of them on Android Development here, But I've used the LG one here, since they're the maker of the G2x.

Then you need to restart udev


$ sudo service udev restart


Now... we're almost done. I first attempted to use the SuperOneClick root... which wasn't working for me. I then found a shell script that was a simple root to... thought I'd give it a go, and it worked easily, which can be downloaded on xda

I will note that... at this point, you should be able to connect your phone via USB, turn on USB Debug Mode. Settings -> Applications -> Development -> USB Debugging. Then run: adb devices. Should return this... or something similar at least... not sure what the hex number is... serial#?


$ adb devices
List of devices attached
02884207417fe4d7 device


After Downloading the G2xRootMacLinux_v0.5.zip and unzipping it.


mitch@kraven:~$ mkdir g2xroot
mitch@kraven:~$ cd g2xroot/
mitch@kraven:~/g2xroot$ unzip ../Downloads/G2xRootMacLinux_v0.5.zip
Archive: ../Downloads/G2xRootMacLinux_v0.5.zip
creating: G2xRootMacLinux_v0.5/
creating: G2xRootMacLinux_v0.5/files/
inflating: G2xRootMacLinux_v0.5/files/adb_linux
inflating: G2xRootMacLinux_v0.5/files/adb_mac
inflating: G2xRootMacLinux_v0.5/files/busybox
inflating: G2xRootMacLinux_v0.5/files/psneuter
inflating: G2xRootMacLinux_v0.5/files/shared.sh
inflating: G2xRootMacLinux_v0.5/files/su
inflating: G2xRootMacLinux_v0.5/files/Superuser.apk
inflating: G2xRootMacLinux_v0.5/Readme.txt
inflating: G2xRootMacLinux_v0.5/root.command
inflating: G2xRootMacLinux_v0.5/unroot.command
mitch@kraven:~/g2xroot$ ls
G2xRootMacLinux_v0.5
mitch@kraven:~/g2xroot$ cd G2xRootMacLinux_v0.5/
mitch@kraven:~/g2xroot/G2xRootMacLinux_v0.5$ ls
files Readme.txt root.command unroot.command
mitch@kraven:~/g2xroot/G2xRootMacLinux_v0.5$ less Readme.txt
mitch@kraven:~/g2xroot/G2xRootMacLinux_v0.5$ ./root.command

Checking for connected device...
Pushing temporary root exploint (psneuter) to device...
1262 KB/s (585731 bytes in 0.453s)
Running psneuter on device...
property service neutered.
killing adbd. (should restart in a second or two)
Waiting for device...
Remounting /system read/write...
remount succeeded
Pushing su to /system/bin/su...
635 KB/s (26324 bytes in 0.040s)
Pushing busybox to /system/bin/busybox...
1253 KB/s (1062992 bytes in 0.827s)
Installing Superuser.apk android application...
1283 KB/s (196521 bytes in 0.149s)
Removing psneuter from device...

Rebooting device...

Once device has rebooted you should be rooted.
Press Enter when you're ready to quit:
mitch@kraven:~/g2xroot/G2xRootMacLinux_v0.5$



And that was it. Phone is rooted.

Many Thanks to jnichols959 for the scripts!

Next up CyanogenMod Nightly


G2x

May 14, 2011 Posted by mitch | cliq-sucks, G2x, motorola-sucks | 0 Comments

So... I was just looking back and I never posted that I bought the G2x when it came out!

Whats up with that... I mean... I really love the phone... and I haven't even root' it yet! I will more than likely... waiting for the gingerbread release to come out for it before I jump ship to another custom rom... Wanting to make sure I can always go back to stock. And I know I said it had to have a keyboard... but a dual core phone with a really good screen... and stock android... I went for it. and while at times I miss the keyboard... i'm getting used to swype. I find me avoiding replying to email with my phone however... so I guess it is telling... All and all tho... I don't miss the cliq in the slightest it was a horrible phone. The G2x however, is great. Only thing that I would change in it... a keyboard!


Random Quote:

If you have a talent, use it in every which way possible. Don't hoard it. Don't dole it out like a miser. Spend it lavishly like a millionaire intent on going broke.

- Brendan Francis