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

Patch 1 to build gpgv and unset LD_PRELOAD for Android 5.0.* #2

Closed
wants to merge 25 commits into from
Closed

Conversation

adamjhogan
Copy link

Each command calling for the chroot triggers the preloaded libraries from Android's environment. We attempt to unset them. These edits allow building the image and starting the chroot, but lildebi does not detect that it has started at this point. I'm not sure what to do to get that to happen right now.

@eighthave
Copy link
Owner

I've got the gpgv stuff almost building. Can you tell me more about the LD_PRELOAD stuff?

eighthave added a commit that referenced this pull request Jan 30, 2015
If an executable is built fully statically, with no dynamic linking at all,
then the same binary will work on both PIE systems (android-21 and above),
and systems where PIE does not work (older than android-16).

closes #2 #2
eighthave added a commit that referenced this pull request Jan 30, 2015
If an executable is built fully statically, with no dynamic linking at all,
then the same binary will work on both PIE systems (android-21 and above),
and systems where PIE does not work (older than android-16).

closes #2 #2
eighthave added a commit that referenced this pull request Jan 30, 2015
If an executable is built fully statically, with no dynamic linking at all,
then the same binary will work on both PIE systems (android-21 and above),
and systems where PIE does not work (older than android-16).

refs guardianproject#145 guardianproject#145
closes #2 #2
@adamjhogan
Copy link
Author

LD_PRELOAD is pulled from init.environ.rc (see https://android-review.googlesource.com/#/c/101634/) and can cause problems since it requires the libraries listed to be loaded into memory regardless of whether or not they can be used by apps/programs on the system. On CM12, LD_PRELOAD=libsigchain.so is set on boot. When it cannot properly call the library, it fails gracefully by printing ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded: ignored. for each attempt to enter the chroot or run a program from outside of the chroot. If the chroot's .profile or .bashrc does not unset LD_PRELOAD, running programs within the chroot exhibit this same error. Pushing this lib and its dependencies to /debian/usr/lib/ causes a segfault. offensive-security/kali-nethunter#98 addresses unsetting LD_PRELOAD to allow Kali and Android to coexist without library load erros, as an example of this fix in the wild.

eighthave added a commit that referenced this pull request Feb 9, 2015
If an executable is built fully statically, with no dynamic linking at all,
then the same binary will work on both PIE systems (android-21 and above),
and systems where PIE does not work (older than android-16).

refs guardianproject#145 guardianproject#145
closes #2
eighthave added a commit that referenced this pull request Feb 9, 2015
If an executable is built fully statically, with no dynamic linking at all,
then the same binary will work on both PIE systems (android-21 and above),
and systems where PIE does not work (older than android-16).

refs guardianproject#145 guardianproject#145
closes #2
@adamjhogan adamjhogan deleted the patch-1 branch February 17, 2015 16:06
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

Successfully merging this pull request may close these issues.

2 participants