Deploy-to-bitrise-io with NFC and HOST_APDU_SERVICE fails when added meta-data

Step deploy-to-bitrise-io doesn’t like when we add the meta-data for NFC aid:

        <meta-data
        android:name="android.nfc.cardemulation.host_apdu_service"
        android:resource="@xml/aid_list" />

The error:

Uploading apk file: /Users/vagrant/deploy/app-buildTest.apk
analyzing apk
Deploy failed, error: failed to get apk infos, output: package: name='[REDACTED].test' versionCode='35' versionName='5.1.3' platformBuildVersionName='5.1.3' compileSdkVersion='28' compileSdkVersionCodename='9'

sdkVersion:'23'

targetSdkVersion:'28'

application-icon-65534:'res/mipmap-anydpi-v26/ic_launcher.xml'
application: label='[REDACTED].test' icon='res/mipmap-anydpi-v26/ic_launcher.xml', error: signal: abort trap 

Here is my “aid_list.xml”:

<?xml version="1.0" encoding="utf-8"?>
<host-apdu-service xmlns:android="http://schemas.android.com/apk/res/android"
    android:description="@string/service_name"
    android:requireDeviceUnlock="false">
    <aid-group
        android:category="other"
        android:description="@string/card_title">
        <aid-filter android:name="A000000750" />
    </aid-group>
</host-apdu-service>

Let me know if you need more info. I can post my AndroidManifest.xml if required.

Temporary solution is to zip all files:

  - deploy-to-bitrise-io@1.6.1:
      inputs:
        - is_compress: true            

This works for now. Bitrise team is looking into it. I’ll post here the solution so we can help anyone with this kind of issues in future.

Thanks for adding this @leonardoanalista and thanks for pointing this out @viktorbenei :wink: Hopefully we’ll find the long-term solution soon as well.