본문 바로가기

개발관련/android

.aab to .apk 로 (aab파일 apk파일로) 변환하기

1. https://github.com/google/bundletool/releases

 

Releases · google/bundletool

Bundletool is a command-line tool to manipulate Android App Bundles - google/bundletool

github.com

2. .aab 파일이 있는 경로로 이동 > bundletool-all-1.15.0.jar 파일 붙여넣기

3. terminal 에서 하단 스크립트 실행

- 디버그키로 사인했을시

java -jar "bundletool-all-1.15.0.jar" build-apks --bundle="your.aab(변환할 .aab파일)" --output="universal.apks(.apk파일을 저장할 경로와 파일명)" --mode=universal

- 릴리즈키로 사인했을시

java -jar "bundletool-all-1.15.0.jar" build-apks --bundle="your.aab(변환할 .aab파일)" --output="universal.apks(.apks파일을 저장할 경로와 파일명)" --mode=universal --ks=keystore.keystore(사인한키스토어) --ks-pass=pass:키스토어비밀번호 --ks-key-alias=alias(사인한alias) --key-pass=pass:키비밀번호

4. --output에서 지정해준 경로에 .apks파일이 생성되는데 확장자를 .zip으로 변경 후 압축을 풀어주면 apk파일이 있습니다. 

 

 

참고 :

https://stackoverflow.com/questions/53040047/generate-apk-file-from-aab-file-android-app-bundle