# [Release] AB2E - Angry Birds 2 Editor



## Visual Studio (Oct 2, 2017)

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.


----------



## SpiffyJUNIOR (Oct 2, 2017)

Huh,nice work! What does it edit?


----------



## Visual Studio (Oct 2, 2017)

SpiffyJUNIOR said:


> Huh,nice work! What does it edit?


Anything in the save.


----------



## SpiffyJUNIOR (Oct 2, 2017)

Visual Studio said:


> Anything in the save.


Nice,should post this on another modding forum btw.


----------



## Visual Studio (Oct 2, 2017)

SpiffyJUNIOR said:


> Nice,should post this on another modding forum btw.


Like?


----------



## SpiffyJUNIOR (Oct 2, 2017)

Visual Studio said:


> Like?


Maybe androidrepublic?


----------



## Visual Studio (Oct 2, 2017)

SpiffyJUNIOR said:


> Maybe androidrepublic?


It keeps asking me to put a thumbnail on that site, it's really annoying.


----------



## JonySnow (May 20, 2020)

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 (May 25, 2020)

JonySnow said:


> 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


----------



## Visual Studio (May 25, 2020)

I'm pretty sure it doesn't work anymore but I haven't tested it in a while so I don't know.


----------



## smay (May 26, 2020)

Visual Studio said:


> 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 (May 27, 2020)

smay said:


> 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 (May 28, 2020)

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.


----------



## SGIAI22 (May 28, 2020)

smay said:


> 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 (May 28, 2020)

SGIAI22 said:


> 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 (May 29, 2020)

Visual Studio said:


> 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 (Jun 1, 2020)

SGIAI22 said:


> 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))


----------



## Hambrew (Jun 1, 2020)

daaang looks like angry birds 2 finally has a reason to exist


----------



## SGIAI22 (Jun 2, 2020)

smay said:


> 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
> 
> ...



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 (Jun 2, 2020)

SGIAI22 said:


> 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


----------



## SGIAI22 (Jun 2, 2020)

smay said:


> 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



Hey, yes, I´ve seen it.
Thank you a lot for this effort. It really is amazing what you have done, I will work with it and let you know how it went. Thanks again, much appreciated.

*So tried it now, but somehow I always get the "IndentationError: expected an indented block" when I try to encrypt the readable text file.
(
   save = AB2_SAVE(str(open("readable.txt", "rb").read(), "utf8").replace("\x00", ""))
    ^
IndentationError: expected an indented block
)
*
Here is the example from the script:
#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))

And this is the command I am using: /AB2E-master>python AB3ES.py -i readable.txt --encrypt

What am I missing or doing wrong? Any idea?


----------



## SGIAI22 (Jun 2, 2020)

Was able to fix the first issue, but now I am getting this one here:

*AB2E-master>python AB4ES.py -i readable.txt --encrypt
Traceback (most recent call last):
  File "AB4ES.py", line 334, in <module>
    save = AB2_SAVE(decrypt_save_file(args.in_file, index_path=args.index_file))
  File "AB4ES.py", line 247, in decrypt_save_file
    dec_save_game = decrypt_save(open(in_file, "rb").read(), index_path)
  File "AB4ES.py", line 221, in decrypt_save
    dec_data = str(unpad(aes.decrypt(data), AES.block_size), "utf8").replace("\x00", "")
  File "E:\Anwendungen\Software\Python\lib\site-packages\Cryptodome\Util\Padding.py", line 86, in unpad
    raise ValueError("Input data is not padded")
ValueError: Input data is not padded
*
What do I have to change in the file or command? Any hints? Would be great, thanks.


----------



## smay (Jun 2, 2020)

SGIAI22 said:


> Hey, yes, I´ve seen it.
> Thank you a lot for this effort. It really is amazing what you have done, I will work with it and let you know how it went. Thanks again, much appreciated.
> 
> *So tried it now, but somehow I always get the "IndentationError: expected an indented block" when I try to encrypt the readable text file.
> ...



