2012-07-06 3 views
4

Android 앱을 배포 할 수있는 소프트웨어를 만들고 있지만 apk 파일 내에있는 AndroidManifest는 사용자 정의 이진 XML 형식입니다. 내가 알아 내고자하는 것은 내가 내 AndroidManifest.xml 파일을 APK에 추가 할 수있는 도구가 있는지 (추가 될 때 AXML로 변환) 또는 어디에서나 설명되는 형식이므로 내 자신의 계산기XML을 Android 이진 XML로 변환하는 방법

답변

7

aapt.exe package -f -m -J src -M AndroidManifest.xml -S res -A assets -0 "" -I android.jar -F MyApp.apk 
의 쉽게 응용 프로그램과 함께 작업 할 수 docs에 따르면

:

-f 
    force overwrite of existing files 

-m 
    make package directories under location specified by -J 

-J 
    specify where to output R.java resource constant definitions 

-M 
    specify full path to AndroidManifest.xml to include in zip 

-S 
    directory in which to find resources. Multiple directories will be scanned and the first match found (left to right) will take precedence 

-A 
    additional directory in which to find raw asset files 

-0 
    specifies an additional extension for which such files will not be stored compressed in the .apk. An empty string means to not compress any files at all. 

-I 
    add an existing package to base include set 

-F 
    specify the apk file to output 

이 매니페스트 일반 XML을 받아 바이너리 XML로 패키지를하고 APK에 삽입합니다.

리소스와 자산이 존재해야합니다 (매니페스트 파일 자체에서 참조하는 경우). 또한 다른 데이터를 apk 파일에 다시 추가해야합니다. 이상적은 아니지만 적어도 작동 함

1

체크 아웃 'apktool' http://ibotpeaches.github.io/Apktool/

그것은 거의 원래의 형태로 자원을 디코딩하고 일부 수정을 한 후이를 재 구축 할 수 있습니다; smali 코드를 단계별로 디버그 할 수 있습니다. 또한 그것은이 때문에 밖으로 안드로이드 패키징 도구를 사용하여 (aapt.exe)를 나타냈다 등 프로젝트와 같은 파일 구조 및 건물 APK 같은 몇 가지 반복적 인 작업의 자동화,

관련 문제