libpd/pd-for-android

Crash on pixels with Android 8.1 and any devices with Android P in sys_startgui

evabishchevich opened this issue · 3 comments

There is a problem with Pixel XL / Pixel 2 XL / Pixel / Pixel 2 after last Android security update.

During initialization process in https://github.com/libpd/libpd project there are function calls libpd_init -> sys_startgui -> setuid. Calling setuid is prohibited in Android starting Oreo.
Looks like it was already fixed in libpd/libpd@b8b972a#diff-77187871d46f57651997feb0748feffdL90.
The same behaviour was detected on Android P Preview.

Stacktrace:

#00  pc 0000000000054bc8  /system/lib/libc.so (setuid+12)
  #01  pc 000000000004c343  /data/app/SOMEAPP/lib/arm/libpd.so (sys_startgui+1094)
  #02  pc 0000000000069b21  /data/app/SOMEAPP/lib/arm/libpd.so (libpd_init+152)
  #03  pc 000000000006a4ff  /data/app/SOMEAPP/lib/arm/libpd.so (libpd_queued_init+142)
  #04  pc 0000000000003b9d  /data/app/SOMEAPP/lib/arm/libpdnativeopensl.so (Java_org_puredata_core_PdBase_initialize+4)

@evabishchevich Could you test my pd_0.48 branch to see if it solves the issue?
#70

Should be now fixed through #70

@tkirshboim I've tested it with pd 0.48.1 and it was fixed. I guess 0.48 fixed the issue too