Android Llama2 demo app fails to install on S23/S24 with Android 14
🐛 Describe the bug
We have an Android CI job to run llama2 demo app on actual S22 devices with stories model on OSS CI at https://github.com/pytorch/executorch/blob/main/.github/workflows/android.yml#L149. However, the job fails to install the app on newer S23/S24 with Android 14. So, the testing is limited only to S22 for now. Attempting to add those newer devices would fail the job, for example https://github.com/pytorch/executorch/actions/runs/10220354591/job/28281804591.
Looking at the logcat output:
- S23 https://gha-artifacts.s3.amazonaws.com/device_farm/10220354591/1/arn_aws_devicefarm_us-west-2_308535385114_artifact_02a2cf0f-6d9b-45ee-ba1a-a086587469e6_c83e8f5a-ebcb-4de7-a952-ae1a6c29421e_00003_00000_00000_00000_Logcat.logcat
- S24 https://gha-artifacts.s3.amazonaws.com/device_farm/10220354591/1/arn_aws_devicefarm_us-west-2_308535385114_artifact_02a2cf0f-6d9b-45ee-ba1a-a086587469e6_c83e8f5a-ebcb-4de7-a952-ae1a6c29421e_00001_00000_00000_00000_Logcat.logcat
The error seems to be this line, which indicates an issue with how the app is built:
D PackageInstallerSession: Marking session 1288101458 as failed: INSTALL_FAILED_DEPRECATED_SDK_VERSION: App package must target at least SDK version 23, but found 0
cc @kirklandsign @guangy10
Versions
Latest trunk version
Because of this issue, I need to split the Android pool into 2 for now https://github.com/pytorch/executorch/wiki/How-to-create-a-custom-device-pool-on-AWS-Device-Farm#existing-device-pools. One with only S22 that we can readily use in CI, the other includes also S23/S24 that we can use once the app is ready.
@kirklandsign During your test, you could use the latter pool for testing, its ARN is arn:aws:devicefarm:us-west-2:308535385114:devicepool:02a2cf0f-6d9b-45ee-ba1a-a086587469e6/98f8788c-2e25-4a3c-8bb2-0d1e8897c0db
@kirklandsign During your test, you could use the latter pool for testing, its ARN is arn:aws:devicefarm:us-west-2:308535385114:devicepool:02a2cf0f-6d9b-45ee-ba1a-a086587469e6/98f8788c-2e25-4a3c-8bb2-0d1e8897c0db
Thank you for your suggestion @huydhn !
I feel like it's not related to adb install failure. However, I can't determine what's wrong from logs.
^ We have the proper SDK level set up in the apk
09-14 05:02:07.908 2404 2796 I PackageManager: Integrity check passed for file:///data/app/vmdl1439995569.tmp
09-14 05:02:07.909 2404 2797 I PackageManager: START INSTALL PACKAGE: observer{105561742}
09-14 05:02:07.909 2404 2797 I PackageManager: stagedDir{/data/app/vmdl1439995569.tmp}
09-14 05:02:07.909 2404 2797 I PackageManager: pkg{com.trellis}
09-14 05:02:07.909 2404 2797 I PackageManager: versionCode{1}
09-14 05:02:07.909 2404 2797 I PackageManager: Request from{null}
09-14 05:02:07.911 13269 20406 I GOS:GameIntentService: onHandleIntent. GameIntentService. type: 15, pkgName: null
09-14 05:02:07.912 13269 20406 W GOS:RequestHeader: tryToAddMcc(), can't find mcc
09-14 05:02:07.912 13269 20406 W GOS:RequestHeader: tryToAddMnc(), can't find mnc
09-14 05:02:07.913 2404 2796 W PackageManager: App com.trellis targets deprecated sdk version
09-14 05:02:07.913 2404 2796 W PackageManager: App package must target at least SDK version 23, but found 0
09-14 05:02:07.915 2404 2796 I PackageManager: result of install: -29{105561742}
09-14 05:02:07.915 2404 2796 D PackageInstallerSession: Marking session 1439995569 as failed: INSTALL_FAILED_DEPRECATED_SDK_VERSION: App package must target at least SDK version 23, but found 0
Seems that the failure is from another app (com.trellis) ?