aboutsummaryrefslogtreecommitdiff
path: root/benchmarks-script/antutu/run.sh
blob: 66dc19453342e998f6c72535c11e3a0d151e3af4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

#need to be defined for different benchmark apks
activity="com.antutu.ABenchMark/.ABenchMarkStart"
apk_file_name="com.antutu.ABenchMark-1.apk"
test_method="testAntutu"
apk_package="com.antutu.ABenchMark"

function change_no_update(){
    user=`adb shell ls -l /data/data/|grep com.antutu.ABenchMark|cut -d \  -f 2`
    user=`echo ${user}|sed 's/\r//'`
    dir_prefs="/data/data/com.antutu.ABenchMark/shared_prefs"
    adb push ${parent_dir}/shared_prefs "${dir_prefs}"
    adb shell chown ${user}:${user} "${dir_prefs}"
    adb shell chmod 700 "${dir_prefs}"
    adb shell chown ${user}:${user} "${dir_prefs}/com.antutu.ABenchMark_preferences.xml"
    adb shell chmod 660 "${dir_prefs}/com.antutu.ABenchMark_preferences.xml"
}

#following should no need to modify
parent_dir=`dirname ${0}`
source "${parent_dir}/../common/common.sh"
post_install="change_no_update"
main "$@"