PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Android > Android HTC Devices > HTC Evo 4G
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-26-2010, 01:15 PM
BooDaddy's Avatar
Linux Administrator
Offline
Pocket PC: HTC Evo -- Rooted
Carrier: Sprint SERO Premium
Location: gigahype.net
 
Join Date: Sep 2007
Posts: 1,078
Reputation: 840
BooDaddy knows their stuffBooDaddy knows their stuffBooDaddy knows their stuffBooDaddy knows their stuffBooDaddy knows their stuffBooDaddy knows their stuffBooDaddy knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.


Please note, that the method below is no longer needed with the new recoveries.


This thread was started during the "grey period" when Sprint re-arranged the partitions in December of 2010. Shortly after, folks were flashing their 4G WiMax partitions with new radios and damaging their RSA keys. Clockwork and Amon_RA recoveries were not capturing the WiMax paritions on backup at that time. I created the thread to help people save their keys before they flashed any 4G radios. The good news is that the method below is no longer needed since both recoveries (Clockwork and Amon_RA) both will now do a complete dump of the 4G WiMax partitions including the keys and everything necessary to restore 4G in case of emergencies. I am now suggesting that you use either Clockwork or Amon_RA recoveries to backup your entire device before flashing anything. I will keep the info below for educational purposes

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


In my endeavor to get rooted on my newly aquired Evo, I learned the RSA keys can easily be jacked up by flashing the wrong stuff to your phone. So, before I went flashing, and rooting away, I wanted a good way to backup the RSA keys on my phone. There are numerous threads out there about where the keys are located, and why some software jacks them up, but this is a good way to get a dump of the keys for safe keeping.

If anyone has any suggestions, feel free to PM me or reply below and I will update the thread as needed!

I am going to assume you are coming from a stock un-rooted phone. This should also work with any other Rom out there as well.

If you have already rooted your phone, you can still grab your RSA keys. See the instructions at the bottom if you have already rooted.

Prerequisites:
You will need to install the USB drivers for the phone. You can find several threads on the forum about getting the proper drivers for the phone. The way I did it was install HTC Sync from this site: HTC Mobile Phone Support - HTC EVO
This will install two sets of programs, one will be your driver package, and the other is the actual HTC Sync program. You can go into add/remove programs and remove the HTC Sync program, but leave the HTC Device drivers.

You will also need a copy of adb in order to open a shell to the phone. This runs on your Windows machine, and connects to the phone via USB and lets you send commands to the phones shell. You can find adb all over the forums, but I have included a copy here:
http://gigahype.net/files/adb_shell.zip
Download that and extract it somewhere on your system. Something like C:\adb_shell will be fine. For simplicity, we will use this location in this tutorial.

Now, lets get started:
1. First, enable USB debugging by going to Settings > Applications > Development > and checking USB Debugging.

2. Grab and install z4root onto your Evo from this thread:
[APP] z4root - xda-developers

Once you have z4root installed, run it, and choose Temporary root. This will take a few seconds to complete so be patient. It will come to a screen that says temp root was a success.

3. Connect your phone using the USB cable. Make sure you select USB Charging mode on the screen.

4. Open a command prompt window from your PC and navigate to where you extracted adb_shell.zip to. In this example, we have extracted it to c:\adb_shell

5. type the following into the command line:
Code:
adb shell
su
Once you type the su command, your phone will prompt asking you to click to allow superuser. Go ahead and click Allow superuser. This will allow the adb shell to get temporary root access.

6. Once you click Allow superuser, your adb shell (in your command window) should now be at a root command line prompt. You can tell if you are at a root command line by the # symbol being displayed. If you see a $ or something other than # then you are not at a root command prompt. GO back and try again

7. If you do indeed have a # then proceed by running the following command. Please type it exactly as you see it. If you are familiar with Linux command strings, this will look familiar.

Code:
busybox sed -n '/BEGIN CERTIFICATE/,$p' /dev/mtd/mtd0 > /sdcard/rsa_OEM.key
8. Your done!
This will dump the RSA keys to a file on your SD Card named rsa_OEM.key
Mine was about 4575 KB in size, but the size could vary.
You can disconnect the phone now. Go ahead and switch the phone's USB connection over to "Disk Drive" and then browse to your SD Card and verify that the file rsa_OEM.key is indeed on the card. It would be a good idea to copy the keys from your SD Card to your PC or somewhere safe. SD cards can and do fail, so get those keys somewhere protected. I keep all of my important stuff on my DropBox account. PM me and I will send you a referal for DropBox

