yashsingh1/xdaforums huggingface dataset:
[Motorola Photon 4G] romracer:
This is a modified CWM-based recovery for the Motorola Photon 4G. It is based on my own custom code forked from the CyanogenMod team's recovery. The major changes I have made include full support for dual SD cards, support for webtop partitions (SD card and internal) and changes to Nandroid backup/restore for this phone's additional partitions.

Some highlights include:

Dual SD card support

ADB support

USB Mass Storage support

Nandroid additions/changes

ext3 formatting

Probably others

This recovery is only for UNLOCKED devices. It is intended to be flashed directly to the recovery partition.

UNLOCKED users can flash this recovery using:

moto-fastboot devices

moto-fastboot erase recovery

moto-fastboot flash recovery recovery-photon3.img

Example:

$ moto-fastboot devices
TA20700KXH fastboot

$ moto-fastboot erase recovery
erasing 'recovery'... OKAY [ 0.741s]

$ moto-fastboot flash recovery recovery.img
sending 'recovery' (4780 KB)... OKAY [ 0.490s]
writing 'recovery'... OKAY [ 0.544s]

SPRINT USERS

Orange 5.0.2.7-photon3 / ZIP version.

MD5 0dc70209659fecbf7a2a01fe64b431af / a7fa2daf946557006931d33f3954e350

Cyan 5.0.2.7-photon3 / ZIP version.

MD5 440baa230638bd12dfd38b67977d3ac3 / 4da9f845f5d8ae0c37d0e1deaecd931c

Light green 5.0.2.7-photon3 / ZIP version.

MD5 b0791b6a4e0ea1a593d450518f309315 / f4afa4ca6f9616713ba436149df48c46

Dark green 5.0.2.7-photon3 / ZIP version.

MD5 5ef4862918169c1b4f9b0cbd60c70267 / 12acbe4adac62dc79e9a2b9ed1d0ea3b

Blue 5.0.2.7-photon3 / ZIP version.

MD5 cb1a4b2b48d18f535f5a3ce312e3ee81 / 53eee173392a8a821e45e8ddb1bbefd6

Red 5.0.2.7-photon3 / ZIP version.

MD5 f95a0adfb47ae2b995412b89d95f40fe / ca222e4891f756b5b4ad59fe06b6f0bf

Original ROM Manager/CWM installable zip thanks to SolidHelix. You must still be UNLOCKED and have already applied at least one version of this recovery via fastboot to use them.

Source is here.

A few notes:

The "osh" partition is webtop. It is the largest by far and will take some time to backup. Nandroid is not frozen!

The "sd-ext" partition is an ext2/3 partition on your external SD card. Veterans will know this as apps2sd and data2sd from other phones. I am not aware of any use of this partition on this phone yet.

Thanks to:

Koush and the CM team for CWM

Calkulin for pointing out the kernel

Everyone who has made unlocking the Photon possible
[Motorola Photon 4G] romracer:
** Changelog **

2011-11-14 (5.0.2.7-photon3):

Minor bugfix update mostly

ext4 experimental support

Added the ability to convert an ext3 partition to ext4 under advanced. Shouldn't break anything, but it is experimental

2011-09-23 (5.0.2.3-photon2):

Updated to CWR5 base source.

The blue version is now the new CWR5 color. Old blue is gone. New photos welcome! :)

2011-09-17 (4.0.1.5-photon1.3):

Added a verify option to the backup and restore menu.

Renamed internal SD card mount point to /emmc and external is now /sdcard (this is largely cosmetic).

Merged in miscellaneous fixes from the official CWM. Version 5 will be merged in once its ready.

2011-08-17 (4.0.1.5-photon1.2):

Changed fstab to ext3 since no kernel support yet

2011-08-17 (4.0.1.4-photon1.1):

Added 0MB option to ext3 partition size under External SD card partitioning which removes any ext3 partitions from the card (choose 0MB ext3/0MB swap to have only a FAT32 partition).

Added a red build to the mix.

Updated the update-binary in the CWM zips to be tailored for this phone.

Minor fixes to sdparted (log file related mostly).

2011-08-14 (4.0.1.4-photon1):

Initial release

Screenshots

Thanks to DarkSim2o9 for the following screenshots (these show an Atrix, but the color is identical):

Orange

Cyan

Blue

Light green

Dark green

Red

Known Issues

I doubt ext4 support works due to no kernel support. Disabled currently. Added in -photon3.

Soft keys to use as navigation may not work due to the kernel.

Miscellaneous

If you'd like ROM Manager to see this recovery as "official" you can try XCellPhoneSalesRep's suggestion posted here.

Alternately, you can try dcarpenter85's suggestion here.

For issues with recovery not sticking, see here:

Old versions

You can browse and download old versions here.
[Motorola Photon 4G] Custodian:
Awsome!!!
[Motorola Photon 4G] bricky23:
Sounds good. Will try.

Sent from my unlocked rooted Moho!
[Motorola Photon 4G] jglee311:
This is what Calk posted earlier......right? I know it's yours, but not to be confused......just different colors...correct?
[Motorola Photon 4G] bricky23:
I like that there is a choice of colors. Well done!
[Motorola Photon 4G] the3rd:
Awesome job. One question, how might one boot direct into the recovery from a full Power Off?
[Motorola Photon 4G] bricky23:
Hold down volume down and power till boot. Volume down till you see android recovery, then volume up.

Also, as aaron130 said you can use quick reboot from the market.

Sent from my unlocked rooted Mopho!
[Motorola Photon 4G] moonzbabysh:
Fricken Awesomeness

Sent from my Photon Blaster.
[Motorola Photon 4G] e240:
ahhh this is what im getting..it seems fastboot isnt working for some reason even tho i just rooted..some help please

C:\AndroidSDK\tools\moto-fastboot>moto-fastboot devices

C:\AndroidSDK\tools\moto-fastboot>moto-fastboot erase recovery

< waiting for device >"

edit: nevermind got it working ..thanks!
[Motorola Photon 4G] Lokifish Marz:
Two questions:

1. Has anybody verified the "ROM Manager support" method on the Photon yet?

2. Other than color choice, what is the difference between this recovery and the one Calkulin posted earlier?
[Motorola Photon 4G] tim-tim:
i think theres an issue with the recovery.

it installed perfectly and booted properly.

i chose to format the internal sd partition and it didnt remove any of the data.

i havent tried to flash anything yet or make a nandroid but ill keep you posted and i do have it loaded.

thanks for all of your hard work. greatly appreciated
[Motorola Photon 4G] ooxcfhxoo:
the same way you boot into fastboot

when phone is off.......

1. press and hold power and volume down

2. when the phone displays fastboot release the buttons

3. use volume down to switch to android recovery

4. press volume up and boot into cwm
[Motorola Photon 4G] ooxcfhxoo:
Im creating a backup as I type (speak)
[Motorola Photon 4G] romracer:
Calkulin's is based off my -atrix3 revision. This is slightly newer code (-atrix3.1 bug fixes mostly). It uses the same kernel as his. He PM'ed me to let me know how he got it to work on this phone and I simply used his advice to create the thread.

I haven't verified ROM Manager on this phone. It may need until Koush updates ROM Manager to say it supports this phone. I thought several times about editing that out of the second post but chose to leave it for now.. :P
[Motorola Photon 4G] romracer:
Under Mounts and Storage menu? If someone can provide me with /proc/mounts while booted into regular Android, I can check it out.
[Motorola Photon 4G] Yay 4 Juggs:
http://pastebin.com/uGakTEYu
[Motorola Photon 4G] romracer:
Thanks, the table looks exactly like the Atrix (not surprising). If choosing "Format /sdcard" from the mounts and storage menu didn't work, I'll probably need /tmp/recovery.log after trying (but before exiting recovery - the file is lost then).
[Motorola Photon 4G] romracer:
Minor update released. Biggest changes include 0MB ext partition option under external SD card partitioning which combined with 0MB swap gives you just a FAT32 partition without having to use Windows, etc. There's also a red version now.