the hack developer used a funny character for his indents.  open the file in a Hex Editor.  Using the FindAndReplace feature, look for hex value 09 and replace all with 20.   Double check by scrolling down to a place in the file first to see if his indents are 09.  Normally when you press the spacebar it types a character with a value of 20 in hexadecimal, thats 32 in decimal

it looks like player star rank is calculated on the fly by adding all the stars from the Level data and the Arena Stars....so you can just make ur arena stars a big number, then ur player seems legit


----------



## yeetuscompeteus (Jun 2, 2020)

I can't find xor_key.bin

Pls help


----------



## smay (Jun 2, 2020)

yeetuscompeteus said:


> If u can't find xor_key.bin
> http://s000.tinyupload.com/?file_id=05752784743821421515
> http://s000.tinyupload.com/?file_id=48291856065710980813


Thanks


----------



## yeetuscompeteus (Jun 2, 2020)

THANKS!


----------



## yeetuscompeteus (Jun 3, 2020)

Is this solveable
Traceback (most recent call last):   File "AB2E.py", line 340, in <module>     save = AB2_SAVE(decrypt_save_file(args.in_file, index_path=args.index_file))   File "AB2E.py", line 253, in decrypt_save_file     dec_save_game = decrypt_save(open(in_file, "rb").read(), index_path)   File "AB2E.py", line 226, in decrypt_save     dec_data = str(unpad(aes.decrypt(data), AES.block_size), "utf8").replace("\x00", "")   File "/usr/local/lib/python3.6/dist-packages/Cryptodome/Cipher/_mode_cbc.py", line 246, in decrypt     raise ValueError("Data must be padded to %d byte boundary in CBC mode" % self.block_size) ValueError: Data must be padded to 16 byte boundary in CBC mode


----------



## smay (Jun 3, 2020)

yeetuscompeteus said:


> Is this solveable
> Traceback (most recent call last):   File "AB2E.py", line 340, in <module>     save = AB2_SAVE(decrypt_save_file(args.in_file, index_path=args.index_file))   File "AB2E.py", line 253, in decrypt_save_file     dec_save_game = decrypt_save(open(in_file, "rb").read(), index_path)   File "AB2E.py", line 226, in decrypt_save     dec_data = str(unpad(aes.decrypt(data), AES.block_size), "utf8").replace("\x00", "")   File "/usr/local/lib/python3.6/dist-packages/Cryptodome/Cipher/_mode_cbc.py", line 246, in decrypt     raise ValueError("Data must be padded to %d byte boundary in CBC mode" % self.block_size) ValueError: Data must be padded to 16 byte boundary in CBC mode



randomly the game seems to save the game with the wrong index file....play a few levels, close the game, try again.  look at the time stamp for when each file was created.  i think the  game stays open in the background, so it doesn't create the new index file...make sure the game is closed, and reboot ur phone


----------



## SGIAI22 (Jun 3, 2020)

smay said:


> try running the original posters script before you attempt my modified script.
> other than that follow the instructions, very exactly
> u need to copy the B4F59D3E9582F13D98B85102B4003E377A9434837B71846F44C05637D2613FA1     AND the index file from your saved game folder to the folder with ur python script
> also the xor_key.bin  goes in to the same folder
> ...



Hey,
thank you very much for your effort, the file now works perfectly. Great work.


----------



## smay (Jun 3, 2020)

