-
Notifications
You must be signed in to change notification settings - Fork 562
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
port to Android master issue #1701
Comments
It looks like the ptrace on Android is different from Linux, so we may need re-implement ptrace based injector on Android. |
drgui fails to build. We should probably just disable it as it doesn't seem likely to be used on Android:
|
For the config dir, since $HOME is read-only and /tmp does not exist, and we do not really want to query at the Java level for the cache dir, the plan is to require cwd to be writable. We'll agument drconfiglib to check for writability (just a stat) and go to the next choice if so. I also plan to replace "/tmp" with "/data/local/tmp" as the latter is often (but not always) avail on Android. |
To support a private libc, we need to emulate what the Android linker does (or else build our own version of libc). It has a special class object that provides convenience access to the args, env vars, and auxv, and it passes it to libc in a special call to __libc_init_tls() prior to calling any other libc init routine. libc stores it into TLS and accesses it from there from its regular init routines. |
We need to make every executable PIE. Today there is a piecemeal approach of marking target flags which results in most things NOT being PIE:
I am removing those target flags and changing the global rules in one place which gives us:
|
Emulating the special setup the Android dynamic linker does for Bionic turns out to not be too difficult, but it does add fragile assumptions about the precise internal pthread data structure (the linker initializes a number of fields deep in the struct for the initial thread) in addition to the layout of the kernel arg class described above. We'll have to live with these dependences. Once that works, we hit an issue where the libdl.so fini array function crashes on exit. It looks like libdl.so's fini array points into libc.so:
In any case, rather than trying to reorder their unmapping or sthg, I'm just going to skip libdl's fini calls on Android. That's enough to get clients that use libc, such as libopcodes, running. Thus we'll consider this core issue finished and open separate issues for any further problems. |
To port DynamoRIO to Android, we need build DynamoRIO with Android ndk, and some other challenges. This is a container case for the Android port.
The text was updated successfully, but these errors were encountered: