[Release] AB2E - Angry Birds 2 Editor

Visual Studio

Developer
OP
Developer
Joined
Aug 25, 2016
Messages
121
Trophies
0
Age
28
XP
1,267
Country
United States
I made a save editor for Angry Birds 2 on iOS and Android a long time ago and thought that I should share it since the game is getting old.

GitHub

You'll need a file named xor_key.bin in the same directory of the application but I'm not supplying that for legal reasons.

Usage is in the readme as usual.
 
Last edited by Visual Studio,

JonySnow

New Member
Newbie
Joined
May 20, 2020
Messages
1
Trophies
0
Age
37
XP
22
Country
United States
Hello, Im new to all this. Is there a way to use this editor in PC? Or it has to be used inside the Android? I use an emulator to hack. The reason why I need to use it is to edit a bird card level. Any help on this?
 

smay

Member
Newcomer
Joined
May 25, 2020
Messages
18
Trophies
0
XP
70
Country
United States
Hello, Im new to all this. Is there a way to use this editor in PC? Or it has to be used inside the Android? I use an emulator to hack. The reason why I need to use it is to edit a bird card level. Any help on this?
To answer your question...it looks like u can install Python3 in windows...im a linux guy, and managed to install it on a chromebook. you can always use Unetbootin to make an Ubuntu Live usb drive. now for you to google much,,.
install python3
install python3 build essentials, and PIP
use pip to install pycryptodome
find the XOR Key somewhere on the internet..i managed to find one in a Hex String format, then found a web page to convert that to a normal binary file. **name the file xor_key.bin so you don't have to put it as an argument on the command line below**
put all the files in the same folder and run
python3 AB2E.py -i B4blablbablka -o newsavefile --gems 9999999 --pearls 99999999
finally carefully rename the newsavefile and copy it in to your games save folder, watch out for copy action renaming stuff
btw....if you are trying to level a guest bird, you need to modify the python script, if you open all the files in a hex editor you can find the key value info you need i think PD_GuestBirdCollection and then OrangeBird PinkBird GreenBird, i couldn't find Leonard. also this script maxes out at level 49, so if you wanna be legendary you need to either figure out how to modify script or give urself millions of gems and buy chests for feathers

--------------------- MERGED ---------------------------

I was wondering how the index file is used and such....so a programming question on how it works
 
Last edited by smay,
  • Like
Reactions: urzy

smay

Member
Newcomer
Joined
May 25, 2020
Messages
18
Trophies
0
XP
70
Country
United States
I'm pretty sure it doesn't work anymore but I haven't tested it in a while so I don't know.
it works. anyways, i was wondering about how the index file ties in to everything. so a hash index? be very technical if you can, i struggle to read python still, and OOPs styled for loops...want to remake it in java.

please and thank you. i will get back to googling
 

Visual Studio

Developer
OP
Developer
Joined
Aug 25, 2016
Messages
121
Trophies
0
Age
28
XP
1,267
Country
United States
it works. anyways, i was wondering about how the index file ties in to everything. so a hash index? be very technical if you can, i struggle to read python still, and OOPs styled for loops...want to remake it in java.

please and thank you. i will get back to googling
The index file is just a file that stores the save file's AES (CBC mode) key and IV for encryption/decryption of saves.
 

SGIAI22

Member
Newcomer
Joined
May 28, 2020
Messages
11
Trophies
0
Age
36
XP
61
Country
United States
Hi, would it also be possible to update the script so that you also could add an high amount of apples or so? Would be great, thanks.

And by the way, it still works like a charme, great work. :)
 
Last edited by SGIAI22,

SGIAI22

Member
Newcomer
Joined
May 28, 2020
Messages
11
Trophies
0
Age
36
XP
61
Country
United States
To answer your question...it looks like u can install Python3 in windows...im a linux guy, and managed to install it on a chromebook. you can always use Unetbootin to make an Ubuntu Live usb drive. now .if you are trying to level a guest bird, you need to modify the python script, if you open all the files in a hex editor you can find the key value info you need i think PD_GuestBirdCollection and then OrangeBird PinkBird GreenBird, i couldn't find Leonard. also this script maxes out at level 49, so if you wanna be legendary you need to either figure out how to modify script or give urself millions of gems and buy chests for feathers

--------------------- MERGED ---------------------------

I was wondering how the index file is used and such....so a programming question on how it works

Actually I couldn´t max the guest birds, it somehow didn´t work.
But I was able to adjust the script and max all birds to the last level of 156. This worked quite nicely actually.
(
#card specs
CARD_LEVEL_MAX = 156
CARD_LEVEL_MAX_TOKENS = 6424350
)
 

Visual Studio

Developer
OP
Developer
Joined
Aug 25, 2016
Messages
121
Trophies
0
Age
28
XP
1,267
Country
United States
Hi, would it also be possible to update the script so that you also could add an high amount of apples or so? Would be great, thanks.

And by the way, it still works like a charme, great work. :)
All the new values would have to be pulled from the game's executable, it takes a while and is rather annoying, you're welcome to it though.
 

SGIAI22

Member
Newcomer
Joined
May 28, 2020
Messages
11
Trophies
0
Age
36
XP
61
Country
United States
All the new values would have to be pulled from the game's executable, it takes a while and is rather annoying, you're welcome to it though.

