App build from fdroid server fails at androguard

This is regarding PSLab app update in Fdroid. We have recently created two flavors to support openstreet maps and Google maps. We use fdroid flavor with openstreet maps to publish in Fdroid. Once the flavors were added (in v2.0.17), Fdroid build failed for obvious reasons and I updated the metadata file. When I try to build it, it seems building successful, but fails eventually with the following error log.

build log for $ fdroid build -v -l io.pslab
DEBUG: Reading 'config.py'
DEBUG: Getting git vcs interface for https://github.com/fossasia/pslab-android
DEBUG: Directory: build/io.pslab
DEBUG: > git rev-parse --show-toplevel
DEBUG: Directory: build/io.pslab
DEBUG: > git submodule foreach --recursive git reset --hard
DEBUG: Directory: build/io.pslab
DEBUG: > git submodule foreach --recursive git clean -dffx
DEBUG: Directory: build/io.pslab
DEBUG: > git -c core.askpass=/bin/true -c core.sshCommand=/bin/false -c url.https://.insteadOf=ssh:// -c url.https://u:p@bitbucket.org/.insteadOf=git@bitbucket.org: -c url.https://u:p@bitbucket.org.insteadOf=git://bitbucket.org -c url.https://u:p@bitbucket.org.insteadOf=https://bitbucket.org -c url.https://u:p@github.com/.insteadOf=git@github.com: -c url.https://u:p@github.com.insteadOf=git://github.com -c url.https://u:p@github.com.insteadOf=https://github.com -c url.https://u:p@gitlab.com/.insteadOf=git@gitlab.com: -c url.https://u:p@gitlab.com.insteadOf=git://gitlab.com -c url.https://u:p@gitlab.com.insteadOf=https://gitlab.com fetch origin
DEBUG: Directory: build/io.pslab
DEBUG: > git -c core.askpass=/bin/true -c core.sshCommand=/bin/false -c url.https://.insteadOf=ssh:// -c url.https://u:p@bitbucket.org/.insteadOf=git@bitbucket.org: -c url.https://u:p@bitbucket.org.insteadOf=git://bitbucket.org -c url.https://u:p@bitbucket.org.insteadOf=https://bitbucket.org -c url.https://u:p@github.com/.insteadOf=git@github.com: -c url.https://u:p@github.com.insteadOf=git://github.com -c url.https://u:p@github.com.insteadOf=https://github.com -c url.https://u:p@gitlab.com/.insteadOf=git@gitlab.com: -c url.https://u:p@gitlab.com.insteadOf=git://gitlab.com -c url.https://u:p@gitlab.com.insteadOf=https://gitlab.com fetch --prune --tags origin
DEBUG: Directory: build/io.pslab
DEBUG: > git remote set-head origin --auto
DEBUG: Directory: build/io.pslab
DEBUG: > git checkout -f HEAD
DEBUG: Directory: build/io.pslab
DEBUG: > git clean -dffx
DEBUG: Getting git vcs interface for https://github.com/fossasia/pslab-android
DEBUG: > git --version
git version 2.17.1
INFO: Using git version 2.17.1
DEBUG: Checking 2.0.18
INFO: Building version 2.0.18 (19) of io.pslab
INFO: Getting source for revision v2.0.18
DEBUG: Directory: build/io.pslab
DEBUG: > git rev-parse --show-toplevel
DEBUG: Directory: build/io.pslab
DEBUG: > git submodule foreach --recursive git reset --hard
DEBUG: Directory: build/io.pslab
DEBUG: > git submodule foreach --recursive git clean -dffx
DEBUG: Directory: build/io.pslab
DEBUG: > git -c core.askpass=/bin/true -c core.sshCommand=/bin/false -c url.https://.insteadOf=ssh:// -c url.https://u:p@bitbucket.org/.insteadOf=git@bitbucket.org: -c url.https://u:p@bitbucket.org.insteadOf=git://bitbucket.org -c url.https://u:p@bitbucket.org.insteadOf=https://bitbucket.org -c url.https://u:p@github.com/.insteadOf=git@github.com: -c url.https://u:p@github.com.insteadOf=git://github.com -c url.https://u:p@github.com.insteadOf=https://github.com -c url.https://u:p@gitlab.com/.insteadOf=git@gitlab.com: -c url.https://u:p@gitlab.com.insteadOf=git://gitlab.com -c url.https://u:p@gitlab.com.insteadOf=https://gitlab.com fetch origin
DEBUG: Directory: build/io.pslab
DEBUG: > git -c core.askpass=/bin/true -c core.sshCommand=/bin/false -c url.https://.insteadOf=ssh:// -c url.https://u:p@bitbucket.org/.insteadOf=git@bitbucket.org: -c url.https://u:p@bitbucket.org.insteadOf=git://bitbucket.org -c url.https://u:p@bitbucket.org.insteadOf=https://bitbucket.org -c url.https://u:p@github.com/.insteadOf=git@github.com: -c url.https://u:p@github.com.insteadOf=git://github.com -c url.https://u:p@github.com.insteadOf=https://github.com -c url.https://u:p@gitlab.com/.insteadOf=git@gitlab.com: -c url.https://u:p@gitlab.com.insteadOf=git://gitlab.com -c url.https://u:p@gitlab.com.insteadOf=https://gitlab.com fetch --prune --tags origin
DEBUG: Directory: build/io.pslab
DEBUG: > git remote set-head origin --auto
DEBUG: Directory: build/io.pslab
DEBUG: > git checkout -f v2.0.18
DEBUG: Directory: build/io.pslab
DEBUG: > git clean -dffx
INFO: Creating local.properties file at build/io.pslab/local.properties
INFO: Creating local.properties file at build/io.pslab/app/local.properties
DEBUG: Removing debuggable flags from build/io.pslab/app
INFO: Cleaned build.gradle of keysigning configs at build/io.pslab/app/build.gradle
INFO: Running 'prebuild' commands in build/io.pslab/app
DEBUG: Directory: build/io.pslab/app
DEBUG: > bash -x -c -- sed -i -e '/LOCAL_KEY/d' build.gradle
+ sed -i -e /LOCAL_KEY/d build.gradle
INFO: Cleaning Gradle project...
DEBUG: Directory: build/io.pslab/app
DEBUG: > gradle clean

