Skip to content
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.

__system_property_* are deprecated, not available on new platforms #40

Open
jbeich opened this issue Dec 6, 2015 · 3 comments
Open

Comments

@jbeich
Copy link
Contributor

jbeich commented Dec 6, 2015

Lollipop introduced support for 64bit platforms (aarch64, x86_64, mips64). According to android/platform_ndk#143627 <sys/system_properties.h> can no longer be used: ABI hidden in libc.so but not libc.a. For one, 4a9648e leads to

/tmp/ccVrqi5L.ltrans2.ltrans.o: In function `api_level':
util.c:1391: undefined reference to `__system_property_get'
/tmp/ccVrqi5L.ltrans3.ltrans.o: In function `compat_property_foreach.lto_priv.74':
cmd_getprop.c:193: undefined reference to `__system_property_find_nth'
/tmp/ccVrqi5L.ltrans3.ltrans.o: In function `property_compare':
cmd_getprop.c:123: undefined reference to `__system_property_read'
cmd_getprop.c:124: undefined reference to `__system_property_read'
/tmp/ccVrqi5L.ltrans8.ltrans.o: In function `getprop_main':
cmd_getprop.c:312: undefined reference to `__system_property_find'
cmd_getprop.c:315: undefined reference to `__system_property_read'
cmd_getprop.c:312: undefined reference to `__system_property_find'
cmd_getprop.c:315: undefined reference to `__system_property_read'
cmd_getprop.c:288: undefined reference to `__system_property_read'
/tmp/ccVrqi5L.ltrans14.ltrans.o: In function `make_abi_mask':
cmd_stub.c:649: undefined reference to `__system_property_find'
cmd_stub.c:651: undefined reference to `__system_property_read'
cmd_stub.c:654: undefined reference to `__system_property_find'
cmd_stub.c:656: undefined reference to `__system_property_read'
cmd_stub.c:660: undefined reference to `__system_property_find'
cmd_stub.c:662: undefined reference to `__system_property_read'
collect2: error: ld returned 1 exit status
@dcolascione
Copy link
Contributor

As usual, Google removed a useful facility without replacing it. dlsym it is.

@yan12125
Copy link
Contributor

yan12125 commented Jun 2, 2016

How about adapting Chromium's workaround [1] in fb-adb?

[1] https://chromium.googlesource.com/chromium/src.git/+/master/base/sys_info_android.cc

@MuntashirAkon
Copy link

I can see that dlsym is used for looking up some __system_property_* after #56 but __system_property_read isn't. Also, after API 26, __system_property_read_callback has to be used instead of __system_property_read.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants