Jump to content

8 posts in this topic

Recommended Posts

Posted (edited)

Hi masters,

I am quite new to this site and I am learning a new way to mod Android games, which is called Hooking functions (I am not sure if I call it right).

As I read the instruction in this GitHub project, at the Creating the libhook.so step (step 2 - Inside "hook.cpp", you'll write your hooks.), I just don't know how to write it (I am completely new to this). I have searched many websites to find a clear instruction for this but there is no one.

So now I am here to ask for your help.

Could anyone please give a sample hook (on Android, of course) when I write in the hook.cpp? Or a screenshot is also pretty good!

For example, in the picture below, I want to GetMoneyTotal (void) at offset 000BBFE8, then what should I write the code?

spacer.png

My English is bad and I don't know if I ask a properly question. I just want to learn new things from this heaven of moddings.

It would be great if any one can help. I am greatful about that.

Hope that @DADi would have a look at this thread and help.

Thanks in advance!

Updated by CeeCeeCee
Posted
1 hour ago, busmanl30 said:

Use MsFindSymbol for that, that game looks like anflex like game on iOS, Shmoo made a tut called Mshook new way

 

https://iosgods.com/topic/4295-tutorial-how-to-hack-with-mshook-new-way/

I have read that thread. But what I want is a complete sample hook to see how it looks like, or something else needed to make the mod works

Posted
8 hours ago, busmanl30 said:

That’s how you do it dude

but I am using Android Hooking Template. is that the same as MSHook?

in MSHook, there is a tweak while the one I am using has a hook.cpp file and I need to write hooks in it

may you give me a sample hook?

Posted

  

ARM V7:


#include <jni.h>
//#include <android/log.h>
#include "libs/KittyMemory/MemoryPatch.h"
#include <libs/Substrate/CydiaSubstrate.h>
#include <memory.h>
#include <dlfcn.h>
#include <cstdio>
#include <cstdlib>
#import "include/Utils.h"

//Struct for patches
struct My_Patches {

    MemoryPatch AddCoin, AddDiamond;
	
} my_cool_Patches;

int (*old_coin)(void *instance);
int (coin)(void *instance) {
	if(instance!=NULL) {
		return 999999;
	}
	return old_coin(instance);
}

int (*old_diamond)(void *instance);
int diamond(void *instance) {
	if(instance!=NULL) {
		return 9999;
	}
	return old_diamond(instance);
}

__attribute__((constructor))
void libhook_main() {

    while(libBase == 0) { 
        libBase = get_libBase(libName); 
        sleep(1); 
    }   
	
	//KittyMemory patch example.
	my_cool_Patches.AddCoin = MemoryPatch(libName, 0xC9C448, "\x3f\x12\x04\xe3\x0f\x10\x40\xe3", 8);
	my_cool_Patches.AddCoin.Modify();
	
	my_cool_Patches.AddDiamond = MemoryPatch(libName, 0xC9C4F4, "\x0f\x17\x02\xe3", 4);
	my_cool_Patches.AddDiamond.Modify();
	
	//Usual Hook example.
	MSHookFunction((void *)getRealOffset(0xC9A8DC), (void *)coin, (void **) &old_coin);
    MSHookFunction((void *)getRealOffset(0xC9AB98), (void *)diamond, (void **) &old_diamond);
}

------------------------------------------------------------------------------------------------------------
And For ARM V8:

Just Edit This Code :

From This:

MSHookFunction((void *)getRealOffset(0xC9A8DC), (void *)coin, (void **) &old_coin);
MSHookFunction((void *)getRealOffset(0xC9AB98), (void *)diamond, (void **) &old_diamond);

To THis:

A64HookFunction((void *)getRealOffset(0xEE218DC), (void *)coin, (void **) &old_coin);
A64HookFunction((void *)getRealOffset(0xEE21A98), (void *)diamond, (void **) &old_diamond);


I Write For You which one Arm V7 & which one Arm V8
And They Are not have change just a latest lines
❤❤❤❤❤❤

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below. For more information, please read our Posting Guidelines.
Reply to this topic... Posting Guidelines

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Our picks

    • Adventure Bay - Farm Games v1.37.13 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Adventure Bay - Farm Games By Gamegos Teknoloji A.S.
      Bundle ID: com.gamegos.adventure.bay.paradise.farm
      iTunes Store Link: https://apps.apple.com/us/app/adventure-bay-farm-games/id1578449819?uo=4
       

      🤩 Hack Features

      - Gems
      - Coins
      - Energy
      - Avatar Unlock
      • 7 replies
    • Adventure Bay - Farm Games v1.37.13 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Adventure Bay - Farm Games By Gamegos Teknoloji A.S.
      Bundle ID: com.gamegos.adventure.bay.paradise.farm
      iTunes Store Link: https://apps.apple.com/us/app/adventure-bay-farm-games/id1578449819?uo=4


      🤩 Hack Features

      - Gems
      - Coins
      - Energy
      - Avatar Unlock
      • 9 replies
    • Merge Cruise: Mystery Puzzle v0.36.140 [ +2 Cheats ] Currency Max
      Modded/Hacked App: Merge Cruise: Mystery Puzzle By STUDIO PEERPLAY GAMES LTD
      Bundle ID: com.peerplay.megamerge
      iTunes Store Link: https://apps.apple.com/us/app/merge-cruise-mystery-puzzle/id6459056553?uo=4
       

      🤩 Hack Features

      - Cash
      - Energy

      • 3 replies
    • Merge Cruise: Mystery Puzzle v0.36.140 [ +2 Jailed ] Currency Max
      Modded/Hacked App: Merge Cruise: Mystery Puzzle By STUDIO PEERPLAY GAMES LTD
      Bundle ID: com.peerplay.megamerge
      iTunes Store Link: https://apps.apple.com/us/app/merge-cruise-mystery-puzzle/id6459056553?uo=4
       

      🤩 Hack Features

      - Cash
      - Energy

      • 5 replies
    • Turret Defense King v1.2.14 [ +9 Cheats ] Gold Max
      Modded/Hacked App: Turret Defense King By MOBIRIX
      Bundle ID: com.mobirix.tdwt
      iTunes Store Link: https://apps.apple.com/us/app/turret-defense-king/id6480586157?uo=4


      🚀 Hack Features

      - ADS NO [ Rewards Free]

      - Gold [ Revive To Get ]

      - Battle Coins [ Enemy Drop Kill ]

      - Tower Cost [ Earn Battle Coins ]

      - Enemy Max [ Only Stage Mod] Easy Win

      - Wave Max [ Only Stage Mod] Easy Win

      - Tower DMG [ Just Rebuild & Upgrade ]

      - Tower ATK Range

      - Tower Fire Rate
      • 9 replies
    • Turret Defense King v1.2.14 [ +9 Jailed ] Gold Max
      Modded/Hacked App: Turret Defense King By MOBIRIX
      Bundle ID: com.mobirix.tdwt
      iTunes Store Link: https://apps.apple.com/us/app/turret-defense-king/id6480586157?uo=4


      🚀 Hack Features

      - ADS NO [ Rewards Free]

      - Gold [ Revive To Get ]

      - Battle Coins [ Enemy Drop Kill ]

      - Tower Cost [ Earn Battle Coins ]

      - Enemy Max [ Only Stage Mod] Easy Win

      - Wave Max [ Only Stage Mod] Easy Win

      - Tower DMG [ Just Rebuild & Upgrade ]

      - Tower ATK Range

      - Tower Fire Rate
      • 10 replies
    • Magic Defense TD v281 [ +5 Cheats ] Always Win
      Modded/Hacked App: Magic Defense! By OBLIQUE GAMES, Corp.
      Bundle ID: com.ObliqueGames.MagicTowerDefense100
      iTunes Store Link: https://apps.apple.com/us/app/magic-defense/id6475539174?uo=4


      Hack Features:
      - No ADS [ Rewards Free ]

      - Skill Cooldown

      - Damage

      - Never Die

      - Auto Kill Enemy + Freez  [ Always Win ]


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 65 replies
    • Magic Defense TD v281 [ +5 Jailed ] Always Win
      Modded/Hacked App: Magic Defense : TD By OBLIQUE GAMES, Corp.
      Bundle ID: com.ObliqueGames.MagicTowerDefense100
      iTunes Store Link: https://apps.apple.com/us/app/magic-defense-td/id6475539174?uo=4



      Hack Features:

      - No ADS [ Rewards Free ]

      - Skill Cooldown

      - Damage

      - Never Die

      - Auto Kill Enemy + Freez  [ Always Win ]


      Jailbreak required hack(s): https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Agree
      • 32 replies
    • Cooking World: Cooking Games v1.5.2 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Cooking World: Cooking Games By MagicSeven Co., Ltd
      Bundle ID: com.cooking.world.chef.craze.restaurant.fever
      iTunes Store Link: https://apps.apple.com/us/app/cooking-world-cooking-games/id6469040590?uo=4
       

      🤩 Hack Features

      - Gems [ Earn Some ]
      - Coins [ Earn Some ]
      - Exp [ Earn Some + Rewards ] Breakable Feature

      - Lives [ Linked With Exp ]
      • 6 replies
    • Cooking World: Cooking Games v1.5.2 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Cooking World: Cooking Games By MagicSeven Co., Ltd
      Bundle ID: com.cooking.world.chef.craze.restaurant.fever
      iTunes Store Link: https://apps.apple.com/us/app/cooking-world-cooking-games/id6469040590?uo=4

       

      🤩 Hack Features

      - Gems [ Earn Some ]
      - Coins [ Earn Some ]
      - Exp [ Earn Some + Rewards ] Breakable Feature 

      - Lives [ Linked With Exp ]
      • 7 replies
    • Disney Solitaire v1.0.1 [ +7 Cheats ] Auto Win
      Modded/Hacked App: Disney Solitaire By SuperPlay LTD
      Bundle ID: com.superplaystudios.disneysolitairedreams
      iTunes Store Link: https://apps.apple.com/ph/app/disney-solitaire/id6475757306?uo=4
       

      🤩 Hack Features

      - Coins [ Win Match ]

      - Task [ No Need Star ]

      - Stars

      - Undo

      - Wild Card

      - Free Ticket

      - Auto Win
      • 6 replies
    • Disney Solitaire v1.0.1 [ +7 Jailed ] Auto Win
      Modded/Hacked App: Disney Solitaire By SuperPlay LTD
      Bundle ID: com.superplaystudios.disneysolitairedreams
      iTunes Store Link: https://apps.apple.com/ph/app/disney-solitaire/id6475757306?uo=4


      🤩 Hack Features

      - Coins [ Win Match ]

      - Task [ No Need Star ]

      - Stars

      - Undo

      - Wild Card

      - Free Ticket

      - Auto Win
      • 8 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines