[One (M9) General] scotty1223:
this thread is for

m9

it will

NOT

work on m7,m8,or any older devices(or anything other than HTC)

again,dont do this on anything other than m9. any posts stating "i bricked my whatever" will be directed back here,to this first bit of information.

you may or may not be aware that m9 has some write protections still in place,even after s off. these write protections keep us from doing things like changing our "tampered" flag with a simple adb command.

this thread will let you disable the remaining wp. be careful what you do after doing this. your s off phone will let you brick itself,if you tell it to.

credits

*beaups,for lots of things, from schooling me on echo comand protocol to providing help and support,and for all he does for the htc and android community. and most of all,for disclosing the location of this flag and letting me bring it to you.

-strace for originally discovering the location of the lock status flag(check out this thread for more info) wich started off my love for chasing such things.

-Zanzibar for testing on sprint

-bschram for testing on vzw

the usual disclaimers:

-i have tested this on my device,but use this info at your own risk. if it melts your phone into an aluminum gooey mess,crashes your pc,or causes any other issues,its not my fault.

prerequisites:

-you must be S-OFF

-you must have superuser installed

-you must have adb and fastboot,and working drivers(if required) installed on your machine

IF you are an advanced user with adb/fastboot set up and some basic knowledge of the cmd window,you can skip to #2

1)set up adb

(windows 7 and older)

-download this file

-install drivers: if you have htc sync installed,you should allready have drivers. if not,you can install htc sync,or install these modified htc drivers from revolutionary (driver mirror)

-unzip your miniadb_v1031.zip file. this is native funtionality in windows 7. you otherwise may need a utility such as "7-zip" to extract,or unzip it. place the

unzipped

folder onto the root of your C drive on your PC. root means the top level,not inside any folders. so just copy and paste,or drag and drop the folder onto C with everything else that is there. you may want to rename it to "miniadb_m7" since youll be putting some device specific files in here.

-open a command window. on windows 7,click the start bubble in the lower left and type "command" in the search box. xp i believe is similar or the same. doing this should open a small black command window.

-change to your miniadb_m7 directory. type the following at the prompt in your cmd window:

cd c:\miniadb_m7

your command promt should change to "c:miniadb_m7>" provided you: 1)unzipped the miniadb_v1031 zip file,and 2)put the folder on your c drive,and 3)entered the name of the folder correctly ("miniadb_m7" in this case)

-now make sure usb debugging is checked in developer options(you will need to turn it on first),and plug your phone into your PC with a usb cable

-make sure your phone is being recognized- type:

adb devices

if your drivers are installed correctly,this should return your phones serial number. you should hear the "found device" noises when you plug your phone in. if it starts installing drivers,wait for it to finish before typing the adb devices command.

if you get your serial number back,then enter this command:

adb reboot bootloader

this should take your phone to the "fastboot" screen,wich is white with colored letters. this is one mode of your bootloaders interactive modes. at the top youll see fastboot devices as confirmation youre in fastboot.

now enter:

fastboot devices

again,this should return your phones serial number. you should hear the "found device" noises when you plug your phone in. if it starts installing drivers,wait for it to finish before typing the adb devices command.

if you get your serial number back,you can enter the following to boot back to the phones OS:

fastboot reboot

and now,youve installed adb/fastboot and tested youre phones drivers. if at either spot,you have trouble and dont get your serial number back,there is some sort of connection issue. use these steps to troubleshoot:

this process,in your cmd window,should look something like this:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Scott>[COLOR="red"]cd c:\miniadb_m7[/COLOR]

c:\miniadb_m7>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
FAxxxxxxxxxx device

c:\miniadb_m7>[COLOR="red"]adb reboot bootloader[/COLOR]

c:\miniadb_m7>[COLOR="red"]fastboot devices[/COLOR]
FAxxxxxxxxxx fastboot

c:\miniadb_m7>[COLOR="red"]fastboot reboot[/COLOR]
rebooting...

finished. total time: 0.037s

c:\miniadb_m7>

2)disable write protections

in cmd enter:

adb shell

su (if needed to get a # prompt)

echo -ne '\x04' | dd of=/dev/block/mmcblk0p32 bs=1 seek=4126

exit

exit (if needed to get back to a normal prompt)

adb reboot

congratulations,your wp have been disabled! :D