Jump to content

Cannot get prefubundle bool on tweak.x


Go to solution Solved by princessXZ,

11 posts in this topic

Recommended Posts

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
Link to comment
https://iosgods.com/topic/122011-cannot-get-prefubundle-bool-on-tweakx/
Share on other sites

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
1 hour ago, 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.

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

18 minutes ago, 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

Weird, perhaps try reinstalling a fresh theos manually?

24 minutes ago, ZoZo said:

Weird, perhaps try reinstalling a fresh theos manually?

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
22 minutes ago, 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

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

@absolut1on @Kilmnar

Updated by ZoZo

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

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

    • Evil Factory: Idle Clicker Cheats v2.23.9 +2
      Modded/Hacked App: Evil Factory: Idle Clicker By AppQuantum Publishing Ltd
      Bundle ID: com.rmg.hellclick
      iTunes Store Link: https://apps.apple.com/us/app/evil-factory-idle-clicker/id1350465370?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

      - Infinite Currencies
      - No Ads


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/topic/94249-evil-factory-idle-clicker-v2239-jailed-cheats-2/

       

      📥 iOS Hack Download Link https://iosgods.com/topic/94246-evil-factory-idle-clicker-cheats-v2239-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 234 replies
    • After Inc. v1.0.8 Jailed Cheats +1
      Modded/Hacked App: After Inc. By Ndemic Creations LTD
      Bundle ID: com.ndemiccreations.survivors
      iTunes Store Link: https://apps.apple.com/us/app/after-inc/id1631859420?uo=4


      Hack Features:
      - Unlock All DLCs & Cheats


      iOS Hack Download IPA Link: https://iosgods.com/topic/189479-after-inc-v105-jailed-cheats-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 13 replies
    • Alien Invasion: RPG Idle Space Cheats v4.05.01 +2
      Modded/Hacked App: Alien Invasion: RPG Idle Space By MULTICAST GAMES LIMITED
      Bundle ID: com.multicastgames.venomSurvive
      iTunes Store Link: https://apps.apple.com/us/app/alien-invasion-rpg-idle-space/id6443697602?uo=4


      Hack Features:
      - Infinite Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/167591-alien-invasion-rpg-idle-space-v204-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/167589-alien-invasion-rpg-idle-space-cheats-v204-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 401 replies
    • Mr Autofire Cheats v3.7.1 +3 [ God Mode & More ]
      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&at=1010lce4


      Hack Features:
      - God Mode 
      - OHK
      - Free Store


      iOS Hack Download Link: https://iosgods.com/topic/134788-mr-autofire-cheats-v142-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 627 replies
    • Puzzle & Dragons (English) v21.9.0 Jailed Cheats +2
      Modded/Hacked App: Puzzle & Dragons (English) By GungHo Online Entertainment, INC.
      Bundle ID: jp.gungho.padEN
      iTunes Store Link: https://apps.apple.com/us/app/puzzle-dragons-english/id563474464?uo=4


      Hack Features:
      - God Mode
      - One Hit Kill


      Jailbreak required hack(s): https://iosgods.com/topic/133984-puzzle-dragons-japan-english-cheats-all-versions-3/


      iOS Hack Download Link: https://iosgods.com/topic/135066-puzzle-dragons-english-v1931-jailed-cheats-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 305 replies
    • [ Puzzle & Dragons KR ] 퍼즐앤드래곤 v21.9.0 Jailed Cheats +2
      Modded/Hacked App: 퍼즐앤드래곤 By GungHo Online Entertainment, INC.
      Bundle ID: jp.gungho.padKO
      iTunes Store Link: https://apps.apple.com/kr/app/%ED%8D%BC%EC%A6%90%EC%95%A4%EB%93%9C%EB%9E%98%EA%B3%A4/id588637521?uo=4


      Hack Features:
      - God Mode
      - One Hit Kill


      Jailbreak required hack(s): https://iosgods.com/topic/133984-puzzle-dragons-japan-english-cheats-all-versions-3/


      iOS Hack Download Link: https://iosgods.com/topic/146388-puzzle-dragons-korea-%ED%8D%BC%EC%A6%90%EC%95%A4%EB%93%9C%EB%9E%98%EA%B3%A4-v1920-jailed-cheats-2/
        • Agree
        • Thanks
        • Winner
        • Like
      • 15 replies
    • HAWK: Airplane Space games Cheats v42.5 +3
      Modded/Hacked App: HAWK: Airplane Fighter jet sky By My.com B.V.
      Bundle ID: com.my.hawk.air.shooter
      iTunes Store Link: https://apps.apple.com/us/app/hawk-airplane-fighter-jet-sky/id1145878423?uo=4


      Hack Features:
      - God Mode
      - OHK
      - Instant Win


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/89813-arm64-hawk-bullet-hell-jet-shooter-v33-jailed-cheats-1/


      Hack Download Link: https://iosgods.com/topic/142184-hawk-airplane-fighter-jet-sky-cheats-v33-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,049 replies
    • Barbie Dreamhouse Adventures Cheats v2025.1.0 +1
      Modded/Hacked App: Barbie Dreamhouse Adventures By Budge Studios
      Bundle ID: com.budgestudios.BarbieDreamhouse
      iTunes Store Link: https://apps.apple.com/us/app/barbie-dreamhouse-adventures/id1296796112?uo=4


      Hack Features:
      - PREMIUM


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/150378-barbie-dreamhouse-adventures-v202180-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/150377-barbie-dreamhouse-adventures-cheats-v202180-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 69 replies
    • The Battle Cats Cheats v14.1.1 +2
      Modded/Hacked App: The Battle Cats by ponos corporation
      Bundle ID: jp.co.ponos.battlecatsen
      iTunes Store Link: https://apps.apple.com/us/app/the-battle-cats/id850057092?uo=4&at=1010lce4


      Hack Features:
      - Infinite Cash
      - OHK Linked

      NOTE: Please don't ask me for currencies hack since this is the best I can do


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/124447-arm64-the-battle-cats-v940-jailed-cheats-2/


      iOS Hack Download Link: https://iosgods.com/topic/124448-arm64-the-battle-cats-cheats-v950-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 904 replies
    • Cat Snack Bar Cheats v1.0.161 +1
      Modded/Hacked App: Cat Snack Bar By treeplla Inc.
      Bundle ID: com.tree.idle.catsnackbar
      iTunes Store Link: https://apps.apple.com/us/app/cat-snack-bar/id6443895159?uo=4


      Hack Features:
      - Freeze Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/170232-cat-snack-bar-v1036-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/170233-cat-snack-bar-cheats-v1036-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 69 replies
    • Pocket Champs PVP Racing Games Cheats v5.4.30 +2
      Modded/Hacked App: Pocket Champs: 3D Racing Games By MADBOX
      Bundle ID: com.pocketchamps.game
      iTunes Store Link: https://apps.apple.com/us/app/pocket-champs-3d-racing-games/id1542776143?uo=4


      Hack Features:
      - Free Store (not Free iAP) -- Negative value will reset to 0 on launch
      - Infinite Coins & Gems

      iOS Hack Download Link: https://iosgods.com/topic/165006-pocket-champs-3d-racing-games-cheats-v318-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 178 replies
    • Idle Theme Park - Tycoon Game Cheats v6.5.1 +1
      Modded/Hacked App: Idle Theme Park - Tycoon Game by Digital Things Sociedad Limitada
      Bundle ID: com.codigames.idle.theme.park.tycoon
      iTunes Store Link: https://apps.apple.com/us/app/idle-theme-park-tycoon-game/id1460772578?uo=4&at=1010lce4


      Hack Features:
      - Infinite Cash


      iOS Hack Download Link: https://iosgods.com/topic/116320-arm64-idle-theme-park-tycoon-game-cheats-v210-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 541 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