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
17 minutes ago, CeeCeeCee said:

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

That’s how you do it dude

  • Thanks 1
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
❤❤❤❤❤❤

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Dead Impact: Survival MMORPG v1.17 +11 Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Dead Impact: Survival MMORPG By SYNTHEZ GAMES LIMITED
      Bundle ID: games.synthez.zombie.survival.multiplayer
      App Store Link: https://apps.apple.com/us/app/dead-impact-survival-mmorpg/id6444281832?uo=4

       
       

      🤩 Hack Features

      - Freeze Currencies
      - Freeze Items
      - 1 Stat Point Requirement
      - Level Threshold Modifier -> Amount of XP required to advance to the next level.
      - No Craft Item Requirement
      - Unlimited Durability
      - No Consumable Cooldown

      VIP
      - Unlimited Currencies -> Will increase instead of decrease.
      - Unlimited Items -> Will increase instead of decrease.
      - Unlock All
      - Unlock All Classes
      • 255 replies
    • Dead Impact: Survival MMORPG v1.17 +11 Cheats [ Unlimited Everything ]
      Modded/Hacked App: Dead Impact: Survival MMORPG By SYNTHEZ GAMES LIMITED
      Bundle ID: games.synthez.zombie.survival.multiplayer
      App Store Link: https://apps.apple.com/us/app/dead-impact-survival-mmorpg/id6444281832?uo=4

       


      🤩 Hack Features

      - Freeze Currencies
      - Freeze Items
      - 1 Stat Point Requirement
      - Level Threshold Modifier -> Amount of XP required to advance to the next level.
      - No Craft Item Requirement
      - Unlimited Durability
      - No Consumable Cooldown

      VIP
      - Unlimited Currencies -> Will increase instead of decrease.
      - Unlimited Items -> Will increase instead of decrease.
      - Unlock All
      - Unlock All Classes
      • 91 replies
    • Matchcreek Motors v10.7.19722 +5 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Matchcreek Motors: Custom Cars By Hutch Games Ltd
      Bundle ID: com.hutchgames.carsm3
      iTunes Store Link: https://apps.apple.com/us/app/matchcreek-motors-custom-cars/id6566187035?uo=4

       
       

      🤩 Hack Features

      - Unlimited Currencies -> Will increase instead of decrease.
      - Freeze Lives
      - Freeze Pre-Game Boosters
      - Freeze Boosters
      - Freeze Moves
        • Agree
      • 10 replies
    • Romantic Blast: Love Stories v2.5.1 +5 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Romantic Blast: Love Stories By Pexix Technology Limited
      Bundle ID: ios.romantic.blast.makeover.game
      iTunes Store Link: https://apps.apple.com/us/app/romantic-blast-love-stories/id6463772070?uo=4


      Hack Features:
      - Unlimited Coins -> Earn or spend some.
      - Unlimited Gems -> Earn or spend some.
      - Unlimited Lives -> Earn or spend some.
      - Unlimited Boosters -> Will not decrease.
      - Unlimited Moves -> Will not decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Romantic Blast: Love Stories v2.2.9 +5 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 5 replies
    • Epic Stickman: RPG Idle Game v1.0.48 +2++ Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Epic Stickman: RPG Idle Game By Fansipan Limited
      Bundle ID: com.fansipan.epic.stickman.survival.rpg.idle.game
      iTunes Store Link: https://apps.apple.com/us/app/epic-stickman-rpg-idle-game/id6503872838?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.
      - Free In-App Purchases -> Toggle via iGMenu.


      Jailbreak required hack(s): [Mod Menu Hack] Epic Stickman: RPG Idle Game v1.0 +2++ Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 45 replies
    • Disney Solitaire v1.11.2 +2++ Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Disney Solitaire By SuperPlay LTD
      Bundle ID: com.superplaystudios.disneysolitairedreams
      iTunes Store Link: https://apps.apple.com/us/app/disney-solitaire/id6475757306?uo=4

       
       

      🤩 Hack Features

      - Unlimited Everything -> Will increase instead of decrease.
      - Free In-App Purchases
      • 45 replies
    • Tiny Reaper: Reborn v1.2.13 +4 Jailed Cheats [ God Mode + More ]
      Modded/Hacked App: Tiny Reaper: Reborn By DAERI SOFT
      Bundle ID: com.daerigame.babysasin
      App Store Link: https://apps.apple.com/us/app/tiny-reaper-reborn/id6739761698?uo=4

       


      🤩 Hack Features

      - God Mode
      - One-Hit Kill
      - No Skill Cooldown
      - Dumb Enemies
      • 23 replies
    • Brotato v1.3.262 +4 Jailed Cheats [ Damage + More ]
      Modded/Hacked App: Brotato By QI YU SG. PTE. LTD.
      Bundle ID: com.brotato.shooting.survivors.action.games.bullethell.ios
      iTunes Store Link: https://apps.apple.com/us/app/brotato/id6445884925?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - God Mode
      - Move Speed Multiplier
      - Free In-App Purchases
      • 44 replies
    • Golf Superstar 2 v1.0.15 +2 Jailed Cheats [ Unlimited Cash ]
      Modded/Hacked App: Golf Superstar 2 By Scott Baillie
      Bundle ID: com.lazyboydevelopments.golfsuperstar2
      App Store Link: https://apps.apple.com/us/app/golf-superstar-2/id1598585549?uo=4

       

      🤩 Hack Features

      - Unlimited Cash 
      - Unlimited XP
      • 1 reply
    • OnceWorld v1.2.2 +2 Mods [ Damage + More ]
      Mod APK Game Name: OnceWorld
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=work.ponix.onceworld

       

      🤩 Hack Features

      - Damage Multiplier
      - God Mode
      • 2 replies
    • Meta Toy DragonZ SAGA v1.40 +5 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Meta Toy DragonZ SAGA By Sandbox Network Inc.
      Bundle ID: com.sandboxgame.mtdzsaga
      App Store Link: https://apps.apple.com/us/app/meta-toy-dragonz-saga/id6748107724?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      -- No Ads
      -- Battle Boost x2.5 Unlocked
      • 11 replies
    • Virtual Beggar v4.1.1 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Virtual Beggar By Treetop Crew Oy
      Bundle ID: com.TreetopCrew.VirtualBeggar
      App Store Link: https://apps.apple.com/us/app/virtual-beggar/id922983045?uo=4

       
       

      🤩 Hack Features

      - Unlimited Coins -> Earn some.
      - Unlimited Virtual Cards -> Earn some.
      - Max Level -> Earn some XP.
      • 4 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