{\"HasGoToFunction\":true,\"QuestType\":\"PlayClanEvent\",\"Goal\":1,\"QuestRewardType\":\"BlackPearl\",\"Progress\":0,\"RewardType\":\"Gems\",\"Reward\":20},{\"HasGoToFunction\":true,\"QuestType\":\"PlayKingPigPanic\",\"Goal\":1,\"QuestRewardType\":\"HardCurrency\",\"Progress\":1,\"RewardType\":\"Gems\",\"Reward\":20},


----------



## SGIAI22 (Jun 4, 2020)

smay said:


> {\"HasGoToFunction\":true,\"QuestType\":\"PlayClanEvent\",\"Goal\":1,\"QuestRewardType\":\"BlackPearl\",\"Progress\":0,\"RewardType\":\"Gems\",\"Reward\":20},{\"HasGoToFunction\":true,\"QuestType\":\"PlayKingPigPanic\",\"Goal\":1,\"QuestRewardType\":\"HardCurrency\",\"Progress\":1,\"RewardType\":\"Gems\",\"Reward\":20},
> 
> I was thinking maybe you could change   HardCurrency  to Apples.....do not change Gems to Apples...it glitcched my game hard, i had to wipe my app data/cache and restore from a cloud backup.   if i feel brave i may try it later.   basically i think we can trick a gift somewhere in to being apples....i remember not long ago rovio sent a Letter in the Mailbox giving 50 Apples, we might need to wait for something like tthat to happen again so we can copy....or even find the Hatchling Fever Event data for double apples
> 
> ...



Hmm, nice thought, I will also give it a try and see if it works. 
I like the idea with the gift message, question is, how long until this happens again? 
Maybe there will also be another way, we just have to figure it out I guess.


----------



## smay (Jun 4, 2020)

SGIAI22 said:


> Hmm, nice thought, I will also give it a try and see if it works.
> I like the idea with the gift message, question is, how long until this happens again?
> Maybe there will also be another way, we just have to figure it out I guess.


Dont do it....there is a time of day you can collect unlimited apples, i think its after MEBC closes before the daily quests.  now about the level data, this will get you to level 517.   I want to be a lot further, it seems the levels all have a unique ID, so someone has to actually play, then upload data for me to copy :-)


----------



## SGIAI22 (Jun 4, 2020)

smay said:


> Dont do it....there is a time of day you can collect unlimited apples, i think its after MEBC closes before the daily quests.



So this would be in the middle of the night then? And how would it work? Because right now, I am not seeing it.


----------



## smay (Jun 4, 2020)

SGIAI22 said:


> Hmm, nice thought, I will also give it a try and see if it works.
> I like the idea with the gift message, question is, how long until this happens again?
> Maybe there will also be another way, we just have to figure it out I guess.


----------



## Visual Studio (Jun 5, 2020)

smay said:


> if anyone has someone in their friends list who is on a higher level, it looks like file   B530BFB9C225DF26B7D4DFE3E5808F16FB5ACFF9DC3481BA677EC62C85E3BF62
> is already a PLAIN TEXT -***- NON-ENCRYPTED dump of someone from your friends list....i still want the RawData from someone at a higher level than me


B530BFB9C225DF26B7D4DFE3E5808F16FB5ACFF9DC3481BA677EC62C85E3BF62 is AbbaFriendsCache

EDIT: I went through the trouble of updating the repository to work with the latest release of the game (2.41.1)


----------



## SGIAI22 (Jun 5, 2020)

Hrmpf, got banned. 
Any way to get unbanned? Using ios device.


----------



## smay (Jun 5, 2020)

SGIAI22 said:


> Hrmpf, got banned.
> Any way to get unbanned? Using ios device.


lol aside from trying to skip playing the first 1000 levels by copying in the RawData section.....my other goal on this game is to get banned, and unban myself.

a lot of people got banned today...i just looked in the pvp arena and about half of the players are gone, strangely not everyone got banned, i can tell who is a cheater because they got low level guest birds lol, guess they should of tried to make account look less obvious, like i spent a lot of time making my birds dif levels and such

im willing to bet you only need the playerdatahash from a new account...i would waste the time trying to preserve the facebookid of the old account....so much to learn about banned accounts


----------



## Visual Studio (Jun 6, 2020)

smay said:


> lol aside from trying to skip playing the first 1000 levels by copying in the RawData section.....my other goal on this game is to get banned, and unban myself.
> 
> so now big question is how did you get banned?  did u give urself millions of black pearls and buy legendary hats?? cuz that would make a post in ur clan each time and risk getting reported
> 
> ...


8DA4F614BD109FD64248704E48E720719DBA53061539CB4C46B6ECBA475C6E5C = Session_ID
You should be able to generate a new session ID and theoretically it will unban you. I haven't looked into their API code yet, I might in the future.


----------



## smay (Jun 6, 2020)

Visual Studio said:


> 8DA4F614BD109FD64248704E48E720719DBA53061539CB4C46B6ECBA475C6E5C = Session_ID
> You should be able to generate a new session ID and theoretically it will unban you. I haven't looked into their API code yet, I might in the future.



i was having some trouble copying in the level raw data....managed to friend crazy high level players, then copied score data from the guy who completed most levels using the abba friend cache.   so either i messed up, or theres more locations for what level a player is on?  any ideas?  here is the raw data file

so what do u use to decompile?  and isnt the code obfuscated?


----------



## Visual Studio (Jun 6, 2020)

smay said:


> i was having some trouble copying in the level raw data....managed to friend crazy high level players, then copied score data from the guy who completed most levels using the abba friend cache.   so either i messed up, or theres more locations for what level a player is on?  any ideas?  here is the raw data file
> 
> so what do u use to decompile?  and isnt the code obfuscated?


They use IL2CPP, I have to use IDA Pro/Ghidra, dnSpy, and 010 Editor.


----------



## SGIAI22 (Jun 6, 2020)

Visual Studio said:


> 8DA4F614BD109FD64248704E48E720719DBA53061539CB4C46B6ECBA475C6E5C = Session_ID
> You should be able to generate a new session ID and theoretically it will unban you. I haven't looked into their API code yet, I might in the future.


But how should this work? What do I have to do to generate a new session id? Please elaborate.


----------



## Visual Studio (Jun 7, 2020)

SGIAI22 said:


> But how should this work? What do I have to do to generate a new session id? Please elaborate.


The latest commit I made has the ability to encrypt/decrypt any file.


----------



## smay (Jun 7, 2020)

SGIAI22 said:


> But how should this work? What do I have to do to generate a new session id? Please elaborate.


im kinda waiting to get banned myself before i test anything, i may get bored and try some stuff later.   at what i assume to be ur skill level.......

save ur game in the cloud
make a full copy of your entire files folder, not just the saved game.  now you can experiment.

decrypt ALL the files in ur saved game folder

go to your app settings and clear all data/cache.  open the game, this will start a new account

ok cool...u now got a new sessionID, playerID, and everything else

figure out how to copy in your banned accounts data, without copying whatever mystery value that is flagging the account as banned......i can't test anything for you because i dont have a banned account

so when you go to the screen where u change ur players name, u see a number that identifies you
in the decrypted  save game files, you will find PlayerDataHash FacebookID, and another player id in the TOF file

good luck
**************************************************************
update i just got banned....took them long enough. new update v2.42 claims to have an advanced anti-cheating system.
ok so now to unban myself......


----------



## Visual Studio (Jun 8, 2020)

smay said:


> im kinda waiting to get banned myself before i test anything, i may get bored and try some stuff later.   at what i assume to be ur skill level.......
> 
> make a full copy of your entire files folder, not just the saved game.  now you can experiment.
> 
> ...


Your changes trigger me.


----------



## smay (Jun 8, 2020)

Visual Studio said:


> Your changes trigger me.


i'll keep them to myself....post was edited....i made a lot of changes on mine, u inspired me to learn some python

p.s.  thanks for updates, below u will notice i didnt hijack any of your code :-) i used much cruder string techniques...everyone else will notice my indents are char(20h) instead of char(9) so anyone can easily edit it...we will classify it as GNU GPL

