• Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    Java
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tool for deobfuscating memory dump files

Badoo HPROF Tools

Badoo HPROF Tools are a collection of libraries and tools with the goal of making memory dumps more than just a tool for analyzing OutOfMemoryErrors.

Modules

  • hprof-viewer: Java application for visualizing and analyzing HPROF files.
  • Android example: contains an sample application showing how to use the cruncher library in an Android app
  • bmd-lib: Library for reading and writing BMD files
  • cruncher: Library (and Java application) for converting HPROF files to BMD format
  • decruncher: Library (and Java application) for converting BMD files to HPROF format
  • deobfuscator: Java application for deobfuscating ProGuard/DexGuard obfuscated HPROF files
  • hprof-lib: Library for reading and writing HPROF files
  • hprof-validator: Simple Java application that reads in a HPROF files and checks that it contains valid data

JavaDoc describing the APIs provided by the modules can be generated using the following gradle task:

./gradlew javaDoc

The generated documentation will be located under /build/docs.

hprof-viewer

Hprof-viewer is a Java application for visualizing and analyzing HPROF files. It contains features that are specifically targeting certain data included in HPROF files created on Android devices (such as recreating View hierarchies, activity Intent parameters, loocation data and more)

Building

HprofCruncher is built by executing the following command from the command line, with the root of the git as your current directory.

./gradlew hprof-viewer:jarWithDependencies

If the build is successful you will find the output jar file in the following location:

./hprof-viewer/build/libs/hprof-viewer-all-1.0.jar

Usage

After building the application jar-file you can execute it with the following command:

java -jar ./hprof-viewer/build/libs/hprof-viewer-all-1.0.jar \

HPROF Deobfuscator

Hprof-deobfuscator is a tool for deobfuscating HPROF memory dump files that are created from builds obfuscated with either ProGuard or DexGuard.

Before and after
Before and after running hprof-deobfuscator

Building

The application can be built by executing the following Gradle command in the root of the git:

./gradlew deobfuscator:jarWithDependencies

This will create a jar file containing the application and its external dependencies in the following location:

./deobfuscator/build/libs/deobfuscator-all-1.0.jar

Usage

After building the application you can execute it with the following command:

java -jar ./deobfuscator/build/libs/deobfuscator-all-1.0.jar \ \ \

HprofCruncher

HprofCruncher is a tool that converts HPROF memory dump files to the much more compact BMD file format. A size reduction of up to 97% can be achieved, however some data is lost in the process (including primitive fields and primitive arrays).

A description of the BMD file format can be found [here](BMD file format.md).

Building

HprofCruncher is built by executing the following command from the command line, with the root of the git as your current directory.

./gradlew cruncher:jarWithDependencies

If the build is successful you will find the output jar file in the following location:

./cruncher/build/libs/cruncher-all-1.0.jar

Usage

After building the application jar-file you can execute it with the following command:

java -jar ./cruncher/build/libs/cruncher-all-1.0.jar \ \

HprofDecruncher

HprofDecruncher is a tool that converts BMD files (created by HprofCruncher) back to HPROF memory dump files. Since some data is discarded when the BMD file is created not all HPROF data is recovered. However, if you have access the the.jaror.apkfile of the application from which the memory dump was taken you can recover some additional data (strings used for class and field names).

Building

HprofDecruncher is built by executing the following command from the command line, with the root of the git as your current directory.

./gradlew decruncher:jarWithDependencies

If the build is successful you will find the output jar file in the following location:

./decruncher/build/libs/decruncher-all-1.0.jar

Usage

After building the application jar-file you can execute it with the following command:

java -jar ./decruncher/build/libs/decruncher-all-1.0.jar \ \ [string source 1] ... [string source n]

Where the string source input files can be either.jar,.dexor.apkfiles.

Android Examples

The Android Examples module contains a sample app that makes use the cruncher library to collect and convert HPROF files to BMD format, on the device.

Building

The app can be built as a regular Android app in Android Studio but before doing so you need to make sure that the library dependencies are published to your local Maven repo. This is done by executing the following command while position in the root of the git:

./gradlw publishToMavenLocal

Credits

Hprof-obfuscator, HprofCruncher and HprofDecruncher are brought to you by Badoo Trading Limited and are released under the MIT License.

Created by Erik Andre

##Blog Read more on our tech blog or explore our other open source projects

More Repositories

1

Chatto

A lightweight framework to build chat applications, made in Swift
Swift
4,476
star
2

android-weak-handler

Memory safer implementation of android.os.Handler
Java
1,544
star
3

MVICore

MVI framework with events, time-travel, and more
Kotlin
1,253
star
4

Reaktive

Kotlin multi-platform implementation of Reactive Extensions
Kotlin
1,172
star
5

MVIKotlin

Extendable MVI framework for Kotlin Multiplatform with powerful debugging tools (logging and time travel), inspired by Badoo MVICore library
Kotlin
824
star
6

Decompose

Kotlin Multiplatform lifecycle-aware business logic components (aka BLoCs) with routing functionality and pluggable UI (Jetpack Compose, SwiftUI, JS React, etc.), inspired by Badoos RIBs fork of the Uber RIBs framework
Kotlin
817
star
7

Chateau

Chateau is a framework for adding (or improving) chat functionality in any Android app
Java
666
star
8

soft-mocks

PHP mocks engine that allows to redefine functions and user methods on-the-fly (provides similar functionality to runkit and uopz extensions)
PHP
310
star
9

liveprof

A performance monitoring system for running on live sites
PHP
232
star
10

phpcf

PHP Code Formatter
PHP
183
star
11

lsd

Live Streaming Daemon
Go
169
star
12

RIBs

Badoo's take on RIBs
Kotlin
162
star
13

BMASpinningLabel

BMASpinningLabel is an UI component which provides easy way for displaying and animating text inside it
Objective-C
151
star
14

pinba2

Pinba2: new implementation of https://github.com/tony2001/pinba_engine
C++
131
star
15

liveprof-ui

An aggregator and web interface for Live Profiler
PHP
126
star
16

ios-collection-batch-updates

Safely perform batch updates in UITableView and UICollectionView
Objective-C
123
star
17

BMAGridPageControl

Objective-C
100
star
18

BMASliders

Configurable simple and range sliders
Objective-C
93
star
19

codeisok

Git code browsing and code review tool
PHP
85
star
20

KmpMvi

Sample of MVI in Kotlin Multiplatform
Kotlin
70
star
21

MockJS

JavaScript
67
star
22

jira-client

Badoo JIRA API Client with code generator
PHP
66
star
23

balancer

Load balancer that was presented at HighLoad++ 2015 Conference in Moscow
PHP
44
star
24

ios-device-server

A server to manage remote iOS simulators and devices for parallel testing
Kotlin
42
star
25

thunder

Our cloud system
Go
42
star
26

funcmap

PHP extension that logs all called userspace functions/methods
C
39
star
27

FreehandDrawing-iOS

A tutorial to build a freehand drawing feature on iOS.
Swift
38
star
28

StarBar

Java
35
star
29

libpssh

library implementing asynchronous SSH connections
C
28
star
30

THEPageControl

Swift
21
star
31

parallel_cucumber

Ruby
21
star
32

BMACollectionViewLayouts

A set of UICollectionView layouts
Objective-C
20
star
33

HyperLabel

Swift
16
star
34

uiautomatorviewer

Rebuild of UiAutomatorViewer app from the sources to make it compatible with modern JDK versions
Java
15
star
35

Gallery

Swift
15
star
36

techblog

HTML
15
star
37

ReceptionApp

Application for guests to sign in and sign off while in the office
Objective-C
15
star
38

ssmtp

extremely simple MTA to get mail off the system to a mail hub
C
13
star
39

pssh_extension

PHP extension-wrapper for libpssh
C
13
star
40

rtl-css

JavaScript
12
star
41

habr

Materials for habrahabr articles
PHP
11
star
42

xhprof_console

A console tool for grabbing profiles from XHProf database and collecting aggregates from them
PHP
11
star
43

libssh2

libssh2 clone with additional patches applied
11
star
44

styleguide

Badoo styleguide used to develop UI components for the Web and React Native
JavaScript
10
star
45

kexasol

Exasol database driver implemented in Kotlin (JVM). It is based on native WebSocket API, supports parallel CSV streaming and compression.
Kotlin
10
star
46

MobileAutomationSampleProject

A sample project to demonstrate best practices for a mobile automation using Cucumber framework
Ruby
8
star
47

intellij-idea-live-profiler

A PhpStorm plugin for Live Profiler.
Kotlin
7
star
48

exasol-data-lineage

Exasol data lineage scripts
Python
6
star
49

TooltipsQueue

Kotlin
6
star
50

phpunit-testlistener-teamcity

Reporting Test in TeamCity using Service Messages
PHP
5
star
51

tarantool-dissector

Wireshark's dissector for the Tarantool's protocol
Lua
5
star
52

dust2jsx

Convert Dust.js templates to JSX
JavaScript
3
star
53

coverage-service

Create code coverage report from window.__coverage__ object
JavaScript
3
star
54

uap-php-lite

PHP implementation of ua-parser without runtime dependencies
PHP
2
star
55

idea-printf-checker-plugin-example

Kotlin
2
star
56

file-streamer

Streams given file data into any buffered writer. Uses fsnotify system for new data detection in files.
Go
2
star
57

hadoop-xargs

Util to run heterogenous applications on Hadoop synchronously
Java
2
star
58

DeviceAgent.iOS.Inspector

Web inspector of UI elements for iOS DeviceAgent
JavaScript
1
star
59

badoo.github.com

PEAR Channel
1
star
60

centrifugo-bench

Benchmark tools for centrifugo
Go
1
star
61

app-tree-utils

Kotlin
1
star
62

meow

C++
1
star