• May 01, 2024, 01:28:43 am

Author Topic: [TUTORIAL] Create Patches For Rompatcher 3.1  (Read 8384 times)

0 Members and 1 Guest are viewing this topic.

Offline kartik.bose

  • Developer
  • Happy Member
  • ****
  • Posts: 196
  • Reputation: 55
  • Symbian FanBoy Till I Die
  • Current Phone: : C7-00 wit SuperBelle
[TUTORIAL] Create Patches For Rompatcher 3.1
« on: May 24, 2012, 03:26:30 pm »
What You'll Be Needing?

A HEX editor, i use mh-nexus HxD in this example

A Hacked phone with Rompatcher 3.1 installed

So.. Are you ready to begin?

Find out what you want to patch, and where. In my example, i want to change the *#0000# screen to say that i have a Nokia N99.



After looking for the right file to change, i found that its Phone.exe, because it has the path of the file we need to change

First, open the file in a HEX editor. (I use HxD in my example)


Next, I know that Z:\resource\versions\model.txt is the file that shows the Phone model, so i search for it (ctrl + F) also remember to show that we search for text, and that its in Unicode


Now we have the result, and also see it directly in HEX code, which will be the first part of the HEX code in the patch file


At this point, its recommended to copy the HEX (circled above) to notepad, or somewhere where you can easily copy it to another place.


Next, i have decided that i want the phone to use Model.txt on the memorycard (E) instead of the Z:\ Drive, so i change the first part of the path (note that changed areas turn red) and you also notice that the HEX code changed from 5A to 43 where i changed the letter Z to be the letter E


At this point, we are half way done, good job if you made it this far.

Next we need to write the patch

The Patch should always have the patch name or short info on the first line, and next comes comments, if you want them, and after that comes the actual Patch, and also, there must be a ; before every line, except the patch line itself, like in this example:


Model Text Changer

;This is a patch that changes the Model text

;here i can add as many lines as i want

;this was made by Microx256 from SF


Now, where did i get that SnR:...blablabla code? Well, you actualy have it already


First, every patch like this should have a SnR: prefix (SnR means Search and Replace)

And after the SnR: comes the file that we want to change, in this case it was Phone.exe. you need to include there the path to the file, WITHOUT the Z:\ in the beginning, in this case it is sys\bin\Phone.exe

After the path and the file comes a : and after it comes the original, unchanged HEX code that we copied to notepad earlier, and after the original code comesagain a : and after that, finally, the changed code, the code that is still in the hex editor.

Now make sure you copy the same amounth of code that you did earlier (starting from the code of the Z, which is 5A to the 00 after the latest character in the name)

And there we have a Patch!

Model Text Changer

;This is a patch that changes the Model text

;here i can add as many lines as i want

;this was made by Microx256 from SF


But wait, we are not finished by this patch just yet!


Now, as we changed the Phone.exe to show the file on the memorycard instead of the file on the Z:\, we need to copy and edit the file.


Copy the file Model.txt from Z:\resource\versions\ to E:\resource\versions\ (you might need to make the folders on the memorycard) and edit it as you wish (note: Model.txt has a 20 character limit)


After this, just copy the patch to E:\Patches\ and have fun! :D

How to save Patches as *.rmp ?

When having the Code in notepad, you need to save the code, and Notepad saves as .txt by default.

To save it as .rmp, like the patches should be do this:

When saving, Select Save as type: All Files (*.*) and manually add the .rmp extension, for example, here i show how it should be if the Patch name was uberpatch



Additional Prefixes:



SnR: is not the only prefix, there are some more, for example, the Prefix Rel:


The Prefix Rel: works the same way as SnR, but you define the location info aswell, so the format of the Rel: prefix is:

Rel:Path\file: location:find:replace

Got confused? Let me explain:



Rel: is just like SnR: but different

Path means the same as the path in the SnR: prefix

file is also same as in SnR: Prefix

location this is the difference from the SnR:, this means the location 0x?? of the change, ill explain this later here

find this is the same as in SnR: Prefix, this is what to look for in the file

replace and this is what to replace the previos with, just like in SnR:



Well, whats this all for if it has same effect as SnR?

- if the file have that same code in multiple places, and you want to change just one of them, how would ROMPatcher know what part do you want to change? well, this <span style="font-style: italic">is the solution to it



And what does that 0x?? mean, and how to find it?

open up HEX editor, in this example i use HxD:



Again, first decide what to do, and where:



In my example, i have decided to remove the Wlan search bar from the Active Standby of my N95.



And i have found out that the file responsible for this is SnifferAIPlugin.dll located in Z:\sys\bin\



And to disable it, i have found out that changing the first and 4th byte to a 0x?? byte disables it



and well, the bytes are 10 and 79.. but the thing here is that there are those same bytes many many times in the file, but i want to change only the first ones! so i use Rel: prefix..



Heres the bytes im talking about in Blue:


and in the Red circles are the location adresses

so decide which byte you want to know the location,