If You have already rooted your phone the process is much easier:

1. Connect your phone using the USB cable. Make sure you select USB Charging mode on the screen.

2. Open a command prompt window from your PC and navigate to where you extracted adb_shell.zip to. In this example, we have extracted it to c:\adb_shell

3. type the following into the command line:
Code:
adb shell
That will immediately drop you to a root command on your phone. You will see the # indicating you are at a root command prompt.

4. Proceed with the sed command below:
Code:
sed -n '/BEGIN CERTIFICATE/,$p' /dev/mtd/mtd0 > /sdcard/rsa_OEM.key
NOW PAY ATTENTION. Once the command completes succesfully, you will not get any reports of it completing. It will simply drop back to the # prompt.
If you get an error that states something similar to "sed command not found" then you do not have busybox running on your phone. That's ok, its not the end of the world. Keep reading, were going to modify the command a little.

Run this command only if you received an error stating "sed command not found" or something similar:
Code:
busybox sed -n '/BEGIN CERTIFICATE/,$p' /dev/mtd/mtd0 > /sdcard/rsa_OEM.key
5. Your done!
This will dump the RSA keys to a file on your SD Card named rsa_OEM.key
Mine was about 4575 KB in size, but the size could vary.
You can disconnect the phone now. Go ahead and switch the phone's USB connection over to "Disk Drive" and then browse to your SD Card and verify that the file rsa_OEM.key is indeed on the card.



CONGRATS! You have just grabbed a backup of your RSA keys! Put these in a safe place Copy them to your PC, Amazon S3, Dropbox, Google storage, or even a floppy disk (just kidding on the floppy). Just make sure you copy the keys OFF your sdcard and put them somewhere safe. SD cards can and do fail, so get those keys somewhere protected. I keep all of my important stuff on my DropBox account. PM me and I will send you a referal for DropBox

Again, if anyone has any suggestions, please feel free to let me know! Hope this helps!
__________________

Yup, Thats the actual speeds I get from my 1U production server
If my posts have been helpful in any way, please click the "Thanks" button --------------------------------> ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓

Last edited by BooDaddy; 01-12-2011 at 11:30 AM.
Reply With Quote
This post has been thanked 10 times.
  #2 (permalink)  
Old 12-26-2010, 02:07 PM
lkillen's Avatar
VIP Member
Offline
Pocket PC: Galaxy S3
Carrier: Sprint
Location: Sugar Hill, Ga
 
Join Date: Aug 2007
Posts: 1,282
Reputation: 810
lkillen knows their stufflkillen knows their stufflkillen knows their stufflkillen knows their stufflkillen knows their stufflkillen knows their stufflkillen knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.

Thanks and that was well written. Just one more note is to copy the keys to your PC.
__________________
Nobody thanks me - Nobody cares.
Reply With Quote
This post has been thanked 1 times.
  #3 (permalink)  
Old 12-26-2010, 02:10 PM
BooDaddy's Avatar
Linux Administrator
Offline
Pocket PC: HTC Evo -- Rooted
Carrier: Sprint SERO Premium
Threadstarter
Location: gigahype.net
 
Join Date: Sep 2007
Posts: 1,078
Reputation: 840
BooDaddy knows their stuffBooDaddy knows their stuffBooDaddy knows their stuffBooDaddy knows their stuffBooDaddy knows their stuffBooDaddy knows their stuffBooDaddy knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.

Thanks! I updated the last paragraph with suggestions on copying the file somewhere safe.
Reply With Quote
  #4 (permalink)  
Old 12-26-2010, 07:11 PM
leerage's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC EVO 4G
Carrier: Sprint
 
Join Date: Dec 2009
Posts: 90
Reputation: 100
leerage is keeping up the good workleerage is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.

Thanks! I've been wanting to do this. Did this on my rooted Evo and worked perfect. My RSA key was 4575 KB in size as well.
__________________
HTC EVO 4G - Hardware 0004 - HBOOT 2.02 Rooted
Amon_RA v2.2.1 Recovery
Custom ROM: Calkulin v1.7.5
Reply With Quote
  #5 (permalink)  
