Decompile React Native Index.android.bundle
Solution 1:
For Macbook
brew install apktool
after install apktool
, unzip apk file by run this command on terminal like this:
apktool d /pathOfApkFile.apk
After that you will get index.android.bundle
file at pathOfApkFile/assets/index.android.bundle
than you can use react-native-decompiler for decompile index.android.bundle
file
Decompile index.android.bundle
File
you can decompile index.android.bundle
by run this command
npx react-native-decompiler -i ./index.android.bundle -o ./output
after that, you will get JS decompiled file in ./output
directory
JS Code Decompile
React Native is already doing uglify js code.
and react-native-obfuscating-transformer is also make complex uglifying code
It is something like MD5 and SHA256 encryption and there is no the tool available right know when make machine learning and bruteforce to give us estimated code
If you want to varify react-native-obfuscating-transformer is implemented or not then you can edit index.android.bundle and save code then implement react-native-obfuscating-transformer and edit and compare both file
you can make more uglify code by adding flag in build.gradle called bundleInRelease: true
and add Hermes which turns js bundle to bytecode for efficiency
Note: There is no way to decompile index.android.bundle
because this file contains uglify code which has many reverses possible of one line
Java Code Decompile
you can use DEX2JAR to convert apk to java code and you can view that code from JD-GUI
you can see this VIDEO
Solution 2:
See https://android.jlelse.eu/getting-inside-apk-files-21dbd01529d4 :
If your app is written on React Native, using the same apktool you can find index.android.bundle file inside assets folder of decompiled APK folder. To open it using IntelliJ IDEA, right click on the file, Associate with File Type… and choose JavaScript. And it is usual minified .js file.
In other words, opening the .bundle file in an IDE such as Intellij will yield a minified .js file, which can then be formatted and compared with your source code. I hope this helps!
Solution 3:
There is a tool called APK Easy Tool
download it from here, install it, and open it.
Select apk by choosing browse option and click on Extract apk, when it is extrcted click on decompiled apk directory, and open directory. you would see something like this
navigate inside Extracted APKs directory you would get the bundle.
Post a Comment for "Decompile React Native Index.android.bundle"