You can edit what level you are on, with this script, I also made it edit ArenaStars, now you can fully adjust your players star level, and get any avatar pic u want.     BACKUP YOUR STUFF FIRST!!!  Put ur phone in airplane mode to test changes and make sure it worked.    I recommend saving ur game to the cloud before ever doing anything, then you can always wipe ur app data and restore thanx to rovio

You will want to rename this file to split.py
Decrypt your saved game file B4F59D3E9582F13D98B85102B4003E377A9434837B71846F44C05637D2613FA1 and name the decrypted file B4F59D3E9582F13D98B85102B4003E377A9434837B71846F44C05637D2613FA1.txt
run python3 split.py
answer the on screen questions
you should now have a file called output.txt
delete B4F59D3E9582F13D98B85102B4003E377A9434837B71846F44C05637D2613FA1
encrypt file output.txt,  make sure to rename it to B4F59D3E9582F13D98B85102B4003E377A9434837B71846F44C05637D2613FA1

KEEP IN MIND, if you started a new account......this just beats the levels, so it doesn't give you the bird keys and such.   I will have to add some more code later to unlock the birds for new accounts.  Maybe start off by jumping to lvl 150, then play the levels before the bird keys or something.....then unlock a couple thousand levels or so


below is areas for code needed to edit for new accounts.