Old 12-26-2010, 07:43 PM
Sit Bits's Avatar
PPCGeeks Regular
Offline
Pocket PC: Ipaq, Imagio, Evo 4G
Carrier: Verizon, Sprint
 
Join Date: Feb 2010
Posts: 52
Reputation: 55
Sit Bits is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.

Worked just like it said. Thanks
Reply With Quote
  #6 (permalink)  
Old 12-26-2010, 10:35 PM
JimSmith94's Avatar
Halfway to VIP Status
Offline
Pocket PC: Sprint Touch Pro 2
Carrier: Sprint
Location: Irving, TX
 
Join Date: Jul 2007
Posts: 705
Reputation: 405
JimSmith94 is becoming a PPCGeeks regularJimSmith94 is becoming a PPCGeeks regularJimSmith94 is becoming a PPCGeeks regularJimSmith94 is becoming a PPCGeeks regularJimSmith94 is becoming a PPCGeeks regular
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.

It's not working for me. I installed Z4root and got temporary root. However I can't get su on my PC:

Code:
C:\android-sdk-windows\tools>adb shell
adb server is out of date.  killing...
* daemon started successfully *
$ su
su
su: permission denied
$
"su" worked when I was rooted on 3.30 but I unrooted to install 3.70, so I'm thinking that is the reason I can't get it.

Can someone tell me what I'm doing (or did) wrong?

Edit: I noticed that I'm still showing S-OFF, even though I did the OTA update to 3.70. I'm guessing that is the problem, but I don't know how to fix it. Is there a way to fix that without doing a complete ROM install again?

Last edited by JimSmith94; 12-26-2010 at 10:52 PM.
Reply With Quote
  #7 (permalink)  
Old 12-28-2010, 01:48 AM
cevaes's Avatar
Lurker
Offline
Pocket PC: HTC touch pro
Carrier: Sprint
 
Join Date: Apr 2008
Posts: 6
Reputation: 0
cevaes is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.

I lost my RSA keys and tried EVERYTHING and nothing worked, so i unrooted my evo and took my phone to sprint and played dumb, it worked they gave me a NEW evo saying that my 4g antenna was broken =)), so i have my new evo and already rooted it again this time i made a copy of my RSA keys now my question is if some how i loose my keys again how do i restore them? they are in a .key format not sure how to restore them. ALSO if i ever break my 4g again will this fix it?

THX in advance
Reply With Quote
  #8 (permalink)  
Old 12-28-2010, 01:48 AM
carlitos's Avatar
PPCGeeks Regular
Offline
Pocket PC: EVO 4G
Carrier: SPRINT
 
Join Date: Sep 2010
Posts: 247
Reputation: 85
carlitos is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.

stupid question sorry but. what is this for? how can we used, where to use it or when to use it?
__________________

Reply With Quote
  #9 (permalink)  
Old 12-28-2010, 02:27 AM
adrian2pm's Avatar
Regular 'Geeker
Offline
Pocket PC: 6700..6800..touch..diamond..pro
Carrier: sprint
Location: chicago
 
Join Date: Apr 2007
Posts: 262
Reputation: 55
adrian2pm is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.

yea what is this for? i just got my phone and rooted couple days ago..
__________________
touch pro
Reply With Quote
  #10 (permalink)  
Old 12-28-2010, 10:05 AM
leerage's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC EVO 4G
Carrier: Sprint
 
Join Date: Dec 2009
Posts: 90
Reputation: 100
leerage is keeping up the good workleerage is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.

This makes a copy of your unique 4G RSA Key. Without it, you wouldn't be able to access 4G. If you have HBOOT 2.02/2.10, I hope you used:

[ROOT][GUIDE] HBoot 2.02/2.10 SOFF - The Savior Edition - Upd. 12.26.10 - xda-developers

As methods like Unrevoked aren't coded for the other partitions (that contain your 4G RSA key) and will ruin 4G permanently for you on that Evo.
Reply With Quote
This post has been thanked 2 times.
Reply

  PPCGeeks > Android > Android HTC Devices > HTC Evo 4G


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 07:54 AM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com