[One (M7) Android Development] Sneakyghost:
Manual Hboot Hex Edit - "Crash Course" - On your own risk!

Manual Hboot Hex Edit - "Crash Course" - On your own risk!​

! NO SUPPORT HERE IN THIS THREAD !

​

You want to edit your own hboot? Here is a crash-course how i do it: Notice: All at your own risk!

Get a !good! HEX Editor like this one http://mh-nexus.de/en/hxd/

Open your hboot-file with it (no matter if its a raw dd dumped piece or an .img or an .nb0 file - the edit takes place all the same).

Enter the search function of the Editor and type in: "this build is". That will find the right place for you.

You will then see this:

000ee1f0h: 6E 65 6C 2E 2E 2E 00 00 45 6E 74 65 72 69 6E 67 ; nel.....Entering
000ee200h: 20 4D 44 4D 20 52 61 6D 64 75 6D 70 20 6D 6F 64 ; MDM Ramdump mod
[COLOR="Red"]000ee210h: 65 2E 2E 2E 00 00 00 00 54 68 69 73 20 62 75 69 ; e.......This bui
000ee220h: 6C 64 20 69 73 20 66 6F 72 00 00 00 64 65 76 65 ; ld is for...deve
000ee230h: 6C 6F 70 6D 65 6E 74 20 70 75 72 70 6F 73 65 73 ; lopment purposes
000ee240h: 20 6F 6E 6C 79 00 00 00 44 6F 20 6E 6F 74 20 64 ; only...Do not d
000ee250h: 69 73 74 72 69 62 75 74 65 20 6F 75 74 73 69 64 ; istribute outsid
000ee260h: 65 20 6F 66 20 48 54 43 00 00 00 00 77 69 74 68 ; e of HTC....with
000ee270h: 6F 75 74 20 48 54 43 27 73 20 77 72 69 74 74 65 ; out HTC's writte
000ee280h: 6E 20 70 65 72 6D 69 73 73 69 6F 6E 2E 00 00 00 ; n permission....
000ee290h: 46 61 69 6C 75 72 65 20 74 6F 20 63 6F 6D 70 6C ; Failure to compl
000ee2a0h: 79 20 6D 61 79 00 00 00 6C 65 61 64 20 74 6F 20 ; y may...lead to
000ee2b0h: 6C 65 67 61 6C 20 61 63 74 69 6F 6E 2E 00 00 00 ; legal action....[/COLOR]
000ee2c0h: 68 62 6F 6F 74 3A 20 20 20 20 30 78 25 78 00 00 ; hboot: 0x%x..
000ee2d0h: 62 6F 6F 74 3A 20 20 20 20 20 30 78 25 78 00 00 ; boot: 0x%x..

In our example hboot 1.44.0000 the Text starts at Offset 000ee210h: right after a series of "65 2E 2E 2E 00 00 00 00 " The "T" of the text "This build is for.....blahblah" is the "54".

How erase it without changing the size of the file or damaging it? Well what i did was look at the spaces between the words displayed at the right hand side. If i place my Cursor on a space, it will show on the left HEX pane what numbers there are. Turns out, the spaces are just 20's. So i learned from that and then replaced the letters and dots with 20's.

For the Replace-Job place the Cursor into the left pane with the numbers! Don't replace in the right pane where you see the text!

Notice: [MENTION=1293920]touch of jobo[/MENTION] points out, that one should really only replace the non-zero digits with 0x20 (replace any two-digit number that is NOT zerozero with 20) and NOT replace with 00 so its spaces and not blanks. This way the hboot routine still "sees" text and not just empty space (a "Space" or 20 is regarded as text in this hex world. A "Blank" or 00 is not regarded as text but as a blank space). It is safer!

Now, make sure your HEX Editor is in overwrite mode and not doing anything else but replace existing bits (You'll be in deep sh.it if it kills bits or adds bits!). After finishing your edit, click "Save" and then compare the sizes of the original and the edited file. The Size must be exactly the same. Please do not only look at the dumb windows size but also check the full byte size.

our example hboot here has a size of 2.096.384 Bytes total before and after the edit.

This is how it looks in my edited hboots after the modification:

000ee200h: 20 4D 44 4D 20 52 61 6D 64 75 6D 70 20 6D 6F 64 ; MDM Ramdump mod
000ee210h: 65 2E 2E 2E 00 00 00 00 20 20 20 20 20 20 20 20 ; e.......
000ee220h: 20 20 20 20 20 20 20 20 20 00 00 00 20 20 20 20 ; ...
000ee230h: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ;
000ee240h: 20 20 20 20 20 00 00 00 20 20 20 20 20 20 20 20 ; ...
000ee250h: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ;
000ee260h: 20 20 20 20 20 20 20 20 00 00 00 00 20 20 20 20 ; ....
000ee270h: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ;
000ee280h: 20 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 ; ...
000ee290h: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ;
000ee2a0h: 20 20 20 20 20 00 00 00 20 20 20 20 20 20 20 20 ; ...
000ee2b0h: 20 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 ; ...
000ee2c0h: 68 62 6F 6F 74 3A 20 20 20 20 30 78 25 78 00 00 ; hboot: 0x%x..