0

My Delphi project have both android 32 and 64 destination. I can deploy them on my test devices and they both works fine.

Now google forces me to upload a single app bundle file (.aab), so i flagged the "Generate Android App Bundle file (arm + arm64)" option, set up my provisioning keystore, loaded the alias and then generated that .aab file

I uploaded that as a beta release for my app from the android developer portal and after a few hours it became available to download for my test devices. But.. it shows the start up logo.. and nothing else.

I don't really know how to debug this since both the apks are working fine (32 and 64 bit), so i tried to launch adb logcat *:W, but i still cannot get useful info. I got those lines in endless loop:

10-30 09:59:21.656 13723 13723 E systems.<my app name>: Not starting debugger since process cannot load the jdwp agent.
10-30 09:59:21.688 13723 13723 W systems.<my app name>: JIT profile information will not be recorded: profile file does not exits.
10-30 09:59:21.688 13723 13723 W systems.<my app name>: JIT profile information will not be recorded: profile file does not exits.
10-30 09:59:21.703   922  1100 E ANDR-IOP: IIop:: Iop HAL Service is not available.
10-30 09:59:21.707 13723 13743 E Perf    : Fail to get file list oat
10-30 09:59:21.707 13723 13743 E Perf    : getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
10-30 09:59:21.743 13723 13723 W linker  : Warning: "/data/app/<my app name>-43xRWdYLtXcvUAbEkuUk6g==/split_config.arm64_v8a.apk!/lib/arm64-v8a/lib<my app name>.so" unused DT entry: DT_RPATH (type 0xf arg 0x2cf24) (ignoring)

Just for info: getFolderSize() is not a function i use in my code (its not even declared).

Also, i think this is pretty important: my app deploys some .so files (different files for 32 and 64 bit) and some other files, like images and fonts. Why i think this is important? Just a suspect born reading this similar issue (but with xamarin): https://github.com/xamarin/Xamarin.Forms/issues/11450

I also tried to deploy the .aab manually on my devices but the only thing i found is how to generate the .apks file from the .aab, and i still cannot deploy it on my devices.

I'm using Delphi 10.4.1 and i also tried to recreate the .dproj file setting up everything again.

How i can debug this? Or how i can get more info about the cause?

Edit: Solved it! I had a few problems that, mixed together, caused this; i'll try to list them in case someone will have a similar issue and will end here!

  • my androidmanifest.template.xml file was generated by an older version of delphi and was missing some important parts
  • you need to include all the needed .so files in both 32 and 64bit build to actually have them in the bundle
  • using TPath.GetLibraryPath() when loading .so files can produce different results if you are using it inside a .aab bundle package
  • i was trying to load one of those .so file from the initialization section using the function TPath.GetLibraryPath() to get the root path, that was causing a unhandled exception that make my app crash into the splash screen

I solved simply removing TPath.GetLibraryPath() from the path i was using to load my .so and now it works

HypeZ
  • 4,017
  • 3
  • 19
  • 34
  • 1
    That is some useful info after all. One of the lines that you get when you start your application using `adb logcat *:W` states that there is `unused DT entry: DT_RPATH` and that it is ignored. I'm guessing your package is making use of this DT entry to store location of your *.so files inside your package but since use of `DT_RPATH` has been superseded with `DT_RUNPATH` it is simply ignored and therefore your app does not have available information about location of your *.so files. You can read more about this [here](https://stackoverflow.com/questions/33206409/unused-dt-entry-type-0x1d-arg) – SilverWarior Oct 30 '20 at 15:18
  • Your issue looks remarkably like this one: https://en.delphipraxis.net/topic/3759-the-android-app-doesnt-start-at-specific-devices/?do=findComment&comment=32023 – Dave Nottage Oct 30 '20 at 23:05
  • thank you for that link @DaveNottage but my issue is different, my app runs perfectly fine when i deploy it on 32 or 64 bit android. Also i don't add extra .jar but extra .so and i already used different version for 32 and 64 bit (apk wouldn't run otherwise). My problem is only with the .aab package, looks that auto-generated package is missing something but i don't know what or how to fix it.. i'm still trying to figure out how to understand how DT variables are used by delphi and if i can edit something about it – HypeZ Nov 02 '20 at 07:39

0 Answers0