Skip to main content

Posts

Better Memory Dumps (v2.0) @ Droidcon Greece

I'm very excited to announce that I'll be speaking at Droidcon Greece in Thessaloniki (September 10-12th). The talk will build upon the one I did at Droidcon Berlin. It's also my first time in Greece so it should be an awesome trip! http://droidcon.gr/session/erik-andre/

More KVM boards

I'm hoping to write a follow up on my previous post about building  Building a USB KVM using ATTINY85 and FSUSB30 . Until then, here is an update on another part of my KVM project: a board for switching 4K DisplayPort signals as well one for USB 2.0. These are the first four layer boards I have designed, so I'm quite excited to assemble them and see if they really work as intended. Manufacturing was done by SeeedStudios instead of my usual choice (Dirty PCBs) but it looks like they came out really well. Routing the signal pairs on the DisplayPort board was definitely the biggest challenge I have encountered so far in PCB design. The specification is very strict when it comes to requirements like trace length difference (inter and intra pair), especially if you want to create a design that is compatible with newer, high resolution, DisplayPort signals.

Better Memory Dumps @ Droidcon Berlin 2015

My Droidcon Berlin 2015 talk about how to make memory dumps a useful tool for debugging Android apps is now online on YouTube. More information can be found in the related post below as well as on the Badoo github page .

Building a USB KVM using ATTINY85 and FSUSB30 (Part 1)

Before I get started, let me first say that I'm a software guy and anything I write about electronics and hardware should be taken with a grain of salt. The only formal education I have that's related to electronics is a couple of introduction courses to analog and digital electronics back at university (which was some time ago). With that out of the way, let me share a bit about one of my latest projects: Building a USB KVM from the ground up. The inspiration for this project came from one of my colleagues at Badoo, who was looking for a KVM that could handle 4K displayport switching (more on this later). Since I was just starting out learning (or rather re-learning) electronics I thought that this would be a fun challenge. Normally a KVM would handle switching three different signals, Keyboard, Video and Mouse (hence the name) but due to my lack of experience I decided to keep things as simple as possible and stick to only handling the USB signal required to hook up a k...

Better Memory Dumps on Android

First published on the Badoo Techblog This is a follow-up on the previous article about Deobfuscating HPROF memory dumps. Reading that article isn’t a requirement, some knowledge of the HPROF file format is useful. While implementing the previously mentioned HPROF deobfuscator I became familiar enough with the HPROF file format to realize that there are several aspects of it that could be optimized for usage on mobile devices. The HPROF format has been around since at least the late 1990s (earliest mention I could find was a bug report from 1998) and since then it has not changed much. Even when Google adopted it as the standard memory dump format for Android they only made some minor additions (requiring the use of hprof-conv to convert to standard HPROF format). In this article I will make the case for moving to a better (in my opinion) file format and show the benefits and new opportunities that such a move would allow. TL:DR Show me the code! The full source code for the...

Deobfuscating HPROF memory dumps

First posted on the Badoo tech blog According to Crittercism  1 , the second most common crash reported in Android apps is java.lang.OutOfMemoryError, so it stands to reason that analyzing these crashes should be one of the top priorities for any Android developer. If you are analyzing memory dumps from a debug build or if you are not using obfuscation this process is fairly straightforward. However, if your heap dump is coming from an app built using obfuscation (Proguard or Dexguard) you are in for quite a challenge (or at least you were, until now). In the image below you can see a typical obfuscated instance dump in Eclipse Memory Analyzer (MAT), where most of the field names have been replaced with indecipherable one-character names. Figure 1: Before deobfuscation Can we do anything about this then? Well, if you have the mapping files you could look up each symbol to figure out the name of the field and its value, but it would be an extremely time-consumi...

Converting screen coordinates to 3D coordinates on Android for OpenGL ES 2.0

I've been struggling to get this to work for quite a while now and finally succeeded yesterday after going through a number of suggested ways of doing it.  The method below (screenToWorld) works for the case where you want to pick a point on a plane that is parallel with the x & y axis and has a z value of zero. The input values are as follows: viewMatrix - The view matrix, a float matrix of 16 elements. projMatrix - The projection matrix, a float matrix of 16 elements. screenX - The x-coordinate on the screen. The value must be between 0 (left edge) and 1 (right edge) screenY - The y-coordinate on the screen. The value must be between 0 (bottom edge) and 1 (top edge). Please note that this is inverted compared to Androids normal coordinate system. The output is a point (x & y) on the plane with z equal to zero. How it works The point on the screen is not enough to calculate an exact point in 3D space (we don't have a z-value!) so what we do is...