The code is technically based on 4.0.1.5 but Koush pushed his commit late and so the build still says 4.0.1.4. I didn't see the need to recompile just for that :)
[Motorola Photon 4G] Yay 4 Juggs:
are the tools fixed such as being able to clear cache...nandroid...etc?
[Motorola Photon 4G] romracer:
Thanks to Yay 4 Juggs, version 1.2 posted which removes ext4 from fstab.
[Motorola Photon 4G] ZiggSVO:
I'm too knew to this moto shtuff lol. Not even sure what removing ext4 your talking about lol
[Motorola Photon 4G] John Kotches:
Ext4 is a linux file system. Its the newest and support can be lacking in some places. Backing down to ext3 gives much broader cross platform compatibility.
[Motorola Photon 4G] ZiggSVO:
Yea I thought ext4 was the fastest lol. What I was running on my epic as opposed to rfs...just didnt know what kind of file system the photon used
[Motorola Photon 4G] cligon:
Noob

Does anyone want to walk me thru the unlocking process?:confused: Im new to Android and don't understand these processes yet...
[Motorola Photon 4G] foxgalaxy:
Awesome work!!!

Does anyone know how to backup the original recovery image first? I'd like to make a backup of the original. Thanks for all your help.
[Motorola Photon 4G] Yay 4 Juggs:
here is the original recovery just flash as you would the custom recovery.
[Motorola Photon 4G] foxgalaxy:
Guides

welcome to android.

Please read this first, try forum search function and google

http://xdaforums.com/showthread.php?t=1216999

- download motorola fastboot

- take off the battery

- with the battery in, hold vol key down, press power button

- you should see fastboot on top of the screen. if not, press vol down until you you see fastboot

- press vol up to run fastboot

- in command line, run the steps in OP's direction:

moto-fastboot devices

moto-fastboot erase recovery

moto-fastboot flash recovery recovery-photon1.2.img

Hope it help.
[Motorola Photon 4G] justforflashing:
OK...so Im gonna through it out there....IM CONFUSED AS SHAT!!!

Im not new to rooting and flashing, just new to Motorola. And what Im seeing is that it is ALOT different than Samsung and/or HTC.

Sooooo....my question. Im rooted! Ive got that down. Ive downloaded the fastboot zip...but where do I put it? Do I have to extract it? And then once I boot into fastboot, does it pretty much do it on its own?

And this whole bootstrap thing...yeah...its like a blind man reading chinese...ITS NOT HAPPENING!!

Any help to get unlocked and CWM would be MUCH MUCH appreciated!
[Motorola Photon 4G] smoothone:
When I am in fastboot I get this "error: cannot load 'recovery-photon1.2.img"

I only get this message when I try to flash the recovery image or the rooted system image. Thanks in advance!

Edit: Fixed my path, I'm an idiot!

Damn its hard to get help in this forum. My question has been up for 24 hours. Cornelius is about the only person that has lent me a hand. The photon is awesome but this board is like a mausoleum. Not complaining, just saying.
[Motorola Photon 4G] mikel719:
+1

I had the same problems.
[Motorola Photon 4G] netengineer:
Okay, I have everything but..... where do I put the "recovery-photon1.2.img" file so I can run the (moto-fastboot flash recovery recovery-photon1.2.img)?
[Motorola Photon 4G] bricky23:
Tools folder. Same place as moto fastboot.
[Motorola Photon 4G] netengineer:
I don't see a Tools folder.
[Motorola Photon 4G] bricky23:
Did you install sdk? Tools folder is in androidsdk
[Motorola Photon 4G] netengineer:
I think I am missing a few steps..... lol Thanks for the help
[Motorola Photon 4G] Yay 4 Juggs:
if you're only using moto-fastboot the sdk is not needed and just a waste of time for you. just put the .img file in the same folder as your moto-fastboot.exe
[Motorola Photon 4G] netengineer:
This is what I get.... I go into fastboot... it says "Starting Fastboot protocol support"

Now should I connect the phone to my laptop and push the image to it? What is the command syntax?

