![]() |
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 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 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 4. Proceed with the sed command below: Code:
sed -n '/BEGIN CERTIFICATE/,$p' /dev/mtd/mtd0 > /sdcard/rsa_OEM.key 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 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! |
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.
|
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.
|
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.
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Worked just like it said. Thanks
|
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 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? |
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 |
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?
|
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..
|
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. |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
leerage,
The guide you posted from XDA is the same guide I used to root my Evo after I saved my RSA keys. Its a very good rooting guide, and I highly recommend it! |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Quote:
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Quote:
[ROOT][GUIDE] HBoot 2.02/2.10 SOFF - The Savior Edition - Upd. 12.26.10 - xda-developers |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Quote:
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Quote:
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Thanks OP. Now I guess the next logical question is how do we restore the keys from the backup?
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Quote:
It is pretty simple: Evo + RSA Key = 4G Evo w/ no RSA Key = No 4G |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Im having issues and am in need of major help, neither command works for me on my rooted Evo. i have titanium backup which installed busybox for me.
However i get both sed not found and busybox not found when i try the commands in adb or from a terminal app. Any help would be great bc i need to have my 4g rsa keys backed up. Thanks |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
This would only work with me when I removed the space between 'rsa' and 'OEM.key'
Thank you! Ron |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
The rooted way worked great for me. Fast and easy, saved to PC and Dropbox
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
I was viewing the root tutorial over at XDA and came across this:
Quote:
cat /dev/mtd/mtd0 > /sdcard/wimax.img In order to save it in a format that can be restored. I just did this and it worked great. The .img came out to be like 12MB in size. |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
I have my key backed up. How do you check out the key to see if its damaged? Plus, how do you restore the key?
My 4G has never worked, but I was able to backup the key and my MAC address is fine. |
Wirelessly posted (Mozilla/5.0 (Linux; U; Android 2.2; en-us; Sprint APA9292KT Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1)
Nothing, really!!! |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
I can't seem to even get started on the first step getting the path to the location of the adb_shell. I am rooted too.
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
good thread BooDaddy, I suggest everyone backup your keys.....stickied!
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
So in the interest of simplification--running a wimax backup in the latest CWM or amon RA will accomplish this, right?
I'm a big fan of learning and doing things manually but adb scares off a lot of people and sometimes simple is good too. |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
I downloaded everything that was listed and this does not work for me
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Quote:
If on amons latest do a selective backup of wimax only. I believe the latest Clockwork can back up your wimax as well just not sure on the specifics since I dont use it. I am 99.9% sure that when doing this backup your RSA keys will be included in the wimax.img. I'll let you know if I find out otherwise. |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
I'm on Amon but don't see an option for just backing up the wimax.
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Quote:
On 2.2.1 when you select backup the last step will bring up a list of options: boot system cache wimax etc.... Just select wimax. btw your RSA keys ARE in the wimax.img created with amon (and I assume CWM) In amonRA's thread he lists the same manual restore method as listed here by using adb with the wimax.img on the root of the SD card. Again, not challenging the OP but just thought a lot of users would find the wimax backup in recovery a simpler option. |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
That would be why. In recovery it shows build 2.1.1. Can you point me to the latest?
Edit: Think I found it within rom manager |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Quote:
Just in case [Recovery] [07-Jan-2011] RA-supersonic-v2.2.1 - xda-developers |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Flashed the newest amon and showing up now. thanks man.
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Quote:
Just got confirmation on the wimax restore. If you use amon (and assume CWM) to create the wimax.img then in the event you lose your RSA keys you can restore it just like any other ROM restore via the restore function in recovery. Still always good to know the manual techniques just in case. |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
thx for the info IKS....since both amon ra & clockwork now backup wimax & wimax.img contains the keys, I'm gonna unsticky....
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Quote:
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
so there still no way just restore the key
cuz restoring the wimax.img restores radios as well |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Quote:
Completely understand iknowsquat. When I originally wrote the post, there wasnt any recoveries backing up the keys at all, so I wanted to put something out there just in case. There are ways to restore the keys if you used my method, but I am not 100% it should be mentioned. Likewise, I am not sure even mentioning using recovery to restore WiMax keys is "legal". The reason being is that it is essence exactly like cloning an ESN. It would be really simple to clone someones WiMax info to a "bad" phone and just use the thing as a wifi hotspot for 4G or what have you. If you are familiar with Linux command line, you can figure out how to write the keys back to your phone. There are several methods, but they usually involve using mtd-utils, cat, sed, and even dd. But, for now, I am going to modify my original thread to point people to start using the new recoveries as this will be the simplest method going forward. If you have used my method, and need to restore your keys, you can use the new clockwork or Amon_ra recoveries in conjunction with the key dump you made. Again, I won't go into details because I dont want to possibly violate any forum rules about device cloning, but it can be done if you learn the following: cat, sed, dd, and mtd-utils. If you have a linux machine, just use the man pages on each of these commands and you can figure it out easily ;) |
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
Reading the Wimax Alpha thread on XDA by Shinzul, he states to be using Amon RA 1.8, or later, which I'm currently using Amon RA 1.8. When I do nandroids, I have a Wimax file created. Is everything I need in that file, or are the Wimax keys only backed up on the newer version of Amon Ra (2.X and greater)?
|
Re: Good way to backup WiMax RSA keys. Works before Rooting, and on stock OEM Roms.
sorry to bump an old thread..but I'm having trouble with the command prompt. Right now the file is in the C:\Users\HT but when I try the promp C:\Users\HT>adb shell nothing happens..am i entering the prompt wrong? thank you
or is there a better way to backup wimax keys? |
All times are GMT -4. The time now is 02:02 AM. |
Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com