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

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
binkybear committed Sep 28, 2016
2 parents 2136915 + 59abb83 commit 072a402
Show file tree
Hide file tree
Showing 87 changed files with 476 additions and 2 deletions.
20 changes: 19 additions & 1 deletion devices.cfg
Expand Up @@ -56,7 +56,7 @@ block = /dev/block/platform/msm_sdcc.1/by-name/boot
# Nexus 6 for CyanogenMod
[shamucm]
author = "discipuloosho"
version = "1.3"
version = "1.4"
devicenames = shamu
block = /dev/block/platform/msm_sdcc.1/by-name/boot

Expand Down Expand Up @@ -309,6 +309,18 @@ author = "jcadduono"
version = "1.4"
devicenames = klte kltexx kltekdi kltedcm SCL23 SC-04F

# Galaxy Note 7 for Grace UI (International Exynos)
[gracelte]
author = "jcadduono"
version = "1.0"
devicenames = gracelte graceltexx

# Galaxy Note 7 for Grace UI (Korea)
[graceltekor]
author = "jcadduono"
version = "1.0"
devicenames = gracelte graceltekor

# Xiaomi Mi 3, Mi 4 ("cancro")
[cancrocm]
author = "binkybear"
Expand All @@ -328,3 +340,9 @@ author = "DeadSquirrel01"
kernelstring = "NetHunter Kernel TW"
version = "1.0"
devicenames = a5ulte a5ultexx SM-A500FU

# Sony Xperia ZR for Cyanogenmod
[dogo]
author = "Daedroza"
version = "1.0"
devicenames = dogo
10 changes: 9 additions & 1 deletion kernels.txt
Expand Up @@ -31,7 +31,7 @@ If you wish to add a kernel/new device, leave a link to source here and feel fre
# git clone https://github.com/binkybear/kernel_msm.git -b android-msm-shamu-3.10-marshmallow-release nexus6-6
# git clone https://github.com/binkybear/kernel_msm.git -b android-msm-shamu-3.10-lollipop-release nexus6-5
# CM
# git clone https://github.com/discipuloosho/android_kernel_moto_shamu.git -b nethunter-cm13.0
# git clone https://github.com/discipuloosho/android_kernel_moto_shamu.git -b nethunter-cm

# - Nexus 5X
# git clone https://github.com/binkybear/kernel_msm.git -b android-msm-bullhead-3.10-n nexus5x-7
Expand Down Expand Up @@ -94,12 +94,20 @@ If you wish to add a kernel/new device, leave a link to source here and feel fre
# git clone https://github.com/jcadduono/nethunter_kernel_klte.git -b cm-12.1
# git clone https://github.com/jcadduono/nethunter_kernel_klte.git -b cm-13.0

# - Galaxy Note 7
# Grace UI
# git clone https://github.com/jcadduono/android_kernel_samsung_universal8890 -b nethunter-6.0

# - Samsung Galaxy A5
# TouchWiz
# git clone https://github.com/DeadSquirrel01/nethunter-kernel-a5ulte.git -b touchwiz-6.0
# AOSP/CM
# git clone https://github.com/DeadSquirrel01/nethunter-kernel-a5ulte.git -b cm-13.0

# - Sony Xperia ZR
# CM 13.0/CM-14.0
# git clone https://github.com/daedroza/nethunter_kernel_apq8064.git -b master

# - Xiaomi Mi3/4
# CM 13.0
# git clone https://github.com/binkybear/android_kernel_xiaomi_cancro.git -b cm-13.0
Expand Down
Binary file added marshmallow/dogo/zImage
Binary file not shown.
Binary file added marshmallow/gracelte/Image
Binary file not shown.
Binary file added marshmallow/gracelte/dtb.img
Binary file not shown.
Binary file added marshmallow/gracelte/modules/asix.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/ath3k.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/auth_rpcgss.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/ax88179_178a.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/bcm203x.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/bfusb.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/blocklayoutdriver.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/bpa10x.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/cdc_ether.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/cifs.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/grace.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/isofs.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/lockd.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/nfs.ko
Binary file not shown.
Binary file not shown.
Binary file added marshmallow/gracelte/modules/nfsv2.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/nfsv3.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/nfsv4.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/oid_registry.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/pegasus.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/rpcsec_gss_krb5.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/smsc75xx.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/smsc9500.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/smscusbnet.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/sunrpc.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/udf.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/usblp.ko
Binary file not shown.
Binary file added marshmallow/gracelte/modules/usbnet.ko
Binary file not shown.
58 changes: 58 additions & 0 deletions marshmallow/gracelte/patch.d/05-f2fs-fstab
@@ -0,0 +1,58 @@
#!/sbin/sh

. "$env"

f2fs_system_opts="ro"
f2fs_system_flags="wait"

