Commit Graph

28 Commits

Author SHA1 Message Date
Christian Stenger
069ac16e19 Android: Fix passing binary data through pipe on Windows
Passing binary data through a pipe may break as soon it hits
a control sequence. Encode binary data before piping and
decode it on the device before writing to file.

Fixes: QTCREATORBUG-21547
Change-Id: Iddef5582631575fdd2091c3795d2468be10b8c74
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-21 17:30:14 +00:00
Christian Stenger
04b20a1a46 Android: Fix uploading file on Windows
Quoting of arguments on Windows behaves differently
depending on the used start() overload of QProcess.
Setting the program and arguments before calling start()
with only the QIODevice::OpenMode parameter allows to
preserve the wanted quoting.

Task-number: QTCREATORBUG-21547
Done-with: Oliver Wolff <oliver.wolff@qt.io>
Change-Id: I644ea0737d51d6114facb19a0ad70f10aeb79f2c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-21 14:35:29 +00:00
Robert Loehning
4032f6383a Fix frequent typo
can not -> cannot

Change-Id: Ie872ada1bc9b4ed64bffb667c2e44dbb13b4ad11
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-23 09:30:20 +00:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
BogDan Vatra
5811848a7b Android: Remove old support for gdbserver
Change-Id: I6d2e8abf0baa5606ad3d79cc7f1f57813e8255b1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-10-05 10:37:23 +00:00
BogDan Vatra
25264d9bd9 Fix debugging on Android arm64/x86_64
On Android 64, there is no lib/ symlink anymore, so we need to upload
gdbserver from QtCreator.

Change-Id: Ib6f6d9b623dc61b72dd434ce1b3b409e880bdeaa
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-10-04 15:36:35 +00:00
hjk
1c9410e353 ProjectExplorer: Rename 'extraAspect' to 'aspect'
Using aspects is the standard pattern nowadays, there's nothing 'extra'
to them anymore.

Change-Id: I446f9d7b1db58a4899e5e44df33ce51f655e7be4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-02 08:32:51 +00:00
Vikas Pachdha
960fccc763 Android: Fix the executable permission of the package dir
This fixes the problem where gdb fails to connect to the gdbserver on
Android with API > 23

Task-number: QTCREATORBUG-20583
Change-Id: Ia581f8ae5dd6d819ac5ffedf633d1423e9e30074
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-08-06 11:47:08 +00:00
Vikas Pachdha
d55373cab2 Android: Enable setting environment variables for android apps
Change-Id: Id4625f081d6997dcabad9b01fb09d6c9c6ef7477
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-08-02 10:01:12 +00:00
Vikas Pachdha
1b12da2493 Android: Support commandline arguments for Android app
Change-Id: I3910b68ebbf00e1b62da663a3e58224413a1929e
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: hjk <hjk@qt.io>
2018-08-02 10:00:57 +00:00
Robert Loehning
4d85b6fc7e Android: Fix error messages
Change-Id: Ib7f996d65d5d50b1c7cbea399bccc1c87ba0e9e6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-07-13 14:30:43 +00:00
Eike Ziller
d09b71d260 Merge remote-tracking branch 'origin/4.7'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/android/androiddebugsupport.cpp

Change-Id: I01c4880850ad25432a65bb32849365d2aeb0756f
2018-07-10 07:44:53 +02:00
Vikas Pachdha
d9bcf78270 Android: Use ipv4 host to connect to app in android
IPv6 enabled systems can have IPv4 and an IPv6 entry for localhost
and macos seems to prefer IPv6 for localhost and IPv6 is not
supported by adbd

Task-number: QTCREATORBUG-20730
Change-Id: Ia0823fa04581afc6297e5e8d57a8034ba1b5749c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-06 06:07:22 +00:00
Vikas Pachdha
aa4407e332 Android: add logging for build and run
Change-Id: Idca5a45713762aa9e2861dcc58c3bbd96cbe687e
Reviewed-by: hjk <hjk@qt.io>
2018-07-04 07:04:03 +00:00
Leena Miettinen
a9b0fa026f Android: Fix messages
Change-Id: If1af26c7c5762b14887787a30cd7dc37d44f9950
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-06-11 05:19:56 +00:00
Tim Jenssen
27b153a5e4 AndroidPlugin: show adb output in error case
Change-Id: I3a9b1e3ca86ab2cfecefd187d9574cf64ef6b1f1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-31 10:14:25 +00:00
hjk
130b08925d Android: Use packageName directly in AndroidRunnerWorker
That was the only remaining field of the AndroidRunnable, passing
the packageName as single string is sufficient.