> Configure project :app
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to /home/padmal/Documents/fdroiddata/build/io.pslab/app/$ANDROID_NDK.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.


> Task :app:clean UP-TO-DATE

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.0/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 0s
1 actionable task: 1 up-to-date
INFO: Scanning source for common problems...
WARNING: Found possible binary at docs/images/oscilloscope_channel_params.png
WARNING: Found possible binary at docs/images/instrument_accelerometer_view.png
WARNING: Found possible binary at docs/images/instrument_robotic_arm_view.png
WARNING: Found possible binary at docs/images/instrument_compass_view.png
WARNING: Found possible binary at docs/images/view_not_connected_nav_menu.png
WARNING: Found possible binary at docs/images/instrument_thermo_view.png
WARNING: Found possible binary at docs/images/instrument_gyro_view.png
WARNING: Found possible binary at docs/images/oscilloscope_data_analysis.png
INFO: Removing gradle-wrapper.jar at gradle/wrapper/gradle-wrapper.jar
INFO: Creating source tarball...
INFO: Building Gradle project...
DEBUG: Directory: build/io.pslab/app
DEBUG: > gradle assembleFdroidRelease

> Configure project :app
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to /home/padmal/Documents/fdroiddata/build/io.pslab/app/$ANDROID_NDK.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.


> Task :app:preBuild UP-TO-DATE
> Task :app:preFdroidReleaseBuild
> Task :app:compileFdroidReleaseAidl NO-SOURCE
> Task :app:compileFdroidReleaseRenderscript
> Task :app:checkFdroidReleaseManifest
> Task :app:generateFdroidReleaseBuildConfig
> Task :app:prepareLintJar
> Task :app:generateFdroidReleaseSources
> Task :app:javaPreCompileFdroidRelease
> Task :app:mainApkListPersistenceFdroidRelease
> Task :app:generateFdroidReleaseResValues
> Task :app:generateFdroidReleaseResources
> Task :app:mergeFdroidReleaseResources
> Task :app:createFdroidReleaseCompatibleScreenManifests
> Task :app:processFdroidReleaseManifest
> Task :app:processFdroidReleaseResources