I think I am just getting caught up in how I did the Epic and confusing myself...:D
[Motorola Photon 4G] bricky23:
connect phone to laptop open command prompt

moto-fastboot devices

moto-fastboot erase recovery

moto-fastboot flash recovery recovery-photon1.2.img
[Motorola Photon 4G] netengineer:
Thanks for the help but I can't get it to work. I get an error when I run "moto-fastboot erase recovery" I also get an error when I 'flash" as well.

on the phone I get "Failed to process command erase" or "Failed to process command flash"

What did I do wrong? It's probably something simple. :confused:

I think I may have it. I don't think I was unlocked.... Rooted but not unlocked.

EDIT: It failed at the end while unlocking it. I did this procedure:

http://xdaforums.com/showthread.php?t=1216097
[Motorola Photon 4G] bricky23:
It always fails. Just continue with the rest.
[Motorola Photon 4G] ianford10:
Well since i applied the latest update ill be buggered if i can get a recovery to work. I am fully rooted and back to being unlocked, follow the instructions and all seems to go well but then when i go into recovery all i get is the stock recovery. Have tried this 4 times and same outcome. Am i missing something?
[Motorola Photon 4G] romracer:
New version posted! See post #2 for details.
[Motorola Photon 4G] xenkato:
J would like someone to help me if you can,

J am unlocked, rooted and after using cmd prompt to fastboot , followed the instuctions to load the recovery, everything went fine but when j use the volume buttons to enter ClockworkMod recovery the well known exclamation and android "thing" appears.Did all the procedure 5 times.

Any suggestion and help ?

Edit : It seems j am in stock android recovery 3e (pressed volume buttons showed me that)
[Motorola Photon 4G] TheGman125:
Hey can someone explain what the zip file is for. Can I just flash the zip in cwm and it will update it?
[Motorola Photon 4G] xenkato:
Well since i applied the latest update ill be buggered if i can get a recovery to work. I am fully rooted and back to being unlocked, follow the instructions and all seems to go well but then when i go into recovery all i get is the stock recovery. Have tried this 4 times and same outcome. Am i missing something?

Have you find a solution?We are in the same problem..
[Motorola Photon 4G] HooliganAMA:
Yes. That is it exactly. Flash zip version through cwm and you're done.
[Motorola Photon 4G] snoopy1e11:
Has anybody gotten moto-fastboot to wrk on a mac
[Motorola Photon 4G] romracer:
New version posted based on CWR5! See post #2 for details.
[Motorola Photon 4G] romracer:
http://xdaforums.com/attachment.php?attachmentid=635333&d=1308903016
[Motorola Photon 4G] smoothone:
I've used moto-fastboot on my Mac many times.
[Motorola Photon 4G] dangtong:
I'be got through all th steps without any error. But I can't boot into Android recovery. I got the black screen with the android and the triangle icons. Tried reflash recovery couple times with both stock and cwm img. Still same issue. The phone is fully rooted, everything working perfectly, except I can't get into this recovery mode. Any advice?
[Motorola Photon 4G] romracer:
Read post #2, particularly the Miscellaneous towards the bottom.
[Motorola Photon 4G] dangtong:
Thanks. Got it working now. I ended up with installed CWM for Atrix from ROM Manager and then fastboot flashing your Photon version. Thanks all.
[Motorola Photon 4G] bitbearmi:
Thank you and question

Thank you for updating CWR for the photon. Especially thank you for adding back the display of file names while nandroid runs. Its always been a way to keep track how far along the process I am.

