[HTC Desire 526] BigCountry907:
How To Get Permanent Root

This is a workaround until I can compile a Bootable Kernel :p

First of all say thanks to [MENTION=1162986]Captain_Throwback[/MENTION] !!

He was the original creator of the TWRP Recovery for the Desire 626s.

I have taken his TWRP recovery for the 626s, unpacked it and ported in some of the Desire 526 recovery image.

Kinda a cracked up way of doing this but hey ( It Works)

Step #1

Unlock Your Boot-Loader !!! (currently accomplished with a

Java Card / HTC Service Tool

)

Even with the card you could run into trouble with unlocking the boot-loader.

There is no switch to Enable OEM Unlock available in the Developer Options.

Here is a work-around for that.

Step #1-A

Open up terminal shell on a computer and pull the frp image from the device. (Temp Root Required)

dd if=/dev/block/bootdevice/by-name/frp of=/sdcard/frp.img

Terminal Output

root@htc_a13wlpp:/ #dd if=/dev/block/bootdevice/by-name/frp of=/sdcard/frp.img <

1024+0 records in

1024+0 records out

524288 bytes transferred in 0.364 secs (1440351 bytes/sec)

root@htc_a13wlpp:/ #

Pull the frp.img to the computer.

If you are still in adb shell.

exit
exit

Then from the normal command line

adb pull /sdcard/frp.img

Terminal Output

f=/dev/block/bootdevice/by-name/frp of=/sdcard/frp.img <

1024+0 records in

1024+0 records out

524288 bytes transferred in 0.364 secs (1440351 bytes/sec)

root@htc_a13wlpp:/ # exit

shell@htc_a13wlpp:/ $ exit

bigcountry@bigcountry-G551JW:~$ adb pull /sdcard/frp.img

2758 KB/s (524288 bytes in 0.185s)

bigcountry@bigcountry-G551JW:~$

Now open the frp.img file in a hex editor. Like HXD in windows.

Go to the last line of the file.

Change the very last 00 to 01 and save the file.

Reference the screen shots below.

Factory FRP

[IMG="Disabled OEM Unlock"]http://i1376.photobucket.com/albums/ah40/Big-Country907/Locked%20FRP_zpsmacpx7cx.jpg[/IMG]

Patched FRP

[IMG="OEM Unlocking Enabled"]http://i1376.photobucket.com/albums/ah40/Big-Country907/Unlocked-FRP_zpsrnyv3oxz.jpg[/IMG]

Flash the patched frp.img to the device.

Back to the terminal.

adb push frp.img /sdcard/frp.img

adb shell
su
dd if=/sdcard/frp.img of=/dev/block/bootdevice/by-name/frp

If you have completed this now your clip can unlock the boot-loader

In case your wondering this will also work on a boot loader locked device. It will get you as far as being able to get a unlock token from fastboot using Fastboot oem get_identifier_token WITH THE DEVICE IN DOWNLOAD MODE

Unfortunatly HTC-DEV still will not give you the UNLOCK TOKEN yet. The pg2fs partition needs an edit then htc dev will generate a good code. Problem is without clip you cannot modify the pg2fs image. Allthough I am working on it.

STEP #2 ( Get Perm Root !! )

Download the Patched TWRP and SuperSu

The 2 files are attached to the thread. Unzip the TWRP-No-Touch.img.zip Do not unzip the Super.zip.

Copy the super.zip to the device sdcard. Use file explorer or terminal.

adb push super.zip /sdcard/super.zip

Flash the TWRP Recovery to the device.

reboot to download mode

adb reboot download

Flash the recovery

fastboot flash recovery Twrp-526-NO-TOUCH.img

Boot into TWRP Recovery

fastboot boot recovery

DON'T PANIC !! Yes your right......The touch screen is not working!!! :eek:

I need to compile a custom kernel to get TWRP working Right.

I have compiled the kernel but it isn't booting right yet. That's why I figured out this work around for now.

So Now What ??? :confused:

No worries....Even though we can't access the TWRP commands from the touch screen LETS NOT FORGET.........

We can use the command line :highfive:

Open up terminal on your computer.

If it's not already open.

Go into the shell.

adb shell

No need to type su cause in case you didn't notice we are already ROOT. "#"

So to install SuperSu (or any other zip package) we do this.

#1 Mount the system partition.

mount -o rw -t ext4 /dev/block/mmcblk0p62 /system

#2 Tell TWRP what we want it to do one stap at a time

Set device to boot into recovery upon reboot.

echo 'boot-recovery ' > /cache/recovery/command

Tell TWRP to install SuperSu when it boots.

echo '--update_package=/sdcard/super.zip' >> /cache/recovery/command

Reboot the recovery to install the SuperSu.

reboot recovery

Now you will see TWRP boot back up and when it boots up it will install the zip package.

Congratulations you are now one of the first peoples to have a fully rooted Verizon Desire 526. :laugh::silly::D

[IMG="Proof"]http://i1376.photobucket.com/albums/ah40/Big-Country907/rooted526_zpssnagbdzs.jpg[/IMG]

Lets get busy boys !!!! We need to get this boot loader unlocked for the rest of the community.

It's all about the pg2fs partition. If we can find a way to write to it with s-on and boot loader locked then we can unlock all boot-loaders