DEV Community

Hiram
Hiram

Posted on

Reverse Engineering a platform

Hey folks, today's post is about a reverse engineering work I had to do for a platform and what I found by doing it 💪

A while ago I acquired a web platform with an android client for a very entertaining project. The backend was written with Symfony 2.X and the client was a native android app written in Java.

Long short story, the backend was a complete headache. I had to deal with different configurations for the server given it was aimed for PHP 7. A lot of deprecations had happened since then so you can picture it. The first setup was good enough, but I ran out of lucky for the 2nd 🤯, this led me to create my 100% (almost there) compatible backend.

Version 1
I started by consuming all API endpoints to figure out what responses look like. I blue-printed the web admin views to replicate the same functionality, and after a thorough debugging to the database I was able to create the same relations with some tweaks for a better integration. This work took me like two weeks but I ended up with an easier and well-known backend.

The android app didn't require too many changes. I basically changed the interfaces, some texts translations and added some validations. Version 1 was a pretty straight forward work.

Update to version 2:
The mess came with the update, because I changed things and it was necessary to understand what should happen next in order to place it into the app. It costs me two rounds, and a hell of debugging. This is basically how you learn to reverse engineering, things must follow a flow and you need to chunk it into small pieces so they can fit. Discover the rules and validations might be the hardest part, try and failure over and over.

Bob's sculpture
Graphic explanation, thanks bob

Finally I could achieve the expected behavior and things continue working smoothly. It has been a good experience. Now that I have forked the project every new change is easier to me. I could go deeper with advanced android topics as well. This is a practice I completely recommend to everyone in their spare time. Keep coding and keep failing ✌

 

This post was originally published on https://eichgi.hashnode.dev/reverse-engineering-a-platform

Top comments (0)