I know you've worked with Koush on this, do you think he will roll this into ROM Manager for "official" support? It would be nice to have that tool. I really loved using it when I had my Evo 4G.
[Motorola Photon 4G] romracer:
The file name display while backing up is part of doing a tar based backup. Tar backups are now the default in CWR5 so this is why you see them now. Nonetheless, I do agree they are a nice way to keep track of the progress :)
[Motorola Photon 4G] xTMFxOffshore:
Has anyone noticed that making a backup now seems to take significantly longer with the update? Not that I mind, it still works the same. Just curious if it's only my phone.
[Motorola Photon 4G] bricky23:
Ya took me like 30 minutes
[Motorola Photon 4G] xTMFxOffshore:
Yeah. Seemed to take me about the same. But worked the same far as I can tell.
[Motorola Photon 4G] CrashV2010:
Could you make this for the Evo Shift, please sir ? This is Awesome.... Please PM me.
[Motorola Photon 4G] jon20usa:
Worked great. Thanks!
[Motorola Photon 4G] Kernodle:
Wanted to say thank for this, it worked great on my MoPho and I'm now rocking a custom ROM.
[Motorola Photon 4G] ericvbp21:
Go easy on me....i just got my Photon and i have seen a couple of videos on how to root and install Clockwork recovery. but i have a mac and it is all done on a PC. how do i do this on a Mac and will i loose my 4g if i install Clockwork recover. i have 4g where i'm at and love using it. Help please
[Motorola Photon 4G] romracer:
I'm sure you can find videos on using fastboot on a Mac. Perhaps not for a Photon, but its going to be the same basic command line structure. And you use Terminal instead of a DOS window. I guess if nothing else, you could install VirtualBox and install a Windows VM in that.

I'd ask in the pudding thread about the unlock/4G issue.
[Motorola Photon 4G] romracer:
New version posted. Updated to 5.0.2.7 base source. See post #2 for full changelog.
[Motorola Photon 4G] radrian92:
Dang it! I just today unlocked and flashed the Photon2.img, I should've done it later tonight and gotten the new version :fail:
[Motorola Photon 4G] bricky23:
Just download the zip version, and flash through cwm. Super easy.
[Motorola Photon 4G] sub2k1:
Anyone try to convert to ext4 with this?
[Motorola Photon 4G] xTMFxOffshore:
It works. Just leaves dalvik cache borked
[Motorola Photon 4G] jokersax11:
Has anyone successfully converted system to ext4
[Motorola Photon 4G] olegfusion:
/cache and /data success, but bricked rom after /system ext4 convert of skinny rev1
[Motorola Photon 4G] jrebo:
I did a backup and restore of my ext4 data with no issues.

MoPho with Joker's skinny unlocked rev1 ext4
[Motorola Photon 4G] romracer:
If you're converting /system to ext4, you need to make sure your boot.img kernel supports ext4 and is mounting /system using ext4 via the various init*.rc files. The stock kernel does not support ext4 and simply changing the mount lines in init.rc is not true ext4 support either. You need both pieces.
[Motorola Photon 4G] aikata:
I recommend not partitioning your SD card with this recovery. It rendered my radio unusable.
[Motorola Photon 4G] jokersax11:
Currently only the data partition is supported with my ext4ready kernels and yes getting system support is being worked on, however your recovery is still not mounting anything ext4 its showing the same error so...
[Motorola Photon 4G] jokersax11:
You should only partition external sdcards and using linux to partition is recommended
[Motorola Photon 4G] aikata:
Naturally. It would also be a good move to only have the option to partition an external sdcard.
[Motorola Photon 4G] jokersax11:
Keep in mind that cwm isnt only for the photon. Romracer ported this for us. He didnt have to at all. Everyone knows there are bugs in cwm but most of it works. Currently the system partition doesnt like ext4. Btw romracer i did a fresh ext4 format of system by formatting and mounting via install script and its still a no go. So its not the conversion process or the modules.
[Motorola Photon 4G] romracer:
Wait, are you guys seeing the option to partition internal SD card under the advanced menu? There should only be a partition external SD card option I'd think. I have specific checks in place to prevent the internal option showing up on Atrix and Photon, so please clarify if that is not the case. Those checks certainly keep the internal option hidden on the Atrix.

Edit: it would also be helpful if this could be confirmed/denied using the latest -photon3.
[Motorola Photon 4G] bricky23:
The only 1 I see is ext sd. Using photon3

Sent from my skinny mopho o/c and all.
[Motorola Photon 4G] romracer:
Based on my previous post, did you do this using the "Partition external SD card" option? Or was the internal option showing for you? Or did you do this manually?