"PD_FeatureUnlockData":"{\"SeenTutorials\":[\"TowerOfFortune\",\"DailyChallenge\",\"Arena\",\"MightyEaglesBootcamp\",\"Clans\"],\"QueuedTutorials\":[],\"PreviouslyUnlockedFeatures\":[\"TowerOfFortune\",\"DailyChallenge\",\"Arena\",\"MightyEaglesBootcamp\",\"Clans\"]}",

\"UnlockedSpells\":[\"MagicDuck\",\"Blizzard\",\"Chili\",\"PigInflater\",\"MightyEagleCaller\"],

"PD_Wallet":"{\"Gems\":99999999,\"SecondaryCurrency\":9999999,\"FreeBirdTokens\":0,\"TOFExpressTickets\":999,\"TOFEntryTickets\":999}","PD_CardSpecCollection":"{\"CardSpecifications\":[{\"CardTemplateName\":\"RedBird\",\"Level\":163,\"Tokens\":6863900,\"DeckNames\":[\"DefaultDeck\"]},{\"CardTemplateName\":\"YellowBird\",\"Level\":163,\"Tokens\":6863900,\"DeckNames\":[\"DefaultDeck\"]},{\"CardTemplateName\":\"BlackBird\",\"Level\":163,\"Tokens\":6863900,\"DeckNames\":[\"DefaultDeck\"]},{\"CardTemplateName\":\"BlueBird\",\"Level\":163,\"Tokens\":6863900,\"DeckNames\":[\"DefaultDeck\"]},{\"CardTemplateName\":\"WhiteBird\",\"Level\":163,\"Tokens\":6863900,\"DeckNames\":[\"DefaultDeck\"]},{\"CardTemplateName\":\"TerenceBird\",\"Level\":163,\"Tokens\":6863900,\"DeckNames\":[\"DefaultDeck\"]},{\"CardTemplateName\":\"PurpleBird\",\"Level\":163,\"Tokens\":6863900,\"DeckNames\":[\"DefaultDeck\"]}]}","PD_SpellCollection":"{\"CardSpecifications\":[]}","PD_GuestBirdCollection":"{\"CardSpecifications\":[{\"CardTemplateName\":\"OrangeBird\",\"Level\":163,\"Tokens\":6863900,\"DeckNames\":[\"DefaultDeck\"]},{\"CardTemplateName\":\"LeonardBird\",\"Level\":163,\"Tokens\":6863900,\"DeckNames\":[\"DefaultDeck\"]},{\"CardTemplateName\":\"PinkBird\",\"Level\":163,\"Tokens\":6863900,\"DeckNames\":[\"DefaultDeck\"]},{\"CardTemplateName\":\"GreenBird\",\"Level\":163,\"Tokens\":6863900,\"DeckNames\":[\"DefaultDeck\"]}]}","PD_NewSpellCollection":"{\"Spells\":[{\"Name\":\"MagicDuck\",\"Count\":100015,\"LastChangeUtc\":\"1970-01-01 00:00:00Z\"},{\"Name\":\"Blizzard\",\"Count\":99987,\"LastChangeUtc\":\"1970-01-01 00:00:00Z"},{\"Name\":\"Chili\",\"Count\":100017,\"LastChangeUtc\":\"1970-01-01 00:00:00Z\"},{\"Name\":\"PigInflater\",\"Count\":100023,\"LastChangeUtc\":\"1970-01-01 00:00:00Z\"},{\"Name\":\"MightyEagleCaller\",\"Count\":100001,\"LastChangeUtc\":\"1970-01-01 00:00:00Z\"}]}",


and below, is the MEBC Chuck avatar pic
\"PurchasedShopItems\":[\"5004\"]
and for all 3 avatar pics
\"PurchasedShopItems\":[\"5004\",\"5005\",\"5006\"]
however this entry only makes the item show as purchased...it does not place the avatar pic in ur list....


----------



## urzy (Jun 15, 2020)

hello, I am currently trying the AB2E that you created, but I found a problem, when I run the program the message appears:

XOR_key = unhexlify (args.key)
binascii.Error: Odd-length string

can you help me please about this, I'm in trouble with the resources in angry bird 2
thank you for the previous program


----------



## smay (Jun 15, 2020)

urzy said:


> hello, I am currently trying the AB2E that you created, but I found a problem, when I run the program the message appears:
> 
> XOR_key = unhexlify (args.key)
> binascii.Error: Odd-length string
> ...


ur xor_key.bin should be exactly 256 bytes.....how big is ur file?  im certain if you read all of the posts on this forum u can solve ur problem

as a side note....if you open the program in a text editor you will see

    if args.key is not None:
        XOR_KEY = unhexlify(args.key)
    elif isfile(KEY_FILE):
        XOR_KEY = read_file(KEY_FILE)
    else:
        raise Exception("The XOR key xor_key.bin or -k/--key command line parameter was not specified")
    assert len(XOR_KEY) == 0x100 and sha1(XOR_KEY).hexdigest() == KEY_HASH, "The specified XOR key is invalid!"


so to translate
if you supply a 512 byte hex key argument the program converts it to the needed binary form
if no key argument was typed, check if the file xor_key.bin exists, load that key from the file
otherwise terminate the program, display error to user
verify the contents of the loaded xor key, ensure user didn't supply the xor key for a different game

it looks like you typed a key argument that wasn't a 512 byte hex string, im guessing you must of typed the file name instead.  i personally replaced all of those lines of code so i wouldn't have to type stuff.   you could always

you can always go to web page https://tomeko.net/online_tools/file_to_hex.php?lang=en   and UNCHECK both check boxes, so you get a plain hex string.  and upload ur xor_key.bin file to the web page.  so then it would be
python3 AB2E.py -k stuff-copied-from-web-page-smay-told-me-about-WITH-OUT-the-check-boxes-selected
with ur other arguments too of course....anyways that hex string can always be put in to the code with " before and after it, on an unhexlify("hex-string") method....it looks like u would want to make XOR_KEY be assigned to that value

**************************************************************
update i just got banned....took them long enough. new update claims to have an advanced anti-cheating system.
ok so now to unban myself......
first thing you should do is make a full copy of all the files from com.rovio.baba
i then wiped all my game data, and started a new account
at this point in time you can copy in the save game folder and reload...u are now mostly back.....
had to wait 3 days for MEBC to come back, u do loose ur MEBC stuff

a more complicated/complete "unbanning" might be possible.  the sharedprefs folder has some xml files containing more game settings.  install game on a chromebook with linux + dev mode enabled.  android-data/data/data/com.rovio.baba/shared_prefs/com.rovio.baba.v2.playerprefs.xml u can find all kinds of sessionIDs and such.  depends entirely on how the servers database is designed


----------



## Herba (Jul 13, 2020)

I cant use this  i´m struggling with pycryptodomex install ...

Can anyone send me a save game with lv of stars 199.

I don´t need anything else...


The rest i can do with gameguardian

Thanks

naoqueroreceberoteuemail gmail com


----------



## smay (Jul 15, 2020)

Herba said:


> I cant use this  i´m struggling with pycryptodomex install ...
> 
> Can anyone send me a save game with lv of stars 199.
> 
> ...


read all posts on this forum....all noob questions were answered on first 2 pages.   also remove the letter x, u r trying to install packages for the older version of this editor.   have u tried google?   ur star lvl is determined by how many pvp-arena wins u have and main game levels beat, it cant be modified directly....split.py edits both of those for you!!!!!   you want 100000 - 200000 arena stars for ur lvl desire
https://pypi.org/project/pycryptodome/

lets leave forum page 3 for more advanced questions, like how to get unbanned.   i took a AB2 break to go hack Merge Dragons, learning to use my Chromebooks full potential.  Now my AB2 accounts are banned again.  New version of game has some kind of improved cheat detection.

OK so now thanx to Chromebook I got full access to the Android file system, plus 2 debian's to run things like python.  I should make a u-tube video teaching people how to use these things.  Thanx Google

.......

So when the game is first loading, it displays the PlayerID from the sharedprefs xml file, need root to see it.
After the game loads, it gets ur PlayerID from ????
I changed the FacebookID's in in the B4 and 91C files...and modified the PlayerID in the 91C file....

anyways after first getting unbanned, i basically didnt play.   it took 3 days to get MEBC back, couple days later account banned.  the thing i notice most is that version 2.42 lists the improved cheat detection as part of the update.   that implies client side detection.  found an android decompiler online...will have to get super bored to figure out how the code works

it seems to me that some answers are needed before cheating on AB2 again....have done a basic unbanning without facebook or cloud.   game seems to run just fine.  backup banned account save folder, wipe app data, make new account, close game, replace save game folder. will wait a week to see if i get banned again.  as MEBC is gone for 3 days, i was only able to access Arena...


----------



## Herba (Jul 16, 2020)

Finnaly, i have instaled pycryptodome/

I had some difficulties, because I was not hitting the code.
I had to install it inside the folde PY - Scripts.

is now supposed to open AB2E.py?
When I run in code, nothing happens.

I'm having difficulties, because I don't understand programming. and I don't understand some of the things that are said here.


----------



## smay (Jul 16, 2020)

Herba said:


> Finnaly, i have instaled pycryptodome/
> 
> I had some difficulties, because I was not hitting the code.
> I had to install it inside the folde PY - Scripts.
> ...


for your first lesson........the devil is in the details.  no one can help you without screen shots, and very detailed descriptions of what you did, and what happened.   usually people just copy and paste from their screen, everything they typed, and what was displayed.   we also might want to know what operating system ur using, im guessing u have Windows?  also thanx to me, there is now a few dif versions of this script...as a courtesy to the original developer im keeping my changes to myself, so i dont really remember how his copy of the program works anymore....but basically u gotta type all the parameters when u run the program, do not put xor_key.bin or index parameters in the command line arguments......details are life


----------



## Herba (Jul 17, 2020)

Yes, you are right.
But sometimes it is difficult to explain what is not known.

So far I have installed Python and then i have instaled pycryptodome
I have XOR Key

and i have the folder like in the picture:

What i have to do next?
i really don´t know...

Thanks and i apologize for bee so noob....


----------



## smay (Jul 19, 2020)

Herba said:


> Yes, you are right.
> But sometimes it is difficult to explain what is not known.
> 
> So far I have installed Python and then i have instaled pycryptodome
> ...


learn to use command.com....been a while since i used a Windows OS.  I think if u r Windows10 or newer u can press the Windows Button + X to get a secret menu to pop up, and then look for anything call Command Prompt.   you can also go to the Run box and type  cmd    or maybe its command.com   it should take you to an old fashioned DOS screen where u type commands in.

now u need to learn to use commands like    "cd"    and      "dir"      and if your python3 is installed in to the PATH, you should hopefully also be able to just type     "python3",   if that works exit out of any python prompt that may of popped up.  start off by typing
cd \                <---i think the \ is for windows, on linux you would type /
dir                 <---the displays files in ur current folder, on linux it would be      ls instead of dir
then looking at only the names of folders, you need to navigate to the folder where ur saved game is...probably
cd "Documents and Settings"               <--- once again my Windows is a little rusty....and keep using cd to change directory (directory is old name for folder) until u r in the folder with ur save game files
finally you would run
python3 AB2E.py decrypt  B4F59D3E9582F13D98B85102B4003E377A9434837B71846F44C05637D2613FA1

or....better yet....make a file named     ***      decrypt.bat    ***        and open it in NOTEPAD not Word...only use Notepad.exe, it can be found in the Windows folder
now type this exact stuff in the file using Notepad.exe

@Echo off
cls
python3 AB2E.py decrypt  B4F59D3E9582F13D98B85102B4003E377A9434837B71846F44C05637D2613FA1
pause

save the file....put ur new batch file in the same folder as ur saved game files....double click on ur batch file to run it.   you would then either get better at making batch files, or make another batch to encrypt ur stuff, calling        encrypt.bat       note that the .bat ending of the file name is critical!!!!!


i think a better batch file might be bellow....but i havent tested cuz i only use linux these days
so name this batch file something with a   .bat at the end of its name.   keep in mind im also using a dif game editor than u???  i only need    python3 ab2e.py decrypt     without anything else after it.....so i dont know for sure what command line arguments u need

@Echo OFF
cls
ECHO ...............................................
ECHO PRESS 1 OR  2 to select your task, or 3 to EXIT.
ECHO ...............................................
ECHO.
ECHO 1 - Decrypt
ECHO 2 - Encrypt
ECHO.
SET /P M=Type 1, 2, or 3 then press ENTER:
IF %M%==1 GOTO DECRYPT
IF %M%==2 GOTO ENCRYPT
IF %M%==3 GOTO END
ECRYPT                                            <---- website displays as happy face, it is  : D E C R Y P T
python3 AB2E.py decrypt
notepad.exe B4F59D3E9582F13D98B85102B4003E377A9434837B71846F44C05637D2613FA1.txt
GOTO END
:ENCRYPT
python3 AB2E.py encrypt
GOTO END
:END
pause


----------



## Brijeshkol (Aug 13, 2020)

I am not so much familier with codes so please can some one send me the file ...which I can replace with my save file ..please...it will be a great help

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

I am not very familiar with the codes...please can you give me the files which I can is replace with my save files...it will be great help..please


----------



## Visual Studio (Aug 14, 2020)

Brijeshkol said:


> I am not so much familier with codes so please can some one send me the file ...which I can replace with my save file ..please...it will be a great help
> 
> --------------------- MERGED ---------------------------
> 
> I am not very familiar with the codes...please can you give me the files which I can is replace with my save files...it will be great help..please


Nobody can do that, it's unique to your device.


----------



## Brijeshkol (Aug 14, 2020)

Is their any way to get mighty eagle bootcamp because after unbanning the account it disrepair


----------



## CyGy (Sep 16, 2020)

Following


----------



## nikitos (Oct 31, 2020)

кто русский?!


----------



## Emivita (Jan 1, 2021)

Hi all, unfortunately I'm totally ignored about editing and modding.
I just have a phone.
I'm here to ask you all an help.
It's about angry birds 2,yes, simply a game.
I've been banned after 5 years and is be never used any cheats.
When I've switched to another phone I've made the mistake to erase save file and paste again.
Rovio reply that ban cannot be lifted.
I've leaved my job in Turin to come back parents home cause they have a terrific brain damage both: Cancer and Alzheimer.
The game was the only thing that distracted me a little bit so now ,after 5 years,I've lost everything.
I'm just ask an help to unban or anything else to play again.
Wish you and your family best and safe New year.
Ty


----------



## Emivita (Jan 3, 2021)

I'm sorry,
I was a 1500 fp and I've been banned switched to another phone.
I've never used any cheats,maybe erase save when switched.
Ban permanently.
I'm not able with editor or modding.
I've saved data and all the folder.
Someone could help please? The game was the only thing that distracted my head from my parents brain damage: cancer and Alzheimer.
I'm really sorry,o don't know what can I do.
Version 2.48.1
Many thanks


----------



## rickmattar (Sep 14, 2021)

Hey man
Please, exemple new ab2e command?

Old ab2e.py -i b4hhhhgggg --key ggagsgddd --gems 555 -o sabe2k

New? 
Thx


----------