and take the number from the left vertical column, and add the number from the top horizional colum to it.

For example, the 4th byte would be 00000003 because in the left theres 00000000



and on top theres 03, and 00000000 + 03 is 00000003
so another example: From the 5th line, the 7th byte would be 00000046 because on the left theres 00000040 and on the top theres 06


so the patch that changes those 2 bytes marked in blue, would be like this:


No Wlan in ActiveStandby

;This removes the Wlan Search bar from the Active Standby, atleast on nokia N95

;to get this to work, first disable ActiveStandby, and then apply the patch, and then again enable Active Standby

Understanding the HEX!


Well, shortly HEX is actualy just numbers, almost like those that we use


Here you can see how the most common numeric systems goes:

Decimals - HEX - Binary

0 0 0

1 1 1

2 2 10

3 3 11

4 4 100

5 5 101

6 6 110

7 7 111

8 8 1000

9 9 1001

10 A 1010

11 B 1011

12 C 1100

13 D 1101

14 E 1110

15 F 1111

16 10 10000

17 11 10001

18 12 10010

19 13 10011

20 14 10100

21 15 10101

22 16 10110

23 17 10111

24 18 11000

25 19 11001

26 1A 11010

27 1B 11011

28 1C 11100

29 1D 11101

30 1E 11110

31 1F 11111

32 20 100000

...



ok.. maybe thats enough for you to see how they goes
so basicaly, Decimals, that we use every day, have 10 numbers, 0 1 2 3 4 5 6 7 8 9

and HEX has 16 numbers, 0 1 2 3 4 5 6 7 8 9 A B C D E F

and finally binary has just 2 numbers, 1 and 0 (binary is not needed to know in this tutorial, but it could be usefull to know it)



So, are all those files just numbers? so how can there be text if hex is only numbers?



- yes, they are numbers, and every letter we use, have thier own number
for example, in HEX editor you can see the letter A (note: its a capital A)



has the HEX of 41

and hex 41 is 65 in Decimal, and 1000001 in Binary
for this, you can use the Windows calculator, just set it to Scientific from the menus, and then check the Hex button, or Dec (decimal) or Bin (binary) and type a number, and check another button to change it to that


So, Remember this:

- HEX is;, and every letter and special mark have its own number

- in HEX editor, theres 2 HEX numbers after each other, and they form 1 Byte, and if you converth the 2 hex numbers into Binary, you get 8 Binary numbers, and 1 Binary number is 1 bit (1byte=8bits) and as you might already know, 1 letter takes 1 byte of space, so 2 HEX numbers forms 1 letter


How did you know what to look for and where?

Just keep looking inside files, and you might find something interesting to patch, thats how i did!

My Patch dont show up in ROMpatcher?

Make sure the patch is in E:\Patches\ and that the patch has a .rmp extension

When i try to apply my patch, i get a red cross as an error, why?

there can be several reasons, but most probably some of these:

*You are trying to patch a file thats not in the ROM (remember, this is ROM Patcher, not Z Patcher)

*The syntax of the patch is wrong (original code that dont exist)

*The 2 hex codes are not the same lenght

*The lenght of the first and second code must be dividable by 2 (eg. 1337FCA is wrong, because 7 is not dividable by 2, but 1337FCA0 is possible, because 8 is dividable by 2)

How can I know what files are on the ROM and what are not?

Use this ROM Dump tool (by Zorn) to get the ROM files extraced to your computer
I did like you did in that example, but the Model line disappeared from the *#0000# display?
Make sure the Patch syntax is correct, and also make sure you have your Model.txt in the right directory on the memory card

Can Patches be harmfull for my phone?

Not really, because the Patches dont actualy change anything, and all changes are reset efter you restart your phone. However, if something happens, neither ME nor This FORUM are responsible to any possible harm caused.

Can i Patch many files in 1 Patch?

Yes you can, heres a example Patch that changes 2 files in 1 Patch:
all info mod

;this mod lets you change the whole *#0000# screen

;make files E:\resource\versions\sw.txt and E:\resource\versions\model.txt on the memorycard

;then customize them as you want

;there is a 64 character limit for the sw.txt, which is displayed first

;and a 20 characters limit for the model.txt, which is displayed after sw.txt

;use \n for a new line, also note, the new line uses 2 characters, and there dont need to be a space before or after the marks

;also note that the model.txt will be displayed right after sw.txt without a new line, unless you define it so

;and you can use the new line marking \n only in sw.txt, it wont work in model.txt

Offline sachinvermarip

  • Retired moderator
  • Mass Poster
  • ***
  • Posts: 1,432
  • Reputation: 192
  • Symbian FTW
    • Photo-Roll Forum
  • Current Phone: : Nokia Lumia 920
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #1 on: May 24, 2012, 04:03:53 pm »
+1 :)

