• Welcome to the new forum! We upgraded our forum software with a host of new boards, capabilities and features. It is also more secure.
    Jump in and join the conversation! You can learn more about the upgrade and new features here.

Changes Not Getting Saved on Android 12 Version

rodrigosoliv

New Forum Member
Joined
May 28, 2023
Messages
7
Reaction score
0
After switching smartphones (Motorola Moto G52 XT2221-2, Android 12, Kernel 4.19.157), the app does not allow creating recipes (add recipe button is stuck), does not save/persist unit settings, cloud login, advanced options or any other other recording-related operation. Using BeerSmith 3.2.2 Mobile.

Note: the permission to write data to the device's storage has been enabled for the application, the problem still exists.

I've been using BeerSmith since 05/2019, and I've already changed my smartphone twice. Despite having come across other common bugs that are reported on the forum, this situation is unprecedented.

From the old smartphone, I noticed that BeerSmith keeps files/directories in some places, and an attempt was to manually create the same structure on the new smartphone, but I don't use root (superuser) for testing.

/storage/emulated/0/Android/data/com.beersmith.beersmith2full/
cache/
files/

/data/data/com.beersmith.beersmith2full/

/data/app/com.beersmith.beersmith2full-0e7PoUMolVaBRWuBrgBECw==/
lib/
lib/arm/
lib/arm/libsqlc-native-driver.so
oat/
base.apk

Note: the Moto G52 is arm64, different from the old smartphone, but I understand that this is not the case.

01.png02.png03.png
 
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
 
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):
motoG6_1.pngmotoG6_2.pngmotoG6_3.png

- new/current (Motorola Moto G52):
motoG52_1.pngmotoG52_2.png


Thanks.
* used Google Translate
 
That is very helpful - I will try recompiling with the latest libraries and dev build and see if it helps. Also I will do some runs on the simulator to test it. I'm a bit concerned though as the data will not carry over if someone upgrades their device, but perhaps there is a way to check the old locations as well.
 
That is very helpful - I will try recompiling with the latest libraries and dev build and see if it helps. Also I will do some runs on the simulator to test it. I'm a bit concerned though as the data will not carry over if someone upgrades their device, but perhaps there is a way to check the old locations as well.

If you need me to do a test and want to make a modified copy of BeerSmith available, with log generation and/or breakpoints, I can enable my smarthpone to allow installing applications from unknown sources, do a simulation with BeerSmith modifying it, and then send the logs and/or screenshots back.

It's the way I can help, doing tests/simulations on real hardware. BeerSmith is a very good piece of software within this genre. I am interested that it works for me, I want to continue using it. I imagine that this bug in Android 12 (and maybe later) impacts the app's reputation on the Google PlayStore, maybe users stop using/buying it, or even ask for a refund for not working on their smartphones with that version of Android (affecting sales earnings/profit). Here in Brazil, BeerSmith is a very popular and well recognized app, although it doesn't have a pt-br translation, I have several homebrew friends who use it.

In an attempt to help a little more, I made a brief demonstration of BeerSmith's behavior on my smathphone, in the form of a GIF.

You'll notice that when I log in to the cloud, as well as change the units to the metric system, apparently everything is ok, but if I close the app and log in again, it's possible to see that the data has not been saved. In the same demo I try to create a recipe and also create a folder, without success. To complete the test, if you try to copy/move a recipe from the cloud to your smartphone, the local directory is not listed.

Thanks.

* using Google Translator


beersmith-bug-demo.gif

beersmith-app-permissions.pngbeersmith-android-version.pngbeersmith-smarthphone-model.png
 
Hi,

Reporting a little more on the behavior of BeerSmith Mobile on Android 12, when I try to access the following screens, they are frozen as in the screenshots.

Trying to access these options does not crash the app, it just fails to load the content. That reinforces the possibility that the app is trying to access/write in some directory/file that it does not have access to (even if it is trying to force its creation). I think.

- Home - Find Recips (OK / works / loads)
- Home - Profiles - Beer Styles (OK / works / loads)

- Home - Profiles - Equipment (freezes / does not load)
- Home - Profiles - Mash Profiles (freezes / won't load)
- Home - Profiles - Fermentation Profiles (freezes / does not load)
- Home - Profiles - Carbonation Profiles (freezes / won't load)
- Home - Igredients - Hops (freezes / does not load)
- Home - Igredients - Fermentables (freezes / does not load)
- Home - Install Add-Ons (freezes / does not load)

* in addition to the above list, all other features, except those reported in previous posts, apparently work (okay)

beersmith-menus-freezes.png
 
That is very helpful - I will try recompiling with the latest libraries and dev build and see if it helps. Also I will do some runs on the simulator to test it. I'm a bit concerned though as the data will not carry over if someone upgrades their device, but perhaps there is a way to check the old locations as well.
Hi.
Any correction predictions?
 
Not yet - I've been tied up with other projects, but it is high on my list to work on.
 
Back
Top