As others have noted, you should not repartition the internal flash. This is because the bootloader stores the start address and size of the internal partitions, and so redo'ing them will cause the phone to fail in unpredictable ways since that information will no longer match.

I'm just trying to understand how you did this as I try to block the dangerous access when possible.
[Motorola Photon 4G] phyba:
I accidently did that and lost my rom, recovery and boot logo. I got everything working except for my boot logo.
[Motorola Photon 4G] romracer:
How did you partition the internal flash? I'm trying to understand so I can fix it if necessary.
[Motorola Photon 4G] phyba:
The option was there after wiped my cache. I hit it by accident and it messed everything up. Ill reboot into recovery to see if the option is still there. I had to reflash the recovery
[Motorola Photon 4G] peetr_:
Just want to share my experience with rom manager.

I am installing kernels and roms with rom manager, using cwm 5.0.2.7-photon3. Backup didn't work with rom manager. I think it did not mount sdcard. Shows 0 space free, looks like it's backing up but ends on .android_secure and backup is nowhere to be found.
[Motorola Photon 4G] andyk11:
No... Rom manager back-up and restore don't work. Have to do the vol down and power buttons to get to the real recovery that does work.
[Motorola Photon 4G] shabbypenguin:
if you guys want an app to interface with clockwork mod use ACS updater. its free its in the market. it doesnt have anything listed in it because im lazy and no one has submitted stuff :P but it will work on allowing you top rename backups and etc etc. until we have official support from koush then rom manager is a rather useless app for the most part.

m talking with drockstar (he manages epic 4g cwm and a host of other devices) about getting official, wont be quick as hes working on getting epic to be official first but it is in the works
[Motorola Photon 4G] pigphish:
what is the dual sd card support used for?
[Motorola Photon 4G] xecuter2:
I am assuming these will work just fine on electrify as well but want to make sure. I am running Photon 2 right now I believe but will upgrade once I get confirmation as to not beak anything lol.

Thanks for porting CWM!!! It was because of you that I even bought this phone.

Pig, Dual SD support is used on our phones since technically the internal flash memory is seen as a "sdcard" so in order to address this internal sdcard plus a user added card, the recovery has to be set up to point to both locations.
[Motorola Photon 4G] roundeye1987:
I've been using it for about a week doing multiple rom installs, backups, and everything in-between with no hickups. Its given my Electrify Cyanogenmod goodness!
[Motorola Photon 4G] sjamie:
If this recovery is installed, is there any need to also have the bootstrap recovery installed?
[Motorola Photon 4G] phyba:
Does nandroid backup work on this after converting data to ext4?
[Motorola Photon 4G] demonotaku:
If you want the bootloader logo back here is what you do

- 1) Reflash the Stock bootloader via Fastboot

- 2) Flash the lastest SBF via RSD

- 3) Redo the unlocking of the boot loader
[Motorola Photon 4G] rockettman:
Does anyone have the plain CWM Recovery.img? I can't seem to locate it within the OP.
[Motorola Photon 4G] bricky23:
No
[Motorola Photon 4G] ttkyles:
Yeaaaa I'm rooted and unlocked

And got cwm blue 5027 flashed

I said no to sd- ext right!

Even though I do use app2sd after flashing roms and re installing apps.

Thanks so much great directions.

First flash cm7.1 :)
[Motorola Photon 4G] :
No Sir, not anymore CWM super seeds it :)D
[Motorola Photon 4G] ttkyles:
I found an app called ..

Recovery manager free and paid

That reboots straight to cwm without hitting volume buttons.
[Motorola Photon 4G] thomasmatt25:
ROM Manager has a free version as well. I prefer that one over Recovery Manager. Its dev by Clockworkmod.
[Motorola Photon 4G] ttkyles:
Yea but rom manager doesn't support the Motorola photon yet.
[Motorola Photon 4G] peetr_:
If you set it up for Defy, you can install rom through rom manager. Defy has no cwm in recovery partition, but uses 2ndInit. So rom manager won't install recovery, but uses the present recovery. Backing up through rom manager doesn't work this way.