2

I am trying to learn how decompiling an android apk using apktool works. When I use apktool to extract a simple apk, all of the resources are extracted correctly. When I check the activity onCreate, I expect to see findViewById(myview) but I get this:

findViewById(2356778)

I do not know where this number comes from, and I can not figure out this number refers to which XML layout file.

René Vogt
  • 43,056
  • 14
  • 77
  • 99
sara smith
  • 21
  • 2
  • The number is actually resource file id so in reverse engg it will showing like you as numbers. – Ajay Pandya Mar 07 '16 at 06:07
  • Do you know about the generated R class and how it's used to index Android resources? – Doug Stevenson Mar 07 '16 at 06:09
  • 1
    That is because each `view` is assigned an `id` that is of type `int`. So the number that you see is the `int` value of an `id` of some `view`. This mapping is stored in the generated `R.java` file. Search for the `int` to understand the view `id` – camelCaseCoder Mar 07 '16 at 06:10

1 Answers1

0

If you extracted with the Apktool means, Your corresponding layout name for findViewById(0x7f030028) will be present in /res/values/public.xml

In public.xml you can see like this,

<public type="layout" name="your_layout_name" id="0x7f030028" />
Mujammil Ahamed
  • 1,454
  • 4
  • 24
  • 50