Search code examples
androidreverse-engineeringandroid-resources

All components id changed to random number


I lost my project folder so I decode the APK using ApkTool and java2dex. now all my java classes that contain so many components has changed its id to a random number.

something like this:

this.time = (EditText)findviewById(2131296533); 

it should be “time” instead of the number. and it’s affected to about a hundred of them.

I’ve tried using another reverse engineering APK on the website but the result is the same.

I also noticed some codes also changed. I hope you guys could help me out. this is my final year project!! thank you!!!


Solution

  • This is because R.id.* are constants generated by your IDE, which are discarded at compile time. It is possible to get your names from Id's

    in res/values, you can find the id using name in public.xml (or something similar, e.g. publics.xml or name.xml). That's it.

    src https://reverseengineering.stackexchange.com/questions/12733/mapping-android-resource-ids-to-resource-string