Unpack, modify, edit, package, and apply an APK application (3)

Source: Internet
Author: User
Tags unpack admob

Part 1: APK application introduction, unpacking and packaging, common software

Http://blog.csdn.net/kuangren_01/article/details/9318977

Part 2: processing, localization and signature of APK files in Samsung's closed-Source System

Http://blog.csdn.net/kuangren_01/article/details/9319027

Part 3: introduce various APK file packaging and unpacking applications

Http://blog.csdn.net/kuangren_01/article/details/9319049

In the first and second sections, we spent a lot of time introducing the structure of the APK file, the unpackaging, modification, editing, packaging, signing of the APK file, and the required tools. I am very tired. You will be very tired when reading. The content is large and long. In this section, we can easily end the third lecture.

Why is it necessary to unpack the APK file? Of course, make necessary modifications to the content. What should I modify? In the second lecture, we finished the APK. In fact, localization is just an application. Next, based on my experience and knowledge, I will introduce the various APK file unpackaging and packaging applications. In general, it is to modify and beautify. Further, we want to customize the Rom.

For the sake of completeness, we will briefly introduce the non-unpackage modification of the APK file. That is to say, without using the first part of the APK unpacking tool, what can we modify the APK file? Open an APK file with WinRAR and you will see a folder/RES. After entering, you will see a sub Folder/drawable or Multiple folders. If there are multiple subfolders, one of them is/drawable-hdpi. Open them one by one. These subfolders contain images and XML files. You can delete, replace, and add all images. If you replace the file with the same name, make sure that the file names are consistent. An example that everyone is familiar with is replacing/modifying the battery display icon. However, you cannot modify the XML. If you want to modify text and other non-image content, you can only decode it by unpackage.

Okay. Now let's go back to this topic to introduce the APK file unpackaging and packaging of various applications. The following tasks need to unpack and package the APK file. In fact, I have introduced it in my previous post. Here I will just repeat it for a brief introduction. Please read the reference materials and find detailed operation methods and tutorials by yourself.

1) Chinese APK Application

The second part is detailed. I will not describe it again.

2) modify the icon label

Each APK file has an "icon tag ". After installing the APK program on your mobile phone, the icon label text is displayed under the icon. The content of this icon label can be modified. Find strings. xml under \ res \ values and modify one line:
<String name = "app_name"> icon tag </string>
For example, <string name = "app_name"> mute startup </string>
Similarly, if the window plug-in is used, modify widget_name.

3) Remove the advertisement from the APK

Many APK applications carry advertisements. To remove the advertisement in the program, modify the content related to the advertisement in the main. xml file. Find the main. xml file in the/RES directory. Usually in the/layout directory, it is sometimes stored in other directories. Sometimes, the main. xml file does not exist, and the advertisement line is placed in other XML files. You can only search for files one by one. In either case, you can see a similar command as follows. This is the advertisement display.
<COM. adMob. android. ads. adview Android: Id = "@ ID/ad" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" admobsdk: backgroundcolor = "# ff000000" admobsdk: textcolor = "# ffffffff" admobsdk: KEYWORDS = "android
Application "/>
Change it:
<COM. adMob. android. ads. adview Android: Id = "@ ID/ad" Android: layout_width = "0.0dip" Android: layout_height = "0.0dip" admobsdk: backgroundcolor = "# ff000000" admobsdk: textcolor = "# ffffffff" admobsdk: KEYWORDS = "android
Application "/>
As you can see, the key is to change fill_parent to 0.0dip, and change wrap_content to 0.0dip. Keep the other content unchanged. In this way, the advertisement is not displayed. Of course, you will not be able to see the advertisement.

4) modify the display precision of the battery.

In the official i897 Rom, the default battery display accuracy is 5%. We want to increase the display precision to 1%. This feature is implemented by modifying the topic file framework-res.apk. Every change of 1% power in your Rom today shows the theme.

The modification procedure is as follows:
(1) Unpack framework-res.apk
(2) modify and add the battery status icon (which can be extracted from other ROM)
(3) modify the stat_sys_battery.xml file (displayed once every 1%)
(4) modify the stat_sys_battery_charge.xml file (corresponding to the new charging animation)
(5) Packaging
(6) extract stat_sys_battery.xml, stat_sys_battery_charge.xml, resources. ARSC, and a directory named drawable-mdpi.
(7) reassemble framework-res.apk

5) the status bar information notifies you to modify the text color

The color of the State column information notification text is controlled by the colors. xml file under Res \ values in the framework-res.apk file, so we only need to modify the colors. xml file. In addition, this file also controls the text color in the drop-down bar, which can be modified.
Open the colors. xml file in the text editor and find
<Color name = "hw_statusbar_time"> # ff000000 </color>
Modify this sentence to: <color name = "hw_statusbar_time"> # ffffffff </color>
The text color of the status bar information is changed from black to white.

6) Other Applications

There are also many applications related to beautifying and modifying the theme, such as modifying the display color of the status bar "time". There are many steps, so we will not introduce them here. If possible, try again later.

Finally, if you have any good experiences and good applications, please share with you.


Main reference:

Package and modify an application from an APK File
Http://bbs.gfan.com/android-1390609-1-1.html

Package and modify an APK File
Http://bbs.hiapk.com/thread-1274998-1-1.html

Personalize your Rom-modification and Decompilation
Http://bbs.zhangku.com/thread-4046-1-1.html

Modify and decompile-Customize your Rom
Http://bbs.l-i-d-r-o-i-d.com/t-55-1-1.html

Decompile, compile, and modify the APK to implement sd2flash and modify the smali file.
Http://blog.csdn.net/shichexixi/archive/2011/01/20/6

Dalvik Opcodes
Http://pallergabor.uw.hu/androidblog/dalvik_opcodes.html

Android apktool decompile apk xml and AD
Http://blog.csdn.net/DavidHsing/archive/2011/03/17/6256333.aspx

Android software localization tutorial (mandatory localization/apktool localization/streamlining/Ad removal)
Http://www.hiapk.com/bbs/thread-1111945-1-1.html

Another powerful tool for decompilation: apktool
Http://apps.hi.baidu.com/share/detail/18314837

Smali
Http://code.google.com/p/smali/

APK Development compiled by ECLIPSE source code, using the system signature mechanism
Http://blog.csdn.net/assassin4824/archive/2011/05/17/6427934.aspx

 

Address: http://bbs.gfan.com/android-1744646-1-1.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.