Jump to content

Cannot get prefubundle bool on tweak.x


Go to solution Solved by princessXZ,

11 posts in this topic

Recommended Posts

Posted (edited)

Hey.

I have a problem when compile the my tweak.

I think it cause calling getPrefBool But I don't know what should I do:/

I tried to add ARCHS = armv7 arm64 to Makefile But still get error

Please help me ..

Error

mafu:~/mcohack root# make package install
> Making all for tweak mcohack…
==> Preprocessing Tweak.x…
==> Preprocessing Tweak.x…
==> Compiling Tweak.x (arm64)…
==> Compiling Tweak.x (armv7)…
==> Linking tweak mcohack (armv7)…
Undefined symbols for architecture armv7:
  "_GetPrefBool", referenced from:
      __logos_method$_ungrouped$AppController$applicationDidBecomeActive$ in Tweak.x.ad486fbc.o
ld: symbol(s) not found for architecture armv7
Not signing file
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/var/root/theos/makefiles/instance/library.mk:33: /var/root/mcohack/.theos/obj/debug/armv7/mcohack.dylib] Error 1
==> Linking tweak mcohack (arm64)…
Undefined symbols for architecture arm64:
  "_GetPrefBool", referenced from:
      __logos_method$_ungrouped$AppController$applicationDidBecomeActive$ in Tweak.x.86cf346b.o
ld: symbol(s) not found for architecture arm64
Not signing file
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/var/root/theos/makefiles/instance/library.mk:33: /var/root/mcohack/.theos/obj/debug/arm64/mcohack.dylib] Error 1
make[2]: *** [/var/root/theos/makefiles/instance/library.mk:33: /var/root/mcohack/.theos/obj/debug/arm64/mcohack.dylib] Error 2
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [/var/root/theos/makefiles/instance/library.mk:33: /var/root/mcohack/.theos/obj/debug/armv7/mcohack.dylib] Error 2
make[1]: *** [/var/root/theos/makefiles/instance/library.mk:24: internal-library-all_] Error 2
make: *** [/var/root/theos/makefiles/master/rules.mk:111: mcohack.all.tweak.variables] Error 2

Tweak.x

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.zorba.prefbundle.plist"

inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

%hook AppController
-(void)applicationDidBecomeActive:(id)argument {
  if(GetPrefBool(@"DetectOpened")) {
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Detected App opened!" delegate:nil cancelButtonTitle:@"Continue" otherButtonTitles:nil];
    [alert show];
  } else {
    return %orig;
  }
}
%end

prefbundle's plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>items</key>
    <array>
        <dict>
            <key>cell</key>
            <string>PSGroupCell</string>
            <key>label</key>
            <string>Settings</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSSwitchCell</string>
            <key>default</key>
            <true/>
            <key>defaults</key>
            <string>com.zorba.prefbundle</string>
            <key>key</key>
            <string>DetectOpened</string>
            <key>label</key>
            <string>DetectOpened</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSGroupCell</string>
            <key>label</key>
            <string>Contact</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSButtonCell</string>
            <key>label</key>
            <string>Twitter</string>
            <key>action</key>
            <string>OpenTwitter</string>
        </dict>
    </array>
    <key>title</key>
    <string>mcohack</string>
</dict>
</plist>

Theos Version: Latest Version got from https://github.com/theos/theos

Device Info iPhone8 / IOS13.3.1 / jailbroken

Updated by mafusuke
Posted (edited)

cd the project and then enter "export THEOS=/var/root/theos" before making the package install.  I also prefer sdk 9.3 and have had @Error. get it too. You should also try to run the command to update Theos just in case, even though you think you're up to date.

go to Group.pm, open it, and change this line

my $functionRetval = shift $args;
my $functionName = shift $args;

With

my $functionRetval = shift @{$args};
my $functionName = shift @{$args};

 

You can also try removing armv7 from the makefile and remove the # before arm64e. If that doesn't work, remove #arm64e from the ARCHS. There's also a command you can run to fix any missing theos files but I completely forgot it. Now I don't know the whole thing with prefubundle but those are the steps I tell people to take when they get any compiling errors in theos.

Updated by ZoZo
Posted
  On 3/28/2020 at 11:20 AM, ZoZo said:

cd the project and then enter "export THEOS=/var/root/theos" before making the package install.  I also prefer sdk 9.3 and have had @Error. get it too. You should also try to run the command to update Theos just in case, even though you think you're up to date.

go to Group.pm, open it, and change this line

my $functionRetval = shift $args;
my $functionName = shift $args;

