Merge lp:~bzoltan/qtcreator-plugin-ubuntu/new_adbd_policy into lp:qtcreator-plugin-ubuntu

Proposed by Zoltan Balogh
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 249
Merged at revision: 251
Proposed branch: lp:~bzoltan/qtcreator-plugin-ubuntu/new_adbd_policy
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 97 lines (+14/-14)
6 files modified
share/qtcreator/ubuntu/scripts/device_service_ssh_start (+1/-2)
share/qtcreator/ubuntu/scripts/device_version (+2/-1)
share/qtcreator/ubuntu/scripts/functions.inc (+4/-3)
share/qtcreator/ubuntu/scripts/openssh_connect (+4/-4)
share/qtcreator/ubuntu/scripts/openssh_publickey (+2/-2)
share/qtcreator/ubuntu/scripts/openssh_version (+1/-2)
To merge this branch: bzr merge lp:~bzoltan/qtcreator-plugin-ubuntu/new_adbd_policy
Reviewer Review Type Date Requested Status
Benjamin Zeller Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+230960@code.launchpad.net

Commit message

Adopt connectivity scripts to the new adbd policy

Description of the change

Adopt connectivity scripts to the new adbd policy

Test with the latest phablet image with write enabled FS, install the new adbd (http://people.canonical.com/~ogra/android-tools-adbd_4.2.2+git20130218-3ubuntu24_armhf.deb) from the terminal app, set a passphrase (other than phablet), reboot the device.

To post a comment you must log in.
246. By Zoltan Balogh

use dpkg instead of uname and send the warings to /dev/null

Revision history for this message
Oliver Grawert (ogra) wrote :

comments inline ...

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
247. By Zoltan Balogh

Remove leftover code

248. By Zoltan Balogh

merge from trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
249. By Zoltan Balogh

Fix ssh connection to the device

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'share/qtcreator/ubuntu/scripts/device_service_ssh_start'
2--- share/qtcreator/ubuntu/scripts/device_service_ssh_start 2014-04-09 11:58:50 +0000
3+++ share/qtcreator/ubuntu/scripts/device_service_ssh_start 2014-09-03 10:36:18 +0000
4@@ -18,7 +18,6 @@
5 . `dirname $0`/functions.inc
6
7 if [ ! "$(adb_shell getprop persist.service.ssh)" = "true" ];then
8- adb_shell setprop persist.service.ssh true >/dev/null 2>&1
9- adb_shell start ssh >/dev/null 2>&1
10+ adb_shell gdbus call -y -d com.canonical.PropertyService -o /com/canonical/PropertyService -m com.canonical.PropertyService.SetProperty ssh true >/dev/null
11 fi
12
13
14=== modified file 'share/qtcreator/ubuntu/scripts/device_version'
15--- share/qtcreator/ubuntu/scripts/device_version 2014-06-12 08:49:13 +0000
16+++ share/qtcreator/ubuntu/scripts/device_version 2014-09-03 10:36:18 +0000
17@@ -21,4 +21,5 @@
18 adb_shell getprop "ro.product.name"
19 device_image_hardware
20 device_image_version
21-adb_shell dpkg --print-architecture
22+#adb_shell uname -p|sed 's/v7l/hf/'
23+adb_shell 'dpkg --print-architecture 2>/dev/null '
24
25=== modified file 'share/qtcreator/ubuntu/scripts/functions.inc'
26--- share/qtcreator/ubuntu/scripts/functions.inc 2014-06-05 09:39:56 +0000
27+++ share/qtcreator/ubuntu/scripts/functions.inc 2014-09-03 10:36:18 +0000
28@@ -15,6 +15,8 @@
29 #
30 # Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
31
32+echo $0 >> /tmp/sdk.logs
33+
34 set -e
35
36 SCRIPTPATH=`dirname $0`
37@@ -23,8 +25,7 @@
38 SSHIDENTITY=${CONFIGDIR}/ubuntudevice_id_rsa
39 USERNAME=phablet
40
41-function adb_root {
42- adb -s ${SERIALNUMBER} root &> /dev/null
43+function adb_wait {
44 adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
45 }
46
47@@ -147,4 +148,4 @@
48 mkdir -p ${CONFIGDIR}
49 fi
50
51-adb_root
52+adb_wait
53
54=== modified file 'share/qtcreator/ubuntu/scripts/openssh_connect'
55--- share/qtcreator/ubuntu/scripts/openssh_connect 2014-04-09 11:58:50 +0000
56+++ share/qtcreator/ubuntu/scripts/openssh_connect 2014-09-03 10:36:18 +0000
57@@ -21,9 +21,9 @@
58 USERNAME=$3
59 IP=$4
60
61-#$SCRIPTPATH/device_portforward ${PORT} 3768
62-if [ ! "$(adb_shell getprop persist.service.ssh)" = "true" ];then
63- adb_shell setprop persist.service.ssh true >/dev/null 2>&1
64- adb_shell start ssh >/dev/null 2>&1
65+SSH_SERVICE_STATUS=`adb_shell getprop persist.service.ssh`
66+
67+if [[ ${SSH_SERVICE_STATUS=} =~ "false" ]]; then
68+ adb_shell gdbus call -y -d com.canonical.PropertyService -o /com/canonical/PropertyService -m com.canonical.PropertyService.SetProperty ssh true >/dev/null
69 fi
70 x-terminal-emulator -e "ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $PORT $USERNAME@$IP" &
71
72=== modified file 'share/qtcreator/ubuntu/scripts/openssh_publickey'
73--- share/qtcreator/ubuntu/scripts/openssh_publickey 2013-09-25 16:59:02 +0000
74+++ share/qtcreator/ubuntu/scripts/openssh_publickey 2014-09-03 10:36:18 +0000
75@@ -45,9 +45,9 @@
76 function deploy_key {
77 echo "Deploy the host key to the device.."
78 KEY=`cat $SSHIDENTITY.pub`
79- phablet_shell "mkdir -p /home/$USERNAME/.ssh"
80+ adb_shell "mkdir -p /home/$USERNAME/.ssh"
81 echo "..key folder created"
82- phablet_shell "echo $KEY >> /home/$USERNAME/.ssh/authorized_keys2"
83+ adb_shell "echo $KEY >> /home/$USERNAME/.ssh/authorized_keys2"
84 echo "..key deployed!"
85 }
86
87
88=== modified file 'share/qtcreator/ubuntu/scripts/openssh_version'
89--- share/qtcreator/ubuntu/scripts/openssh_version 2013-09-24 16:54:55 +0000
90+++ share/qtcreator/ubuntu/scripts/openssh_version 2014-09-03 10:36:18 +0000
91@@ -21,5 +21,4 @@
92 ssh-add ~/.ssh/ubuntudevice*id_rsa &> /dev/null
93 set -e
94
95-adb_shell apt-get -f install &> /dev/null
96-adb_shell apt-cache policy openssh-server|grep Installed|sed "s/Installed\://g"
97+adb_shell dpkg -l openssh-server|egrep "^ii"|awk '{print $3}'

Subscribers

People subscribed via source and target branches

to all changes: