├── .gitattributes ├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── common ├── post-fs-data.sh ├── service.sh └── system.prop ├── config.sh ├── module.prop └── system └── lib └── liboemcrypto.so /.gitattributes: -------------------------------------------------------------------------------- 1 | # Declare files that will always have LF line endings on checkout. 2 | META-INF/** text eol=lf 3 | common/** text eol=lf 4 | module.prop text eol=lf 5 | changelog.txt text eol=lf 6 | 7 | # Denote all files that are truly binary and should not be modified. 8 | system/** binary 9 | -------------------------------------------------------------------------------- /META-INF/com/google/android/update-binary: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | ########################################################################################## 3 | # 4 | # Magisk Module Template Install Script 5 | # by topjohnwu 6 | # 7 | ########################################################################################## 8 | 9 | # Detect whether in boot mode 10 | ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true || BOOTMODE=false 11 | $BOOTMODE || ps -A 2>/dev/null | grep zygote | grep -v grep >/dev/null && BOOTMODE=true 12 | 13 | TMPDIR=/dev/tmp 14 | INSTALLER=$TMPDIR/install 15 | MAGISKBIN=/data/adb/magisk 16 | 17 | # Default permissions 18 | umask 022 19 | 20 | # Initial cleanup 21 | rm -rf $TMPDIR 2>/dev/null 22 | mkdir -p $INSTALLER 23 | 24 | # echo before loading util_functions 25 | ui_print() { echo "$1"; } 26 | 27 | require_new_magisk() { 28 | ui_print "*******************************" 29 | ui_print " Please install Magisk v15.0+! " 30 | ui_print "*******************************" 31 | exit 1 32 | } 33 | 34 | ########################################################################################## 35 | # Environment 36 | ########################################################################################## 37 | 38 | OUTFD=$2 39 | ZIP=$3 40 | 41 | mount /data 2>/dev/null 42 | 43 | # Utility functions must exist 44 | [ -f $MAGISKBIN/util_functions.sh ] || require_new_magisk 45 | # Load utility fuctions 46 | . $MAGISKBIN/util_functions.sh 47 | 48 | # We can't alter magisk image live, use alternative image if required 49 | $BOOTMODE && IMG=/data/adb/magisk_merge.img 50 | # Always mount under tmp 51 | MOUNTPATH=$TMPDIR/magisk_img 52 | 53 | # Preperation for flashable zips 54 | get_outfd 55 | 56 | # Mount partitions 57 | mount_partitions 58 | 59 | # Detect version and architecture 60 | api_level_arch_detect 61 | 62 | # You can get the Android API version from $API, the CPU architecture from $ARCH 63 | # Useful if you are creating Android version / platform dependent mods 64 | 65 | # Setup busybox and binaries 66 | $BOOTMODE && boot_actions || recovery_actions 67 | 68 | ########################################################################################## 69 | # Preparation 70 | ########################################################################################## 71 | 72 | # Extract common files 73 | unzip -o "$ZIP" module.prop config.sh 'common/*' -d $INSTALLER >&2 74 | 75 | [ ! -f $INSTALLER/config.sh ] && abort "! Unable to extract zip file!" 76 | # Load configurations 77 | . $INSTALLER/config.sh 78 | 79 | # Check the installed magisk version 80 | MIN_VER=`grep_prop minMagisk $INSTALLER/module.prop` 81 | [ ! -z $MAGISK_VER_CODE -a $MAGISK_VER_CODE -ge $MIN_VER ] || require_new_magisk 82 | MODID=`grep_prop id $INSTALLER/module.prop` 83 | MODPATH=$MOUNTPATH/$MODID 84 | 85 | # Print mod name 86 | print_modname 87 | 88 | # Please leave this message in your flashable zip for credits :) 89 | ui_print "******************************" 90 | ui_print "Powered by Magisk (@topjohnwu)" 91 | ui_print "******************************" 92 | 93 | ########################################################################################## 94 | # Install 95 | ########################################################################################## 96 | 97 | # Get the variable reqSizeM. Use your own method to determine reqSizeM if needed 98 | request_zip_size_check "$ZIP" 99 | 100 | # This function will mount $IMG to $MOUNTPATH, and resize the image based on $reqSizeM 101 | mount_magisk_img 102 | 103 | # Create mod paths 104 | rm -rf $MODPATH 2>/dev/null 105 | mkdir -p $MODPATH 106 | 107 | # Extract files to system. Use your own method if needed 108 | ui_print "- Extracting module files" 109 | unzip -o "$ZIP" 'system/*' -d $MODPATH >&2 110 | 111 | # Remove placeholder 112 | rm -f $MODPATH/system/placeholder 2>/dev/null 113 | 114 | # Handle replace folders 115 | for TARGET in $REPLACE; do 116 | mktouch $MODPATH$TARGET/.replace 117 | done 118 | 119 | # Auto Mount 120 | $AUTOMOUNT && touch $MODPATH/auto_mount 121 | 122 | # prop files 123 | $PROPFILE && cp -af $INSTALLER/common/system.prop $MODPATH/system.prop 124 | 125 | # Module info 126 | cp -af $INSTALLER/module.prop $MODPATH/module.prop 127 | if $BOOTMODE; then 128 | # Update info for Magisk Manager 129 | mktouch /sbin/.core/img/$MODID/update 130 | cp -af $INSTALLER/module.prop /sbin/.core/img/$MODID/module.prop 131 | fi 132 | 133 | # post-fs-data mode scripts 134 | $POSTFSDATA && cp -af $INSTALLER/common/post-fs-data.sh $MODPATH/post-fs-data.sh 135 | 136 | # service mode scripts 137 | $LATESTARTSERVICE && cp -af $INSTALLER/common/service.sh $MODPATH/service.sh 138 | 139 | ui_print "- Setting permissions" 140 | set_permissions 141 | 142 | ########################################################################################## 143 | # Finalizing 144 | ########################################################################################## 145 | 146 | # Unmount magisk image and shrink if possible 147 | unmount_magisk_img 148 | 149 | $BOOTMODE || recovery_cleanup 150 | rm -rf $TMPDIR 151 | 152 | ui_print "- Done" 153 | exit 0 154 | -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # liboemcrypto.so disabler 2 | 3 | ## Description 4 | 5 | Apps that use `liboemcrypto.so` for DRM, such as Netflix and My5, will fail during playback on rooted devices. This Magisk module masks `liboemcrypto.so` with a zero byte replacement. 6 | 7 | ## Changelog 8 | 9 | 2018-04-23: v1 10 | 11 | ## Requirements 12 | - The module assumes the library is located at `/system/lib/liboemcrypto.so`. If your library is located elsewhere (or nowhere), the module will have no effect. 13 | 14 | - The module has been verified working on a Samsung Galaxy S9+ (SM-G965F/DS) running Magisk 16.3 installed by v1.9 of SoLdieR9312's Stock ROM. 15 | -------------------------------------------------------------------------------- /common/post-fs-data.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/... 3 | # This will make your scripts compatible even if Magisk change its mount point in the future 4 | MODDIR=${0%/*} 5 | 6 | # This script will be executed in post-fs-data mode 7 | # More info in the main Magisk thread 8 | -------------------------------------------------------------------------------- /common/service.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/... 3 | # This will make your scripts compatible even if Magisk change its mount point in the future 4 | MODDIR=${0%/*} 5 | 6 | # This script will be executed in late_start service mode 7 | # More info in the main Magisk thread 8 | -------------------------------------------------------------------------------- /common/system.prop: -------------------------------------------------------------------------------- 1 | # This file will be read by resetprop 2 | # Example: Change dpi 3 | # ro.sf.lcd_density=320 4 | -------------------------------------------------------------------------------- /config.sh: -------------------------------------------------------------------------------- 1 | ########################################################################################## 2 | # 3 | # Magisk 4 | # by topjohnwu 5 | # 6 | # This is a template zip for developers 7 | # 8 | ########################################################################################## 9 | ########################################################################################## 10 | # 11 | # Instructions: 12 | # 13 | # 1. Place your files into system folder (delete the placeholder file) 14 | # 2. Fill in your module's info into module.prop 15 | # 3. Configure the settings in this file (common/config.sh) 16 | # 4. For advanced features, add shell commands into the script files under common: 17 | # post-fs-data.sh, service.sh 18 | # 5. For changing props, add your additional/modified props into common/system.prop 19 | # 20 | ########################################################################################## 21 | 22 | ########################################################################################## 23 | # Defines 24 | ########################################################################################## 25 | 26 | # NOTE: This part has to be adjusted to fit your own needs 27 | 28 | # This will be the folder name under /magisk 29 | # This should also be the same as the id in your module.prop to prevent confusion 30 | MODID=liboemcryptodisabler 31 | 32 | # Set to true if you need to enable Magic Mount 33 | # Most mods would like it to be enabled 34 | AUTOMOUNT=true 35 | 36 | # Set to true if you need to load system.prop 37 | PROPFILE=false 38 | 39 | # Set to true if you need post-fs-data script 40 | POSTFSDATA=false 41 | 42 | # Set to true if you need late_start service script 43 | LATESTARTSERVICE=false 44 | 45 | ########################################################################################## 46 | # Installation Message 47 | ########################################################################################## 48 | 49 | # Set what you want to show when installing your mod 50 | 51 | print_modname() { 52 | ui_print "********************************" 53 | ui_print " liboemcrypto.so disabler " 54 | ui_print "********************************" 55 | } 56 | 57 | ########################################################################################## 58 | # Replace list 59 | ########################################################################################## 60 | 61 | # List all directories you want to directly replace in the system 62 | # By default Magisk will merge your files with the original system 63 | # Directories listed here however, will be directly mounted to the correspond directory in the system 64 | 65 | # You don't need to remove the example below, these values will be overwritten by your own list 66 | # This is an example 67 | REPLACE=" 68 | /system/app/Youtube 69 | /system/priv-app/SystemUI 70 | /system/priv-app/Settings 71 | /system/framework 72 | " 73 | 74 | # Construct your own list here, it will overwrite the example 75 | # !DO NOT! remove this if you don't need to replace anything, leave it empty as it is now 76 | REPLACE="" 77 | 78 | ########################################################################################## 79 | # Permissions 80 | ########################################################################################## 81 | 82 | # NOTE: This part has to be adjusted to fit your own needs 83 | 84 | set_permissions() { 85 | # Default permissions, don't remove them 86 | set_perm_recursive $MODPATH 0 0 0755 0644 87 | 88 | # Only some special files require specific permissions 89 | # The default permissions should be good enough for most cases 90 | 91 | # Some templates if you have no idea what to do: 92 | 93 | # set_perm_recursive (default: u:object_r:system_file:s0) 94 | # set_perm_recursive $MODPATH/system/lib 0 0 0755 0644 95 | 96 | # set_perm (default: u:object_r:system_file:s0) 97 | # set_perm $MODPATH/system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0 98 | # set_perm $MODPATH/system/bin/dex2oat 0 2000 0755 u:object_r:dex2oat_exec:s0 99 | # set_perm $MODPATH/system/lib/libart.so 0 0 0644 100 | } 101 | -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=liboemcryptodisabler 2 | name=liboemcrypto disabler 3 | version=v1 4 | versionCode=1 5 | author=ianmacd 6 | description=Disables /system/lib/liboemcrypto.so DRM (e.g. Netflix, My5) on rooted devices. 7 | minMagisk=1500 8 | -------------------------------------------------------------------------------- /system/lib/liboemcrypto.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umylive/liboemcrypto-disabler/602fb7cd30f49dd05675649b1675c6b00ca0ff9f/system/lib/liboemcrypto.so --------------------------------------------------------------------------------