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

Android support for armv7/aarch32 #538

Closed
maxwell-kalin opened this issue Apr 17, 2022 · 63 comments
Closed

Android support for armv7/aarch32 #538

maxwell-kalin opened this issue Apr 17, 2022 · 63 comments
Labels
android Related to Android app enhancement New feature or request

Comments

@maxwell-kalin
Copy link

I have an LG Android device with Android 11

unable to use the app

@epoberezkin
Copy link
Member

Thanks for reporting!

Could you please share some screenshot/errors you are seeing?

Do you by any chance have logcat viewer installed? If so, it would really help if you could share what is in the logs.

@maxwell-kalin
Copy link
Author

Screenshot_20220417-100918

it says in german that the app is incompatible

same on Fdroid.

Screenshot_20220417-101040

@maxwell-kalin
Copy link
Author

here some of my phone's specs
Screenshot_20220417-102437

@maxwell-kalin
Copy link
Author

maxwell-kalin commented Apr 17, 2022

could it be that you only compile for armv8?

@epoberezkin
Copy link
Member

Correct, the app does not support arm v7 CPUs, sorry about it.

@epoberezkin epoberezkin changed the title Android app incompatible Android app incompatible with ARM v7 CPUs Apr 17, 2022
@maxwell-kalin
Copy link
Author

maxwell-kalin commented Apr 17, 2022

is it possible to compile it for armv7 androids or is it a deeper problem?

@epoberezkin
Copy link
Member

I don't think we can - Haskell has aarch64 support, but not the previous ARM versions...

@maxwell-kalin
Copy link
Author

maxwell-kalin commented May 15, 2022

thats funny
so it wont run on most devices kekw

good luck with that i guess

@why-not-try-calmer
Copy link

@ata-star is correct that it's an important setback for an app that is potentially useful to many "old" Android devices.

@epoberezkin
Copy link
Member

Indeed, it's a problem, but we hope to at least support Android v8/9 - that would almost 1.5x the number of supported devices.

In any case, both these problems will be solved by time...

@why-not-try-calmer
Copy link

Indeed, it's a problem, but we hope to at least support Android v8/9 - that would almost 1.5x the number of supported devices.

In any case, both these problems will be solved by time...

Ah you mean that you plan on supporting ARMv7 when time comes? Then all is fine I guess!

@maxwell-kalin
Copy link
Author

maxwell-kalin commented Jul 17, 2022

my phone is not even old, its 1 year old... has android 11
i recomend switching to a more portable language like rust or go

@maxwell-kalin
Copy link
Author

maxwell-kalin commented Aug 11, 2022

I don't think we can - Haskell has aarch64 support, but not the previous ARM versions...

Are you sure?
i think it does...
its a Nix problem and not a Haskell problem
https://nixos.wiki/wiki/NixOS_on_ARM

debian offers haskell armv7 out of the box

@maxwell-kalin
Copy link
Author

Bump

haskell has armv7 support, port the app please?

@epoberezkin
Copy link
Member

epoberezkin commented Oct 9, 2022

Right, this is indeed tooling and not Haskell problem…

@ltguillaume
Copy link

Is this a short-term goal? Seems you can get there with QEMU pretty easily.

Not supporting ARMv7 rules out a whole batch of devices, so it'll take a lot more time for SimpleX to gain traction.

@maxwell-kalin
Copy link
Author

Or even gain traction at all

@maxwell-kalin
Copy link
Author

i see no future in this project if i cant even run it on a modern phone where every other app works
(Element/Matrix or XMPP)

Why should anyone use this if you cant be sure it works on all modern devices

@epoberezkin
Copy link
Member

epoberezkin commented Nov 1, 2022

  1. It’s definitely a priority to run on aarch32 / ARM v7, but a lower priority than to run on Android 8 and 9 which is likely to happen sooner.
  2. I wouldn’t call 32 bit android devices modern, that they are still manufactured and sold doesn’t make them modern. The biggest surprise was to discover the devices with 64 bit CPUs locked in 32 bit mode - we all should just stop buying them…
  3. Please be aware that Google seems to have already dropped the support or deprecated 32 bit apps, and Pixel 7 devices can’t run them.

I share the frustration - we will do what we can to add 32 bit device support, but my recommendation is to only buy 64 bits devices next time you upgrade - the price difference is minimal (less than $5 in many cases), you just need to check the small print.

@epoberezkin
Copy link
Member

Is this a short-term goal? Seems you can get there with QEMU pretty easily.

that’s not that easy, but we are doing it.

@why-not-try-calmer
Copy link

why-not-try-calmer commented Nov 2, 2022

My phone belongs to the armeabi v7a platform. I can run any Google Play app and therefore use any instant messaging application published there. But I cannot use SimpleX, to my great dismay.

