Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android debugger does not work
Forum Updated to NodeBB v4.3 + New Features

Android debugger does not work

Scheduled Pinned Locked Moved Mobile and Embedded
18 Posts 8 Posters 7.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alexey.petrenko
    wrote on 3 Sept 2015, 14:16 last edited by
    #1

    I am trying to debug Android application on fresh installation. SDK and NDK are present and added to the PATH, Qt Creator knows about them.

    But when I select Android armv7 kit and press "Debug" for simple Hello World application it just says:

    Debugging starts
    Debugging has finished

    Debugger log is the following, also nothing particularly useful here:

    Starting debugger "GdbEngine" for ABI "arm-linux-android-elf-32bit"...
    dStart parameters: 'org.qtproject.example.debug_test' mode: 6
    dABI: arm-linux-android-elf-32bit
    dLanguages: c++ 
    dExecutable: /home/alexey/work_objscanning/src/misc/test/debug_test/build-debug_test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Release/app_process 
    dDebugger: /home/alexey/work_objscanning/tools/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb
    dQML server: 127.0.0.1:3768
    dRemote: :5039
    dSysroot: 
    dDebug Source Location: 
    dDebugger settings: 
    dBreakOnAbort: true  (default: false)  ***
    dShowQmlObjectTree: true  (default: true)
    dNoPluginBreakpoints: false  (default: false)
    dSelectedPluginBreakpointsPattern: .*  (default: .*)
    dSelectedPluginBreakpoints: false  (default: false)
    dAdjustBreakpointLocations: true  (default: true)
    dBreakOnWarning: false  (default: false)
    dBreakOnFatal: true  (default: false)  ***
    dBreakOnThrow: false  (default: false)
    dBreakOnCatch: false  (default: false)
    dWatchdogTimeout: 120  (default: 20)  ***
    dAutoEnrichParameters: true  (default: true)
    dGdbStartupCommands:   (default: )
    dGdbPostAttachCommands:   (default: )
    dWarnOnReleaseBuilds: true  (default: true)
    dMultiInferior: true  (default: false)  ***
    dUseDynamicType: true  (default: true)
    dTargetAsync: false  (default: false)
    dCDB_Console: false  (default: false)
    dBreakpointCorrection: true  (default: true)
    dBreakEvent:   (default: )
    dBreakOnCrtDbgReport: false  (default: false)
    dLoadGdbDumpers2: true  (default: false)  ***
    dAttemptQuickStart: true  (default: false)  ***
    dIgnoreFirstChanceAccessViolation: false  (default: false)
    dLoadGdbInit: true  (default: true)
    dDisplayStringLimit: 110  (default: 100)  ***
    dListSourceFiles: false  (default: false)
    dAutoDerefPointers: true  (default: true)
    dMaximalStringLength: 10000  (default: 10000)
    dAllPluginBreakpoints: true  (default: true)
    dSkipKnownFrames: false  (default: false)
    dEnableReverseDebugging: false  (default: false)
    dMaximalStackDepth: 44  (default: 20)  ***
    dIntelFlavor: false  (default: false)
    dIdentifyDebugInfoPackages: true  (default: false)  ***
    dShowQtNamespace: true  (default: true)
    dSortStructMembers: true  (default: true)
    dShowStandardNamespace: true  (default: true)
    dCloseBuffersOnExit: true  (default: false)  ***
    dCloseMemoryBuffersOnExit: true  (default: true)
    dRaiseOnInterrupt: true  (default: true)
    dStationaryEditorWhileStepping: false  (default: false)
    dSwitchModeOnExit: false  (default: false)
    dBreakpointsFullPath: true  (default: false)  ***
    dFontSizeFollowsEditor: false  (default: false)
    dUseMessageBoxForSignals: true  (default: true)
    dUseAlternatingRowColours: false  (default: false)
    dLogTimeStamps: false  (default: false)
    dVerboseLog: false  (default: false)
    dAutoQuit: false  (default: false)
    dAlwaysAdjustColumnWidths: true  (default: true)
    dExtraDumperFile:   (default: )
    dUseAddressInStackView: false  (default: false)
    dSymbolPaths:   (default: )
    dSourcePaths:   (default: )
    dGdbCustomDumperCommands:   (default: )
    dAdditionalArguments:   (default: )
    dShowThreadNames: true  (default: false)  ***
    dUseToolTips: true  (default: true)
    dUseDebuggingHelper: true  (default: true)
    dUseCodeModel: true  (default: true)
    dUseToolTipsInBreakpointsView: false  (default: true)  ***
    dUseAddressInBreakpointsView: false  (default: false)
    dUseToolTipsInLocalsView: false  (default: false)
    dUseToolTipsInBreakpointsView: false  (default: false)
    dQmlInspector.ShowAppOnTop: false  (default: false)
    dState changed from DebuggerNotReady(0) to EngineSetupRequested(1) [master]
    dQUEUE: SETUP ENGINE
    dCALL: SETUP ENGINE
    dTRYING TO START ADAPTER
    dNOTE: REQUEST REMOTE SETUP
    
    dNOTE: INFERIOR EXITED
    dState changed from EngineSetupRequested(1) to InferiorExitOk(16) [master]
    dState changed from InferiorExitOk(16) to InferiorShutdownOk(19) [master]
    dState changed from InferiorShutdownOk(19) to EngineShutdownRequested(20) [master]
    dQUEUE: SHUTDOWN ENGINE
    dCALL: SHUTDOWN ENGINE
    dINITIATE GDBENGINE SHUTDOWN IN STATE 0, PROC: 0
    dNOTE: ENGINE SHUTDOWN OK
    dState changed from EngineShutdownRequested(20) to EngineShutdownOk(22) [master]
    dState changed from EngineShutdownOk(22) to DebuggerFinished(23) [master]
    dQUEUE: FINISH DEBUGGER
    dNOTE: FINISH DEBUGGER
    dHANDLE RUNCONTROL FINISHED
    sDebugger finished.
    

    How do I diagnose this?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gdaino
      wrote on 4 Sept 2015, 20:37 last edited by
      #2

      Same here, on a OS X host. The same installation worked fine until some day ago, the only thing that maybe I did was to update the android SDK... I tried (almost) everything, also a clean reinstall of Qt 5.4.2 but without success.... any hints anyone?

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gdaino
        wrote on 4 Sept 2015, 22:02 last edited by
        #3

        In my case, the culprit seems to be something the latest Android SDK tools, I did a restore of an old version (one month) of the sdk folder with Time Machine, and now is working again, without changing anything in my project and/or the Qt installation.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sharethl
          wrote on 6 Sept 2015, 21:58 last edited by
          #4

          I have the same issue on Windows and Linux, Android SDK API 19, can compile and run on android, but cannot debug. Anyone knows how to solve this?

          J 1 Reply Last reply 8 Sept 2015, 08:06
          0
          • S sharethl
            6 Sept 2015, 21:58

            I have the same issue on Windows and Linux, Android SDK API 19, can compile and run on android, but cannot debug. Anyone knows how to solve this?

            J Offline
            J Offline
            john3000
            wrote on 8 Sept 2015, 08:06 last edited by john3000 9 Aug 2015, 09:01
            #5

            @sharethl I have a similar issue, that no one has been able to answer. No problem debugging as a desktop application, but the mobile debugger does not work at all on android. I can run apps as well. I have tried three different NDK's 9, and latest two version of 10, also tried recent SDK, and one before it. I am guessing there is a major bug, as I have tried for 2 days to get something to work on a very basic application.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              GGenny
              wrote on 8 Sept 2015, 12:35 last edited by
              #6

              I lost several days to understand the problem that is simply the last SDK ( no NDK ) , try using an older SDK without update, a new Qt5.5.0 version and recompile your project.

              S J 2 Replies Last reply 8 Sept 2015, 15:29
              0
              • G GGenny
                8 Sept 2015, 12:35

                I lost several days to understand the problem that is simply the last SDK ( no NDK ) , try using an older SDK without update, a new Qt5.5.0 version and recompile your project.

                S Offline
                S Offline
                sharethl
                wrote on 8 Sept 2015, 15:29 last edited by sharethl 9 Aug 2015, 16:55
                #7

                @GGenny what version you used?

                Thanks

                1 Reply Last reply
                0
                • G GGenny
                  8 Sept 2015, 12:35

                  I lost several days to understand the problem that is simply the last SDK ( no NDK ) , try using an older SDK without update, a new Qt5.5.0 version and recompile your project.

                  J Offline
                  J Offline
                  john3000
                  wrote on 8 Sept 2015, 19:13 last edited by
                  #8

                  @GGenny What version of the SDK are you using? I did something similar and went back to build tools 23.0 (current is 24.0) and turned off updates. but I am still getting no love from the debugger.

                  S 1 Reply Last reply 8 Sept 2015, 20:24
                  0
                  • J john3000
                    8 Sept 2015, 19:13

                    @GGenny What version of the SDK are you using? I did something similar and went back to build tools 23.0 (current is 24.0) and turned off updates. but I am still getting no love from the debugger.

                    S Offline
                    S Offline
                    sharethl
                    wrote on 8 Sept 2015, 20:24 last edited by
                    #9

                    @john3000 I have tried out, with Android SDK Platform-tools rev 22, I can debug.

                    J 2 Replies Last reply 9 Sept 2015, 03:38
                    0
                    • S sharethl
                      8 Sept 2015, 20:24

                      @john3000 I have tried out, with Android SDK Platform-tools rev 22, I can debug.

                      J Offline
                      J Offline
                      john3000
                      wrote on 9 Sept 2015, 03:38 last edited by john3000 9 Sept 2015, 03:39
                      #10

                      @sharethl Did you have to go back to "Platform SDK Tools" rev 22.x.x or the "Andoird SDK Platform Tools" rev 22 in Android SDK Manager? I am currently trying rev 22.6.2 of the SDK (the name of the tar.gz file) . I'll let you all know it goes, but I would rather be using the newest version that work, as this version doesn't support lollipop levels of API, android 4.4.2 is the highest level. Screen Grab of android sdk manager

                      S 1 Reply Last reply 9 Sept 2015, 12:59
                      0
                      • S sharethl
                        8 Sept 2015, 20:24

                        @john3000 I have tried out, with Android SDK Platform-tools rev 22, I can debug.

                        J Offline
                        J Offline
                        john3000
                        wrote on 9 Sept 2015, 03:49 last edited by john3000 9 Sept 2015, 04:10
                        #11

                        @sharethl Thanks for sharing. I will definitely lodge a bug against this over for the newest Qt Creator. I wonder if I just missed somewhere in the notes that it wouldn't work with anything newer than 22.6 build of the SDK. It will certainly build and run just fine, it just won't debug. Thanks for your help and that of @sharethl . Now I just have to figure out why I can step through the init code but as soon as I enter the window app the gdbserver shuts down because of illegal memory access. Maybe I have to build the Qt .so files from scratch with debug symbols. Not sure though.

                        J 1 Reply Last reply 9 Sept 2015, 07:54
                        0
                        • J john3000
                          9 Sept 2015, 03:49

                          @sharethl Thanks for sharing. I will definitely lodge a bug against this over for the newest Qt Creator. I wonder if I just missed somewhere in the notes that it wouldn't work with anything newer than 22.6 build of the SDK. It will certainly build and run just fine, it just won't debug. Thanks for your help and that of @sharethl . Now I just have to figure out why I can step through the init code but as soon as I enter the window app the gdbserver shuts down because of illegal memory access. Maybe I have to build the Qt .so files from scratch with debug symbols. Not sure though.

                          J Offline
                          J Offline
                          john3000
                          wrote on 9 Sept 2015, 07:54 last edited by
                          #12

                          @john3000 I found that I had to also use the 32 bit version of the NDK to work as well.

                          1 Reply Last reply
                          0
                          • J john3000
                            9 Sept 2015, 03:38

                            @sharethl Did you have to go back to "Platform SDK Tools" rev 22.x.x or the "Andoird SDK Platform Tools" rev 22 in Android SDK Manager? I am currently trying rev 22.6.2 of the SDK (the name of the tar.gz file) . I'll let you all know it goes, but I would rather be using the newest version that work, as this version doesn't support lollipop levels of API, android 4.4.2 is the highest level. Screen Grab of android sdk manager

                            S Offline
                            S Offline
                            sharethl
                            wrote on 9 Sept 2015, 12:59 last edited by
                            #13

                            @john3000 Here is the list I have. Hate cannot upload image on here.

                            • Android SDK Tool Rev24.3.3
                            • SDK Platform-tools Rev 22
                            • SDK Build-tools Rev 22.0.1
                            • SDK Build tools Rev 20
                            • Adnroid API 22 and 19, SDK Platform
                            • Extras: Android support library Rev 22.2.1

                            I have two ubuntu PCs, 2nd PC with SDK Platform tools 23 cannot debug, once I copied the SDK mentioned above to 2nd PC, debug working.
                            I have Linux-Mint , 64 bits, android-ndk-r10e.

                            J 1 Reply Last reply 17 Sept 2015, 03:37
                            0
                            • K Offline
                              K Offline
                              kolegs
                              wrote on 10 Sept 2015, 12:28 last edited by
                              #14

                              here is the link with instruction how to downgrade platform-tools, I did downgrade to rev 22 and debugger started to work.

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                aidoru
                                wrote on 16 Sept 2015, 10:08 last edited by aidoru
                                #15

                                Hello,
                                after your downgrade did you have any problems with gdb?
                                Because if i try to step into, after a little time I receive the message:
                                "The gdb process has not responded to a command within 40 second(s).".
                                As it is really slow....

                                Do you think that I have to downgrade/upgrade it?
                                I'm on Windows 10 (...tried on Ubuntu, it works perfectly)

                                Thank you.

                                S 1 Reply Last reply 21 Sept 2015, 14:03
                                0
                                • S sharethl
                                  9 Sept 2015, 12:59

                                  @john3000 Here is the list I have. Hate cannot upload image on here.

                                  • Android SDK Tool Rev24.3.3
                                  • SDK Platform-tools Rev 22
                                  • SDK Build-tools Rev 22.0.1
                                  • SDK Build tools Rev 20
                                  • Adnroid API 22 and 19, SDK Platform
                                  • Extras: Android support library Rev 22.2.1

                                  I have two ubuntu PCs, 2nd PC with SDK Platform tools 23 cannot debug, once I copied the SDK mentioned above to 2nd PC, debug working.
                                  I have Linux-Mint , 64 bits, android-ndk-r10e.

                                  J Offline
                                  J Offline
                                  john3000
                                  wrote on 17 Sept 2015, 03:37 last edited by
                                  #16

                                  @sharethl Thanks. I also got stuff working I just haven't checked back in a while. I think your list works just fine. I am using ubuntu 14.04.

                                  1 Reply Last reply
                                  0
                                  • K Offline
                                    K Offline
                                    kuzulis
                                    Qt Champions 2020
                                    wrote on 17 Sept 2015, 11:57 last edited by
                                    #17

                                    Please watch for https://bugreports.qt.io/browse/QTCREATORBUG-15032 and related bugs..

                                    1 Reply Last reply
                                    0
                                    • A aidoru
                                      16 Sept 2015, 10:08

                                      Hello,
                                      after your downgrade did you have any problems with gdb?
                                      Because if i try to step into, after a little time I receive the message:
                                      "The gdb process has not responded to a command within 40 second(s).".
                                      As it is really slow....

                                      Do you think that I have to downgrade/upgrade it?
                                      I'm on Windows 10 (...tried on Ubuntu, it works perfectly)

                                      Thank you.

                                      S Offline
                                      S Offline
                                      sharethl
                                      wrote on 21 Sept 2015, 14:03 last edited by
                                      #18

                                      @aidoru Windown10 and Ubuntu both working for me.

                                      1 Reply Last reply
                                      0

                                      1/18

                                      3 Sept 2015, 14:16

                                      • Login

                                      • Login or register to search.
                                      1 out of 18
                                      • First post
                                        1/18
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Users
                                      • Groups
                                      • Search
                                      • Get Qt Extensions
                                      • Unsolved