qilingframework / qilingframework/qiling

Make symbolic link for Android

Open
#1,459 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6.1k
Forks
798
Avg merge
1d 1h
Merged PRs (30d)
9

Description

Using Android binaries found in the rootfs, the readlink syscall does not find the binaries associated with file descriptors 3 and 4 which are libdl.so and libc.so respectively.

Here's the warning message raise during the execution:

linker: readlink("/proc/self/fd/3") failed: Operation not permitted [fd=3]
linker: warning: unable to get realpath for the library "/system/lib64/libdl.so". Will use given path.
linker: readlink("/proc/self/fd/4") failed: Operation not permitted [fd=4]
linker: warning: unable to get realpath for the library "/system/lib64/libc.so". Will use given path.
propClient: PropClient failed to load

Creating symbolic links as shown below is enough to satisfy the linker:

mkdir -p rootfs/arm64_android/proc/self/fd
ln -sf rootfs/arm64_android/system/lib64/libdl.so rootfs/arm64_android/proc/self/fd/3
ln -sf rootfs/arm64_android/system/lib64/libc.so rootfs/arm64_android/proc/self/fd/4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the Android rootfs handles /proc/self/fd and the readlink syscall, using the reported paths for descriptors 3 and 4 as the entry point. Compare that behavior with the proposed rootfs/arm64_android/proc/self/fd symlinks; done means the linker resolves libdl.so and libc.so without the readlink warnings and PropClient loads.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, python
Domain
operating-systems, reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.