Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Commit

Permalink
Fixed Nexus 6P 8.1 kernel (wifi) modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kimocoder committed Mar 14, 2019
1 parent 57a956a commit 3f7630f
Show file tree
Hide file tree
Showing 71 changed files with 134 additions and 2 deletions.
2 changes: 1 addition & 1 deletion devices.cfg
Expand Up @@ -63,7 +63,7 @@ block = /dev/block/mmcblk0p2

# Nexus 6P
[angler]
author = "Binkybear & jcadduono & kimocoder (8.1+)"
author = "Binkybear & jcadduono & kimocoder"
version = "2.1 & 2.0 & 3.0 (8.1+)"
kernelstring = "NetHunter + ElementalX"
arch = arm64
Expand Down
Binary file modified oreo/angler/Image.gz-dtb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Expand Up @@ -234,7 +234,6 @@ kernel/drivers/input/touchscreen/cyttsp4_device_access.ko
kernel/drivers/input/touchscreen/cyttsp4_loader.ko
kernel/drivers/input/touchscreen/cyttsp4_debug.ko
kernel/drivers/input/touchscreen/synaptics_dsx25/synaptics_dsx_core.ko
kernel/drivers/input/touchscreen/synaptics_dsx25/synaptics_dsx_rmi_dev.ko
kernel/drivers/input/touchscreen/synaptics_dsx25/synaptics_dsx_fw_update.ko
kernel/drivers/leds/led-class.ko
kernel/drivers/leds/leds-qpnp.ko
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
20 changes: 20 additions & 0 deletions oreo/angler/patch.d/010-no-force-encrypt
@@ -0,0 +1,20 @@
#!/sbin/sh

. "$env"

print "Disabling forced encryption in the fstab..."

found_fstab=false

for fstab in fstab.*; do
[ -f "$fstab" ] || continue
print "Found fstab: $fstab"
sed -i "
s/\b\(forceencrypt\|forcefdeorfbe\)=/encryptable=/g
" "$fstab"
found_fstab=true
done

$found_fstab || print "Unable to find the fstab!"

exit 0
28 changes: 28 additions & 0 deletions oreo/angler/patch.d/015-no-dm-verity
@@ -0,0 +1,28 @@
#!/sbin/sh

. "$env"

print "Disabling dm-verity in the fstab..."

found_fstab=false

for fstab in fstab.*; do
[ -f "$fstab" ] || continue
print "Found fstab: $fstab"
sed -i "
s/,verify\b//g
s/\bverify,//g
s/\bverify\b//g
s/,support_scfs\b//g
s/\bsupport_scfs,//g
s/\bsupport_scfs\b//g
" "$fstab"
found_fstab=true
done

$found_fstab || print "Unable to find the fstab!"

setprop ro.config.dmverity false
rm -f verity_key sbin/firmware_key.cer

exit 0
23 changes: 23 additions & 0 deletions oreo/angler/patch.d/020-patch-ramdisk
@@ -0,0 +1,23 @@
#!/sbin/sh

. "$env"

cd "$ramdisk_patch" && [ "$(ls)" ] || exit 0

# fix permissions of patch files
chmod -R 0755 .

find -type f \( \
-name "*.rc" ! -name "ueventd.*" \
\) -exec chmod 0750 {} \;

find -type f \( \
-name "*.xml" -o -name "*.do" -o -name "*.pem" -o -name "*.vtab" -o \
-name "fstab.*" -o -name "*.prop" -o -name "*_contexts" -o \
-name "ueventd.*" -o -name "sepolicy" -o -name "sepolicy_version" \
\) -exec chmod 0644 {} \;

print "Copying new files to the ramdisk..."
cp -rd ./. "$ramdisk/"

exit 0
62 changes: 62 additions & 0 deletions oreo/angler/patch.d/030-kernel-modules
@@ -0,0 +1,62 @@
#!/sbin/sh

. "$env"

[ "$(ls "$tmp/modules")" ] || {
print "No kernel modules found, skipping"
exit 0
}

print "Installing /lib/modules symlink"
rm -rf lib
mkdir -m 0755 lib
ln -s /system/lib/modules lib/modules

cd "$tmp"

print "Gathering original module layout..."
find /system/lib/modules -name "*.ko" -maxdepth 3 > modules.list
> modules.layout
while read -r kmod; do
kmod_name=$(basename "$(readlink "$kmod")")
echo "$kmod:$kmod_name" >> modules.layout
done < modules.list

print "Removing old kernel modules..."
rm -rf /system/lib/modules

print "Installing new kernel modules..."
cp -r modules /system/lib/

print "Creating module symlinks..."

# Create /system/lib/modules/*.ko symlinks for each module installed
find /system/lib/modules -type f -name "*.ko" > modules.installed
while read -r kmod_installed; do
kmod_name=$(basename "$kmod_installed")
kmod_link="/system/lib/modules/$kmod_name"
ln -s "$kmod_installed" "$kmod_link"
echo "Symlinked module (install): $kmod_link -> $kmod_installed"
done < modules.installed

# Create module symlinks at original module link locations
while read -r kmod; do
kmod_name=$(echo "$kmod" | cut -f2 -d:)
kmod_link=$(echo "$kmod" | cut -f1 -d:)
if [ ! "$kmod_link" ] || [ ! "$kmod_name" ] || [ -e "$kmod_link" ]; then
continue
fi
kmod_installed=$(grep -m1 "/$kmod_name$" modules.installed)
if [ ! -f "$kmod_installed" ]; then
echo "Warning: Module not installed: $kmod_link -> $kmod_installed"
continue
fi
mkdir -p "$(dirname "$kmod_link")"
ln -s "$kmod_installed" "$kmod_link"
echo "Symlinked module (layout): $kmod_link -> $kmod_installed"
done < modules.layout

setperm 0755 0644 /system/lib/modules
chcon -R -h "u:object_r:system_file:s0" /system/lib/modules

exit 0
File renamed without changes.

0 comments on commit 3f7630f

Please sign in to comment.