f2fs_data_opts="nosuid,nodev,noatime,nodiratime,discard,inline_xattr"
f2fs_data_flags="wait,encryptable=footer"

f2fs_cache_opts="nosuid,nodev,noatime,nodiratime,discard,inline_xattr"
f2fs_cache_flags="wait"

fstab_get_block() {
awk '$2 == "/'$1'" && $3 == "'$2'" { print $1; exit; }' "$fstab"
}

fstab_get_line() {
awk '$2 == "/'$1'" && $3 == "'$2'" { print NR; exit; }' "$fstab"
}

fstab_has() {
[ "$(fstab_get_block $2 $1)" ] || return 1
}

fstab_check() {
if fstab_has f2fs $1 || ! fstab_has ext4 $1; then
return 1
fi
}

fstab_add() {
fstab_check $1 || return 0
block="$(fstab_get_block $1 ext4)"
line=$(fstab_get_line $1 ext4)
[ "$block" -a "$line" ] && {
sed -i "${line}i$block /$1 f2fs $2 $3" "$fstab"
print "Added f2fs /$1 to fstab"
}
}

print "Patching the fstab for f2fs support..."

found_fstab=false

for fstab in fstab.*; do
print "Found fstab: $fstab"
found_fstab=true
fstab_add system "$f2fs_system_opts" "$f2fs_system_flags"
fstab_add data "$f2fs_data_opts" "$f2fs_data_flags"
fstab_add cache "$f2fs_cache_opts" "$f2fs_cache_flags"
done

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

exit 0
63 changes: 63 additions & 0 deletions marshmallow/gracelte/patch.d/06-disable-protection
@@ -0,0 +1,63 @@
#!/sbin/sh

. "$env"

print "Removing Samsung secure kernel info..."
rm /system/*info*

print "Disabling SELinux enforcement..."
setprop ro.build.selinux 1
setprop ro.build.selinux.enforce 0
setprop ro.boot.selinux permissive

print "Disabling Knox..."
rm -rf /system/app/SecurityLogAgent
setprop ro.config.knox 0
setprop ro.config.kap false
delprop ro.config.kap_default_on
setprop ro.securestorage.support false

print "Disabling TIMA..."
setprop ro.config.tima 0
setprop ro.config.rkp false
delprop ro.config.timaversion

print "Disabling HDCP enforcing..."
setprop wlan.wfd.hdcp disable

print "Adding private mode support..."
insert_after_last init.rc "import /init\\..*\\.rc" "import /init.privatemode.rc"

#print "Probably unnecessary"
#setprop ro.sec.fle.encryption false

print "Applying MobiCore/TUI service fix..."

cat <<EOF > "$tmp/keepmc"
00060308060501020000000000000000.tlbin
07060000000000000000000000000000.tlbin
08130000000000000000000000000000.tlbin
ffffffff000000000000000000000005.tlbin
ffffffff00000000000000000000000e.tlbin
ffffffff000000000000000000000016.tlbin
ffffffff000000000000000000000019.tlbin
ffffffff00000000000000000000001f.tlbin
ffffffff00000000000000000000002e.tlbin
ffffffff000000000000000000000042.tlbin
ffffffff000000000000000000000047.tlbin
ffffffffd00000000000000000000004.tlbin
ffffffffd0000000000000000000000e.tlbin
ffffffffd00000000000000000000014.tlbin
ffffffffd00000000000000000000016.tlbin
ffffffffd00000000000000000000017.tlbin
ffffffffd0000000000000000000001a.tlbin
EOF

cd /system/app/mcRegistry
for tlbin in *.tlbin; do
grep -q "/^$tlbin\$/" "$tmp/keepmc" || rm "$tlbin"
done

rm -rf /system/app/TuiService

exit 0
67 changes: 67 additions & 0 deletions marshmallow/gracelte/patch.d/07-disable-encryption
@@ -0,0 +1,67 @@
#!/sbin/sh

. "$env"

print "Replacing vold/crypto daemons..."

de=$ramdisk_patch/disable-encryption

# remove old binaries
rm -f \
/system/bin/sdp_cryptod \
/system/bin/uncrypt \
/system/bin/vold \
/system/lib/libknox_migration.so \
/system/lib64/libknox_migration.so \
/system/lib64/libsec_ode_migration.so

# place new binaries
mv -f \
"$de/bin/sdp_cryptod" \
"$de/bin/vold" \
"$de/bin/uncrypt" \
/system/bin/

mv -f \
"$de/lib/libknox_migration.so" \
/system/lib/

mv -f \
"$de/lib64/libknox_migration.so" \
"$de/lib64/libsec_ode_migration.so" \
/system/lib64/

rm -rf "$de"

# adjust metadata
chmod 0755 \
/system/bin/sdp_cryptod \
/system/bin/vold

chmod 0750 \
/system/bin/uncrypt

chmod 0644 \
/system/lib/libknox_migration.so \
/system/lib64/libknox_migration.so \
/system/lib64/libsec_ode_migration.so

chown 0:2000 \
/system/bin/sdp_cryptod \
/system/bin/uncrypt \
/system/bin/vold \
/system/lib/libknox_migration.so \
/system/lib64/libknox_migration.so \
/system/lib64/libsec_ode_migration.so

chcon -t sdp_cryptod_exec /system/bin/sdp_cryptod
chcon -t uncrypt_exec /system/bin/uncrypt
chcon -t vold_exec /system/bin/vold
chcon -t system_library_file \
/system/lib/libknox_migration.so \
/system/lib64/libknox_migration.so \
/system/lib64/libsec_ode_migration.so

print "Encryption should no longer be forced!"

exit 0
23 changes: 23 additions & 0 deletions marshmallow/gracelte/patch.d/09-free-space
@@ -0,0 +1,23 @@
#!/sbin/sh

. "$env"

print "Freeing up space..."

# Stock ramdisk items
rm -f \
./*.ranchu \
./*.goldfish \
sbin/dm_verity_signature_checker \
sbin/ffu \
sbin/sverifysignature

# NetHunter ramdisk items
rm -rf \
sbin/busybox_nh \
sbin/dvbootscript.sh \
sbin/dvmediarevert \
sbin/hostapd \
sbin/media_profiles.xml

exit 0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions marshmallow/gracelte/ramdisk-patch/init.privatemode.rc
@@ -0,0 +1,13 @@
on post-fs
mkdir /mnt/shell/privatemode 0700 system system
mkdir /storage/Private 0000 system system

on post-fs-data
mkdir /mnt/shell 0750 shell shell
mkdir /data/privatemode 0770 system system
chown system system /data/privatemode
restorecon /data/privatemode

service privatemode /system/bin/sdcard /data/privatemode /mnt/shell/privatemode 1000 1000
class late_start
oneshot
Binary file added marshmallow/graceltekor/Image
Binary file not shown.
Binary file added marshmallow/graceltekor/dtb.img
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/asix.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/ath3k.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/auth_rpcgss.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/ax88179_178a.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/bcm203x.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/bfusb.ko
Binary file not shown.
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/bpa10x.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/cdc_ether.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/cifs.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/grace.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/isofs.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/lockd.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/nfs.ko
Binary file not shown.
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/nfsv2.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/nfsv3.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/nfsv4.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/oid_registry.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/pegasus.ko
Binary file not shown.
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/smsc75xx.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/smsc9500.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/smscusbnet.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/sunrpc.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/udf.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/usblp.ko
Binary file not shown.
Binary file added marshmallow/graceltekor/modules/usbnet.ko
Binary file not shown.
58 changes: 58 additions & 0 deletions marshmallow/graceltekor/patch.d/05-f2fs-fstab
@@ -0,0 +1,58 @@
#!/sbin/sh

. "$env"

f2fs_system_opts="ro"
f2fs_system_flags="wait"

f2fs_data_opts="nosuid,nodev,noatime,nodiratime,discard,inline_xattr"
f2fs_data_flags="wait,encryptable=footer"

f2fs_cache_opts="nosuid,nodev,noatime,nodiratime,discard,inline_xattr"
f2fs_cache_flags="wait"

fstab_get_block() {
awk '$2 == "/'$1'" && $3 == "'$2'" { print $1; exit; }' "$fstab"
}

fstab_get_line() {
awk '$2 == "/'$1'" && $3 == "'$2'" { print NR; exit; }' "$fstab"
}

fstab_has() {
[ "$(fstab_get_block $2 $1)" ] || return 1
}

fstab_check() {
if fstab_has f2fs $1 || ! fstab_has ext4 $1; then
return 1
fi
}

fstab_add() {
fstab_check $1 || return 0
block="$(fstab_get_block $1 ext4)"
line=$(fstab_get_line $1 ext4)
[ "$block" -a "$line" ] && {
sed -i "${line}i$block /$1 f2fs $2 $3" "$fstab"
print "Added f2fs /$1 to fstab"
}
}

print "Patching the fstab for f2fs support..."

found_fstab=false

for fstab in fstab.*; do
print "Found fstab: $fstab"
found_fstab=true
fstab_add system "$f2fs_system_opts" "$f2fs_system_flags"
fstab_add data "$f2fs_data_opts" "$f2fs_data_flags"
fstab_add cache "$f2fs_cache_opts" "$f2fs_cache_flags"
done

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

exit 0

0 comments on commit 072a402

Please sign in to comment.