1b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer#!/bin/sh
2b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer
3b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmerrtrn=0
4b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer
5b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmeradb shell mount | grep -q /sdcard
6b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmerif [ 0 -ne $? ]
7b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmerthen
8b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer    echo FAILURE: /sdcard is not mounted
9b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer    exit 1
10b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmerfi
11b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer
12b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmerfor i in nosuid noexec
13b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmerdo
14b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer    adb shell mount | grep /sdcard | grep -q $i
15b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer    if [ 0 -ne $? ]
16b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer    then
17b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer        echo FAILURE: /sdcard is not mounted $i
18b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer        rtrn=$(expr $rtrn + 1)
19b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer    fi
20b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmerdone
21b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer
22894b139aa18f0554571c6d69dbbc2a16178d9d64Chris Palmerfor i in mem kmem
23894b139aa18f0554571c6d69dbbc2a16178d9d64Chris Palmerdo
24894b139aa18f0554571c6d69dbbc2a16178d9d64Chris Palmer    adb shell ls /dev/*mem | grep -q $i
25894b139aa18f0554571c6d69dbbc2a16178d9d64Chris Palmer    if [ 0 -ne $? ]
26894b139aa18f0554571c6d69dbbc2a16178d9d64Chris Palmer    then
27894b139aa18f0554571c6d69dbbc2a16178d9d64Chris Palmer        echo FAILURE: $i is present on system
28894b139aa18f0554571c6d69dbbc2a16178d9d64Chris Palmer        rtrn=$(expr $rtrn + 1)
29894b139aa18f0554571c6d69dbbc2a16178d9d64Chris Palmer    fi
30894b139aa18f0554571c6d69dbbc2a16178d9d64Chris Palmer
31894b139aa18f0554571c6d69dbbc2a16178d9d64Chris Palmerdone
32894b139aa18f0554571c6d69dbbc2a16178d9d64Chris Palmer
33b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmerexit $rtrn
34b000782e81f9757ec9f6eb1711135cdaf622f6b0Chris Palmer
35