Offline prarun2030

  • Retired moderator
  • Forum Ghost
  • ***
  • Posts: 2,396
  • Reputation: 280
  • Living a life between Good and Bad..
  • Current Phone: : N8|Mi3|Jolla
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #2 on: May 24, 2012, 04:41:33 pm »
nice tutorial kartik but i don't have a pc to do this :(

Offline Normas Interruptor

  • Respected Member
  • ****
  • Posts: 893
  • Reputation: 409
  • Current Phone: : I'm the Power Belle Maker :)
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #3 on: May 24, 2012, 09:39:19 pm »
Its Complicated bcoz u using in the example your phone.exe file...
but if someone using some other file then how he know what change they need it... fot the changes.... and its really complicated.... so i never do this.... :P

you know about this that's why u say its easy.... but for newbie user's its really complicated........

:)

any way..... Nice tutorial

+1 for this

;)

Offline Normas Interruptor

  • Respected Member
  • ****
  • Posts: 893
  • Reputation: 409
  • Current Phone: : I'm the Power Belle Maker :)
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #4 on: May 24, 2012, 09:40:55 pm »
please make the MINICMD tutorial.... how to use this... and how to add this on phone startup registry...

Offline kartik.bose

  • Developer
  • Happy Member
  • ****
  • Posts: 196
  • Reputation: 55
  • Symbian FanBoy Till I Die
  • Current Phone: : C7-00 wit SuperBelle
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #5 on: May 24, 2012, 10:56:54 pm »
Indeed its complicated but of one has a sure hard interest in modding  "like me" then after 5 6 times of repeated tries one can learn it! ;)

Offline kartik.bose

  • Developer
  • Happy Member
  • ****
  • Posts: 196
  • Reputation: 55
  • Symbian FanBoy Till I Die
  • Current Phone: : C7-00 wit SuperBelle
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #6 on: May 24, 2012, 11:00:55 pm »
please make the MINICMD tutorial.... how to use this... and how to add this on phone startup registry...
sure :D
Give me somtime coz somtimes my of first work our sometimes I don't have internet!
So many major post are yet pending as well as superbelle is also not complete yey :( I have a hell lot of work to do! :/

Offline Normas Interruptor

  • Respected Member
  • ****
  • Posts: 893
  • Reputation: 409
  • Current Phone: : I'm the Power Belle Maker :)
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #7 on: May 25, 2012, 07:58:14 am »
sure :D
Give me somtime coz somtimes my of first work our sometimes I don't have internet!
So many major post are yet pending as well as superbelle is also not complete yey :( I have a hell lot of work to do! :/

OK i'm waiting.....

Offline kartik.bose

  • Developer
  • Happy Member
  • ****
  • Posts: 196
  • Reputation: 55
  • Symbian FanBoy Till I Die
  • Current Phone: : C7-00 wit SuperBelle
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #8 on: May 25, 2012, 08:40:08 pm »
In Progress . . . . . .  Sory for taking too much time going through some personal problems! :(

Offline Normas Interruptor

  • Respected Member
  • ****
  • Posts: 893
  • Reputation: 409
  • Current Phone: : I'm the Power Belle Maker :)
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #9 on: May 25, 2012, 09:39:03 pm »
In Progress . . . . . .  Sory for taking too much time going through some personal problems! :(

its ok mate... my pc take too much time... no USB driver for my phone.. so i'm not hurry....

:P

Offline kartik.bose

  • Developer
  • Happy Member
  • ****
  • Posts: 196
  • Reputation: 55
  • Symbian FanBoy Till I Die
  • Current Phone: : C7-00 wit SuperBelle
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #10 on: May 25, 2012, 10:27:12 pm »
its ok mate... my pc take too much time... no USB driver for my phone.. so i'm not hurry....

:P
Same here ;) today only i punched my pc screen . . now i'm waiting for my alienware! -_-

Offline jayraj11

  • Forum User
  • **
  • Posts: 52
  • Reputation: 1
  • MY LIFE MY RULES
  • Current Phone: : Nokia N8
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #11 on: May 25, 2012, 11:11:41 pm »
Nice 1 mate :)

Offline kartik.bose

  • Developer
  • Happy Member
  • ****
  • Posts: 196
  • Reputation: 55
  • Symbian FanBoy Till I Die
  • Current Phone: : C7-00 wit SuperBelle

Offline zeeshaan

  • Viewer
  • *
  • Posts: 6
  • Reputation: 0
  • Symbian Power User
  • Current Phone: : Nokia 701
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #13 on: February 24, 2013, 03:35:50 pm »
How to make a patch for rompatcher for removing the red led light while video recording in Nokia 701.

Offline aliranan8

  • Viewer
  • *
  • Posts: 5
  • Reputation: 0
  • Symbian Power User
  • Current Phone: : Nokia N8
Re: [TUTORIAL] Create Patches For Rompatcher 3.1
« Reply #14 on: February 25, 2013, 03:27:43 pm »
Kindly create the following patch:

when you put a new number on the dial pad for dialing, it should show that the number is already there with a certain name. This is missing in Nokia N8.