Sam
Sam

Reputation: 31

aws devicefarm python upload apk - android_app_aapt_debug_badging_failed

I am uploading the APK using python code, when I check for status after create_upload and uploading the actual file then I keep getting FAILED with android_app_aapt_debug_badging_failed. Any Idea why ?

Upvotes: 0

Views: 250

Answers (2)

Noah Corona
Noah Corona

Reputation: 11

I was having this exact issue, and none of the suggestions were doing any good.

The fix was to assign the file to data instead of files.

def upload_app(path):
    url, arn = create_signed_upload('ANDROID_APP')
    headers = {'content-type': 'application/octet-stream'}
    with open(path, 'rb') as app:
        requests.put(url, data=app, headers=headers)
    success = wait_on_upload(arn)
    return success

Upvotes: 0

Hongda Zhao
Hongda Zhao

Reputation: 101

Sorry to hear that you are running into issues with the upload. For the error code you are facing, i am pasting the debugging steps below

Debugging Steps During the upload validation process, AWS Device Farm parses out information from the output of an "aapt debug badging " command.

Make sure that you can run this command on your Android application successfully. In the following example, the package's name is app-debug.apk.

Copy your application package to your working directory, and then run the command:

$ aapt debug badging app-debug.apk A valid Android application package should produce output like the following:

package: name='com.amazon.aws.adf.android.referenceapp' versionCode='1' versionName='1.0' platformBuildVersionName='5.1.1-1819727' sdkVersion:'9' application-label:'ReferenceApp' application: label='ReferenceApp' icon='res/mipmap-mdpi-v4/ic_launcher.png' application-debuggable launchable-activity: name='com.amazon.aws.adf.android.referenceapp.Activities.MainActivity' label='ReferenceApp' icon='' uses-feature: name='android.hardware.bluetooth' uses-implied-feature: name='android.hardware.bluetooth' reason='requested android.permission.BLUETOOTH permission, and targetSdkVersion > 4' main supports-screens: 'small' 'normal' 'large' 'xlarge' supports-any-density: 'true' locales: '--_--' densities: '160' '213' '240' '320' '480' '640'

Upvotes: 1

Related Questions