With

my $functionRetval = shift @{$args};
my $functionName = shift @{$args};

 

You can also try removing armv7 from the makefile and remove the # before arm64e. If that doesn't work, remove #arm64e from the ARCHS. There's also a command you can run to fix any missing theos files but I completely forgot it. Now I don't know the whole thing with prefubundle but those are the steps I tell people to take when they get any compiling errors in theos.

Expand  

Thank you for your reply.

I followed these steps but I still get Error ._.

I am concerned that the original code in Group.pm was "undef" instead of "shift $args".

I show what I did below

// Theos Update
mafu:~ root# $THEOS/bin/update-theos
Fetching origin
Already up to date.
==> Notice: Visit https://github.com/theos/theos/releases to see the changelog.

// export THEOS=/var/root/theos
mafu:~/mcohack root# export THEOS=/var/root/theos

// /var/root/theos/vendor/logos/bin/lib/Logos/Group.pm
my $functionRetval = undef;
my $functionName = undef;
 ↓↓↓↓↓↓↓↓↓↓
my $functionRetval = shift @{$args};
my $functionName = shift @{$args};

// change to only ARMv7 and only ARM64

Posted
  On 3/28/2020 at 12:32 PM, mafusuke said:

Thank you for your reply.

I followed these steps but I still get Error ._.

I am concerned that the original code in Group.pm was "undef" instead of "shift $args".

I show what I did below

// Theos Update
mafu:~ root# $THEOS/bin/update-theos
Fetching origin
Already up to date.
==> Notice: Visit https://github.com/theos/theos/releases to see the changelog.

// export THEOS=/var/root/theos
mafu:~/mcohack root# export THEOS=/var/root/theos

// /var/root/theos/vendor/logos/bin/lib/Logos/Group.pm
my $functionRetval = undef;
my $functionName = undef;
 ↓↓↓↓↓↓↓↓↓↓
my $functionRetval = shift @{$args};
my $functionName = shift @{$args};

// change to only ARMv7 and only ARM64

Expand  

Weird, perhaps try reinstalling a fresh theos manually?

Posted (edited)
  On 3/28/2020 at 12:51 PM, ZoZo said:

Weird, perhaps try reinstalling a fresh theos manually?

Expand  

I reinstalled to follow steps https://github.com/theos/theos/wiki/Installation-iOS

I checked Group.pm first but there are

my $functionRetval = undef;

my $functionName = undef;

