Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-22542

'ABI is incompatible, device supports ABIs: .' when deploying using android sdk platform-tools v29.0.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • Qt Creator 4.9.1
    • Android Support
    • None
    • Development OS: Windows 10
      Android SDK: 26.1.1
      Android SDK Platform Tools: 29.0.0
      Connected device: Samsung S8 with android 9
    • Windows

    Description

      When trying to deploy an android app, all connected devices are listed as "incompatible" with this error information : 'ABI is incompatible, device supports ABIs: .' (no ABI!)

      Problem comes from two sides : ADB and QtCreator. This is what I diagnosed:

      When calling adb with "shell getprop ro.product.cpu.abilist" arguments to get supported ABIs, it correctly reports ABIs in stdout, but adb exit with non-0 exit code (-1073740940 in my case). I suppose that QtCreator interpret this as a failure code and won't parse stdout (in function AndroidConfig::getAbis, response.result is not SynchronousProcessResponse::Finished but SynchronousProcessResponse::TerminatedAbnormally)

      I suppose it's more ADB's fault than QtCreator's one, but it would be appreciable that QtCreator try to parse stdout even if adb didn't finished normally.

       

      I found a workaround in adb side by following these steps:

      • Rename %AndroidSDK%\platform-tools\adb.exe as "adb.exe.bak.exe"
      • Compile the following standard C++ code to make an adb wrapper :
      #include <cstdlib>
      #include <string>
      #include <iostream>
      #include <algorithm>
      #include <cctype>
      
      int main(int argc, char *argv[])
      {
        std::string strCmd = std::string(argv[0]);
        std::string strExt = strCmd.substr(strCmd.length() - 4, 4);
        std::transform(strExt.begin(), strExt.end(), strExt.begin(), 
                    [](unsigned char c) { return std::tolower(c); });
        if (strExt.compare(".exe") != 0)
          strCmd += ".exe";
      
        strCmd += ".bak.exe";
        
        if (argc > 1) {
          for (int i = 1; i < argc; ++i) {
            strCmd += " \"" + std::string(argv[i]) + "\"";
          }
        }
      
        std::system(strCmd.c_str());
      }
      
      • Build this code as adb.exe and move it in %AndroidSDK%\platform-tools\

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vikas Vikas Pachdha
            woazim Benjamin ALBOUY-KISSI
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes