Since the official NUS NextBus Android app requires Google Play services which my phone does not support. I wanted to develop a custom app for NUS NextBus. To do so, I need to be able to access the APIs used by NUS NextBus. A quick google search led to this reverse engineered API by SuibianP: However, I noticed that executing any of these requests would give a 401 Unauthorized error: It seems that SuibianP did not document how to make authorized requests here. Let's reveal how the NUS NextBus app does it by reverse-engineering the app ourselves. Since it is my first attemp to reverse-engineer an Android app, I did a quick search and found this wonderful article: Following that article, let's first get the package name of NUS NextBus by opening the app on my phone and runing the following command: > adb shell dumpsys activity recents | grep 'Recent #0' | cut -d= -f2 | sed 's| .*||' | cut -d '/' -f1 nus.ais.mobile.android.shuttlebus The next step is to get the apk path: > adb shell pm path nus.ais.mobile.android.shuttlebus package:/data/app/nus.ais.mobile.android.shuttlebus-gywHKqGywO_xoIevMtAYrA==/base.apk And then pull the apk to the computer: > adb pull /data/app/nus.ais.mobile.android.shuttlebus-gywHKqGywO_xoIevMtAYrA==/base.apk Let's decompile the apk with apktool: > apktool d base.apk We can now see a new folder under the current directory that holds the decompiled source. Let's view the source code using jadx: > jadx-gui base.apk After glancing through some of the code, I noticed that the Java source code does not seem to hold any logic. I also found that there are imports of the…