An open API service indexing awesome lists of open source software.

https://github.com/jmp/react-native-bundle-extractor

A utility for extracting the React Native JavaScript bundle from an Android APK or a package installed on a connected device.
https://github.com/jmp/react-native-bundle-extractor

android apk bundle extract react-native

Last synced: about 1 year ago
JSON representation

A utility for extracting the React Native JavaScript bundle from an Android APK or a package installed on a connected device.

Awesome Lists containing this project

README

          

# react-native-bundle-extractor

[![codecov](https://codecov.io/gh/jmp/react-native-bundle-extractor/branch/master/graph/badge.svg)](https://codecov.io/gh/jmp/react-native-bundle-extractor)

This is a small utility for extracting the [React Native][1] JavaScript bundle
file from an Android APK. It can fetch the bundle either from an APK file
on the disk, or from an Android package installed on a connected device
(including Android virtual devices), without requiring deep knowledge of
the Android Debug Bridge (ADB).

Since React Native JavaScript bundles are typically minified, the tool
also runs it through [jsbeautifier][2] to get a more human-readable output.

The purpose of this tool is to give you a better idea of what your release
code will look like. It may convince you to obfuscate your JavaScript bundles.

## Installation

pip install -r requirements.txt

[Python](https://python.org/) 3.8 or later is recommended.

## Usage

To extract the bundle from an APK:

python extract.py foo.apk

To extract the bundle from connected device using `adb`:

python extract.py com.package.someapp

To customize the bundle filename, you can pass an additional parameter:

python extract.py com.package.someapp --bundle index.android.bundle

## Run tests

pytest

[1]: https://reactnative.dev/
[2]: https://pypi.org/project/jsbeautifier/