#Path of the generated bundle during patch

1 messages · Page 1 of 1 (latest)

floral gull
#

Hi @static lichen,

For last few months, we are facing native changes (dex files) while patching our android app. I went through most of the discord posts covering this and want to dig deeper, what is causing the native changes. To do this, I am planning to compare the dexes of release and patch. If you can provide where to find the intermediate bundle generated by shorebird, so that I can diff out and find the root cause.

#

Path of the generated bundle during patch

quasi panther
#

Are you able to share a minimal reproduction sample?

floral gull
#

@quasi panther Here are the details:
Shorebird app id: 4b371693-9cc0-4c87-89f4-9372e39606fb
Release Version: 8.1.240+411
Release Date: Wed Mar 26 16:49:53 2025 +0530
Release Branch: master
Release Command: shorebird release android --target lib/main.dart --flavor prod --flutter-version=3.24.2 -- --no-tree-shake-icons

Patch Command: shorebird patch android --flavor prod --release-version 8.1.240+411 --target lib/main.dart --allow-asset-diffs --track=staging --verbose

Patch 1 Release Date: Fri Mar 28 09:05:17 2025 +0000  ✅
Patch 1 Branch: patch/3.1.242

Patch 2: Unpatchable
Branch: patch/3.1.242 (same as last patch - no diff)
Date: Thu Apr 3 08:09 2025

Attached pub.log file and published the patch to the staging track for easier debug at your end.

quasi panther
#

@floral gull you should be passing --no-tree-shake-icons to shorebird patch as well. That could be causing the issue.

floral gull
#

Let me try that out. I thought it will only surface the font changes.

#

@quasi panther Still getting the same error

#

shorebird patch android --flavor prod --release-version 8.1.240+411 --target lib/main.dart --allow-asset-diffs --track=staging --verbose -- --no-tree-shake-icons

quasi panther
#

Do you track your pubspec.lock in source control?

floral gull
#

yes we do track pubspec.lock

#

That's why I want to get the dex of shorebird patch and release build. At least, I will figure it out which library is causing this issue.

quasi panther
#

You can compare you local (patched build) against your release build. The easiest way to download the release build is to preview the release via (shorebird preview) and the output will include the location where the release is downloaded

floral gull
#

I want to know which directory is used while building the patch. Is it the project build directory only or some global shorebird cache directory.

quasi panther
#

it's the project build directory

floral gull
#

Thanks. I'll update the findings.

floral gull
#
  • As suggested by the shorebird the classes4.dex has native changes.
  • I copied the bundle generated during the patch process and extracted the classes4.dex
  • Downloaded the bundle from the shorebird admin panel for the release version extracted the classes4.dex
  • Used the tool https://github.com/theapache64/dex-diff?tab=readme-ov-file to compare two dexes
  • Summary of the report (attached images)
  • The changes were only the comments which mention from where the dex file was loaded
  • The md5 for original classes4.dex MD5(/Users/apple/Desktop/app/base/dex/classes4.dex)= 3179daff11e55fe609b73b00f101351d
  • The md5 for patch classes4.dex MD5(/Users/apple/Desktop/patch/base/dex/classes4.dex)= 73f425e2ec1a6d1436409d5382c24342
GitHub

A tool to compare two APK files at the dex level. Useful for checking the impact of things like fullMode and dex optimisations. - theapache64/dex-diff

quasi panther
#

That’s annoying. Thanks for investigating! Mind filing an issue with this info?

floral gull
#

Sure! I will fill a detail issue.

floral gull
finite hawk
haughty cobalt
#

I see, so presumably the path is in the .dex still, just it's manifesting in the jadx output as a comment

floral gull
#

@haughty cobalt I don't think so. Since, the path in the dex-diff matches with the path of the individual (patch and release) dexes on my machine and if I move the dexes to different folder then the generated report have different path for the comment. This clearly shows that the path is not in the dex files.

floral gull
#

Let me know if you guys want me to create and publish patch having dex changes to staging so that you can test at your end if needed.

quasi panther
#

What would be most helpful is if you could share a link to a public repo where we can reproduce Ava debug the issue ourselves

haughty cobalt
#

@floral gull so to make sure I understand. The diff only shows path differences, and you believe those are not actually in the dex files. e.g. the diff shows nothing if the dexes are in the same folder?

#

I seem to recall your report saying that all the files had differences.

haughty cobalt