Just (Give Me My) Dance (Profile)!

A review of a journey into debugging an app.

I’m currently in a smaller town than I’m used to. Due to not walking to/from stations nor walking across larger parts of a city, I find that I’m walking less. I’m also far away from my gaming consoles therefore I am slowly building up my library on Steam. This all adds up to something… throw in another Steam sale and I find myself purchasing Just Dance 2017.

Steam calls…

With a free weekend ahead of me, I looked forward to beginning it with some cardio. Then there it was in front of me: the controller-app’s page on Apple’s App Store displaying a 2.3 user rating. This screamed warnings in my head that I might not have the best experience.

As of late November 2020, the reviews aren’t looking so great on Apple’s App Store

Within half an hour, I had my fun with a few dances but was annoyed by a slight bug I came across. With a controller-app connected, a ‘Happy’ profile was always used during dances. You could have your own profile there but you’d need to sign into Ubisoft Connect on your phone. The app unfortunately wouldn’t allow you to. Even when you managed to replace ‘Happy’ with your own profile (bypassing the app), ‘Happy’ still persisted.

The game itself locking you out of Profile functionality whilst a phone is used as a controller

A quick search led to me finding a (nearly) four year old forum post in which eight different Ubi-Support/Community staff members had reassured the Happy dancing public that their developers are looking into it.

I shouldn’t have cared. I could still dance. But I like (software) bugs…

One of my proudest moments in a previous job was when I debugged a minified version of a framework’s code as part of our team’s product. I had the framework’s website open next to me (for translation) and concluded the root of a problem with our product. Remembering how much fun that was, this app’s bug intrigued me.

And so began my weekend occupying myself; intent on Sherlock-Holmesing why a ‘Happy’ profile appeared in place of my own; eager to tackle a four year old problem.

As the app was unresponsive at the pressing of my avatar, I initially wanted to check any REST calls which might be failing. This is my usual starting-point when websites fail me.

Having discovered Charles, I excitedly looked upon all the traffic my phone was generating. I had never done this before and I had never looked so fascinated by network traffic!

Some GET calls the app was making to retrieve the dance-track thumbnails

Ultimately, the only traffic I could see were the REST calls to retrieve the images… I had found a longer way to effectively take a screenshot from an app onto my laptop.

If the network traffic was not going to show me something, I then researched debugging the user interface (UI). A blog post here showed me what I wanted to achieve but — as a user of a released version and not a developer who has access to a development version — there were some pre-requisites that I could not fulfil.

My next debug-related searches led me to this thread here which informed me of the woes if I wanted to persevere and decompile the app on my iPhone. Fearful of the consequences of jailbreaking my phone, I remembered someone stated in the forum post that they experienced the app’s bug on an Android device.

After reading how Android apps are easier to decompile (whilst trying to find an iPhone app solution), I obtained the app’s APK and ultimately a decompiled version of the code! I even found where in the code would be a good place to set breakpoints and observe where/how an incorrect profile was sticking around.

I had last used Android Studio when I wanted to contribute to an open source mobile app project. Unfortunately, both I and the project maintainer agreed my laptop’s setup would not work with that project. It felt a bit ominous returning to Android Studio since then…

The low-point in the debugger’s journey…

My feelings were valid: I received a blue-screen-of-death after having tweaked my third Android Virtual Device (AVD) in trying to run the app on my laptop for debugging.

I knew early on in my weekend that I wanted to write about this: my epic saga in debugging a released app and fixing a bug! I almost felt deterred in writing this all up when I realised I wouldn’t be fixing the bug by the end of my weekend. Why have I written so much about it?

It was fun! It was like the feelings you get at a hackathon whether or not you built the next Instagram. I had the same level of enjoyment as I did when I debugged a framework’s minified version. As much as my conclusion isn’t about something I’ve achieved at the very end, it is about what I have learnt during the process.

My software engineering background consisted of a small amount of knowledge on mobile-app development before this bug. Even less about Android as I’ve always had an iPhone! Now I’m familiar with:

  • Android architectures

Are ARM apps slow on your AVDs? Try selecting Android 11!

  • Third-party tools to aid in debugging

Charles, APK-decompilers and more!

  • Extra files that come with installed Steam games

Ever delved into a Steam game’s files? I cautiously adjusted the Just Dance config so it would not maximise during debugging. I did this after having learnt someone did so with another game.

This weekend was very fun and challenging for me. As software engineers, we might be hard on ourselves when we miss a sprint goal or haven’t made that deadline in a way we would have liked: but give yourself credit; there’s something in what you’ve done along the way.

(And also if you are to get Just Dance, Rasputin will always be my recommended song.)

Thanks for reading!