> Task :app:compileFdroidReleaseJavaWithJavac
Gradle may disable incremental compilation as the following annotation processors are not incremental: realm-annotations-processor-5.8.0.jar (io.realm:realm-annotations-processor:5.8.0), butterknife-compiler-8.8.1.jar (com.jakewharton:butterknife-compiler:8.8.1).
Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental.
Note: Version 5.13.1 of Realm is now available: https://static.realm.io/downloads/java/latest
Note: Processing class CompassData
Note: Processing class SensorDataBlock
Note: Processing class OscilloscopeData
Note: Processing class PowerSourceData
Note: Processing class LogicAnalyzerData
Note: Processing class DataMPU6050
Note: Processing class GasSensorData
Note: Processing class SensorLogged
Note: Processing class MultimeterData
Note: Processing class BaroData
Note: Processing class AccelerometerData
Note: Processing class ThermometerData
Note: Processing class ServoData
Note: Processing class GyroData
Note: Processing class LuxData
Note: Processing class WaveGeneratorData
Note: Creating DefaultRealmModule
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :app:compileFdroidReleaseNdk NO-SOURCE
> Task :app:compileFdroidReleaseSources
> Task :app:lintVitalFdroidRelease
> Task :app:mergeFdroidReleaseShaders
> Task :app:compileFdroidReleaseShaders
> Task :app:generateFdroidReleaseAssets
> Task :app:mergeFdroidReleaseAssets
> Task :app:signingConfigWriterFdroidRelease
> Task :app:transformClassesWithRealmTransformerForFdroidRelease
/home/padmal/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/4.0.1/4e606430c80c69b744d19c6ca1b269b68e297040/okhttp-4.0.1.jar: D8: Type `org.conscrypt.Conscrypt` was not found, it is required for default or static interface methods desugaring of `java.security.Provider okhttp3.internal.platform.ConscryptPlatform.getProvider()`
/home/padmal/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/4.0.1/4e606430c80c69b744d19c6ca1b269b68e297040/okhttp-4.0.1.jar: D8: Interface `org.conscrypt.ConscryptHostnameVerifier` not found. It's needed to make sure desugaring of `okhttp3.internal.platform.ConscryptPlatform$configureTrustManager$1` is correct. Desugaring will assume that this interface has no default method.
> Task :app:transformClassesWithDexBuilderForFdroidRelease
> Task :app:transformDexArchiveWithDexMergerForFdroidRelease
> Task :app:mergeFdroidReleaseJniLibFolders
> Task :app:transformNativeLibsWithMergeJniLibsForFdroidRelease
> Task :app:processFdroidReleaseJavaRes NO-SOURCE
> Task :app:transformResourcesWithMergeJavaResForFdroidRelease
> Task :app:packageFdroidRelease
> Task :app:assembleFdroidRelease

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.0/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 30s
25 actionable tasks: 25 executed
INFO: Successfully built version 2.0.18 of io.pslab
DEBUG: Using androguard from "/usr/lib/python3/dist-packages/androguard/__init__.py"
DEBUG: Checking build/io.pslab/app/build/outputs/apk/fdroid/release/app-fdroid-release-unsigned.apk
DEBUG: > /home/padmal/Android/Sdk/build-tools/29.0.0/aapt version
DEBUG: > /home/padmal/Android/Sdk/build-tools/29.0.0/aapt dump badging build/io.pslab/app/build/outputs/apk/fdroid/release/app-fdroid-release-unsigned.apk
ERROR: Could not build app io.pslab: Wrong package ID - build 9 but expected io.pslab
INFO: Finished
INFO: 1 build failed

Following is my metadata file for the project.

Metadate file for io.pslab
Categories:
  - Science & Education
