The invention discloses a convenient method, a implanted in the Android code in APK reverse operation: processing the file APK into operation in reverse engineering; (2) two Edition: reverse engineering to generate all kinds of documents in CRUD operations, after all resource additions and deletions to conform to the relevant codes, the original format add code, code will be converted to SmalI format; (3) compile operation: reverse engineering is compiled into a new APK; (4) the file after reduction, will be packaged into a APK file according to the corresponding directory, with the use of SDK JarSigner to the APK packet signature; (5) re signature, APK interface you can use the new official. Through the method of the invention, the reverse engineering file is recompiled to the file format supported in APK, so as to get the new APK file, so as to complete the access process of the entire SDK, thus greatly reducing the workload of SDK access.
【技术实现步骤摘要】
一种在AndroidAPK中植入代码的便捷方法
本专利技术涉及代码集成领域,具体是一种在AndroidAPK中植入代码的便捷方法。
技术介绍
传统的Android平台SDK传统接入方法都是在APK生成前执行源代码接入。传统方法接入,一般来说需要做以下步骤:(1)SDK;(2)参考接入文档,在原代码工程中添加相关SDK;(3)SDK执行运行环境;(4)SDKAPI;(5)APK,完成接入。由于AndroidAPK本质上是一种ZIP格式的压缩包,一般情况下,压缩包内的文件无法做二次编辑,因此传统接入方法都是在APK生成前执行源代码接入。
技术实现思路
本专利技术的目的在于提供一种在AndroidAPK中植入代码的便捷方法,以解决上述
技术介绍
中提出的问题。为实现上述目的,本专利技术提供如下技术方案:一种在AndroidAPK中植入代码的便捷方法,步骤如下:(1)反向操作:将APK中文件处理成反向操作中的工程1)Assets目录解压后文件直接使用,无需处理;2)res和resources.arsc内容通过AndroidSDK自带的APPT工具解析成res目录中内容;3)Classes.dex通过dex2smali工具解析成smali文件夹中内容;4)AndroidManifest.xml文件通过Axml2xml格式解析工具解析成XML,并通过上述对应的解析后,反向工程进行二次编辑;(2)二次编辑:对步骤(1)中生成的反向工程中各类文件进行增删改的操作,各个资源增删改之后符合原格式的相关规范,添加代码,将代码转换为smali格式加入;(3)编译操作:将反向工程编译成新A ...
【技术保护点】
一种在Android APK中植入代码的便捷方法,其特征在于,步骤如下:(1)反向操作:将APK中文件处理成反向操作中的工程1)Assets目录解压后文件直接使用,无需处理;2)res和resources.arsc内容通过Android SDK自带的APPT工具解析成res目录中内容;3)Classes.dex通过dex2smali工具解析成smali文件夹中内容;4)AndroidManifest.xml文件通过Axml2xml格式解析工具解析成XML,并通过上述对应的解析后,反向工程进行二次编辑;(2)二次编辑:对步骤(1)中生成的反向工程中各类文件进行增删改的操作,各个资源增删改之后符合原格式的相关规范,添加代码,将代码转换为smali格式加入;(3)编译操作:将反向工程编译成新APK1)lAssets目录无需处理,放置在相对应的位置;2)lRes目录中的内容通过Android SDK自带的APPT工具解析成res目录中内容;3)lSmali文件夹通过dex2smali工具解析成dex文件中内容;4)lAndroidManifest.xml文件通过Axml2xml格式解析工具解析 ...
【技术特征摘要】
1.一种在AndroidAPK中植入代码的便捷方法,其特征在于,步骤如下:(1)反向操作:将APK中文件处理成反向操作中的工程1)Assets目录解压后文件直接使用,无需处理;2)res和resources.arsc内容通过AndroidSDK自带的APPT工具解析成res目录中内容;3)Classes.dex通过dex2smali工具解析成smali文件夹中内容;4)AndroidManifest.xml文件通过Axml2xml格式解析工具解析成XML,并通过上述对应的解析后,反向工程进行二次编辑;(2)二次编辑:对步骤(1)中生成的反向工程中各类文件进行增删改的操作,各个...
【专利技术属性】
技术研发人员:王修强,彭俊,
申请(专利权)人:深圳市慧动创想科技有限公司,
类型:发明
国别省市:广东,44
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。