-
Notifications
You must be signed in to change notification settings - Fork 4
/
run
executable file
·72 lines (60 loc) · 1.46 KB
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#! /bin/bash
PKG=com.radio_sensors.rs
ACTION=Client
APP=Client-debug.apk
function run()
{
ant clean debug
adb install bin/$APP
adb shell am start -n $PKG/$PKG.$ACTION
}
function remove()
{
adb uninstall $PKG
}
function log()
{
# Log.d ("t1", "t2"); in App
adb logcat
# adb logcat RStrace:D *:S; for only RStrace debug
}
function init_project()
{
# Generate local.properties file
android update project -p .
}
function update_project()
{
android update project --subprojects -p $HOME/workspace/RS --target 1
}
function sign()
{
ant clean release
#jarsigner -verbose -keystore RS.keystore bin/Client-release-unsigned.apk RS
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore RS.keystore bin/Client-release-unsigned.apk RS
jarsigner -verify -verbose -certs my_application.apk
rm -f Read-Sensors.apk
zipalign 4 bin/Client-release-unsigned.apk Read-Sensors.apk
}
function make_key()
{
#CN=Robert Olsson, OU=RD, O=Radio Sensors AB, L=Uppsala, ST=Unknown, C=SE
#keytool -genkey -v -keystore RS.keystore -alias RS -keyalg RSA -validity 10000
keytool -genkey -v -keystore RS.keystore -alias RS -keyalg RSA -keysize 2048 -validity 10000
}
function debug_over_ip()
{
# Get IP address ov android
adb tcpip 5555
adb connect 192.168.2.91:5555
# Disconnect USB cable
adb logcat
}
function screenshot()
{
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
}
#remove
sign
#run