License: Apache-2.0
WebSite: https://pslab.io
SourceCode: https://github.com/fossasia/pslab-android
IssueTracker: https://github.com/fossasia/pslab-android/issues

AutoName: PSLab
Description: |-
    Pocket Science Lab hardware device provides an array of sensors for doing
    science and engineering experiments. It provides functions of numerous
    experimental devices such as an oscilloscope, a waveform generator, a frequency
    counter, a programmable voltage & current source and a data logger. This app
    exposes all the functionalities of device along with using Audio Jack as
    Oscilloscope and Wave Generator. The app has built-in support for experiments
    covering areas like electronics, electrical and physics etc.

RepoType: git
Repo: https://github.com/fossasia/pslab-android

Builds:
  - versionName: 2.0.3
    versionCode: 4
    commit: v2.0.3
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.4
    versionCode: 5
    commit: v2.0.4
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.5
    versionCode: 6
    commit: v2.0.5
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.6
    versionCode: 7
    commit: v2.0.6
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.7
    versionCode: 8
    commit: v2.0.7
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.8
    versionCode: 9
    commit: v2.0.8
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.9
    versionCode: 10
    commit: v2.0.9
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.10
    versionCode: 11
    commit: v2.0.10
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.11
    versionCode: 12
    commit: v2.0.11
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.12
    versionCode: 13
    commit: v2.0.12
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.13
    versionCode: 14
    commit: v2.0.13
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.14
    versionCode: 15
    commit: v2.0.14
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.16
    versionCode: 17
    commit: v2.0.16
    subdir: app
    gradle:
      - yes

  - versionName: 2.0.17
    versionCode: 18
    commit: v2.0.17
    subdir: app
    gradle:
      - fdroid
    prebuild: sed -i -e '/LOCAL_KEY/d' build.gradle

  - versionName: 2.0.18
    versionCode: 19
    commit: v2.0.18
    subdir: app
    gradle: fdroid
    prebuild: sed -i -e '/LOCAL_KEY/d' build.gradle

AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 2.0.18
CurrentVersionCode: 19

fdroid lint -v io.pslab doesn’t output anything either.

What could be the possible reason for “Wrong package ID”? :thinking:

Looks like an error in scraping aapt output. That should be fixed by using fdroidserver from git, or using androguard instead of aapt.

1 Like

I tried both androguard and aapt. Following is the result.