:(

https://github.com/theos/logos/blob/a54760ea60acf45fa48267b9fb344c0317d9351c/bin/lib/Logos/Group.pm

Updated by mafusuke
Posted (edited)
  On 3/28/2020 at 1:15 PM, mafusuke said:

I reinstalled to follow steps https://github.com/theos/theos/wiki/Installation-iOS

I checked Group.pm first but there are

my $functionRetval = undef;

my $functionName = undef;

:(

https://github.com/theos/logos/blob/a54760ea60acf45fa48267b9fb344c0317d9351c/bin/lib/Logos/Group.pm

Expand  

Weird, maybe someone else who may has more knowledge about this can help.

@absolut1on @Kilmnar

Updated by ZoZo
Posted

I hope they solve my problem:)
And I show more details about how did I install theos

add repo http://repo.bingner.com/
add "Theos Dependencies" in BigBoss
$ echo "export THEOS=~/theos" >> ~/.profile
<Restar shell>
echo $THEOS
$ git clone --recursive https://github.com/theos/theos.git $THEOS
$ curl -LO https://github.com/theos/sdks/archive/master.zip
// fix sdks
$ TMP=$(mktemp -d)
$ unzip master.zip -d $TMP
$ mv $TMP/sdks-master/*.sdk $THEOS/sdks
$ rm -r master.zip $TMP
// fix fakeroot
"$THEOS/bin/fakeroot.sh"を開き一番最後の部分を
> $fakeroot perl /var/root/theos/bin/$cmd
に変更
// fix group.pm
$ vim /var/root/theos/vendor/logos/bin/lib/Logos/Group.pm
my $functionRetval = undef;
my $functionName = undef;
↓↓↓↓↓↓↓↓↓↓
my $functionRetval = shift @{$args};
my $functionName = shift @{$args};
// add to makefile
<tweak_name>_LIBRARIES = substrate

  • Solution
Posted

Omg I found a workaround

I just changed file name from Tweak.x to Tweak.xm

And change makefile from <projectname>_FILES = Tweak.x to <projectname>_FILES = Tweak.xm

mafu:~/mcohack root# make package install
> Making all for tweak mcohack…
==> Preprocessing Tweak.xm…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (arm64)…
==> Compiling Tweak.xm (armv7)…
==> Linking tweak mcohack (arm64)…
==> Generating debug symbols for mcohack…
==> Linking tweak mcohack (armv7)…
==> Generating debug symbols for mcohack…
rm /var/root/mcohack/.theos/obj/debug/arm64/Tweak.xm.mm
rm /var/root/mcohack/.theos/obj/debug/armv7/Tweak.xm.mm
==> Merging tweak mcohack…
==> Signing mcohack…
> Making all in prefbundle…
> Making all for bundle prefbundle…
==> Copying resource directories into the bundle wrapper…
==> Compiling XXXRootListController.m (arm64)…
==> Compiling XXXRootListController.m (armv7)…
==> Linking bundle prefbundle (armv7)…
==> Generating debug symbols for prefbundle…
==> Linking bundle prefbundle (arm64)…
==> Generating debug symbols for prefbundle…
==> Merging bundle prefbundle…
==> Signing prefbundle…
> Making stage for tweak mcohack…
> Making stage in prefbundle…
> Making stage for bundle prefbundle…
dm.pl: building package `com.zorba.mcohack:iphoneos-arm' in `./packages/com.zorba.mcohack_0.0.1-1+debug_iphoneos-arm.deb'
==> Installing…
dpkg: warning: downgrading com.zorba.mcohack from 0.0.1-2+debug to 0.0.1-1+debug
(Reading database ... 58411 files and directories currently installed.)
Preparing to unpack .../com.zorba.mcohack_0.0.1-1+debug_iphoneos-arm.deb ...
Unpacking com.zorba.mcohack (0.0.1-1+debug) over (0.0.1-2+debug) ...
Setting up com.zorba.mcohack (0.0.1-1+debug) ...
Processing triggers for com.saurik.substrate.safemode (1.1) ...
==> Unloading '-'…
> Making after-install in prefbundle…

My Problem solved but I want to know the difference between Tweak.x and Tweak.xm and why this happens
thank you.

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

    • Magic Defense TD v275 [ +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/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 61 replies
    • Magic Defense TD v275 [ +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/
        • Thanks
        • Winner
        • Like
      • 24 replies
    • Puzzles & Cats v1.2.1 [+5 Jailed Cheats]
      Modded/Hacked App: Puzzles & Cats By Kwalee Ltd
      Bundle ID: com.kwalee.puzzlesandcatsnew
      iTunes Store Link: https://apps.apple.com/us/app/puzzles-cats/id6738574871?uo=4

       

      🤩 Hack Features

      - Free Store (Everything inside Shop. Enable and Buy)
      - Auto Win (Enable and make move)
      - Never Die
      - Infinite Heart
      - Always Can Afford (Gold, Diamond, Character Upgrade)
      • 0 replies
    • Puzzles & Cats v1.2.1 [+5 Cheats]
      Modded/Hacked App: Puzzles & Cats By Kwalee Ltd
      Bundle ID: com.kwalee.puzzlesandcatsnew
      iTunes Store Link: https://apps.apple.com/us/app/puzzles-cats/id6738574871?uo=4



      🤩 Hack Features

      - Free Store (Everything inside Shop. Enable and Buy)
      - Auto Win (Enable and make move)
      - Never Die
      - Infinite Heart
      - Always Can Afford (Gold, Diamond, Character Upgrade)

      • 0 replies
    • Lucky Offense v1.1.7 [ +4 Cheats ] Battle Coins
      Modded/Hacked App: Lucky Offense By Crater Co., Ltd.
      Bundle ID: com.percent.ios.luckyrolling
      iTunes Store Link: https://apps.apple.com/us/app/lucky-offense/id6511224968?uo=4


      🤩 Hack Features

      - Battle Coins
      - ATK
      - ATK Range
      - ATK Speed

      ATK Linked Enemy
        • Agree
        • Thanks
        • Winner
        • Like
      • 29 replies
    • Dragon Village Survival v1.119 [ +9 Cheats ] Never Die
      Modded/Hacked App: Dragon Survival By Alchemist Games Inc
      Bundle ID: com.alchemist.games.dvs
      iTunes Store Link: https://apps.apple.com/us/app/dragon-survival/id6453701946?uo=4


      Hack Features:
      - No ADS

      - Never Die

      - DMG

      - Max Ammo

      - Pick Up Range [ Enter The Game Then Use ]

      - Movement Speed

      - Enemy No Limit 

      - Fire Radius

      - Max Revive 


      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
        • Thanks
        • Winner
        • Like
      • 98 replies
    • Dragon Survival v1.119 [ +9 Jailed ] Never Die
      Modded/Hacked App: Dragon Survival By Alchemist Games Inc
      Bundle ID: com.alchemist.games.dvs
      iTunes Store Link: https://apps.apple.com/us/app/dragon-survival/id6453701946?uo=4


      Hack Features:
      - No ADS [ Rewards Free]

      - Immortal

      - Damage

      - Ammo

      - Pick Up Range

      - Movement Speed

      - Enemy No Limit

      - Revive

      - Fire Radius


      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
        • Thanks
        • Winner
        • Like
      • 23 replies
    • Dream Resort - Match 3 Games v1.2.8 [ +7 Jailed ] Auto Win
      Modded/Hacked App: Dream Resort - Match 3 Games By F.O.G LIMITED
      Bundle ID: com.dream.resort.candy.match.mania.ios
      iTunes Store Link: https://apps.apple.com/us/app/dream-resort-match-3-games/id6737011572?uo=4
       

      🚀 Hack Features

      - Auto ADS Disable

      - Coins

      - Diamonds

      - Lives Cost

      - Moves Freeze

      - Booster [ Buy Get Unlimited After use Then work ]

      - Auto win 


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Winner
        • Like
      • 5 replies
    • Dream Resort - Match 3 Games v1.2.8 [ +7 Cheats ] Auto Win
      Modded/Hacked App: Dream Resort - Match 3 Games By F.O.G LIMITED
      Bundle ID: com.dream.resort.candy.match.mania.ios
      iTunes Store Link: https://apps.apple.com/us/app/dream-resort-match-3-games/id6737011572?uo=4

       

      🔧 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Cydia, Sileo or Zebra).

       

      🚀 Hack Features

      - Auto ADS Disable

      - Coins

      - Diamonds

      - Lives Cost

      - Moves Freeze

      - Booster [ Buy Get Unlimited After use Then work ]

      - Auto win 


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
        • Like
      • 7 replies
    • Meow Tower - Nonogram Puzzle v3.2.101 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Meow Tower - Nonogram Puzzle By HyperBeard Inc.
      Bundle ID: com.grapetree.meowtower
      iTunes Store Link: https://apps.apple.com/us/app/meow-tower-nonogram-puzzle/id1579122980?uo=4


      🚀 Hack Features

      - ADS NO
      - Gold CANS
      - Pencil Max 
      - Hints Max
        • Like
      • 2 replies
    • Meow Tower - Nonogram Puzzle v3.2.101 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Meow Tower - Nonogram Puzzle By HyperBeard Inc.
      Bundle ID: com.grapetree.meowtower
      iTunes Store Link: https://apps.apple.com/us/app/meow-tower-nonogram-puzzle/id1579122980?uo=4
       

      🚀 Hack Features

      - ADS NO
      - Gold CANS
      - Pencil Max 
      - Hints Max 
      • 5 replies
    • DomiNations v12.1460.1461 +40++ Cheats [ Exclusive ]
      Modded/Hacked App: DomiNations by NEXON M Inc.
      Bundle ID: com.nexonm.dominations
      iTunes Store Link: https://itunes.apple.com/us/app/dominations/id922558758


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - Unlimited Crowns/Food/Oil/Gold -> Resources will add instead of subtracting. Works with Crowns. Read note inside the feature for more information! This does not work for speeding up buildings.
      - All Achievements Unlocked
      - Freeze Crowns/Food/Oil/Gold -> Freezes Resources so they do not decrease when used! This does not work for speeding up buildings.
      - No Citizens Cost
      - Place Multiple of Same Building
      - 0 Cost to Speed Up Training Troops
      - 0 Cost to Speed Up Tactics
      - 0 Food Cost to Train Troops
      - 0 Food Cost to Upgrade Troops
      - No Timer to Upgrade Troops
      - 0 Food Cost to Train Spells
      - 0 General Train Cost
      - No General Train Cooldown
      - 0 Food Cost to Build Wonder
      - 0 Food Cost to Research Troops
      - 0 Food Cost to Upgrade Tactics
      - No Timer to Library Research
      - No Timer to Upgrade Spells
      - 0 Cost to Upgrade Buildings
      - 0 Workers Required to Upgrade
      This hack is an In-Game Mod Menu (iGMM). In order to activate the Mod Menu, tap on the iOSGods button found inside the app.
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 4,962 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