Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset bootstrapping doesn't detect architecture change #467

Open
projectgus opened this issue Feb 1, 2024 · 1 comment
Open

Asset bootstrapping doesn't detect architecture change #467

projectgus opened this issue Feb 1, 2024 · 1 comment
Assignees

Comments

@projectgus
Copy link

I think some Koreader F-Droid users encountered this recently: koreader/koreader#11399 (in particular comment koreader/koreader#11399 (comment)).

If a device updates from (for example) an armv7eabi build of an android-luajit-launcher app to an armv8a build of the same app, built from the same git revision, then the asset management code doesn't detect a new bundle and doesn't know to re-extract the assets. This means the install will break if it contained any shared libraries, as they're now 32-bit in a 64-bit runtime.

Perhaps a fix would be to add an additional file in the app's storage directory that writes versionCode, versionName from the packageInfo, and maybe even os.arch, and check this in isNewBundle() as well?

I don't have a android-luajit-launcher development environment set up, but I'm happy to take a crack at this if it's potentially useful (unless someone else is keen.)

@pazos
Copy link
Member

pazos commented Feb 2, 2024

Thank you for your triage, @projectgus!

Perhaps a fix would be to add an additional file in the app's storage directory that writes versionCode, versionName from the packageInfo, and maybe even os.arch, and check this in isNewBundle() as well?

I guess is enough to create a new file with the arch in the 7z and check between that and what's included in the APK, like we do now with version.txt.

Since the file doesn't exist actually on current installations handle it the same way we do for version (extract assets if version doesn't match or version doesn't exist).

I don't have a android-luajit-launcher development environment set up, but I'm happy to take a crack at this if it's potentially useful (unless someone else is keen.)

It would be very welcome, indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants