This repository has been archived by the owner on Aug 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/sbin/sh | ||
FD=$2 | ||
|
||
ui_print() { | ||
echo -n -e "ui_print $1\n" > /proc/self/fd/$FD | ||
echo -n -e "ui_print\n" > /proc/self/fd/$FD | ||
} | ||
|
||
copy_linker() | ||
{ | ||
if [ -f /vendor/bin/linker ]; then | ||
ui_print "- Copying linker from vendor" | ||
cp -f /vendor/bin/linker /system/bin/linker | ||
else | ||
ui_print "- Copying linker from zip" | ||
cp -f /tmp/bin/linker /system/bin/linker | ||
fi | ||
ui_print "- Fixing linker permision" | ||
chown -h root.shell /system/bin/linker | ||
} | ||
|
||
fix_libs() | ||
{ | ||
ui_print "- Fixing missing $1" | ||
cp -f /system/lib/$1 /vendor/lib/$1 | ||
cp -f /system/lib64/$1 /vendor/lib64/$1 | ||
} | ||
|
||
ui_print "************************************" | ||
ui_print "** GSI Linker Fix by simonsmh **" | ||
ui_print "Link: github.com/OP3Treble/linkerfix" | ||
ui_print "************************************" | ||
|
||
# Mount partition | ||
mount system | ||
mount vendor | ||
|
||
# Self Function | ||
copy_linker | ||
|
||
### TODO: Not working in 9.0 GSI, we need to compile linker under LOS 16 | ||
# # Needed by 9.0 GSI vndksupport | ||
# fix_libs libcameraservice.so | ||
# fix_libs [email protected] | ||
# fix_libs libutilscallstack.so | ||
# fix_libs [email protected] | ||
|
||
# Unmount partition | ||
umount system | ||
umount vendor | ||
|
||
ui_print "Succeed." | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#SIMONSMH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
# linkerfix | ||
This repo contains a linker (32-bit) binary with shim libs support compiled in. | ||
|
||
This linker supports unofficial OP3Treble Project: | ||
|
||
```Makefile | ||
TARGET_LD_SHIM_LIBS := \ | ||
/vendor/lib/hw/camera.msm8996.so|libcamera_shim.so | ||
``` | ||
|
||
Reference: https://review.lineageos.org/c/LineageOS/android_bionic/+/223065/2 |
Binary file not shown.