2026년부터 트렁크 안정 개발 모델과 일치하고 생태계의 플랫폼 안정성을 보장하기 위해 2분기와 4분기에 AOSP에 소스 코드를 게시합니다. AOSP를 빌드하고 기여하려면 android-latest-release를 사용하세요. android-latest-release 매니페스트 브랜치는 항상 AOSP에 푸시된 최신 버전을 참조합니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
ModuleOemTargetPreparer
public
class
ModuleOemTargetPreparer
extends InstallApexModuleTargetPreparer
요약
공개 메서드 |
void
|
checkModuleAfterPush(ITestDevice device, pushedModules)
푸시 후 모듈 이름 및 버전 코드 확인
|
void
|
setUp(TestInformation testInfo)
테스트를 위한 타겟 설정을 실행하고 미리 로드된 모듈을 대체하도록 모듈을 푸시합니다.
|
보호된 메서드 |
void
|
checkPreloadModules(TestInformation testInfo, DeviceDescriptor deviceDescriptor)
미리 로드 모듈 정보 확인
|
String[]
|
getApkDirectory(ITestDevice device, String packageName)
시스템 디렉터리 아래의 APK 파일 경로 가져오기
|
String
|
getPackageVersioncode(ITestDevice device, String packageName, boolean isAPK)
지정된 패키지 이름의 모듈을 푸시한 후 패키지 버전을 확인합니다.
|
ModuleOemTargetPreparer.ModuleInfo
|
pushFile(File moduleFile, TestInformation testInfo)
apex의 경우 /system/apex/ 에, apk의 경우 /system/** 에 파일을 푸시합니다.
|
String
|
renameFile(ITestDevice device, File moduleFile, String packageName)
업데이트할 파일 이름을 /system 아래의 동일한 이름으로 바꿉니다.
|
void
|
setupDevice(TestInformation testInfo)
/system 아래에 파일을 푸시하기 전에 adb root 및 기기 재마운트
|
공개 생성자
ModuleOemTargetPreparer
public ModuleOemTargetPreparer ()
공개 메서드
checkModuleAfterPush
public void checkModuleAfterPush (ITestDevice device,
pushedModules)
푸시 후 모듈 이름 및 버전 코드 확인
| 매개변수 |
device |
ITestDevice |
pushedModules |
: 푸시된 모듈 목록 |
| 생성 값 |
TargetSetupError |
푸시된 모듈이 없으면 예외 발생 |
DeviceNotAvailableException |
사용 가능한 기기가 없는 경우 예외 발생
|
public void setUp (TestInformation testInfo)
테스트를 위한 타겟 설정을 실행하고 미리 로드된 모듈을 대체하도록 모듈을 푸시합니다.
| 생성 값 |
TargetSetupError |
환경 설정 중 심각한 오류가 발생한 경우 |
BuildError |
빌드 준비로 인해 오류가 발생한 경우 |
DeviceNotAvailableException |
기기가 응답하지 않음
|
보호된 메서드
protected void checkPreloadModules (TestInformation testInfo,
DeviceDescriptor deviceDescriptor)
미리 로드 모듈 정보 확인
| 매개변수 |
testInfo |
TestInformation: 테스트 정보 |
deviceDescriptor |
DeviceDescriptor |
| 생성 값 |
DeviceNotAvailableException |
기기를 사용할 수 없는 경우 예외가 발생함 |
TargetSetupError |
미리 로드된 모듈이 없으면 예외가 발생합니다.
|
getApkDirectory
protected String[] getApkDirectory (ITestDevice device,
String packageName)
시스템 디렉터리 아래의 APK 파일 경로 가져오기
| 매개변수 |
device |
ITestDevice |
packageName |
String: 모듈 패키지 이름 |
| 반환 값 |
String[] |
APK 이름 및 경로가 포함된 문자열 배열 |
| 생성 값 |
DeviceNotAvailableException |
기기를 사용할 수 없는 경우 |
TargetSetupError |
패키지 경로를 찾을 수 없는 경우
|
getPackageVersioncode
protected String getPackageVersioncode (ITestDevice device,
String packageName,
boolean isAPK)
지정된 패키지 이름의 모듈을 푸시한 후 패키지 버전을 확인합니다.
| 매개변수 |
packageName |
String: 푸시된 패키지 이름 |
isAPK |
boolean |
| 생성 값 |
DeviceNotAvailableException |
기기를 찾을 수 없는 경우 예외가 발생합니다. |
protected ModuleOemTargetPreparer.ModuleInfo pushFile (File moduleFile,
TestInformation testInfo)
apex의 경우 /system/apex/ 에, apk의 경우 /system/** 에 파일을 푸시합니다.
| 매개변수 |
moduleFile |
File: 모듈 파일 |
testInfo |
TestInformation: 호출의 TestInformation입니다. |
| 생성 값 |
TargetSetupError |
adb를 통해 파일을 푸시할 수 없는 경우 |
DeviceNotAvailableException |
기기를 사용할 수 없는 경우
|
renameFile
protected String renameFile (ITestDevice device,
File moduleFile,
String packageName)
업데이트할 파일 이름을 /system 아래의 동일한 이름으로 바꿉니다.
| 매개변수 |
device |
ITestDevice: 테스트 기기 |
moduleFile |
File: 설치할 모듈 파일 |
packageName |
String: /system/* 아래의 이름 |
| 반환 값 |
String |
이름을 바꾼 후의 새 파일 이름 |
| 생성 값 |
TargetSetupError |
파일 이름을 변경할 수 없는 경우
|
DeviceNotAvailableException |
|
protected void setupDevice (TestInformation testInfo)
/system 아래에 파일을 푸시하기 전에 adb root 및 기기 재마운트
| 생성 값 |
TargetSetupError |
기기를 다시 마운트할 수 없는 경우
|
DeviceNotAvailableException |
|
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[]]