I just decode one apk file, but issue is that I can't get the R.java file.
The R.java file is created automatically in the application, but when the apk file is decoded, it gives the hex value that is created in R.java instead of @string/abc or @color/white etc ....
When we create string or color or any other resources in the application, android platform assigns some hex value to that string or color in R.java, so when we decode the apk file, it gives that hex value, so how can we decide that particular hex value is for that string or color ?
You cannot directly extract r.java file, but the contents of r.java file can be extracted using 'aapt' tool. The following command lists all resources and their respective ID's as present in r.java file:
aapt d resources name_of_apk
The R class consists of nested classes, each of which consists consists entirely of compile-time constants. If the .apk file was obfuscated by ProGuard (which will be true of pretty much all published apps), all this will have been optimized away. There's no way to recover it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With