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
REF
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