Also, it's incorrect to say that Google Play is no longer supporting 32-bit kernels and it's incorrect to assume that platforms like mine are for "old phones" only (this model hit market in 2019). To tell me that it was a mistake to get this phone might be true but is irrelevant to the importance of having a large platform coverage.

@ltguillaume
Copy link

ltguillaume commented Nov 2, 2022

  1. It’s definitely a priority to run on aarch32 / ARM v7, but a lower priority than to run on Android 8 and 9 which is likely to happen sooner.

I really don't get this. Why would it be more important to be able to run the app on end-of-life and wholly unsupported operating system versions than to be able to run it on up-to-date devices (considering the software) that happen to have a different architecture?

@epoberezkin
Copy link
Member

Why would it be more important to be able to run the app on end-of-life and wholly unsupported operating system versions

I might be wrong, but it seems that it gives more value (= more supported devices) for less effort... According to Google ~20-25% of devices are still running Android 8 and 9... I don't know the exact number, but it seems that much less than 20% of devices have 32-bit only CPUs, and at the same time it is substantially more complex to support – that's why it is a lower priority.

Also, support for 32-bit CPU seems dying faster than Androids 8 and 9, and some 64 bit devices stopped supporting 32-bit apps (again I might be wrong here) - https://www.androidauthority.com/arm-32-vs-64-bit-explained-1232065/.

If you have a better statistics we might be reconsidering the priorities, but it's in progress anyway – 32bit support is next on the list after supporting Android 8 and 9.

@ltguillaume
Copy link

ltguillaume commented Nov 2, 2022

According to Google ~20-25% of devices are still running Android 8 and 9...

There will undoubtedly be a significant amount of overlap between devices on Android 8/9 and 32-bit CPU devices. So fixing support for Android 8/9 will only have true meaning if you'll also support 32-bit CPU's.

Also, support for 32-bit CPU seems dying faster than Androids 8 and 9, and some 64 bit devices stopped supporting 32-bit apps (again I might be wrong here) - https://www.androidauthority.com/arm-32-vs-64-bit-explained-1232065/.

It can't, because there is no support for Android 8 and 9 anymore (https://endoflife.date/android).

I think it's admirable to still support older Android OS's, but I think it's ill-advised to prioritize supporting the use of insecure devices over supporting older devices that have been updated to run up-to-date OS versions with proper security patches still available (e.g. via LineageOS/GrapheneOS/DivestOS), or just newer devices with an older architecture (@why-not-try-calmer's case).

@maxwell-kalin
Copy link
Author

I HAVE AN ANDROID 11 WITH ARMv7

God Damn it the version is unimportant JESUS!

@maxwell-kalin
Copy link
Author

@ltguillaume
There are MANY new Phones produced like mine that has Android 11 AND armv7

@ltguillaume
Copy link

ltguillaume commented Nov 8, 2022

@ata-star I never said there aren't. I think you misread my statement, twice. We'd like to see the same thing, and still you're "downvoting" me. I think you should try to stop shouting and start reading.

@epoberezkin
Copy link
Member

@ltguillaume @ata-star thanks - the comments actually helped to re-assess the priority of 32 bit devices support – instead of "to do some time next year" we are looking into it now, together with Android 8/9.

@ata-star There are MANY new Phones produced like mine that has Android 11 AND armv7

I would love to see some statistics, if you have it. I was looking, but couldn't find it. Even Samsung hides it in small print, which is annoying.

Irrespective of SimpleX Chat supporting it, I really hope this stops soon, and Google simply stops upgrading OS for 32bit devices, as the savings are minimal, but it creates unnecessary fragmentation, lots of libraries are only tested on 64bit CPUs, so this definitely creates some risks of bugs...

@ltguillaume I think it's admirable to still support older Android OS's, but I think it's ill-advised to prioritize supporting the use of insecure devices over supporting older devices that have been updated to run up-to-date OS versions with proper security patches still available

That was actually the main argument to re-asses, so thanks for not just shrugging it away :)

In any case, Android 8/9 seems to be a substantial share, whether there is an overlap I am not so sure, it could be the opposite, e.g., the possible logic could be that it's been some time since only lower-end devices were 32bit, and they may be upgraded more frequently than higher-end devices, that can be 64bit, but still not upgradeable. Don't get me wrong, I don't really know, just playing devil's advocate here. A credible statistics on the distribution would be very helpful. Play Store must have it, but I can't find it...

@why-not-try-calmer
Copy link

why-not-try-calmer commented Nov 8, 2022

A credible statistics on the distribution would be very helpful. Play Store must have it, but I can't find it...

There you go: https://gs.statcounter.com/os-version-market-share/android
We can discuss all day long how "credible" this is (consolidated ~22% market share between 9 & 8) but I hope there's common sense in the idea that since Play Store supports ALL devices running Android 9, they must do it for a reason that should also apply to SimpleX (relative to a reasonable cost in terms of time and effort).

