forked from albertz/commandergenius
-
Notifications
You must be signed in to change notification settings - Fork 248
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
apk tries to unpack assets into wrong directory #146
Comments
/data/user/0/com.my.app.debug/files will be accessoble from your app.
To access it from adb, run this command in adb shell
run-as com.my.app.debug
I cannot provide more support, as I'm in the army right now.
…On Tue, 10 Jan 2023, 16:53 1000283, ***@***.***> wrote:
Greetings and thanks for your work.
I've been migrating a legacy C app from SDL 1.2 to 2.0. The 1.2 version
works fine when compiled on an Ubuntu Xenial but is quite dated (although
i'll need to maintain it for a while or at least ensure i can maintain
KitKat/Lollipop).
I'm using commit 798fd0f
<798fd0f>
from 10/03/2022 on an Ubuntu Fossa and have been adapting scripts for the
newer build but need to maintain access to /sdcard (that's out the window
with Android 10 but that's another matter).
The build compiles fine and the assets.zip file is placed in the apk as
intended, however when the apk is installed the system tries to unpack the
assets onto /data/user/0/com.my.app.debug/files (to which adb shell ls
has no permissions so i'm guessing neither does my app) when it used to
unpack to /sdcard/Android/data/com.my.app.debug/files. So the app it
fails to start because it's expecting assets that don't exist.
(Is does touch a file in /sdcard but is unable to replace it later with
another file from assets because there is none.
It closes "gracefully" when trying to open a nonexisting font.ttf, without
ever showing either of the un/successful log messages.
Works fine in Linux and Windows.)
I've "backported" most of the definitions to old values, but no matter
what i put in android:installLocation it always defaults to the same
location. The older build works fine on the same device.
Can you tell me what am i missing in order to get the old behavior?
This is my env:
ANDROID_NDK_HOME=/opt/android/ndk/22.0.7026061
ANDROID_HOME=/usr/lib/android-sdk
NDK=/opt/android/ndk/22.0.7026061
ANDROID_NDK_ROOT=/opt/android/ndk/22.0.7026061
And the files i'm using:
project/settings.gradle
<https://github.com/pelya/commandergenius/files/10383623/project_settings.gradle.txt>
project/jni/sdl2/android-project/app/src/main/AndroidManifest.xml
<https://github.com/pelya/commandergenius/files/10383624/proj_jni_sdl2-etc-AndroidManifest.xml.txt>
project/app/build-templace.gradle
<https://github.com/pelya/commandergenius/files/10383625/project_app_build-templace.gradle.txt>
project/build.gradle
<https://github.com/pelya/commandergenius/files/10383626/project_build.gradle.txt>
—
Reply to this email directly, view it on GitHub
<#146>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABF5QCH26Z3B3NFJ26FETLWRVZWZANCNFSM6AAAAAATW45OPQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Turns out the newest version expects |
Use
!!MyAssets|assets.zip
so it won't show the dialog at start
…On Tue, 10 Jan 2023, 20:46 1000283, ***@***.***> wrote:
Turns out the newest version expects
AppDataDownloadUrl="!MyAssets|myassets.zip" instead of the previous
AppDataDownloadUrl="|myassets.zip". Now the app loads the assets and
starts as expected.
Well i get a black screen and the app seems dead, but that's another
issue, possibly SDL2-related.
—
Reply to this email directly, view it on GitHub
<#146 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABF5QGENRUBC2BBU6QMMPDWRWU7FANCNFSM6AAAAAATW45OPQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Greetings and thanks for your work.
I've been migrating a legacy C app from SDL 1.2 to 2.0. The 1.2 version works fine when compiled on an Ubuntu Xenial but is quite dated (although i'll need to maintain it for a while or at least ensure i can maintain KitKat/Lollipop).
I'm using commit 798fd0f from 10/03/2022 on an Ubuntu Fossa and have been adapting scripts for the newer build but need to maintain access to
/sdcard
(that's out the window with Android 10 but that's another matter).The build compiles fine and the assets.zip file is placed in the apk as intended, however when the apk is installed the system tries to unpack the assets onto
/data/user/0/com.my.app.debug/files
(to whichadb shell ls
has no permissions so i'm guessing neither does my app) when it used to unpack to/sdcard/Android/data/com.my.app.debug/files
. So the app it fails to start because it's expecting assets that don't exist.(Is does touch a file in
/sdcard
but is unable to replace it later with another file from assets because there is none.It closes "gracefully" when trying to open a nonexisting font.ttf, without ever showing either of the un/successful log messages.
Works fine in Linux and Windows.)
I've "backported" most of the definitions to old values, but no matter what i put in
android:installLocation
it always defaults to the same location. The older build works fine on the same device.Can you tell me what am i missing in order to get the old behavior?
This is the place in the log:
This is my env:
ANDROID_NDK_HOME=/opt/android/ndk/22.0.7026061
ANDROID_HOME=/usr/lib/android-sdk
NDK=/opt/android/ndk/22.0.7026061
ANDROID_NDK_ROOT=/opt/android/ndk/22.0.7026061
And the files i'm using:
project/settings.gradle
project/jni/sdl2/android-project/app/src/main/AndroidManifest.xml
project/app/build-templace.gradle
project/build.gradle
The generated AndroidManifest.xml. It has
android:installLocation="0"
, which doesn't seem to be recognized, instead ofandroid:installLocation="auto"
but so did the old one.The text was updated successfully, but these errors were encountered: