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
=== modified file 'share/qtcreator/ubuntu/scripts/device_service_ssh_start'
--- share/qtcreator/ubuntu/scripts/device_service_ssh_start 2014-04-09 11:58:50 +0000
+++ share/qtcreator/ubuntu/scripts/device_service_ssh_start 2014-09-03 10:36:18 +0000
@@ -18,7 +18,6 @@
18. `dirname $0`/functions.inc18. `dirname $0`/functions.inc
1919
20if [ ! "$(adb_shell getprop persist.service.ssh)" = "true" ];then20if [ ! "$(adb_shell getprop persist.service.ssh)" = "true" ];then
21 adb_shell setprop persist.service.ssh true >/dev/null 2>&121 adb_shell gdbus call -y -d com.canonical.PropertyService -o /com/canonical/PropertyService -m com.canonical.PropertyService.SetProperty ssh true >/dev/null
22 adb_shell start ssh >/dev/null 2>&1
23fi22fi
2423
2524
=== modified file 'share/qtcreator/ubuntu/scripts/device_version'
--- share/qtcreator/ubuntu/scripts/device_version 2014-06-12 08:49:13 +0000
+++ share/qtcreator/ubuntu/scripts/device_version 2014-09-03 10:36:18 +0000
@@ -21,4 +21,5 @@
21adb_shell getprop "ro.product.name"21adb_shell getprop "ro.product.name"
22device_image_hardware22device_image_hardware
23device_image_version23device_image_version
24adb_shell dpkg --print-architecture24#adb_shell uname -p|sed 's/v7l/hf/'
25adb_shell 'dpkg --print-architecture 2>/dev/null '
2526
=== modified file 'share/qtcreator/ubuntu/scripts/functions.inc'
--- share/qtcreator/ubuntu/scripts/functions.inc 2014-06-05 09:39:56 +0000
+++ share/qtcreator/ubuntu/scripts/functions.inc 2014-09-03 10:36:18 +0000
@@ -15,6 +15,8 @@
15#15#
16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>16# Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
1717
18echo $0 >> /tmp/sdk.logs
19
18set -e20set -e
1921
20SCRIPTPATH=`dirname $0`22SCRIPTPATH=`dirname $0`
@@ -23,8 +25,7 @@
23SSHIDENTITY=${CONFIGDIR}/ubuntudevice_id_rsa25SSHIDENTITY=${CONFIGDIR}/ubuntudevice_id_rsa
24USERNAME=phablet26USERNAME=phablet
2527
26function adb_root {28function adb_wait {
27 adb -s ${SERIALNUMBER} root &> /dev/null
28 adb -s ${SERIALNUMBER} wait-for-device &> /dev/null29 adb -s ${SERIALNUMBER} wait-for-device &> /dev/null
29}30}
3031
@@ -147,4 +148,4 @@
147 mkdir -p ${CONFIGDIR}148 mkdir -p ${CONFIGDIR}
148fi149fi
149150
150adb_root151adb_wait
151152
=== modified file 'share/qtcreator/ubuntu/scripts/openssh_connect'
--- share/qtcreator/ubuntu/scripts/openssh_connect 2014-04-09 11:58:50 +0000
+++ share/qtcreator/ubuntu/scripts/openssh_connect 2014-09-03 10:36:18 +0000
@@ -21,9 +21,9 @@
21USERNAME=$321USERNAME=$3
22IP=$422IP=$4
2323
24#$SCRIPTPATH/device_portforward ${PORT} 376824SSH_SERVICE_STATUS=`adb_shell getprop persist.service.ssh`
25if [ ! "$(adb_shell getprop persist.service.ssh)" = "true" ];then25
26 adb_shell setprop persist.service.ssh true >/dev/null 2>&126if [[ ${SSH_SERVICE_STATUS=} =~ "false" ]]; then
27 adb_shell start ssh >/dev/null 2>&127 adb_shell gdbus call -y -d com.canonical.PropertyService -o /com/canonical/PropertyService -m com.canonical.PropertyService.SetProperty ssh true >/dev/null
28fi28fi
29x-terminal-emulator -e "ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $PORT $USERNAME@$IP" &29x-terminal-emulator -e "ssh -i ${SSHIDENTITY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $PORT $USERNAME@$IP" &
3030
=== modified file 'share/qtcreator/ubuntu/scripts/openssh_publickey'
--- share/qtcreator/ubuntu/scripts/openssh_publickey 2013-09-25 16:59:02 +0000
+++ share/qtcreator/ubuntu/scripts/openssh_publickey 2014-09-03 10:36:18 +0000
@@ -45,9 +45,9 @@
45function deploy_key {45function deploy_key {
46 echo "Deploy the host key to the device.."46 echo "Deploy the host key to the device.."
47 KEY=`cat $SSHIDENTITY.pub`47 KEY=`cat $SSHIDENTITY.pub`
48 phablet_shell "mkdir -p /home/$USERNAME/.ssh"48 adb_shell "mkdir -p /home/$USERNAME/.ssh"
49 echo "..key folder created"49 echo "..key folder created"
50 phablet_shell "echo $KEY >> /home/$USERNAME/.ssh/authorized_keys2"50 adb_shell "echo $KEY >> /home/$USERNAME/.ssh/authorized_keys2"
51 echo "..key deployed!"51 echo "..key deployed!"
52}52}
5353
5454
=== modified file 'share/qtcreator/ubuntu/scripts/openssh_version'
--- share/qtcreator/ubuntu/scripts/openssh_version 2013-09-24 16:54:55 +0000
+++ share/qtcreator/ubuntu/scripts/openssh_version 2014-09-03 10:36:18 +0000
@@ -21,5 +21,4 @@
21ssh-add ~/.ssh/ubuntudevice*id_rsa &> /dev/null21ssh-add ~/.ssh/ubuntudevice*id_rsa &> /dev/null
22set -e22set -e
2323
24adb_shell apt-get -f install &> /dev/null24adb_shell dpkg -l openssh-server|egrep "^ii"|awk '{print $3}'
25adb_shell apt-cache policy openssh-server|grep Installed|sed "s/Installed\://g"

Subscribers

People subscribed via source and target branches

to all changes: