v1.3.2 (Feb 19, 2019)
Jun 27, 2018
Mar 15, 2019
linjiang (whataa)
linjiang (whataa)
Source code
APK file


EN | 中文

an android library for debugging what we care about directly in app.


Pandora is a tool box that allows you to inspect and modify what includes networks, databases, UIs, etc. directly in your application. It is suitable for rapid position of various problems in the development and testing stages.


  • Inspect the detailed log of each network request, such as headers, response, etc.

  • View the internal storage system of own app;

  • View all databases, and support ADD, DELETE, UPDATE, QUERY operations;

  • View and edit all Shared Preference;

  • Preview the current view Hierarchy, and can view/modify the properties of widgets;

  • Measure the distance between the views and detect whether the alignment is correct

  • You can select any view on the Activity to move the position, get the size of itself, display the relative relationship;

  • More features look forward to you exploring;

Some of the effects are as follows:

The display pictures are: network, database, UI, file


  1. Add the JitPack repository to your root build file:
allprojects {
    repositories {
        maven { url '' }
  1. Add the dependency to your app build.gradle (please use the latest version):
dependencies {
    debugImplementation 'com.github.whataa:pandora:v${RELEASE}'
    releaseImplementation 'com.github.whataa:pandora-no-op:v${RELEASE}'

the latest version name, Please check the RELEASE for specific updates.

library name release version


Now, without adding any code, you can start using it directly in the app by shaking the device.

Pandora will display the function panel in the form of a floating window, so it needs the "floating window" permission, please open it manually.

By default, Pandora is opened with a "shake", if this feature conflicts with your application, you can solve it by the following two ways and then implement your own trigger method invoking Pandora.get().open() to open the function panel:

  1. Turn it off in the settings of the panel;

  2. Or directly call the following method in the application's onCreate: (the corresponding switch of the panel will be invalid)


If your project uses OKHttp as the underlying network library, you can add the following interceptor to enable the function of the network debugging module:

Note: Please use Pandora as the last interceptor to prevent request-headers and request-params from getting;

new OkHttpClient.Builder()

Extended features

Inspect the View property

Pandora supports viewing and partially modifying the properties of View, ViewGroup, and common TextView and ImageView by default. If you want to inspect more view attributes, you can expand them in the following ways:

  1. implement tech.linjiang.pandora.inspector.attribute.IParser interface and specify the type of View that you are interested in. Here is an example of an already implemented ImageView:
public class ImageViewParser implements IParser<ImageView> {

    public List<Attribute> getAttrs(ImageView view) {
        List<Attribute> attributes = new ArrayList<>();
        // Add the property of interest and return
        Attribute scaleTypeAttribute = new Attribute("scaleType", scaleTypeToStr(view.getScaleType()), Attribute.Edit.SCALE_TYPE);
        return attributes;
  1. Add new Parser to Pandora:
Pandora.get().getAttrFactory().addParser(new ImageViewParser());

After this, every time you click on the ImageView, the property list will automatically enumerate the values of the properties we are interested in.。

Inspect Shared Preference

Pandora reads by default the XML file in the default SP path in the application(data/data/<package-name>/shared_prefs/),If there exist other SP files that are not in the default path, they can be extended in the following ways:

  1. implement tech.linjiang.pandora.preference.protocol.IProvider interface,and return the corresponding file list:

(Specific details can refer to the default implementation in the librarySharedPrefProvider)

  1. Add new Provider to Pandora:
Pandora.get().getSharedPref().addProvider(new XXProvider());


  • Minimum supported Android SDK version is 14

  • Network debugging module: only supports the network library with OKHttp 3.x as the underlying network library;

  • Database debugging module: Only SQLite-based databases are supported, and viewing encrypted databases is temporarily not supported;

  • others;


Pandora was developed on the shoulders of giants. Thanks to the following open source projects or person:

  • Logo and Icon are produced by the designer Zularizal.

  • Inspired by Flipboard's open source iOS platform debugging tool FLEX

  • Project database module ideas and part of the source code from Facebook's open source project stetho

  • The idea of selecting views in the UI module of the project and part of the source code from eleme's open source project UETool

  • The request API in the Demo module comes from jgilfelt's open source project chuck