Remote debugging in android

Although I usually backup (with TitaniumBackup) my progress in the games I occasionally play in my rooted Nexus 4, lately I was quite lazy about it, so when the latest upgrade to Angry Birds StarWars crashed and I lost all the data it was almost two months of game progress. That was the whole Hoth system… I was not going to repeat the 40 levels, so I would have to fix it myself. Using adb I enter the /data/data/com.rovio.angrybirdsstarwars.ads.iap/files folder, where the file highscores.lua is stored. I remembered that in the first version of the game the file was just a plain text file with your scores in each level you have played, but it seems that Rovio does not like people improving scores so easily, so they changed it to make things more difficult.

I decided to debug the game in order to check what was exactly that file.  I installed the Android NDK and learn how to use the gdb remote debugger. Disassembling the binary showed that that they were using AES with a secret key. More apktool, ndk-gdb and lot of learning and I got it!

e83Tph0R3aZ2jGK6eS91uLvQpL33vzNi

some python coding, and I was again just after Hoth. It took me about 6 hours to learn enough to fix it, quite less than the two months it had taken me to finish the Hoth system.

I would never use this kind of hacking to skip a difficult level, but replaying a whole system … no way. At the end, lot of learning and satisfaction for being able to fix it.

3 thoughts on “Remote debugging in android

  1. Hi, you managed to obtain the AES decryption key for the Angry Birds Star Wars highscores.lua file. I have the same problem as yours, I lost my backups for AB Star Wars II game. I’ve tried for several days to follow Brut.all’s instructions and obtain the AES key for this game, but did not succeed, maybe it’s because my computer is Win8.1 and there are a lot of issues related to Android NDK and gdb. From what I’ve read only people with Linux managed to obtain the keys. Could you maybe try and get the key for this game, it’s probably much easier for you because you succeeded once. Thanks a lot, hope you can help me. All the best. Andrei

    • I usually work with OSX, but I’ve tried with Windows 7 NDK and is also possible to get the key, I do not know about W8.1. Anyway the key seems to be

      taT3vigDoNlqd44yiPbt21biCpVma6nb

      • Hi, thank you again for the key of ABSW2. I’m sorry to bother you, but by any chance do you know how to decrypt the save file for Angry Birds Go? It seemed like it was very easy for you to obtain the key before. ABGo does not have highscores.lua and settings.lua, but I have investigated, and reaches the conclusion that it now used the “save_guest.dat” (or “save_[reallylongcode].dat” for Rovio account) file to keep all the data: bought items, scores, levels. I think that they might be encrypting this file in the same way like the other games and we just need the key to unlock everything. Can you try to obtain the key? like only you know how. Thanks a lot for everything. All the best. Andrei

Leave a Reply to Andrei Cancel reply

Your email address will not be published. Required fields are marked *