Jump to content

6 posts in this topic

Recommended Posts

Posted (edited)

tested on iphone6s plus & iphone5s

I thought arm64 devices can not hook like this.

#import <CoreFoundation/CoreFoundation.h>
#import "substrate.h"
#import "libMobileGestalt.h"

CFPropertyListRef (*orig_MGCopyAnswer)(CFStringRef key);//hook MGCopyAnswer
CFPropertyListRef replace_MGCopyAnswer(CFStringRef key)
{
    NSLog(@"my hookfunction");
    return orig_MGCopyAnswer(key);
}

__attribute__((constructor)) static void initialize() {
    MSHookFunction(MGCopyAnswer,replace_MGCopyAnswer,&orig_MGCopyAnswer);
}

any ideas to hook MGCopyAnswer on arm64 devices??  ;)

Updated by youngzzzzzzz
Posted

I can hook stuff fine on my 5s

 

I know one instance where stuff will crash when hooked, when something that you are hooking doesn't exist. Can you see "my hookfunction" in syslog?

Posted (edited)

syslog of my iphone6s plus 9.0.2jb before crashed

[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:14:49 iPhone[0;36m com.apple.xpc.launchd[1][m (UIKitApplication:com.apple.mobilesafari[0xaa3f][20940])[m <Notice>: Service exited due to signal: Illegal instruction: 4
[0;37mJul 20 17:14:49 iPhone[0;36m diagnosticd[177][2;31m <[0;31mError[2;31m>[0;37m:[m unable to find offset 0x9a7f3a5c in shared cache for arch 'arm64'
[0;37mJul 20 17:14:49 iPhone[0;36m SpringBoard[783][2;33m <[0;33mWarning[2;33m>[0;37m:[m Application 'UIKitApplication:com.apple.mobilesafari[0xaa3f]' crashed.

and my iphone5s 9.1jb

[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m MS:Notice: Injecting: com.apple.mobilesafari [MobileSafari] (1241.11)
[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m CoreFoundation = 1241.110000
[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m Could not match CoreFoundation = 1241.110000
[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction
[0;37mJul 20 17:30:42 iPhone[0;36m diagnosticd[191][2;31m <[0;31mError[2;31m>[0;37m:[m error evaluating process info - pid: 969, puniqueid: 969
[0;37mJul 20 17:30:42 iPhone[0;36m com.apple.xpc.launchd[1][m (UIKitApplication:com.apple.mobilesafari[0x8cb0][969])[m <Notice>: Service exited due to signal: Illegal instruction: 4
[0;37mJul 20 17:30:42 iPhone[0;36m SpringBoard[779][2;33m <[0;33mWarning[2;33m>[0;37m:[m Application 'UIKitApplication:com.apple.mobilesafari[0x8cb0]' crashed.

Tweak.xm:

#import <CoreFoundation/CoreFoundation.h>
#import "substrate.h"
#import "MobileGestalt.h"

CFPropertyListRef (*orig_MGCopyAnswer)(CFStringRef key);//hook MGCopyAnswer
CFPropertyListRef replace_MGCopyAnswer(CFStringRef key)
{
    NSLog(@"my hookfunction");
    return orig_MGCopyAnswer(key);
}

__attribute__((constructor)) static void initialize() {
    MSHookFunction(MGCopyAnswer,replace_MGCopyAnswer,&orig_MGCopyAnswer);
}

makefile:

export ARCHS = armv7 arm64
export TARGET = iphone:clang:latest:8.0

include $(THEOS_MAKE_PATH)/common.mk

TWEAK_NAME = DemoTweak
DemoTweak_FILES = Tweak.xm
DemoTweak_LIBRARIES = flipswitch MobileGestalt
DemoTweak_LDFLAGS += -Wl,-segalign,4000
DemoTweak_CFLAGS = -Wno-c++11-extensions

include $(THEOS_MAKE_PATH)/tweak.mk
include $(THEOS_MAKE_PATH)/aggregate.mk

after-install::
	# install.exec "killall -9 SpringBoard"

any ideas?

Updated by youngzzzzzzz
Posted (edited)

syslog of my iphone6s plus 9.0.2jb before crashed

[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m com.apple.xpc.launchd[1][m (UIKitApplication:com.apple.mobilesafari[0xaa3f][20940])[m <Notice>: Service exited due to signal: Illegal instruction: 4[0;37mJul 20 17:14:49 iPhone[0;36m diagnosticd[177][2;31m <[0;31mError[2;31m>[0;37m:[m unable to find offset 0x9a7f3a5c in shared cache for arch 'arm64'[m[0;37mJul 20 17:14:49 iPhone[0;36m SpringBoard[783][2;33m <[0;33mWarning[2;33m>[0;37m:[m Application 'UIKitApplication:com.apple.mobilesafari[0xaa3f]' crashed.

and my iphone5s 9.1jb

 

[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m MS:Notice: Injecting: com.apple.mobilesafari [MobileSafari] (1241.11)[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m CoreFoundation = 1241.110000[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;32m <[0;32mNotice[2;32m>[0;37m:[m Could not match CoreFoundation = 1241.110000[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:30:42 iPhone[0;36m MobileSafari[969][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:30:42 iPhone[0;36m diagnosticd[191][2;31m <[0;31mError[2;31m>[0;37m:[m error evaluating process info - pid: 969, puniqueid: 969[0;37mJul 20 17:30:42 iPhone[0;36m com.apple.xpc.launchd[1][m (UIKitApplication:com.apple.mobilesafari[0x8cb0][969])[m <Notice>: Service exited due to signal: Illegal instruction: 4[0;37mJul 20 17:30:42 iPhone[0;36m SpringBoard[779][2;33m <[0;33mWarning[2;33m>[0;37m:[m Application 'UIKitApplication:com.apple.mobilesafari[0x8cb0]' crashed.
Tweak.xm:

#import <CoreFoundation/CoreFoundation.h>#import "substrate.h"#import "MobileGestalt.h"CFPropertyListRef (*orig_MGCopyAnswer)(CFStringRef key);//hook MGCopyAnswerCFPropertyListRef replace_MGCopyAnswer(CFStringRef key){    NSLog(@"my hookfunction");    return orig_MGCopyAnswer(key);}__attribute__((constructor)) static void initialize() {    MSHookFunction(MGCopyAnswer,replace_MGCopyAnswer,&orig_MGCopyAnswer);}
makefile:

export ARCHS = armv7 arm64export TARGET = iphone:clang:latest:8.0include $(THEOS_MAKE_PATH)/common.mkTWEAK_NAME = DemoTweakDemoTweak_FILES = Tweak.xmDemoTweak_LIBRARIES = flipswitch MobileGestaltDemoTweak_LDFLAGS += -Wl,-segalign,4000DemoTweak_CFLAGS = -Wno-c++11-extensionsinclude $(THEOS_MAKE_PATH)/tweak.mkinclude $(THEOS_MAKE_PATH)/aggregate.mkafter-install::	# install.exec "killall -9 SpringBoard"
any ideas?
I highlighted the text that described the error and it was exactily what I thought :p My guess is that you'll have to find another way to do this

 

Look:

 

[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m MobileSafari[20940][2;33m <[0;33mWarning[2;33m>[0;37m:[m my hookfunction[0;37mJul 20 17:14:49 iPhone[0;36m com.apple.xpc.launchd[1][m (UIKitApplication:com.apple.mobilesafari[0xaa3f][20940])[m <Notice>: Service exited due to signal: Illegal instruction: 4[0;37mJul 20 17:14:49 iPhone[0;36m diagnosticd[177][2;31m <[0;31mError[2;31m>[0;37m:[m unable to find offset 0x9a7f3a5c in shared cache for arch 'arm64'[0;37mJul 20 17:14:49 iPhone[0;36m SpringBoard[783][2;33m <[0;33mWarning[2;33m>[0;37m:[m Application 'UIKitApplication:com.apple.mobilesafari[0xaa3f]' crashed.

 

The best analogy I have to what your problem is is this: imagine you're making an app, and you call a method names "- (void)showAlert". But that method doesn't exist, and when you tap a button that is supposed to call that method, your app will crash. I'm pretty sure it's the same issue here, you are calling something that doesn't exist :)

Updated by Guest

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

    • Shiba Story Go! RPG Idle Game v1.0.3 [ +12 Jailed ] Always Win
      Modded/Hacked App: Shiba Story Go! RPG Idle Game By Proof of Play, Inc.
      Bundle ID: com.proofofplay.shibastorygo
      App Store Link: https://apps.apple.com/ph/app/shiba-story-go-rpg-idle-game/id6749783343?uo=4 

      🤩 Hack Features

      - Gems

      - Gold

      - Energy

      - Keys+3

      - Enhance Items

      - Pet Egg

      - Chest Max [ Server Error Show Some Time But Works ]

      - Fast Travel Energy Cost 1

      - Enemy Easy Kill [ Both Of Linked ] Server Error Show Some Time

      - Alway My Turn

      - HP [ Enemy Easy Kill + Alway My Turn ] Disable Then Use This Feature

      - ATK

      - DEF
        • Like
      • 2 replies
    • Shiba Story Go! RPG Idle Game v1.0.3 [ +12 Cheats ] Always Win
      Modded/Hacked App: Shiba Story Go! RPG Idle Game By Proof of Play, Inc.
      Bundle ID: com.proofofplay.shibastorygo
      App Store Link: https://apps.apple.com/ph/app/shiba-story-go-rpg-idle-game/id6749783343?uo=4

      🤩 Hack Features

      - Gems

      - Gold

      - Energy

      - Keys+3

      - Enhance Items

      - Pet Egg

      - Chest Max [ Server Error Show Some Time But Works ]

      - Fast Travel Energy Cost 1

      - Enemy Easy Kill [ Both Of Linked ] Server Error Show Some Time

      - Alway My Turn

      - HP [ Enemy Easy Kill + Alway My Turn ] Disable Then Use This Feature

      - ATK

      - DEF
        • Like
      • 4 replies
    • Merge & Blast: Dream Island v2.27.0 [ +2 Cheats ] Auto Win
      Modded/Hacked App: Merge & Blast: Dream Island By Dreamo, Inc.
      Bundle ID: com.dreamo.woodyblast
      iTunes Store Link: https://apps.apple.com/us/app/merge-blast-dream-island/id1668748189?uo=4


      🤩 Hack Features

      - Auto Win
      - Coin + Moves [ Disable After Get ]




      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Like
      • 18 replies
    • Merge & Blast: Dream Island v2.27.0 [ +2 Jailed ] Auto Win
      Modded/Hacked App: Merge & Blast: Dream Island By Dreamo, Inc.
      Bundle ID: com.dreamo.woodyblast
      iTunes Store Link: https://apps.apple.com/us/app/merge-blast-dream-island/id1668748189?uo=4

       

      🤩 Hack Features

      - Auto Win
      - Coin + Moves [ Disable After Get ]




      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Thanks
        • Winner
        • Like
      • 26 replies
    • Backpack Rush 1.722.215 [ +20 Cheats ] Currency Max
      Modded/Hacked App: Backpack Rush By Noodle Games Limited
      Bundle ID: com.onicore.backpack.rush
      iTunes Store Link: https://apps.apple.com/us/app/backpack-rush/id6736857029?uo=4

      Hack Features:
      - ADS Ticket

      - Gems

      - Gold

      - Energy

      - Silver Coins [ Merge Weapons ]

      - Summon Coins

      - Heroic Water [ Hero Up ]

      - Meteor Essence [ Gear Refining ]

      - Talent Book +2

      - Core Evo Stone [ Pet Evo Up ]

      - Fish Hook [ Obtain Gear During A Voyage ]

      - Pickaxe [ Mine ]

      - Blueprint [ Outfit Equip UP ]

      - Fragment [ Gear Up ]

      - Fragment [ Pet UP ]

      - Dungeon Keys +3

      - Spin

      - Enemy Status [ HP ATK 0 ] Easy Kill

      - DMG [ Outfit Just Equip & Unequip ]

      - HP [ Outfit Just Equip & Unequip ]


      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/
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 42 replies
    • Backpack Rush v1.722.215 [ +20 Jailed ] Currency Max
      Modded/Hacked App: Backpack Rush By Noodle Games Limited
      Bundle ID: com.onicore.backpack.rush
      iTunes Store Link: https://apps.apple.com/us/app/backpack-rush/id6736857029?uo=4

      Hack Features:

      - ADS Ticket

      - Gems

      - Gold

      - Energy

      - Silver Coins [ Merge Weapons ]

      - Summon Coins

      - Heroic Water [ Hero Up ]

      - Meteor Essence [ Gear Refining ]

      - Talent Book +2

      - Core Evo Stone [ Pet Evo Up ]

      - Fish Hook [ Obtain Gear During A Voyage ]

      - Pickaxe [ Mine ]

      - Blueprint [ Outfit Equip UP ]

      - Fragment [ Gear Up ]

      - Fragment [ Pet UP ]

      - Dungeon Keys +3

      - Spin

      - Enemy Status [ HP ATK 0 ] Easy Kill

      - DMG [ Outfit Just Equip & Unequip ]

      - HP [ Outfit Just Equip & Unequip ]

       
      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
        • Haha
        • Thanks
        • Winner
        • Like
      • 44 replies
    • Squishmallows Match v1.0.3 [ +2 Cheats ] Auto Win
      Modded/Hacked App: Squishmallows Match By East Side Games Inc
      Bundle ID: com.eastsidegames.squishmallows
      App Store Link: https://apps.apple.com/ph/app/squishmallows-match/id6450057167?uo=4

       

      🤩 Hack Features

      - Auto Win
      - Lives [ 0 Play Unlimited ]

        • Like
      • 10 replies
    • Squishmallows Match v1.0.3 [ +2 Jailed ] Auto Win
      Modded/Hacked App: Squishmallows Match By East Side Games Inc
      Bundle ID: com.eastsidegames.squishmallows
      App Store Link: https://apps.apple.com/ph/app/squishmallows-match/id6450057167?uo=4
       

      🤩 Hack Features

      - Auto Win
      - Lives [ 0 Play Unlimited ]

        • Like
      • 15 replies
    • Spin Break: Roulette Battle v1.8.2 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Spin Break: Roulette Battle By Fifty-one percent Corp.
      Bundle ID: com.FiftyOnePercent.SpinBreak
      iTunes Store Link: https://apps.apple.com/us/app/spin-break-roulette-battle/id6462842820?uo=4

      Hack Features:

      - Currency Max

      - Energy Max

      - LvL Rewards Gold

      - Hero Status [ HP DMG DEF Luck Gold ]

      - Enemy Status [ ATK HP DEF 0 ]

       
      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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Like
      • 39 replies
    • Spin Break: Roulette Battle v1.8.2 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Spin Break: Roulette Battle By Fifty-one percent Corp.
      Bundle ID: com.FiftyOnePercent.SpinBreak
      iTunes Store Link: https://apps.apple.com/us/app/spin-break-roulette-battle/id6462842820?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:

      - Currency Max

      - Energy Max

      - LvL Rewards Gold

      - Hero Status [ HP DMG DEF Luck Gold ]

      - Enemy Status [ ATK HP DEF 0 ]


      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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 38 replies
    • Mr Autofire v4.2.2 [ +12 Cheats ] Currency Max
      Modded/Hacked App: Mr Autofire By Lightheart Entertainment Oy
      Bundle ID: games.lightheart.mrautofire
      iTunes Store Link: https://apps.apple.com/us/app/mr-autofire/id1483457500?uo=4


      Hack Features:
      - N0 ADS [ Reward Free ]

      - Damage 

      - Health 

      - Pet Damage

      - Rome Clear [ 1 Wave Clear ]

      Level Rearwards 

      [ Gems - Silver - Pet Card - Hero Card - Guns Card ]
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 54 replies
    • Mr Autofire v4.2.2 [ +12 Jailed ] Currency Max
      Modded/Hacked App: Mr Autofire By Lightheart Entertainment Oy
      Bundle ID: games.lightheart.mrautofire
      iTunes Store Link: https://apps.apple.com/us/app/mr-autofire/id1483457500?uo=4


      Hack Features:

      - N0 ADS [ Reward Free ]

      - Damage 

      - Health 

      - Pet Damage

      - Rome Clear [ 1 Wave Clear ]

      Level Rearwards 

      [ Gems - Silver - Pet Card - Hero Card - Guns Card ]
        • Informative
        • Agree
        • Like
      • 21 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