5,606,465 Members 33,301 Now Online
XDA Developers Android and Mobile Development Forum

[TUTORIAL] How To Unlock Nand Protection ~ Part-2 [Gaining RW Access/Full Root]

Tip us?
 
toastcfh
Old
(Last edited by toastcfh; 22nd June 2010 at 01:08 AM.)
#1  
toastcfh's Avatar
Retired Forum Mod / Senior Recognized Developer - OP
Thanks Meter 1895
Posts: 1,298
Join Date: Feb 2009
Location: Lakeland, FL

 
DONATE TO ME
Angry [TUTORIAL] How To Unlock Nand Protection ~ Part-2 [Gaining RW Access/Full Root]

THIS IS PART 2 OF A 2 PART GUIDE TO ROOTING THE EVO AND UNLOCKING NAND PROTECTION. YOU MUST FOLLOW THE STEPS IN THE PART 1 OF ROOTING TO BE ABLE TO PROCEED WITH THIS GUIDE. IF YOU HAVENT ROOTED USING MY METHOD, THEN FOLLOW THE LINK BELOW AND DO SO.

[TUTORIAL] How To Root The HTC EVO ~ Part-1 \0/

THANX:
- keishou (for the rooted build. without it none of this would be possible)
- Behnaam (my good friend and awesome dev. he tip me off on how to downgrade to older main versions)
- maejrep (for compiling us a recovery from Amon's source)
- Flipz (for being awesome :P)
- Stericson (for hosting the files for me)
- Amon RA (for his awesome recovery source on github that we used)

INTRODUCTION:

This process will allow you to unlock Nand protection on all partitions at all times via Engineering SPL. Without going into details and driving more confusion, lets get started.

FILES NEEDED:

- PC36IMG.zip ~> mirror-1
PC36IMG.zip md5sum~ fe8aba99893c766b8c4fd0a2734e4738
- mtd-eng.zip
- flash_image.zip
- recovery.img ~> mirror-1
STEP 1~NANDROID BACKUP:

- go into the recovery provided in the PART 1 root method and do a nandroid backup before u begin this. we will use this nandroid at the end of this tutorial to get u back where u were.

STEP 2~FLASHING MTD PARTITION TO ENABLE DOWNGRADE:

- down;oad all files posted above
- unzip the flash_image.zip and the mtd-eng.zip
- put the flash_image and mtd-eng.img on the root of your sdcard
- go into shell on ur pc and do:
Code:
adb shell
cat /sdcard/flash_image > /data/flash_image
chmod 755 /data/flash_image
/data/flash_image misc /sdcard/mtd-eng.img
- this should only take a second or two
- now put the PC36IMG.zip on the root of your sdcard
- power off the phone

STEP 3~FLASHING ENG BUILD:

- hold volume down + power to boot into hboot
- it should now find and verify the PC36IMG.zip on the root of your sdcard. itll show a blue status bar on the top right of the screen.
- after a minute or so it will ask u if u wanna flash SAY YES
- affter it flashes the PC36IMG.zip it will ask if you wanna reboot. SAY YES
- once booted into Android put the recovery.img linked above on the root of you sdcard
- on your PC open a shell again and do:
Code:
adb shell
cat /sdcard/flash_image > /data/flash_image
chmod 755 /data/flash_image
/data/flash_image recovery /sdcard/recovery.img
reboot recovery
- you should now be in recovery mode
- do a wipe of data and dalvik cache
- navigate to nandroid restore and restore the previous rom setup
- come here to the forum, get and flash the latest radio
- enjoy... you can now reboot into recovery, write to system and other partitions while in Android. Also you now have a Engineering SPL so you can fastboot and much more.

SCROLL DOWN TO SECOND POST FOR FAQ
Buy me a coffee
You can follow me on Twitter:
@toastcfh
Source:
http://github.com/toastcfh
On IRC:
irc.freenode.net
#HTC-EVO | #HTC_EVO_SHIFT | #HTC-EVO-3D | #CyanogenMod
 
phinnaeus
Old
(Last edited by phinnaeus; 17th June 2010 at 01:01 AM.)
#2  
phinnaeus's Avatar
Senior Member
Thanks Meter 6
Posts: 251
Join Date: Apr 2010
Location: Seattle

 
DONATE TO ME
Default toast rocks + unofficial FAQ

EPIC. WIN.

and toast, if you ever had a reason to sticky one of your own threads, I think this one is deserving.

Common Mistakes / Questions

Problem:
Quote:
I can't download the files / They are corrupted / etc!!!!1!!!!1
How to fix:
Here's a mirror, thanks to lewi3069.
----------------------------------------------------

Error:
Code:
adb shell
# cat /sdcard/flash_image > /data/flash_image
cat /sdcard/flash_image > /data/flash_image
cat: can't open ' /sdcard/flash_image' : No such file or directory
How to fix:
Your sdcard isn't mounted properly. You can use ADB to push the files:
Code:
adb push /path/to/flash_image /sdcard/flash_image
adb push /path/to/mtd-eng.img /sdcard/mtd-eng.img
or try to mount the card: (*note, this command only works from recovery. If you are inside the android OS you have to use adb remount. This is also how you test system r/w access, which is what this whole process gives you
Code:
adb shell mount /sdcard
----------------------------------------------------

Error:
Code:
mtd: erase failure at 0x00000000 (I/O error)
mtd: skipping write block at 0x00000000
mtd: erase failure at 0x00020000 (I/O error)
mtd: erase failure at 0x00020000 (I/O error)
mtd: skipping write block at 0x00020000
mtd: erase failure at 0x00040000 (I/O error)
mtd: erase failure at 0x00040000 (I/O error)
mtd: skipping write block at 0x00040000
mtd: erase failure at 0x00060000 (I/O error)
mtd: erase failure at 0x00060000 (I/O error)
(note: probably a lot longer than that)

How to fix:
You are using the wrong PC36IMG.zip file. Its not the same one from part one. Download the file listed in Toast's post, above.

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

Error:
Something about "Main version is older" ...not sure of exact syntax

How to fix:
You need to redo the mtd-eng.img step. Check and make sure you didn't get the sdcard mounting error.

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

Question:
Quote:
Can I delete these files from my sdcard, now that I have finished?
Answer:
Sure. Alternatively, you can just throw them into a folder named whatever you want (example folder name: "files for rooting") and leave them there in case you need the later! Totally up to you, but yes they are safe to remove.

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

Question:
Quote:
Do I have to backup/restore my nandroid? Can't I just flash a new ROM?
Answer:
Yep. The advantage of restoring your nandroid is I believe you get your radio back. Maybe not. It takes like 3 seconds to restore your radio anyway. I just flashed my ROM back over clean and used Titanium Backup which I strongly recommend to restore all my apps.
 
JustinLoe
Old
(Last edited by toastcfh; 14th June 2010 at 04:14 AM.)
#3  
Member
Thanks Meter 3
Posts: 74
Join Date: May 2009
Plucking Hot, Thanks. I'll edit this post later for soemthing meaningful like "donated".
 
Merckle
Old
#4  
Merckle's Avatar
Senior Member
Thanks Meter 6
Posts: 444
Join Date: Dec 2007
Location: Greenville
Grats toast
My Phone: Sprint Samsung Galaxy S3
Rom:Team Sonic-FreeGS3 JB v3.0.0

Hit me up on Talk : TheMerk (@) gmail (dt) com
________________________


 
geekykid
Old
#5  
Member
Thanks Meter 1
Posts: 41
Join Date: Apr 2010
Location: Washington, DC
flashing now.
 
herbthehammer
Old
(Last edited by herbthehammer; 14th June 2010 at 06:33 AM.) Reason: found a snafu?
#6  
herbthehammer's Avatar
Senior Member
Thanks Meter 51
Posts: 928
Join Date: May 2010
Outstanding Toast! Thank you oh so VERY MUCH!!! You made my day a lot happier...

Uh oh, is there something wrong? First off, after you finish step 1, you need to reboot the phone (or at least I did cause nothing was happening while sitting in recovery). Second, in step 3, I got so far as the img and then I got errors. I followed the instructions to the letter. Hell, I even rebooted and tried step 3 again ad still have the same problems.

Code:
users-macbook:evo-recovery user$ ./adb-mac shell
# cat /sdcard/flash_image > /data/flash_image
# chmod 755 /data/flash_image
# /data/flash_image recovery /sdcard/recovery.img
mtd: erase failure at 0x00000000 (I/O error)
mtd: erase failure at 0x00000000 (I/O error)
mtd: skipping write block at 0x00000000
mtd: erase failure at 0x00020000 (I/O error)
mtd: erase failure at 0x00020000 (I/O error)
mtd: skipping write block at 0x00020000
mtd: erase failure at 0x00040000 (I/O error)
mtd: erase failure at 0x00040000 (I/O error)
mtd: skipping write block at 0x00040000
mtd: erase failure at 0x00060000 (I/O error)
mtd: erase failure at 0x00060000 (I/O error)
mtd: skipping write block at 0x00060000
mtd: not writing bad block at 0x00080000
mtd: erase failure at 0x000a0000 (I/O error)
mtd: erase failure at 0x000a0000 (I/O error)
mtd: skipping write block at 0x000a0000
mtd: erase failure at 0x000c0000 (I/O error)
mtd: erase failure at 0x000c0000 (I/O error)
mtd: skipping write block at 0x000c0000
mtd: erase failure at 0x000e0000 (I/O error)
mtd: erase failure at 0x000e0000 (I/O error)
mtd: skipping write block at 0x000e0000
mtd: erase failure at 0x00100000 (I/O error)
mtd: erase failure at 0x00100000 (I/O error)
mtd: skipping write block at 0x00100000
mtd: erase failure at 0x00120000 (I/O error)
mtd: erase failure at 0x00120000 (I/O error)
mtd: skipping write block at 0x00120000
mtd: erase failure at 0x00140000 (I/O error)
mtd: erase failure at 0x00140000 (I/O error)
mtd: skipping write block at 0x00140000
mtd: erase failure at 0x00160000 (I/O error)
mtd: erase failure at 0x00160000 (I/O error)
mtd: skipping write block at 0x00160000
mtd: erase failure at 0x00180000 (I/O error)
mtd: erase failure at 0x00180000 (I/O error)
mtd: skipping write block at 0x00180000
mtd: erase failure at 0x001a0000 (I/O error)
mtd: erase failure at 0x001a0000 (I/O error)
mtd: skipping write block at 0x001a0000
mtd: erase failure at 0x001c0000 (I/O error)
mtd: erase failure at 0x001c0000 (I/O error)
mtd: skipping write block at 0x001c0000
mtd: erase failure at 0x001e0000 (I/O error)
mtd: erase failure at 0x001e0000 (I/O error)
mtd: skipping write block at 0x001e0000
mtd: erase failure at 0x00200000 (I/O error)
mtd: erase failure at 0x00200000 (I/O error)
mtd: skipping write block at 0x00200000
mtd: erase failure at 0x00220000 (I/O error)
mtd: erase failure at 0x00220000 (I/O error)
mtd: skipping write block at 0x00220000
mtd: erase failure at 0x00240000 (I/O error)
mtd: erase failure at 0x00240000 (I/O error)
mtd: skipping write block at 0x00240000
mtd: erase failure at 0x00260000 (I/O error)
mtd: erase failure at 0x00260000 (I/O error)
mtd: skipping write block at 0x00260000
mtd: erase failure at 0x00280000 (I/O error)
mtd: erase failure at 0x00280000 (I/O error)
mtd: skipping write block at 0x00280000
mtd: erase failure at 0x002a0000 (I/O error)
mtd: erase failure at 0x002a0000 (I/O error)
mtd: skipping write block at 0x002a0000
mtd: erase failure at 0x002c0000 (I/O error)
mtd: erase failure at 0x002c0000 (I/O error)
mtd: skipping write block at 0x002c0000
mtd: erase failure at 0x002e0000 (I/O error)
mtd: erase failure at 0x002e0000 (I/O error)
mtd: skipping write block at 0x002e0000
mtd: erase failure at 0x00300000 (I/O error)
mtd: erase failure at 0x00300000 (I/O error)
mtd: skipping write block at 0x00300000
mtd: erase failure at 0x00320000 (I/O error)
mtd: erase failure at 0x00320000 (I/O error)
mtd: skipping write block at 0x00320000
mtd: erase failure at 0x00340000 (I/O error)
mtd: erase failure at 0x00340000 (I/O error)
mtd: skipping write block at 0x00340000
mtd: erase failure at 0x00360000 (I/O error)
mtd: erase failure at 0x00360000 (I/O error)
mtd: skipping write block at 0x00360000
mtd: erase failure at 0x00380000 (I/O error)
mtd: erase failure at 0x00380000 (I/O error)
mtd: skipping write block at 0x00380000
mtd: erase failure at 0x003a0000 (I/O error)
mtd: erase failure at 0x003a0000 (I/O error)
mtd: skipping write block at 0x003a0000
mtd: erase failure at 0x003c0000 (I/O error)
mtd: erase failure at 0x003c0000 (I/O error)
mtd: skipping write block at 0x003c0000
mtd: erase failure at 0x003e0000 (I/O error)
mtd: erase failure at 0x003e0000 (I/O error)
mtd: skipping write block at 0x003e0000
mtd: erase failure at 0x00400000 (I/O error)
mtd: erase failure at 0x00400000 (I/O error)
mtd: skipping write block at 0x00400000
mtd: erase failure at 0x00420000 (I/O error)
mtd: erase failure at 0x00420000 (I/O error)
mtd: skipping write block at 0x00420000
mtd: erase failure at 0x00440000 (I/O error)
mtd: erase failure at 0x00440000 (I/O error)
mtd: skipping write block at 0x00440000
mtd: erase failure at 0x00460000 (I/O error)
mtd: erase failure at 0x00460000 (I/O error)
mtd: skipping write block at 0x00460000
mtd: erase failure at 0x00480000 (I/O error)
mtd: erase failure at 0x00480000 (I/O error)
mtd: skipping write block at 0x00480000
mtd: erase failure at 0x004a0000 (I/O error)
mtd: erase failure at 0x004a0000 (I/O error)
mtd: skipping write block at 0x004a0000
mtd: erase failure at 0x004c0000 (I/O error)
mtd: erase failure at 0x004c0000 (I/O error)
mtd: skipping write block at 0x004c0000
mtd: erase failure at 0x004e0000 (I/O error)
mtd: erase failure at 0x004e0000 (I/O error)
mtd: skipping write block at 0x004e0000
error writing recovery: No space left on device
There were no errors up until this point. Did I do something wrong?
Nevermind for now. I read a few pages into this post and found out the img from step 1 is different from the img in this topic. Redownloading and trying again.
 
Archon810
Old
(Last edited by Archon810; 14th June 2010 at 04:56 AM.)
#7  
Archon810's Avatar
Senior Member
Thanks Meter 57
Posts: 349
Join Date: Feb 2010
Location: San Francisco
Oh yes!!!!!

Edit: I started community coverage on this here: Achievement unlocked! EVO 4G now fully rooted, NAND protection defeated, full write permissions to /system. Incredible next?
AndroidPolice.com - Android news, reviews, and tutorials | @AndroidPolice
My Tech Blog
| @ArtemR
 
mccurt29
Old
#8  
mccurt29's Avatar
Senior Member
Thanks Meter 56
Posts: 778
Join Date: Dec 2008
Well its about time lol thanx
 
Tilde88
Old
#9  
Senior Member
Thanks Meter 209
Posts: 1,010
Join Date: Nov 2008
Haha,,, You OWN!
 
psych2l
Old
#10  
psych2l's Avatar
Senior Member
Thanks Meter 81
Posts: 534
Join Date: May 2010
Location: Boston

 
DONATE TO ME
Posting in an epic thread? Thanks!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Speed up the ROM or Kernel Build Process

Creating a kernel, ROM, or any other development projectrequires knowledge and tools. While … more

Google Glass Now Open to Anyone… with $1500 to Spend (Update: Not Anymore)

Google Glass, which recently received its official update … more

Android 4.4.2 OTA Now Available for the Verizon Droid DNA

A couple of days ago, we talked about how the Android 4.4.2 upgrade for the HTC … more