aapt output
$HOME/Android/Sdk/build-tools/29.0.0/aapt dump badging app-fdroid-release-unsigned.apk 
package: name='io.pslab' versionCode='19' versionName='2.0.18' compileSdkVersion='28' compileSdkVersionCodename='9'
sdkVersion:'23'
targetSdkVersion:'28'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.RECORD_AUDIO'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission: name='android.permission.BLUETOOTH'
uses-permission: name='android.permission.BLUETOOTH_ADMIN'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
application-label:'PSLab'
application-label-af:'PSLab'
application-label-am:'PSLab'
application-label-ar:'PSLab'
application-label-as:'PSLab'
application-label-az:'PSLab'
application-label-be:'PSLab'
application-label-bg:'PSLab'
application-label-bn:'PSLab'
application-label-bs:'PSLab'
application-label-ca:'PSLab'
application-label-cs:'PSLab'
application-label-da:'PSLab'
application-label-de:'PSLab'
application-label-el:'PSLab'
application-label-en-AU:'PSLab'
application-label-en-CA:'PSLab'
application-label-en-GB:'PSLab'
application-label-en-IN:'PSLab'
application-label-en-XC:'PSLab'
application-label-es:'PSLab'
application-label-es-US:'PSLab'
application-label-et:'PSLab'
application-label-eu:'PSLab'
application-label-fa:'PSLab'
application-label-fi:'PSLab'
application-label-fr:'PSLab'
application-label-fr-CA:'PSLab'
application-label-gl:'PSLab'
application-label-gu:'PSLab'
application-label-hi:'PSLab'
application-label-hr:'PSLab'
application-label-hu:'PSLab'
application-label-hy:'PSLab'
application-label-id:'PSLab'
application-label-in:'PSLab'
application-label-is:'PSLab'
application-label-it:'PSLab'
application-label-iw:'PSLab'
application-label-ja:'PSLab'
application-label-ka:'PSLab'
application-label-kk:'PSLab'
application-label-km:'PSLab'
application-label-kn:'PSLab'
application-label-ko:'PSLab'
application-label-ky:'PSLab'
application-label-lo:'PSLab'
application-label-lt:'PSLab'
application-label-lv:'PSLab'
application-label-mk:'PSLab'
application-label-ml:'PSLab'
application-label-mn:'PSLab'
application-label-mr:'PSLab'
application-label-ms:'PSLab'
application-label-my:'PSLab'
application-label-nb:'PSLab'
application-label-ne:'PSLab'
application-label-nl:'PSLab'
application-label-no-NB:'PSLab'
application-label-no-NN:'PSLab'
application-label-or:'PSLab'
application-label-pa:'PSLab'
application-label-pl:'PSLab'
application-label-pt:'PSLab'
application-label-pt-BR:'PSLab'
application-label-pt-PT:'PSLab'
application-label-ro:'PSLab'
application-label-ru:'PSLab'
application-label-se:'PSLab'
application-label-si:'PSLab'
application-label-sk:'PSLab'
application-label-sl:'PSLab'
application-label-sq:'PSLab'
application-label-sr:'PSLab'
application-label-sr-Latn:'PSLab'
application-label-sv:'PSLab'
application-label-sw:'PSLab'
application-label-ta:'PSLab'
application-label-te:'PSLab'
application-label-th:'PSLab'
application-label-tl:'PSLab'
application-label-tr:'PSLab'
application-label-uk:'PSLab'
application-label-ur:'PSLab'
application-label-uz:'PSLab'
application-label-vi:'PSLab'
application-label-zh-CN:'PSLab'
application-label-zh-HK:'PSLab'
application-label-zh-TW:'PSLab'
application-label-zu:'PSLab'
application-icon-120:'res/drawable/app_icon.png'
application-icon-160:'res/drawable/app_icon.png'
application-icon-240:'res/drawable/app_icon.png'
application-icon-320:'res/drawable/app_icon.png'
application-icon-480:'res/drawable/app_icon.png'
application-icon-640:'res/drawable/app_icon.png'
application-icon-65534:'res/drawable/app_icon.png'
application: label='PSLab' icon='res/drawable/app_icon.png'
uses-library-not-required:'org.apache.http.legacy'
launchable-activity: name='io.pslab.activity.SplashActivity'  label='' icon=''
feature-group: label=''
  uses-feature-not-required: name='android.hardware.location.gps'
  uses-feature-not-required: name='android.hardware.location.network'
  uses-feature-not-required: name='android.hardware.sensor.light'
  uses-feature-not-required: name='android.hardware.telephony'
  uses-feature: name='android.hardware.usb.host'
  uses-feature-not-required: name='android.hardware.wifi'
  uses-feature: name='android.hardware.bluetooth'
  uses-implied-feature: name='android.hardware.bluetooth' reason='requested android.permission.BLUETOOTH permission, requested android.permission.BLUETOOTH_ADMIN permission, and targetSdkVersion > 4'
  uses-feature: name='android.hardware.faketouch'
  uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
  uses-feature: name='android.hardware.location'
  uses-implied-feature: name='android.hardware.location' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and requested android.permission.ACCESS_FINE_LOCATION permission'
  uses-feature: name='android.hardware.microphone'
  uses-implied-feature: name='android.hardware.microphone' reason='requested android.permission.RECORD_AUDIO permission'
  uses-feature: name='android.hardware.screen.landscape'
  uses-implied-feature: name='android.hardware.screen.landscape' reason='one or more activities have specified a landscape orientation'
  uses-feature: name='android.hardware.screen.portrait'
  uses-implied-feature: name='android.hardware.screen.portrait' reason='one or more activities have specified a portrait orientation'
