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

handle AOSP 10 Runtime changes #53

Open
c3ph3us opened this issue Feb 7, 2020 · 3 comments
Open

handle AOSP 10 Runtime changes #53

c3ph3us opened this issue Feb 7, 2020 · 3 comments

Comments

@c3ph3us
Copy link

c3ph3us commented Feb 7, 2020

support android 10 changes:

In Android 10, the ART build system creates the Runtime module in two variants: release and debug (contains additional diagnostic and debugging tools). The release version is installed on user builds and the debug version is installed on userdebug and eng builds. When a device boots, apexd mounts the Runtime module under /apex/com.android.runtime.

Native libraries
Android 10 refactors native libraries that support the Managed Core Library. Several dynamically linked libraries (for example, libcrypto, libexpat, and zlib) that were previously shared with other parts of the platform are now duplicated so that the Runtime module has its own copies loaded into the runtime linker namespace. Dynamically linked native libraries provided by the Runtime module are in /apex/com.android.runtime/{lib,lib64}.

Android 10 moves the libnativebridge library to the Runtime module as this library is tightly coupled with libnativeloader and the Bionic C libraries that are part of the Runtime module.

refs:

https://source.android.com/devices/architecture/modular-system/runtime
https://source.android.com/devices/architecture/vndk/linker-namespace

art_runtime.cc:58 refs libart.so

art_runtime.h:18

static constexpr const char *kAndroidLibDir = "/system/lib64/";
static constexpr const char *kLibNativeBridgePath = "/system/lib64/libnativebridge.so";
static constexpr const char *kLibArtPath = "/system/lib64/libart.so";
static constexpr const char *kLibAocPath = "/system/lib64/libaoc.so";
static constexpr const char *kLibHoudiniArtPath = "/system/lib64/arm64/libart.so";

static constexpr const char *kAndroidLibDir = "/system/lib/";
static constexpr const char *kLibArtPath = "/system/lib/libart.so";
static constexpr const char *kLibAocPath = "/system/lib/libaoc.so";
static constexpr const char *kLibHoudiniArtPath = "/system/lib/arm/libart.so";

@c3ph3us c3ph3us changed the title handle AOSPK 10 Runtime changes handle AOSP 10 Runtime changes Feb 7, 2020
@c3ph3us
Copy link
Author

c3ph3us commented Feb 7, 2020

related

#50
#48
#15

@lyqaiym
Copy link

lyqaiym commented May 17, 2020

add "/apex/com.android.runtime/lib/libart.so"
if (api_level_ >= ANDROID_Q)
expected_access_flags |= kAccPublicApi;
but crash

2020-05-17 19:40:55.528 30782-30782/com.example.looper A/libc: Fatal signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xca05406c in tid 30782 (.example.looper), pid 30782 (.example.looper)
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: Build fingerprint: 'samsung/d2xqzc/d2xq:10/QP1A.190711.020/N9760ZCU1BTA1:user/release-keys'
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: Revision: '16'
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: ABI: 'arm'
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: Timestamp: 2020-05-17 19:40:55+0800
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: pid: 30782, tid: 30782, name: .example.looper >>> com.example.looper <<<
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: uid: 10434
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xca05406c
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: r0 eede6821 r1 ca05406c r2 ffb55920 r3 ffb55924
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: r4 c25c7794 r5 f17efe00 r6 c3a14871 r7 ffb55808
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: r8 00000000 r9 f3a73e00 r10 ffb55930 r11 f3a73e00
2020-05-17 19:40:55.578 31079-31079/? A/DEBUG: ip c25c8a04 sp ffb55750 lr c23369fb pc eede6820
2020-05-17 19:40:55.579 31079-31079/? A/DEBUG: backtrace:
2020-05-17 19:40:55.579 31079-31079/? A/DEBUG: #00 pc 00208820 /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreter10DoFieldPutILNS_13FindFieldTypeE37ELNS_9Primitive4TypeE0ELb1ELb1EEEbPNS_6ThreadERKNS_11ShadowFrameEPKNS_11InstructionEt+1272) (BuildId: 84d977a6273fa7d72047ec0f95daaf95)

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

No branches or pull requests

2 participants