Hi, here is an example for using GDB making cheat
Edizon SE is good to match GDB environment
First of all, I want to make a cheat for getting fruit, it is 2 at the beginning

Search with U32 normally

make a change in the game

and search again

Repeat the steps until you get several results

May change them with different values, to test which one is correct and can be used.

After eating 2 fruits, it become 11

So, the third one should be used
now you can write down the address(es) by pen or notepad
Open a blank page in IDA PRO,
connect using GBD debugger

Set the processor as ARM64

Attach with correct PID

You can find the game is freezing now

Type "get info" in the GDB command line
Get get the address for Heap/Alias (Some game use Heap, some game use Alias), Stack, and Main
(or you can get them from EdizonSE)

There is a little difference between the length of main and alias, never-minded.
Now, we need to define the regions we use.

First, it is Alias. Just copy from Output window, and type in the end, mark the name and not executable


Then it is Stack, type in the Start and End address similarly

Finially, it is Main address,
Note: This time I need to fill in the Base address, i.e. Start Address exclude the ending 0.

Click a Hex View once, and press G, and type in the Address we found before

We may need to Press 4, to have a better view, that is the view I found before

Now, we change to the Breakpoints List Tab, and Press INS to insert a new breakpoint.
Make sure it is Hardware breakpoint, then Uncheck the Read, the Size 0x1 is not important, just leave it 0x1 is fine! (not necessary to change it as 0x4)

Press F9 to continue the game

The game should be freeze again, when you ate a fruit.

And the IDA PRO gives a message, just omit it.

Click the IDA View-PC tab, and there should be a STR command.

Don't forget to switch off or delete the breakpoint immediately (otherwise, it may have some issues, that's buggy!)

We should make change of the register W8, in order to make a mulitplier cheat,
let's take a look on the prior code first, scroll up to a certain address that ending with 0/4/8/C, and press C to compile it

it's rather simple in this case,
W8 is read from [x19,0x1C]. and then add 1, and then write back to [x19,0x1c]
So, the multiplier can simply change the line Add W8, W8, #1 as Add W8, W8, #5
it will become a 5x multiplier cheat.
How to make cheat code for it?
You can go to here and type your command, quite convenience for not heavy work

Beside this online converter, you can also use keystone to get the ASM code
After you get the asm code 11000508, you can use the change byte command and paste the code there
(I've set a shortcut for it, since I always use this function)

(By the way, I use py3 keystone + keypatch plugin for IDA PRO, so that I can just press CTRL+ALT+K and type tons of commands directly)

Anyway, the command changes, and you can continue the game (press F9) to test the cheat

Oh, it does not work as expected

OMG, I've wrongly used the first address, instead of the third one,
it should be 67FA5EFEC8, nevermind, insert another breakpoint

double click the breakpoint , I can check the current value for it, Yes, it is 0x13 , i.e. 19

Start again with F9, and the game freeze again when eating another fruit

Similarly, get more codes prior to there.

This time, it is changed with ADDS W8, W8, W20,
for a multiplier, we can simply add a LSL at the end, such as ADDS W8, W8, W20, LSL#3, it is 8x multiplier (2 to the power 3 is 8)

write 2B140D08 for it (or you can also type 08 0D 14 2B, they are the same)

F9, Test again.
It is fine. it works as expected.
Finally, tab to a Hex-view that sync with PC view

Press 4 to change its format as u32, and then highlight and Copy the codes

and add a 04000000 before 01D5349C 2B140D08 , that is.
For the task that is too complex, such as Judge friend or foe, we need code cave. I may show it on the next tutorial
Edizon SE is good to match GDB environment
First of all, I want to make a cheat for getting fruit, it is 2 at the beginning

Search with U32 normally

make a change in the game

and search again

Repeat the steps until you get several results

May change them with different values, to test which one is correct and can be used.

After eating 2 fruits, it become 11

So, the third one should be used
now you can write down the address(es) by pen or notepad
Open a blank page in IDA PRO,
connect using GBD debugger

Set the processor as ARM64

Attach with correct PID

You can find the game is freezing now

Type "get info" in the GDB command line
Get get the address for Heap/Alias (Some game use Heap, some game use Alias), Stack, and Main
(or you can get them from EdizonSE)

There is a little difference between the length of main and alias, never-minded.
Now, we need to define the regions we use.

First, it is Alias. Just copy from Output window, and type in the end, mark the name and not executable


Then it is Stack, type in the Start and End address similarly

Finially, it is Main address,
Note: This time I need to fill in the Base address, i.e. Start Address exclude the ending 0.

Click a Hex View once, and press G, and type in the Address we found before

We may need to Press 4, to have a better view, that is the view I found before

Now, we change to the Breakpoints List Tab, and Press INS to insert a new breakpoint.
Make sure it is Hardware breakpoint, then Uncheck the Read, the Size 0x1 is not important, just leave it 0x1 is fine! (not necessary to change it as 0x4)

Press F9 to continue the game

The game should be freeze again, when you ate a fruit.

And the IDA PRO gives a message, just omit it.

Click the IDA View-PC tab, and there should be a STR command.

Don't forget to switch off or delete the breakpoint immediately (otherwise, it may have some issues, that's buggy!)

We should make change of the register W8, in order to make a mulitplier cheat,
let's take a look on the prior code first, scroll up to a certain address that ending with 0/4/8/C, and press C to compile it

it's rather simple in this case,
W8 is read from [x19,0x1C]. and then add 1, and then write back to [x19,0x1c]
So, the multiplier can simply change the line Add W8, W8, #1 as Add W8, W8, #5
it will become a 5x multiplier cheat.
How to make cheat code for it?
You can go to here and type your command, quite convenience for not heavy work

Beside this online converter, you can also use keystone to get the ASM code
After you get the asm code 11000508, you can use the change byte command and paste the code there
(I've set a shortcut for it, since I always use this function)

(By the way, I use py3 keystone + keypatch plugin for IDA PRO, so that I can just press CTRL+ALT+K and type tons of commands directly)

Anyway, the command changes, and you can continue the game (press F9) to test the cheat

Oh, it does not work as expected

OMG, I've wrongly used the first address, instead of the third one,
it should be 67FA5EFEC8, nevermind, insert another breakpoint

double click the breakpoint , I can check the current value for it, Yes, it is 0x13 , i.e. 19

Start again with F9, and the game freeze again when eating another fruit

Similarly, get more codes prior to there.

This time, it is changed with ADDS W8, W8, W20,
for a multiplier, we can simply add a LSL at the end, such as ADDS W8, W8, W20, LSL#3, it is 8x multiplier (2 to the power 3 is 8)

write 2B140D08 for it (or you can also type 08 0D 14 2B, they are the same)

F9, Test again.
It is fine. it works as expected.
Finally, tab to a Hex-view that sync with PC view

Press 4 to change its format as u32, and then highlight and Copy the codes

and add a 04000000 before 01D5349C 2B140D08 , that is.
Members only
For the task that is too complex, such as Judge friend or foe, we need code cave. I may show it on the next tutorial
Last edited by Eiffel2018,

















