UbuntuTouch

Differences between revisions 2 and 23 (spanning 21 versions)
Revision 2 as of 2013-05-22 14:52:08
Size: 2219
Editor: 188-221-246-203
Comment:
Revision 23 as of 2013-07-04 19:07:57
Size: 4160
Editor: cpe-72-179-16-106
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
To be able to run autopilot tests on touch images, this is all you need:

== Preparing your test environment ==
Make sure you have the *latest* image and the latest android-tools-adb from the phablet-team ppa. Install the relevant ppas:

 * sudo apt-add-repository -y ppa:phablet-team/tools
 * sudo apt-add-repository -y ppa:autopilot/ppa (if not on saucy)
 * sudo apt-get update
 * sudo apt-get install phablet-tools android-tools-adb
To prepare your device for ubuntu-touch testing and to be able to write and run automated tests on touch images, this is all you need (or have a look at the [[https://wiki.ubuntu.com/Touch/Install|Touch/Install wiki]]):
Line 13: Line 5:
 * phablet-flash {{{#!highlight bash
phablet-flash}}}
Line 22: Line 15:
 * phablet-network-setup -i {{{#!highlight bash
phablet-network-setup -i
}}}
Line 32: Line 27:
 * adb shell getprop ro.build.display.id {{{#!highlight bash
adb shell getprop ro.build.display.id

or just
adb
shell getprop (for all the properties)
}}}

== Preparing your test environment ==
Make sure you have the '''latest''' image and the latest android-tools-adb from the phablet-team ppa. Install the relevant ppas:

{{{#!highlight bash
sudo apt-add-repository -y ppa:phablet-team/tools
sudo apt-add-repository -y ppa:autopilot/ppa (if not on the latest dev release)
sudo apt-get update
sudo apt-get install phablet-tools android-tools-adb}}}
Line 36: Line 46:
This command will set up autopilot for you. You'll need the patch like the one in
https://code.launchpad.net/~pwlars/phablet-tools/new-autopilot/+merge/163235
unless it's merged already, otherwise it will install autopilot under
the old name.
This command will set up autopilot for you.
Line 41: Line 48:
 * phablet-test-run -n -i -p 'qml-phone-shell-autopilot' qml_phone_shell {{{
phablet-test-run -n -i -p 'qml-phone-shell-autopilot' qml_phone_shell
}}}
Line 44: Line 53:
phablet's home directory on the phone. Then you can just run phablet's home directory on the phone.
Line 46: Line 55:
 * 'phablet-test-run -n test_foo' Then you want to connect to the device:

{{{
adb shell (to get to the android shell)
}}}

After this you are already running commands on the device, then we recommend you install openssh-server to be able to interact with the device through ssh:

{{{#!highlight bash
 apt-get install openssh-server
}}}

You can now install packages, etc. If you prefer to use ssh instead from this point onwards, you can exit this shell and go back to your main machine. Map the phone port to some random port and off you go:

{{{#!highlight bash
adb forward tcp:8888 tcp:22
ssh -p 8888 phablet@localhost (phablet/phablet).
}}}

Then you can just run anything you want.

{{{
'phablet-test-run -n test_foo'
}}}
Line 51: Line 83:

== Now get started with Autopilot ==

This [[https://wiki.ubuntu.com/Touch/Testing/Autopilot|wiki]] contains all the information you need to install autopilot on your phone and start testing on it, or even better, developing tests for autopilot-touch!


== Some other useful commands ==

 * Put a script or a file in your device:

{{{
   adb push /path/to/file /home/phablet
}}}

 * No ifconfig available, so you get the ip of the device by using ip

{{{
   ip addr (no ifconfig available)
}}}

 * Show all the installed apps:
{{{
perl -p -i -e 's/expandable\:\ false/expandable\:\ true/' /usr/share/unity8/Dash/Apps/ApplicationsFilterGrid.qml
}}}

 * Network configuration on the device
{{{
adb shell netcfg
}}}

== Update apps and show them all on the screen ==

Run from the host, the following bash script uses adb to enable all the apps on the main screen (it will install them from the repositories, requires network to be setup):

 * http://bazaar.launchpad.net/~popey/+junk/phablet-flash-wrapper/view/head:/add_apps.sh

== How to install a kernel on the device ==

 * https://wiki.ubuntu.com/Kernel/Dev/AndroidKernel

To prepare your device for ubuntu-touch testing and to be able to write and run automated tests on touch images, this is all you need (or have a look at the Touch/Install wiki):

Flash the image for testing and set up the network

Connect device you want to flash with ubuntu touch via USB to your computer and run:

   1 phablet-flash

This will just flash your phone with the latest image, after you read and accept the disclaimer.

If you try to stop the download and then start it again, you'll need to remove the previous attempt to download from /home/<username>/Downloads/phablet-flash/<build_no>.

Then you want to set up the wireless on your touch device by copying your wireless configuration to it:

   1  phablet-network-setup -i

This will set up the network based on your current wireless networking profile from /etc/NetworkManager/system-connections.

If you are on a desktop computer or you want to use a different configuration for your testing, call phablet-network-setup with -n and provide the configuration file you wish to use.

Verify which image you've got!

If you want to verify which image you have on the device:

   1 adb shell getprop ro.build.display.id
   2 
   3 or just
   4 adb
   5 shell getprop (for all the properties)

Preparing your test environment

Make sure you have the latest image and the latest android-tools-adb from the phablet-team ppa. Install the relevant ppas:

   1 sudo apt-add-repository -y ppa:phablet-team/tools
   2 sudo apt-add-repository -y ppa:autopilot/ppa (if not on the latest dev release)
   3 sudo apt-get update
   4 sudo apt-get install phablet-tools android-tools-adb

Start running stuff

This command will set up autopilot for you.

phablet-test-run -n -i -p 'qml-phone-shell-autopilot' qml_phone_shell

One thing you can do once you do this, is drop a test, say "test_foo" in phablet's home directory on the phone.

Then you want to connect to the device:

adb shell (to get to the android shell)

After this you are already running commands on the device, then we recommend you install openssh-server to be able to interact with the device through ssh:

   1  apt-get install openssh-server

You can now install packages, etc. If you prefer to use ssh instead from this point onwards, you can exit this shell and go back to your main machine. Map the phone port to some random port and off you go:

   1 adb forward tcp:8888 tcp:22
   2 ssh -p 8888 phablet@localhost (phablet/phablet). 

Then you can just run anything you want.

'phablet-test-run -n test_foo'

The -n is very important. It kills the phone shell before running the test. If you don't do this, your application will be executed in the background and autopilot won't be able to interact with it.

Now get started with Autopilot

This wiki contains all the information you need to install autopilot on your phone and start testing on it, or even better, developing tests for autopilot-touch!

Some other useful commands

  • Put a script or a file in your device:

   adb push /path/to/file /home/phablet
  • No ifconfig available, so you get the ip of the device by using ip

   ip addr (no ifconfig available)
  • Show all the installed apps:

perl -p -i -e 's/expandable\:\ false/expandable\:\ true/' /usr/share/unity8/Dash/Apps/ApplicationsFilterGrid.qml
  • Network configuration on the device

adb shell netcfg  

Update apps and show them all on the screen

Run from the host, the following bash script uses adb to enable all the apps on the main screen (it will install them from the repositories, requires network to be setup):

How to install a kernel on the device

QATeam/AutomatedTesting/UbuntuTouch (last edited 2013-07-04 19:07:57 by cpe-72-179-16-106)