Do you have any insight as to why it can't create the directories?
I've only recently had a complaint of BeerSmith not running on the latest Android and I've not yet had time to test in the emulator.
I also replied to your email with some alternatives if we can't get this working.
Brad
Hello and thanks for a placement.
Considering that the problem is related to the directory structure, due to the non-existence or lack of access to the standard path where BeerSmith maintains its database persisting user information/records, I made a brief comparison between the old smartphone (in which does BeerSmith work), and new/current smartphone (where BeerSmith has unusual behavior).
Remembering that the Android of both smartphones are versions distributed by the manufacturer (they are not custom roms), rooting was not done (no superuser/su), and the BeerSmith app has read/write permissions enabled for storage.
- old (Motorola Moto G6 XT1925-3, with Android 9, version PPSS29.55-37-7-10):
/storage/emulated/0/Android/data/com.beersmith.beersmith2full/
/storage/emulated/0/Android/data/com.beersmith.beersmith2full/cache/
/storage/emulated/0/Android/data/com.beersmith.beersmith2full/files/
/data/data/com.beersmith.beersmith2full/
/data/app/com.beersmith.beersmith2full-0e7PoUMoIVaBRWuBrgBECw==/
/data/app/com.beersmith.beersmith2full-0e7PoUMoIVaBRWuBrgBECw==/base.apk (7.8 MiB / 8.168.175 bytes / version: 3.2.2 / version code: 13202 / target sdk: 30 / data path: /data/user/0/com.beersmith.beersmith2full)
/data/app/com.beersmith.beersmith2full-0e7PoUMoIVaBRWuBrgBECw==/lib/
/data/app/com.beersmith.beersmith2full-0e7PoUMoIVaBRWuBrgBECw==/lib/arm/
/data/app/com.beersmith.beersmith2full-0e7PoUMoIVaBRWuBrgBECw==/lib/arm/libsqlc-native-driver.so (594 KiB / 608.116 bytes)
/data/app/com.beersmith.beersmith2full-0e7PoUMoIVaBRWuBrgBECw==/oat/
- new/current (Motorola Moto G52 XT2221-2, with Android 12, version S1SRS32.38-132-11):
/data/app/com.beersmith.beersmith2full-t-Xva5u_PTpHpQq1WwTEbg==/
/data/app/com.beersmith.beersmith2full-t-Xva5u_PTpHpQq1WwTEbg==/base.apk (7.8 MiB / 8.168.175 bytes / version: 3.2.2 / version code: 13202 / target sdk: 30 / data path: /data/user/0/com.beersmith.beersmith2full)
/data/app/com.beersmith.beersmith2full-t-Xva5u_PTpHpQq1WwTEbg==/base.digests (92 bytes)
/data/app/com.beersmith.beersmith2full-t-Xva5u_PTpHpQq1WwTEbg==/base.dm (32 KiB / 33.011 bytes)
/data/app/com.beersmith.beersmith2full-t-Xva5u_PTpHpQq1WwTEbg==/lib/
/data/app/com.beersmith.beersmith2full-t-Xva5u_PTpHpQq1WwTEbg==/lib/arm64/
/data/app/com.beersmith.beersmith2full-t-Xva5u_PTpHpQq1WwTEbg==/lib/arm64/libsqlc-native-driver.so (1.3 MiB / 1.316.552 bytes)
/data/app/com.beersmith.beersmith2full-t-Xva5u_PTpHpQq1WwTEbg==/oat/
Note: the FX File Explorer app (developed by NextApp, Inc) was used to collect this information, and although this app also has read/write permissions to the storage, I could not explore all directories because I had not rooted (the "access was denied / was not able to obtain root/superuser access to perform this operation" in some cases it was displayed, for example, when trying to access "/data/user/")
Some details caught my eye:
- the old smartphone has an arm 32-bit platform, the new/current one is arm 64-bit.
- I noticed that in both cases, the BeerSmith version is the same, and sdk = 30, including the base.apk size. Considering the platforms are different (Android 9 => arm / Andoid 12 => arm64), shouldn't the base.apk also have different sizes even though they are in the same version? An example of this is the "libsqlc-native-driver.so" library, which has different sizes, where I believe that each one is intended for its proper platform. Correct me if I'm wrong, but shouldn't BeerSmith be compiled for arm64, with targetSdkVersion = 32?
- another possibility may be that the system directory structure is slightly different from Android 12, or because it is arm64, an example of this is that in the new/current smartphone the directory and subdirectories of "/storage/emulated/0/Android/data /com.beersmith.beersmith2full/" does not exist, or cannot be created for this reason.
- would using a try...catch to define an alternative path of where the database should be stored be an alternative?
- if BeerSmith had a backup/restore feature (which is an old request, the limitation of 15 recipes in the cloud is not enough), it could be given another try, taking a backup on the old smartphone and restoring the data on the new/current one.
These posts I made are just speculations, as I am also a developer, I understand the technical difficulties of day-to-day life.
If there's anything else I can contribute, collecting information from the new/current smartphone, or even the app's behavior, I'm at your disposal.
- old (Motorola Moto G6):
- new/current (Motorola Moto G52):
Thanks.
* used Google Translate