BundletoolUtil
public
class
BundletoolUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.BundletoolUtil |
Bundletool 명령줄을 사용하여 기기에 .apk를 설치하는 유틸리티 클래스입니다. Bundletool 문서 링크: https://developer.android.com/studio/command-line/bundletool bundletool.jar는 번들 해제된 모듈 브랜치에서 모듈 파일과 함께 다운로드됩니다.
요약
공개 생성자 | |
---|---|
BundletoolUtil(File bundletoolJar)
|
공개 메서드 | |
---|---|
File
|
extractSplitsFromApks(File apks, String deviceSpecPath, ITestDevice device, IBuildInfo buildInfo)
.apks에서 분할 APK/Apex를 추출합니다. |
String
|
generateDeviceSpecFile(ITestDevice device)
연결된 기기 구성의 JSON 파일을 생성합니다. |
void
|
installApks(File apks, ITestDevice device,
bundletool을 사용하여 APK .apks를 설치합니다. |
void
|
installApks(File apks, ITestDevice device)
bundletool을 사용하여 APK .apks를 설치합니다. |
void
|
installApksFromZip(File apksZip, ITestDevice device,
제공된 ZIP 파일에 포함된 APK를 설치합니다. |
보호된 메서드 | |
---|---|
String
|
getAdbPath()
|
File
|
getBundletoolFile()
|
IRunUtil
|
getRunUtil()
|
static
long
|
parseCmdTimeout(
|
공개 생성자
BundletoolUtil
public BundletoolUtil (File bundletoolJar)
매개변수 | |
---|---|
bundletoolJar |
File |
공개 메서드
extractSplitsFromApks
public File extractSplitsFromApks (File apks, String deviceSpecPath, ITestDevice device, IBuildInfo buildInfo)
.apks에서 분할 APK/Apex를 추출합니다. 분할 이름을 바꾸고 .apk가 저장된 디렉터리에 분할을 저장합니다. 분할이 저장된 새 디렉터리를 반환합니다.
매개변수 | |
---|---|
apks |
File : 추출해야 하는 APK |
deviceSpecPath |
String : bundletool에서 APK를 추출하는 데 사용하는 기기 사양 파일입니다. |
device |
ITestDevice : 연결된 기기 |
buildInfo |
IBuildInfo : 빌드 아티팩트 정보 |
반환 값 | |
---|---|
File |
추출된 APK/Apex가 있는 디렉터리인 ERROR(/File) |
generateDeviceSpecFile
public String generateDeviceSpecFile (ITestDevice device)
연결된 기기 구성의 JSON 파일을 생성합니다.
매개변수 | |
---|---|
device |
ITestDevice : 연결된 기기 |
반환 값 | |
---|---|
String |
기기 사양 파일의 경로를 나타내는 String |
installApks
public void installApks (File apks, ITestDevice device,extraArgs)
bundletool을 사용하여 APK .apks를 설치합니다.
매개변수 | |
---|---|
apks |
File : 설치해야 하는 APK |
device |
ITestDevice : 연결된 기기 |
extraArgs |
: bundletool 명령어의 경우 |
생성 값 | |
---|---|
TargetSetupError |
installApks
public void installApks (File apks, ITestDevice device)
bundletool을 사용하여 APK .apks를 설치합니다.
매개변수 | |
---|---|
apks |
File : 설치해야 하는 APK |
device |
ITestDevice : 연결된 기기 |
생성 값 | |
---|---|
TargetSetupError |
installApksFromZip
public void installApksFromZip (File apksZip, ITestDevice device,extraArgs)
제공된 ZIP 파일에 포함된 APK를 설치합니다.
매개변수 | |
---|---|
apksZip |
File : 설치할 zip 파일 |
device |
ITestDevice : 연결된 기기 |
extraArgs |
: bundletool install 명령어에 전달할 추가 인수입니다. |
생성 값 | |
---|---|
TargetSetupError |
보호된 메서드
getAdbPath
protected String getAdbPath ()
반환 값 | |
---|---|
String |
getBundletoolFile
protected File getBundletoolFile ()
반환 값 | |
---|---|
File |
parseCmdTimeout
protected static long parseCmdTimeout (args, long defaultValue)
매개변수 | |
---|---|
args |
|
defaultValue |
long |
반환 값 | |
---|---|
long |
생성 값 | |
---|---|
TargetSetupError |