Android behavior change: no more W^X violations

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Android behavior change: no more W^X violations

Post by abik »

Ras wrote: Sat Dec 05, 2020 1:34 pm Yes. From Peter Osterlund's Droidfish repo referring to that problem.
Ah, thank you kindly for this data point. It is good to see this confirmed by others too.
lucasart wrote: Sat Dec 05, 2020 10:36 am Should we completely review the UCI model of pipe communication between processes, and instead have engines be compiled as dynamic libraries ? Or will that also be banned for security reasons ?
For the time being it seems that pre-packaged engines work, even with pipe communication, both inter- and intra-app. But I agree that the ways things are going, it is not unlikely exec() may go away too. In that case it will be natively called engines packaged in one app only.
User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Android behavior change: no more W^X violations

Post by abik »

Okay, after some more research and asking around my old Android friends, I convinced myself there is no way to install binaries from SD card into Chess for Android anymore. The same restrictions will apply to any chess app that *targets* API 29 (note, apps targeting API 28 will still work, even when running on API 29, but since Google Play requires the API 29 target from now on, artificially keeping the target low is only a solution for alternative distribution channels).

I internally proposed adding an explicit W^X permission to Android so that users can opt-in for apps that they trust (like Chess for Android :-)). Let's see how that goes, but I am not sure how serious such a proposal will be taken, or if that even addresses all security concerns.

For now, the silver lining behind the dark cloud is that engine packages still work, as do GUI's that package their own engines.
IanKennedy
Posts: 55
Joined: Sun Feb 04, 2018 12:38 pm
Location: UK

Re: Android behavior change: no more W^X violations

Post by IanKennedy »

I've got a Huawei P40 Pro so I don't take stuff off the PlayStore. Don't use it much for games (or development) but do have DroidFish and a couple of Go programs.
Author of the actively developed PSYCHO chess engine
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Android behavior change: no more W^X violations

Post by Ras »

abik wrote: Sun Dec 06, 2020 10:38 pmI internally proposed adding an explicit W^X permission to Android so that users can opt-in for apps that they trust (like Chess for Android :-)).
Maybe they could put in a store requirement so that this option will only be available for apps where the author states a technical reason why the app needs that feature.
Rasmus Althoff
https://www.ct800.net
Pi4Chess
Posts: 253
Joined: Mon Nov 16, 2020 12:13 pm
Full name: Manuel Rivera

Re: Android behavior change: no more W^X violations

Post by Pi4Chess »

Is the OEX standard the way to go or even this is impacted ?
twobeer
Posts: 20
Joined: Sat Feb 22, 2020 6:43 pm
Full name: Leif Aronsson

Re: Android behavior change: no more W^X violations

Post by twobeer »

It's sad the path Google has chosen to more and more sacrifice openness, on the altar of "control/security". It's also sad how evil Google behaves when it comes to Huawei and its Google play licensing policies (I expect these boycotts to spread to many more brands).. It will take some time before authorities stamp down on Googles evil ways, in the meantime I try to use Android versions that are mostly AOSP based and do without Google Services, which I feel is abusing the users trust more and more these days.

To me it's baffling that Google treats iOS more generous than AOSP and unlicensed versions of Android with it's free apps and services.

Can we hope for Sailfish, Tizen, Harmony or other Linux flavors for mobile devices?? I really think Google/IOS duopoly needs competion.
User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Android behavior change: no more W^X violations

Post by abik »

Pi4Chess wrote: Mon Dec 07, 2020 2:50 pm Is the OEX standard the way to go or even this is impacted ?
When done right (viz. don't violate W^X), both OEX and the chessbase compatible format will work, even targeting API 29 on Android 10. For example, both Chess for Android and the BikJump engine package target API 29, and you can still import the engine without problem.
User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Android behavior change: no more W^X violations

Post by abik »

I had not touched this webpage in a long time, but this change demands an explanatory note on the UCI and XBoard Protocols for Android page.
parrish
Posts: 2651
Joined: Fri Mar 17, 2006 6:05 am

Re: Android behavior change: no more W^X violations

Post by parrish »

abik wrote: Sun Dec 06, 2020 10:38 pm Okay, after some more research and asking around my old Android friends, I convinced myself there is no way to install binaries from SD card into Chess for Android anymore. The same restrictions will apply to any chess app that *targets* API 29 (note, apps targeting API 28 will still work, even when running on API 29, but since Google Play requires the API 29 target from now on, artificially keeping the target low is only a solution for alternative distribution channels).

I internally proposed adding an explicit W^X permission to Android so that users can opt-in for apps that they trust (like Chess for Android :-)). Let's see how that goes, but I am not sure how serious such a proposal will be taken, or if that even addresses all security concerns.

For now, the silver lining behind the dark cloud is that engine packages still work, as do GUI's that package their own engines.
Then please pre-package the latest Stockfish and Komodo, in an update.
User avatar
abik
Posts: 819
Joined: Fri Dec 01, 2006 10:46 pm
Location: Mountain View, CA, USA
Full name: Aart Bik

Re: Android behavior change: no more W^X violations

Post by abik »

parrish wrote: Tue Dec 08, 2020 1:50 am Then please pre-package the latest Stockfish, and Komodo, in an update.
Yes, I saw your one star rating on Google Play. Thank you for that... :-(

For many reasons, I prefer not to ship engine binaries in Chess for Android. However, luckily several engine packages are available on Google Play, which work really well with Chess for Android. See, for example, Karl's stockfish collection.