Change-Id: I73333e58a0719df09d6905eb212007ce421f600e
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-16 10:34:01 +00:00
hjk
099f8c7e80 Android: Remove AndroidRunnable::{beforeStart,afterFinish}AdbCommands
We have nowadays two ways to pass data from run configurations to
tool that do not require intimate knowledge of the sender:

1. Using RunConfigurationAspects, accessible for all workers in a
   RunControl
2. Using RunWorker::recordData for an individual worker.

This removes the need to use specific fields in a runnable and
means that a tool plugin can be better separated from target plugins.

The approaches are not mutually exclusive, both use an string-ish
id, I chose here to use the same string when using both.

This patch here uses approach 2. for the GammaRay/Android combo.
It also fixes a (harmless) typo (s/POSTSTART/POSTFINISH).

Change-Id: I4048693ca73b17253a39bfcacc9e1880ecf25736
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-16 10:18:27 +00:00
hjk
6585edf143 Android: Pass RunWorker to AndroidRunnerWorker
The RunWorker will carry the amPreStart/amPostFinish commands later,
and the run control is still accessible via worker->runControl().

Change-Id: Ieac1a1d2a5a8689025a7707b218df44ef2485b16
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-16 08:22:38 +00:00
hjk
cf01d20f95 Android: Remove AndroidRunnable::amStartExtraArgs
It was only set up in AndroidRunner from the run configuration
and passed to AndroidRunnerWorker, instead get in in the
AndroidRunnerWorker from the run configuration directly.

Change-Id: I52fc793f07ca766a80a1b06f216f850da0b563ed
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-16 08:22:06 +00:00
hjk
0031dbb667 Android: Remove AndroidRunnable::intentName
It was only uses to pass the intent from the Runner to the RunnerWorker,
use a normal stand-alone QString member and setter instead.

Change-Id: I0fde87b0177d4ed013f9599600929070362ea09c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-15 10:36:48 +00:00
hjk
52e0b47c3f Android: Flatten then AndroidRunnerWorker hierarchy again
The difference was the selection of findProcessPID vs
findProcessPIDPreNougat functions, done by a flag now
passed to and used inside a combined findProcessPID function.

Change-Id: I738cdac1a81302c2207f9bc3c74c7cf916ca4089
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-11 08:44:38 +00:00
hjk
8e7c1bf1ab Android: Remove m_extraAppParams and m_extraEnvVars from Runnable
The idea was actually to make AndroidRunnable and "everything else",
i.e. StandardRunnable more similar over time to lessen the impact
of the "matrix" problem. The two removed items are avoidable.

Change-Id: I8ef011d76e2ad0154194ff5141ef8eb92cf235f3
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-09 09:27:37 +00:00
hjk
ba01d8729e Android: Remove m_deviceSerialNumber and m_apiLevel from Runnable
It's nothing that can be chosen freely, rather a feature of
the current setup/device.

Change-Id: I39460e22dab56adcce9da44f61a895923fb8c2a0
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-09 08:54:09 +00:00
hjk
736f7f89d1 Android: Hide process deleter a bit
This also avoid a spurious(?) code model warning about
"function 'deleter' is not needed and will not be emitted"

Change-Id: I76372866ec1a51b3adc350d83b8efcd497b02cb5
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-08 12:52:49 +00:00
hjk
c4e3cda26a Android: Remove traces of special debugger setup
Change-Id: Ibf85a6e6e7c025287dd388bc5908cefc30fbaa2f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-08 09:56:09 +00:00
Eike Ziller
185fe0c705 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/android/androidrunnable.h
	src/plugins/android/androidrunner.cpp
	src/plugins/qmakeandroidsupport/qmakeandroidrunconfiguration.cpp
	src/plugins/qmakeprojectmanager/qmakeproject.cpp
	src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp

Change-Id: I68093d44cfd672347eab82459ff70c21a32297ce
2018-04-17 10:09:35 +02:00
BogDan Vatra
429c596395 Android: Fix debugging on Android 8+
The new way is much reliable and now we can debug all the libs from very
first start, including static constructors, JNI_OnLoad, etc.

The downside is that the startup is a little bit slower then before.
On a Ryzen 1700X is 2 to 5 seconds slower.

Task-number: QTCREATORBUG-19081
Change-Id: Iacedf7b8aa84de5026f9c81eeca35dd377cf4640
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-04-13 14:05:40 +00:00