display" />
开发者

editing stock android contact apk

I am trying to edit the contact and开发者_开发知识库 dialer to have the option to display the nickname field instead of the first or last name. Currently in the contacts app, if you goto "menu>display options>view contact name as" the only options available are to select first name or last name. I have decomplied the apk and searched through all of its resources (maybe not well enough) and have not been able to find where this option is located. I know that this is a feature that personally and MANY others have longed for and requested. Shouldnt be hard to impliment this, but I just cant find where to add/modify code.

Any ideas?


Modding apks is basically hunting hex IDs:

Search in the strings.xml for the string or string array containing the text for "First Name first" and "Last Name first". Find the name for that string or array and search into public.xml for those IDs. Use these numbers to search into the smali files where is an array using those hex IDs.

  1. Add a new entry into the array string
  2. compile and decompile again to create new IDs taking into account your new string.
  3. Modify the smali file you found using the same ID accordingly.

Tip: if the id starts with a 0, then use only the last seven digits for searching the smalis. apktool strips those zeroes.

Hint: look for display_options_view_given_name_first

Browsing the open source code may help quite a bit :)

https://android.googlesource.com/platform/packages/apps/Contacts

Think of a smali file as a translated java code. To begin learning modding smali files, see my answers here:

  • What's the best way to learn Smali (and how/when to use Dalvik VM opcodes)?

and here:

  • Decompile .smali files on an APK
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