New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
jnichols959
Old
(Last edited by jnichols959; 3rd June 2011 at 03:27 AM.) Reason: added a registration-free download link for the vm (thanks propain4444)
#1  
Senior Member - OP
Thanks Meter 89
Posts: 128
Join Date: Mar 2011
Default [RECOVERY] G2x ClockworkMod flash for Mac

Disclaimer: flashing is a lot more risky than rooting so proceed at your own risk. This has only been tested with the G2x.

This uses the free VirtualBox (from Oracle) and a 900 meg vitrual machine I created to allow flashing recovery (clockworkmod or stock) from a mac. If you run into any problems with the first download link, try the second (it requires free registration).

This will give you a running linux virtual machine that has g2x root/unroot, clockworkmod (and stock) recovery flashing, and the android sdk (including adb) set up. You can root or unroot as well as flash clockworkmod recovery or the stock recovery using some double-clickable scripts. The android sdk is on there too in case you want to play around with adb. The clockworkmod version installed is 3.1.0.1 external with ext4 (http://forum.xda-developers.com/show....php?t=1086687) but you can download other versions and flash them pretty easily - just check the Readme.txt in the nvflash folder.

The clockworkmod flash here is the mac equivalent of http://forum.xda-developers.com/show....php?t=1056847 - though this thread just uses a linux virtual machine to get it done.

The username and password on the virtual machine are both "android" (without the quotes of course).

Requirements:
  • a few gigs of hard disk space
  • about 300 megs of RAM
  • intel mac
  • a sense of adventure

  1. download virtualbox and the extension pack from http://www.virtualbox.org/wiki/Downloads
  2. install virtualbox
  3. install the extension pack (just double click it once virtualbox is installed)
  4. download the linux virtual machine (thanks to propain4444 for the hosting) http://articulatevisuals.com/g2x/vir...it_0_3.tar.bz2 or (requires free registration for this one) http://www.4shared.com/file/19DywhVS...it_0_3tar.html
  5. decompress the virtual machine download (double click) if it didn't happen automatically
  6. in virtualbox choose Machine -> Add… from the menu bar and choose the android_g2x.vbox file inside the android_g2x folder created by the decompressed virtual machine download
  7. once the vm boots up you'll see the root/untoot and nvflash folders on the desktop with double-clickable scripts inside

After following the requirements above, to connect your phone for flashing with nvflash do the following:
  1. plug the USB cable into your mac
  2. turn the phone off
  3. remove the battery
  4. hold down volume up and volume down then plug the USB cable into the phone

Nothing will happen on the linux vm (unless you ran the tail_kernel_log.sh script in the nvflash folder) but you *should* be able to then run the flash-clockworkmod-recovery.sh script. If it doesn't see your device try disconnecting from USB and doing the steps above again. If you want more visibility into whether or not it's connected then double-click the tail_kernel_log.sh script and watch for a line to appear when you plug your phone in (with volume buttons held down of course).

If this helped you please click the Thanks button on this post. Thanks to baykakes for helping with the initial testing and propain4444 for the registration free download hosting. Countless thanks and credit to krylon360 for the updated ClockworkMod, Chris Soyars (ctso) for the initial test2 ClockworkMod and linux scripts in the g2x forum that motivated me to do this, koush for ClockworkMod and many others here whose knowledge helped make this possible.
The Following 17 Users Say Thank You to jnichols959 For This Useful Post: [ Click to Expand ]
 
baykakes
Old
#2  
Member
Thanks Meter 3
Posts: 57
Join Date: Apr 2011
YEY you posted it!

Once everything is downloaded IT'S REALLY EASY FOLKS! :)
 
VisedMonk
Old
#3  
VisedMonk's Avatar
Senior Member
Thanks Meter 72
Posts: 464
Join Date: Dec 2010
Location: Michigan
Hey OP, thanks for developing and posting this. I can confirm that this works well and that it is really easy once the necessary files are downloaded.
 
Mikeglongo
Old
#4  
Senior Member
Thanks Meter 7
Posts: 309
Join Date: Apr 2011
I'm a newb, but after all these steps are done we should be able to save the stock ROM and I can download another ROM?
 
jnichols959
Old
(Last edited by jnichols959; 1st June 2011 at 05:30 PM.)
#5  
Senior Member - OP
Thanks Meter 89
Posts: 128
Join Date: Mar 2011
Quote:
Originally Posted by Mikeglongo View Post
I'm a newb, but after all these steps are done we should be able to save the stock ROM and I can download another ROM?
That's exactly what you should be able to do. If you get it all installed and run the flash-clockworkmod-recovery.sh script successfully then you can do the following.

In preparation, download your ROM of choice to some place on your MicroSD card. If it's cyanogenmod you'll also need to install google apps. If you want to download it to your MicroSD card (gapps) and you'll install it later with clockworkmod. Once this is done back up the stock ROM:
  1. power off the phone
  2. hold down power and volume down until you see Android with a bunch of app icons then release both buttons
  3. when the screen with red text comes up press volume down to scroll to "backup and restore" then hit power button to select
  4. Backup should be highlighted so hit power to select
  5. wait for the backup to complete

Now you should have a folder in /sdcard/_ExternalSD/clockworkmod/backup with a timestamp and the contents of your backup (the path may vary if you're on something other than the stock ROM). At this point you'll want to
  1. navigate to "wipe data/factory reset" and let it complete
  2. navigate to "advanced" => "Wipe Dalvik Cache" and let it complete
  3. finally back to "install zip from sdcard" -> "choose zip from sdcard" and find the zip file with the ROM you downloaded above and install it
  4. if you installed a ROM like cm7 that requires the google apps separately choose "install zip from sdcard" again, "choose zip from sdcard" and find the gapps zip you downloaded and install it

When it finishes you can reboot and setup your new ROM. You can of course backup the new ROM like you did before. At any point you can reboot into recovery (power off then hold power and volume down) and use restore to restore a previous backup.
 
suhailtheboss
Old
#6  
Senior Member
Thanks Meter 74
Posts: 288
Join Date: Jun 2009
Location: Kansas City
worked great, thanks so much for your work!
 
Mikeglongo
Old
#7  
Senior Member
Thanks Meter 7
Posts: 309
Join Date: Apr 2011
Awesome, this might actually be what I was looking for, a big thanks to you.

Just one question, since T-mobile is sending me a new phone, shoud be here by thursday, might as well not install NVFLASH until thursday correct?
 
jnichols959
Old
(Last edited by jnichols959; 2nd June 2011 at 05:32 PM.)
#8  
Senior Member - OP
Thanks Meter 89
Posts: 128
Join Date: Mar 2011
Quote:
Originally Posted by Mikeglongo View Post
Awesome, this might actually be what I was looking for, a big thanks to you.

Just one question, since T-mobile is sending me a new phone, shoud be here by thursday, might as well not install NVFLASH until thursday correct?
Yeah, assuming you need to send your current one back you might just wait for the new one. Though you could flash cwm now, backup your stock ROM, flash some new ROMs just for fun then restore the stock ROM and flash the stock recovery before sending it back :D. This virtual machine also includes my easy root/unroot scripts as well...
 
propain4444
Old
#9  
Senior Member
Thanks Meter 9
Posts: 111
Join Date: Jun 2010
I may be able to host the VM image for you - Send me a PM if interested.
The Following User Says Thank You to propain4444 For This Useful Post: [ Click to Expand ]
 
propain4444
Old
#10  
Senior Member
Thanks Meter 9
Posts: 111
Join Date: Jun 2010
So, this is the "full" clockwork flash for a mac right? Not the "fake" one i keep hearing about.

Basically, this is flashing clockwork as described here (only, for a mac):
http://forum.xda-developers.com/show....php?t=1056847