Also let's be real: looking from the code there's 0 reason to think that Simplex is too demanding CPU-wise or GPU-wise or RAM-wise; so it's always a good idea to cater for sober users who like to stick to simple, affordable devices -- if possible.

@epoberezkin
Copy link
Member

https://www.reddit.com/r/SimpleXChat/comments/10dcyze/simplex_chat_lack_of_android_32_bit_cpu_support/ - some interesting comments to this post.

TL;DR: the advice is to upgrade to aarch64 devices for security reasons. It doesn't mean we won't support 32bit, as most people won't follow this advice, but somebody might I think...

@why-not-try-calmer
Copy link

why-not-try-calmer commented Jan 19, 2023

That's where I unsubscribe from this topic. The implication that folks at Signal, Threema, and all the others are somewhat irresponsible the supporting 32bit is veering too much into a clown show.

@ltguillaume
Copy link

ltguillaume commented Jan 20, 2023

https://www.reddit.com/r/SimpleXChat/comments/10dcyze/simplex_chat_lack_of_android_32_bit_cpu_support/ - some interesting comments to this post.

TL;DR: the advice is to upgrade to aarch64 devices for security reasons. It doesn't mean we won't support 32bit, as most people won't follow this advice, but somebody might I think...

This may sound harsh, but I'd rather see your being honest.

It's very, very strange to talk about "security reasons" when it comes to 32-bit devices and at the same time about supporting Android 8 and 9 (it even being a higher priority). You may as well just be honest and state that adding support for 32-bit, up-to-date, devices is more work (work you don't wanna put in) than supporting earlier EOL and with certainty non-secure Android versions, instead of hiding behind security reasons...

@x80486
Copy link

x80486 commented Jan 20, 2023

I don't think anyone is hiding behind anything. They stated clearly that they are working to support the architecture (makes no sense to be honest) and since it's open source, people should be able to watch the progress at some point — if not already. In the meantime there is nothing wrong providing evidence that it can have downsides around security and what not. This looks very much like a side conversation, not as something that's being put in front of the development process to delay it.

New projects require some magic to succeed because time and money are always limited. I would rather see SimpleX spending time on the future, fixing existing bugs, and solidifying what's done already, rather than trying to support something that will be discarded any time soon.

@ltguillaume
Copy link

ltguillaume commented Jan 20, 2023

That's fine, but if you say it's because of security reasons, then drop possible support for Android 9 and below, too.

That being said, offering money to potential users for making a phone switch is something I'd never have expected, lolz.

@epoberezkin
Copy link
Member

epoberezkin commented Jan 21, 2023

@ltguillaume Android 8 and 9 (it even being a higher priority). You may as well just be honest and state that adding support for 32-bit, up-to-date

We actually did re-assess it as a result of this conversation, and the work to add 32bit support is on-going. That I made some comment several months ago doesn't mean I still think the same :)

We're not hiding behind security reasons, that was not the point of sharing this comment.

@x80486 They stated clearly that they are working to support the architecture (makes no sense to be honest)

I thought that too. But the logic is very simple here - not supporting 32 bit architecture doesn't reduce the network size proportionally to the share of 32 bit devices, if it were the case it would make no sense indeed. It has a disproportionately higher impact on network size, because of its impact on network density. Imagine a group of 4 close friends with only one of them having 32 bit device... The result is that none of them will use SimpleX Chat, even if 3 of them want to use it. Anecdotally, I have such an active group myself, with one of key members having 32 bit device (and yes, I suggested I'll just buy the device, but we're still talking with this particular group elsewhere). My estimate is that adding support for 32bit devices will 2-3x the network size, because of disproportionate impact of network density on network size.

That's fine, but if you say it's because of security reasons, then drop possible support for Android 9 and below, too.

We're not looking into Android 9 atm, work on 32 bit support is on-going - there is a substantial progress.

That being said, offering money to potential users for making a phone switch is something I'd never have expected, lolz.

We do have a small marketing budget, I'd rather give it to the users :)))

@ltguillaume
Copy link

Thanks for the reply, great to see these developments (no Android 8/9 plans, but 32-bit progress), I think it's the right call, and your reasoning about the impact on network size (in the current "landscape") seems sound.

@epoberezkin
Copy link
Member

epoberezkin commented Feb 19, 2023

@ltguillaume @x80486 @why-not-try-calmer @ata-star what specific 32 bit device would you recommend to test the app on? Can't run 32 bit app on Google pixel it seems...

@maxwell-kalin
Copy link
Author

i have my LG K41 something, it is an 32bit device

@why-not-try-calmer
Copy link