main
other-activities
other-receivers
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--' 'af' 'am' 'ar' 'as' 'az' 'be' 'bg' 'bn' 'bs' 'ca' 'cs' 'da' 'de' 'el' 'en-AU' 'en-CA' 'en-GB' 'en-IN' 'en-XC' 'es' 'es-US' 'et' 'eu' 'fa' 'fi' 'fr' 'fr-CA' 'gl' 'gu' 'hi' 'hr' 'hu' 'hy' 'id' 'in' 'is' 'it' 'iw' 'ja' 'ka' 'kk' 'km' 'kn' 'ko' 'ky' 'lo' 'lt' 'lv' 'mk' 'ml' 'mn' 'mr' 'ms' 'my' 'nb' 'ne' 'nl' 'no-NB' 'no-NN' 'or' 'pa' 'pl' 'pt' 'pt-BR' 'pt-PT' 'ro' 'ru' 'se' 'si' 'sk' 'sl' 'sq' 'sr' 'sr-Latn' 'sv' 'sw' 'ta' 'te' 'th' 'tl' 'tr' 'uk' 'ur' 'uz' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
densities: '120' '160' '240' '320' '480' '640' '65534'
native-code: 'arm64-v8a' 'armeabi-v7a' 'mips' 'x86' 'x86_64'
androguard output
androguard analyze app-fdroid-release-unsigned.apk 
[INFO    ] root: Generating grammar tables from /usr/lib/python3.6/lib2to3/Grammar.txt
[INFO    ] root: Generating grammar tables from /usr/lib/python3.6/lib2to3/PatternGrammar.txt
Please be patient, this might take a while.
Found the provided file is of type 'APK'
[INFO    ] androguard.analysis: End of creating cross references (XREF)
[INFO    ] androguard.analysis: run time: 0min 04s
[INFO    ] androguard.analysis: End of creating cross references (XREF)
[INFO    ] androguard.analysis: run time: 0min 06s
Added file to session: SHA256::5f5c6bf6be1d5f7b6e5f355956c49b849908bd89d84e98a60d17eed9cdd51bbb
Loaded APK file...
>>> a
<androguard.core.bytecodes.apk.APK object at 0x7f93b205e1d0>
>>> d
[<androguard.core.bytecodes.dvm.DalvikVMFormat object at 0x7f939b188dd8>, <androguard.core.bytecodes.dvm.DalvikVMFormat object at 0x7f936a55bf98>]
>>> dx
<analysis.Analysis VMs: 2, Classes: 10651, Strings: 18629>

Androguard version 3.3.5 started

Looking at the output from aapt, it looks like it’s getting the last “9” from the second line in its log.

package: name='io.pslab' versionCode='19' versionName='2.0.18' compileSdkVersion='28' compileSdkVersionCodename='9'

So I tried with another app that has multiple flavors (including fdroid) and that one also fails :thinking:

Could not build app com.eventyay.organizer: Wrong package ID - build 9 but expected com.eventyay.organizer
package: name='com.eventyay.organizer' versionCode='15' versionName='1.5.0' compileSdkVersion='28' compileSdkVersionCodename='9'

Is it possible to edit this scraping? :thinking: (I’m going through fdroidserver source code in the meantime)

I’m pretty sure this is already fixed in fdroidserver.git. You could hardcode an older build-tools version in config.py (see examples/config.py). Or remove all mention of aapt and build-tools from config.py, then it should use androguard.

I was using apt-get fdroidserver. When I used fdroidserver.git it was successful.

BUILD SUCCESSFUL in 55s
25 actionable tasks: 25 executed
INFO: Successfully built version 2.0.18 of io.pslab
DEBUG: Using androguard from "/home/padmal/Desktop/test-venv/lib/python3.6/site-packages/androguard/__init__.py"
DEBUG: Checking build/io.pslab/app/build/outputs/apk/fdroid/release/app-fdroid-release-unsigned.apk
INFO: success: io.pslab
INFO: Finished
INFO: 1 build succeeded

Thanks for the tips @hans :+1: I’ll close this thread now and update the merge request…

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.