-
Notifications
You must be signed in to change notification settings - Fork 347
Localviewserver
dtmilano edited this page Apr 24, 2013
·
17 revisions
UNDER CONSTRUCTION
TemperatureConverter is a sample application used to demonstrated several testing techniques and features.
TemperatureConverterActivity extends LocalViewServerActivity enabling the use of AndroidViewClient, Culebra and other utilities even on devices with Secure mode enabled.
If secure mode is enabled and you run this command line:
(eval $(adb shell getprop | dos2unix | egrep '\[ro\.secure]|\[ro\.debuggable]' | sed 's/\./_/g; s/]: /=/g; s/[][]//g'); [[ 1 == $ro_secure && 0 == $ro_debuggable ]] && echo "System is secure: AVC won't work" || echo "System is not secure: AVC will work")
this is obtained:
System is secure: AVC won't work
Running TemperatureConverter with LocalViewServer will circumvent this restriction, though for this sole application.
In such case you will be able to run:
$ dump.py
and obtain
android.widget.FrameLayout id/no_id/1
android.widget.LinearLayout id/no_id/2
android.widget.FrameLayout id/no_id/3
android.widget.TextView id/no_id/4 TemperatureConverter
android.widget.FrameLayout id/no_id/5
android.widget.LinearLayout id/no_id/6
android.widget.TextView id/no_id/7 Enter the temperature to convert
android.widget.TextView id/no_id/8 Celsius
android.widget.EditText id/no_id/9
android.widget.TextView id/no_id/10 Fahrenheit
android.widget.EditText id/no_id/11
android.widget.TextView id/no_id/12
LocalViewServer repository can be found at https://github.com/dtmilano/ViewServer