@ltguillaume @x80486 @why-not-try-calmer @ata-star what specific 32 bit device would you recommend to test the app on? Can't run 32 bit app on Google pixel it seems...

I wish I could help with testing but I am using an Android 9 phone.

@ltguillaume
Copy link

Do you have any old device lying around? Doesn't need an up-to-date stock OS, with e.g. https://divestos.org/pages/devices you'll be reasonably up-to-date (11/12/13) with additional security over LineageOS and even backported kernel security patches.

@tomquas
Copy link

tomquas commented Mar 5, 2023

@epoberezkin rewrite in rust ;)

seriously: google can warn about 32-bit apps as much as they want, 32-bit devices will stay in use for longer than we can expect.

do you have an ETA? market share seems still ~20%, representing tens of millions of devices...

@epoberezkin
Copy link
Member

epoberezkin commented Mar 7, 2023

We have a working build for ARM v7a working on Android 8+ - I will upload APK here to test in a day or two.

I have it working on 32bit Android Go device with Android 12, I think there must be some issues on earlier versions that we didn't find/fix.

@epoberezkin
Copy link
Member

epoberezkin commented Mar 8, 2023

Happy to see that many upvotes on this news in less than a day :)

The experimental APK for 32bit devices with ARM v7a CPU is here: https://github.com/simplex-chat/simplex-chat/releases/tag/v4.5.3

It should support Android 8+/API 26+ (the currently released version supports Android 10+/29+)

We did fix several limitations of lower android versions we could find, and we could not find any CPU-specific issues. But given that it's literally the world's first Haskell build for ARM v7a CPU, it's reasonable to expect bugs, so definitely don't use it with your existing main chat profile yet.

@tomquas
Copy link

tomquas commented Mar 8, 2023

thank you so much! am making an exception to the rule and am jumping in to test the world's first...

@epoberezkin
Copy link
Member

@tomquas which rule? :)

@tomquas
Copy link

tomquas commented Mar 8, 2023

first feedback:

on a galaxy a13 (SM A135F) running android 12 i get the following error...

E/flutter (14622): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: Invalid argument(s): Failed to load dynamic library 'libsimplex.so': dlopen failed: cannot locate symbol "__svfscanf" referenced by "/data/app/~~lXL6-_sZj2UUHFapIDdwRw==/com.wildtrolls.u2nite-ztdnoT7Is2ekAwGJFgBRNg==/base.apk!/lib/armeabi-v7a/libsimplex.so"...

both required libs reside under

android/app/src/main/jniLibs/armeabi-v7a:
.rw-r--r-- tom staff 116 MB Wed Mar  8 13:54:57 2023 libsimplex.so
.rw-r--r-- tom staff  12 MB Wed Mar  8 13:54:57 2023 libsupport.so

any hints appreciated...

@epoberezkin
Copy link
Member

epoberezkin commented Mar 8, 2023

I don't understand... What file did you install? Also assuming you couldn't start it at all or did it crash later?

@avently
Copy link
Collaborator

avently commented Mar 8, 2023

@tomquas I have devices on Android 13 and 9. Both works fine with provided apk.

Do you use the same apk or your specific build of it?

Logs you attached have a note about flutter. We don't use flutter in the app. Where it comes from? Did you use the libs in your own build based on flutter or is it come from system that uses flutter for some reason?

@tomquas
Copy link

tomquas commented Mar 8, 2023

sorry for commenting a bit out of context: we're developing a flutter app and integrate simplex chat using libsimplex.so, libsupport.so, and some dart/flutter glue code.

so i didn't install the apk on the phone but extracted both libs and threw it into our own project. during runtime, while dart trying to load libsimplex.so, we see the failure log shown above. does this clarify things?

@epoberezkin
Copy link
Member

it won't work without changes in the app itself

@avently
Copy link
Collaborator

avently commented Mar 8, 2023

@tomquas currently, the libs doesn't have some symbols required for linking. So to make it working, I added these symbols to a linking stage, see here for more info:
77d7c8a

af44e03

Maybe later we will include required symbols as a stubs to the libs code, so the process in commits will not be needed

@tomquas
Copy link

tomquas commented Mar 8, 2023

Maybe later we will include required symbols as a stubs to the libs code, so the process in commits will not be needed

awesome, thanks a lot. i'll be watching this thread and will be happy to report more results...

@epoberezkin
Copy link
Member

https://github.com/simplex-chat/simplex-chat/releases/tag/v4.6.0-beta.0

This beta supports armv7a and Android 8+

@Kortik7
Copy link

Kortik7 commented Mar 22, 2023

Installed 4.6.0-beta.0 on pixle 3a with GrapheneOS same symptoms as before. app at opening just closes and doesn't go anywhere. closes back to main page.

@epoberezkin
Copy link
Member

If it persists with 4.6 please open another issue. This one is done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Related to Android app enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

11 participants