Code Monkey home page Code Monkey logo

cosmetic's Introduction

Cosmetic

Android 换肤解决方案

用最少的代码改动量在已有的项目中加入换肤功能。

下载最新的apktool:http://code.google.com/p/android-apktool/wiki/Install

1.用apktool把apk反编译出资源文件(apktool d <apk路径>)
反编译文件在apktool所在目录

2.把新皮肤所需要替换的资源替换。

3.在assets文件中使用下面文本替换:
#文件编码格式为UTF-8
#皮肤包版本 数据类型int 根据实际目标版本修改,
#与反编译应用中的Manifest中versionCode保持一致
targetVersion=1

4.可在assets中增加皮肤包的icon,此项可选。

#第5步骤可以舍弃,验证id已无需public.xml
#5.\res\values下的public.xml复制到assets中,
#在打包成皮肤包后可用于与当前项目R.java验证id的匹配,
#使用提供的验证工具验证

6.建议把资源里的smali文件(代码文件)删除。

7.再用apktool重新打包成apk(apktool b <反编译资源路劲>)。

无需签名,新打包的apk根据要求修改名称和后缀就可以用来换肤使用了。

Tools

新增皮肤包效验工具,用于确定新皮肤包与主程序apk包中R文件所有id可以一一对应。

Cmd运行编译好的Cusmetictool.jar或双击使用Cusmetictool.bat脚本(Cusmetictool.jar与脚本同一目录)

此工具提供两种比对ids的方法,一个是R.java文件和皮肤包比对,一个是apk与皮肤包比对

可在控制台里使用Cusmetictool命令查看使用方法

cosmetic's People

Contributors

baofei avatar 11os avatar hyp11 avatar

Watchers

James Cloos avatar kaff avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.