Ok, I understand.
But to be honest, I am not really good for stuff like that. I would not even know where to start looking. So any tipps or hints are much appreciated, thanks.
 

smay

Member
Newcomer
Joined
May 25, 2020
Messages
18
Trophies
0
XP
70
Country
United States
Ok, I understand.
But to be honest, I am not really good for stuff like that. I would not even know where to start looking. So any tipps or hints are much appreciated, thanks.
some of the game loads from the internet. put ur phone in airplane mode, and then open it. the script is finished for all intents and purposes. about the only thing that "could" be added, is the extra bird cards for MEBC.....or to edit the players star level!!!

you could get a rooted phone, then run an app to "fake" in app purchases, thus allowing you to *buy* apples. i would be careful running any memory editors as many players have been banned for cheating, thinking they likely hacked online values like apples

to see all the save data in plain text add this
#write the save to a file
open(args.out_file, "wb").write(encrypt_save(save.get_json(), args.index_file))
open("readable.txt", "wb").write( str.encode(save.get_json()) )

*****I have since added a few lines and changed stuff. with the below code you can manually edit the saved game as plain text, then use the --encrypt command to make it usable. as such i now have all ninja, roman, and samurai hats, i also have TOFExpress tickets.....etc. So first use the above code to generate the file readable.txt edit your newly created readable.txt file yourself, then comment out the above open() commands with a # before the line, then add the below code, and finally use the --encrypt argument....sorry i didn't clean up my code before posting, but im done until I open all levels and mod the players star level. PLEASE make sure to use CORRECT indentation when adding all this code in your python script, you notice i show you nearby existing lines, and you simply add the additional lines

#load the save
save = AB2_SAVE(decrypt_save_file(args.in_file, index_path=args.index_file))
if args.encrypt is not None:
save = AB2_SAVE( str( open("readable.txt", "rb").read(), "utf8" ).replace("\x00", "") )
open(args.out_file, "wb").write(encrypt_save(save.get_json(), args.index_file))
 
Last edited by smay,

SGIAI22

Member
Newcomer
Joined
May 28, 2020
Messages
11
Trophies
0
Age
36
XP
61
Country
United States
some of the game loads from the internet. put ur phone in airplane mode, and then open it. the script is finished for all intents and purposes. about the only thing that "could" be added, is the extra bird cards for MEBC.....or to edit the players star level!!!

you could get a rooted phone, then run an app to "fake" in app purchases, thus allowing you to *buy* apples. i would be careful running any memory editors as many players have been banned for cheating, thinking they likely hacked online values like apples

ooooohhhhhhh ya, to modify your guest birds we need a few changes.....put these extra lines in the correct places in your script....im nervous about the newly added level 156 issue....hehehe

KEY_CARD_SPEC = "PD_CardSpecCollection"
KEY_GUEST_BIRD = "PD_GuestBirdCollection"

BIRD_IDS = [
"RedBird", "YellowBird", "BlueBird", "BlackBird", "PurpleBird", "WhiteBird", "TerenceBird", "OrangeBird", "PinkBird", "GreenBird"
]
#card specs
#CARD_LEVEL_MAX = 49
#CARD_LEVEL_MAX_TOKENS = 1194350
CARD_LEVEL_MAX = 156
CARD_LEVEL_MAX_TOKENS = 6424350

cardspeccollection = None
guestbirdcollection = None

if self.cardspeccollection is not None:
out_data[KEY_CARD_SPEC] = dumps(self.cardspeccollection)
out_data[KEY_GUEST_BIRD] = dumps(self.guestbirdcollection)


#max card levels
if args.max_cards:
for x in range(0, len(save.cardspeccollection["CardSpecifications"])):
tmp = save.cardspeccollection["CardSpecifications"][x]
tmp["Level"] = CARD_LEVEL_MAX
tmp["Tokens"] = CARD_LEVEL_MAX_TOKENS
save.cardspeccollection["CardSpecifications"][x] = tmp
for x in range(0, len(save.guestbirdcollection["CardSpecifications"])):
tmp = save.guestbirdcollection["CardSpecifications"][x]
tmp["Level"] = CARD_LEVEL_MAX
tmp["Tokens"] = CARD_LEVEL_MAX_TOKENS
save.guestbirdcollection["CardSpecifications"][x] = tmp

Hey,
thank you very much for detailed reply, this helped me a lot.
I will try these changes later on and then let you know.

Regarding the apples, ok, I understand. It´s not the solution I expected but it surely makes sense for them to do it this way. Greedy like always. ;)
 

smay

Member
Newcomer
Joined
May 25, 2020
Messages
18
Trophies
0
XP
70
Country
United States
Hey,
thank you very much for detailed reply, this helped me a lot.
I will try these changes later on and then let you know.

Regarding the apples, ok, I understand. It´s not the solution I expected but it surely makes sense for them to do it this way. Greedy like always. ;)
if you look i have modded that post a few times....read it again. i find it easiest to just dump the save game as plain text, manually edit, then use my newly added --encrypt command you can now get everything possible all on your own. Ninja Roman and Samurai hats are named exactly like that
 
Last edited by smay,
General chit-chat
Help Users
    KenniesNewName @ KenniesNewName: I farted so loud it scared me