Attempting to install QGC on Herelink

I’ve built Herelink QGC from source (https://github.com/Herelink/qgroundcontrol) and I’m attempting to deploy it on the Herelink ground station with no success so far. I’ve removed the original version from the device (via shell). Then I tried installing with “adb install -r compiledQGC.apk”. It was successfully installed, but when starting it I got an error message, claiming that the UDP port is already taken by other application. I noticed that the apk I had installed was located in /data/app instead of /system/app/QGroundControl as was the original. So I thought this might be causing the issue, removed it from /data/app and installed it with the following set of commands:

adb root
adb remount
adb push compiledQGC.apk /system/app/QGroundControl
adb shell
chmod 755 /system/app/QGroundControl
chmod -R 644 /system/app/QGroundControl
reboot

When Herelink rebooted the app started, but showed only blank white screen with the QGC logo in the top left corner.

I then removed it again, rebooted and tried clearing all traces from it (by pulling packages.xml from /data/system/, removing the QGC section from it and pushing it back in place), then tred installing the same way as above, and again I was getting only blank white screen.

So I decided I’ll try the common version from qgroundcontrol.com. I cleaned up packages.xml again, downloaded and installed the .apk, and at the moment I’m unable to start it on the device

It is obvious I’m not doing something right, the question is what am I missing? Any help will be appreciated.

2 Likes

Update: Managed to start QGC, but I get the same error:

Error binding UDP port: The bound address is already in use

2 Likes

wow, great work! If you have success pls let us now how to do it!

Thanks!

Update: I tried again installing the compiled version in /system/app the same way I did above. This time after I got the blank white screen I forced the app to close and then from adb shell I started it manually with

am start -n org.mavlink.qgroundcontrol/.QGCActivity

This time I got a popup saying:

Your application encountered a fatal error and cannot continue

1 Like

Another update: Now I’m even more puzzled. I’ve reinstalled the custom compiled QGC in /data/app with

adb install -r compiledQGC.apk

QGC runs, I get the message that UDP is busy. I tried in shell

netstat -tulpn

and got this weird thing:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program Name
tcp        0      0 [127.0.0.1:5037](http://127.0.0.1:5037/)          0.0.0.0:*               LISTEN      1682/adbd
udp        0      0 [0.0.0.0:14550](http://0.0.0.0:14550/)           0.0.0.0:*                           346/mavlink-router
udp        0      0 [192.168.0.11:5760](http://192.168.0.11:5760/)       0.0.0.0:*                           317/rild
udp        0      0 [0.0.0.0:48963](http://0.0.0.0:48963/)           0.0.0.0:*                           346/mavlink-router
udp        0      0 [0.0.0.0:46059](http://0.0.0.0:46059/)           0.0.0.0:*                           323/rc_service

What bothers me here is that (if I understand it correctly) the process that actually uses the default port (14550) is mavlink-router. And this makes no sense, since it must have always been there and using the same port. I’m totally at a loss here…

1 Like

Going on:

I flashed Herelink with the 0.2.2 image from https://docs.cubepilot.org/user-guides/herelink/firmware-releases#v-0-2-2 to restore it to working condition. Then I ran netstat again to check the used ports and got this:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program Name
tcp        0      0 [127.0.0.1:5037](http://127.0.0.1:5037/)          0.0.0.0:*               LISTEN      2054/adbd
udp        0      0 [0.0.0.0:58485](http://0.0.0.0:58485/)           0.0.0.0:*                           371/mavlink-router
udp        0      0 [0.0.0.0:14550](http://0.0.0.0:14550/)           0.0.0.0:*                           371/mavlink-router
udp        0      0 [0.0.0.0:14551](http://0.0.0.0:14551/)           0.0.0.0:*                           1377/org.mavlink.qgr
udp        0      0 [0.0.0.0:16666](http://0.0.0.0:16666/)           0.0.0.0:*                           1377/org.mavlink.qgr
udp        0      0 [0.0.0.0:57704](http://0.0.0.0:57704/)           0.0.0.0:*                           354/rc_service
udp        0      0 [192.168.0.11:5760](http://192.168.0.11:5760/)       0.0.0.0:*                           348/rild

As it seems QGS doesn’t use UDP 14550 at all - it uses 14551. I find this very strange, considering the message I was getting.

At this point I decided to try and directly replace the .apk file, without changing anything else. I used adb push to transfer the compiled file to /system.app/QGroundControl and then ran

ls -al

to see the rights the .apk file should have. I got this:

optimus:/system/app/QGroundControl # ls -al                                                                                                 
total 122600
drwxr-xr-x  4 root root     4096 2020-03-05 08:16 .
drwxr-xr-x 49 root root     4096 2019-05-21 12:09 ..
-rw-r--r--  1 root root 34043915 2019-05-21 12:09 QGroundControl.apk
drwxr-xr-x  3 root root     4096 2019-05-21 12:09 lib
drwxr-xr-x  3 root root     4096 2019-05-21 12:09 oat
-rw-r--r--  1 root root 28707670 2020-03-02 11:45 compiledQGC.apk

Although the owner and the rights seem fine, the file size caught my eye and made me wonder if I’m actually using the correct repository to build the software in the first place (I’ve mentioned what I’m using in the initial post of the thread). Can anyone confirm this is the one? And if so, why the size of the .apk I’m building is so different than the size of the original .apk from the 0.2.2 update?

Having this in mind I removed the original .apk file and renamed the custom one to have the exact same name. Upon reboot I once again got the white screen with logo, and when I killed the app, I got the forementioned popup.

1 Like

And a bit of clarification - the reason I’m trying to install a custom version of QGC is the issue I’ve described here: Throttle issue
The only change to the code I’ve done is line 456 in Joystick.cc where I changed it from

throttle_accu += throttle*(40/1000.f);

to

throttle_accu += throttle*(40/4000.f);

as an attempt to fix the throttle issue.

One more update:
Decided I’ll try to build from this source: https://github.com/CubePilot/qgroundcontrol

When I tried installing in /system/app/QGroundControl there was no effect - the same as the previous attempts, I got the white screen and logo and the error popup.

Then I uninstalled it from /system/app/QGroundControl; removed the QGC entry in packages.xml and installed it with

adb install -r compiledQGC.apk

This time I got an even weirder result - when the app starts I hear the “Stabilize flight mode” voice announcement. However the screen is blank white, no logo. I tried to kill the app and start it again, as well as reboot the device - the result is exactly the same. Also the .apk size is again different than what is in the firmware image.

1 Like

And another update:

I decided to run logcat, force stop and restart the app. I got this result:

03-05 14:08:05.748   731  1070 I ActivityManager: Force stopping org.mavlink.qgroundcontrol appid=10057 user=0: from pid 1037
03-05 14:08:05.749   731  1070 I ActivityManager: Killing 1256:org.mavlink.qgroundcontrol/u0a57 (adj 600): stop org.mavlink.qgroundcontrol
03-05 14:08:05.750   731  1070 D ActivityManager: cleanUpApplicationRecord -- 1256
03-05 14:08:05.756   731  1070 I ActivityManager:   Force finishing activity ActivityRecord{8997e3d u0 org.mavlink.qgroundcontrol/.QGCActivity t2}
03-05 14:08:05.796  1017  1017 E PhoneInterfaceManager: [PhoneIntfMgr] getCarrierPackageNamesForIntent: No UICC
03-05 14:08:05.797  1017  1017 D CarrierSvcBindHelper: No carrier app for: 0
03-05 14:08:05.822  1037  1037 D AppUtils: Have 0 number of activities in preferred list
03-05 14:08:05.829   731   757 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@e9f782b attribute=null, token = android.os.BinderProxy@2a2d24d
03-05 14:08:05.952   731   758 D GraphicsStats: Buffer count: 2
03-05 14:08:05.952   332   923 E OMXNodeInstance: !!! Observer died. Quickly, do something, ... anything...
03-05 14:08:06.472   341   341 W mavlink-router: [UDP] writing may block mainloop: [4ms]
03-05 14:08:06.620   341   341 I mavlink-router: The camera message 0 only route to qgc
03-05 14:08:06.629   341   341 I mavlink-router: The time sync message only sent to qgc
03-05 14:08:08.316  2065  2065 E         : Proxy are not enabled, exit current process
03-05 14:08:08.620   341   341 I mavlink-router: The camera message 0 only route to qgc
03-05 14:08:08.845   326   401 V audio_hw: out_standby
03-05 14:08:09.062   326   401 V audio_hw: get_ucm_string2: devices = 0x00000002-0x00000000, id = PlaybackPCM, def = hw:0,0
03-05 14:08:09.062   326   401 V audio_hw: get_ucm_string2: id = PlaybackPCM, value = primary
03-05 14:08:09.144   731  2058 I ActivityManager: START u0 {flg=0x10804000 cmp=com.android.systemui/.recents.RecentsActivity} from uid 10023 on display 0
03-05 14:08:09.149   731  2058 W WindowManager: addAppToken2: AppWindowToken{702b246 token=Token{2c43e21 ActivityRecord{cc57488 u0 com.android.systemui/.recents.RecentsActivity t4}}}
03-05 14:08:09.183   239   247 D PermissionCache: checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (1820 us)
03-05 14:08:09.189   239   247 I gralloc : alloc start: size = 2598528, usage = 0x333, 0x333,                          int_format = 0x1, w = 1069, h = 606
03-05 14:08:09.344   239   247 I gralloc : alloc start: size = 8486912, usage = 0x900, 0x900,                          int_format = 0x100000001, w = 1920, h = 1080
03-05 14:08:09.349   239   247 I gralloc : alloc start: size = 8486912, usage = 0x900, 0x900,                          int_format = 0x100000001, w = 1920, h = 1080
03-05 14:08:09.356   239   247 I gralloc : alloc start: size = 8486912, usage = 0x900, 0x900,                          int_format = 0x100000001, w = 1920, h = 1080
03-05 14:08:09.364   853  1084 D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
03-05 14:08:09.382   239   249 I gralloc : alloc start: size = 8486912, usage = 0xb00, 0xb00,                          int_format = 0x100000001, w = 1080, h = 1920
03-05 14:08:09.401   239   247 I gralloc : alloc start: size = 8486912, usage = 0xb00, 0xb00,                          int_format = 0x100000001, w = 1080, h = 1920
03-05 14:08:09.406   239   300 I gralloc : alloc start: size = 638848, usage = 0x933, 0x933,                           int_format = 0x1, w = 988, h = 161
03-05 14:08:09.416   731   767 I ActivityManager: Displayed com.android.systemui/.recents.RecentsActivity: +198ms
03-05 14:08:09.467   239   300 I gralloc : alloc start: size = 8486912, usage = 0xb00, 0xb00,                          int_format = 0x100000001, w = 1080, h = 1920
03-05 14:08:09.620   341   341 I mavlink-router: The camera message 0 only route to qgc
03-05 14:08:10.620   341   341 I mavlink-router: The camera message 0 only route to qgc
03-05 14:08:10.830   341   341 W mavlink-router: [UDP] writing may block mainloop: [7ms]
03-05 14:08:10.989   731  2058 I ActivityManager: Killing 1420:android.process.acore/u0a1 (adj 906): empty #17
03-05 14:08:10.989   731  2058 I ActivityManager: Killing 1391:com.android.carrierconfig/u0a3 (adj 906): empty #18
03-05 14:08:10.990   731  2058 I ActivityManager: Killing 1037:com.android.settings/1000 (adj 900): remove task
03-05 14:08:11.063   731  2058 D ActivityManager: cleanUpApplicationRecord -- 1391
03-05 14:08:11.106   731  2058 D ActivityManager: cleanUpApplicationRecord -- 1420
03-05 14:08:11.149   731   792 W InputDispatcher: channel 'bba99a0 com.android.settings/com.android.settings.Settings$ManageApplicationsActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
03-05 14:08:11.149   731   792 E InputDispatcher: channel 'bba99a0 com.android.settings/com.android.settings.Settings$ManageApplicationsActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
03-05 14:08:11.149   731   792 W InputDispatcher: channel 'ce9f27 com.android.settings/com.android.settings.Settings (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
03-05 14:08:11.149   731   792 E InputDispatcher: channel 'ce9f27 com.android.settings/com.android.settings.Settings (server)' ~ Channel is unrecoverably broken and will be disposed!
03-05 14:08:11.149   731   792 W InputDispatcher: channel 'ff53102 com.android.settings/com.android.settings.SubSettings (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
03-05 14:08:11.149   731   792 E InputDispatcher: channel 'ff53102 com.android.settings/com.android.settings.SubSettings (server)' ~ Channel is unrecoverably broken and will be disposed!
03-05 14:08:11.200   731  1067 I WindowManager: WIN DEATH: Window{bba99a0 u0 com.android.settings/com.android.settings.Settings$ManageApplicationsActivity}
03-05 14:08:11.200   731  1067 W InputDispatcher: Attempted to unregister already unregistered input channel 'bba99a0 com.android.settings/com.android.settings.Settings$ManageApplicationsActivity (server)'
03-05 14:08:11.200   731  2058 D ActivityManager: cleanUpApplicationRecord -- 1037
03-05 14:08:11.203   731  1064 D GraphicsStats: Buffer count: 1
03-05 14:08:11.204   731  1070 I WindowManager: WIN DEATH: Window{ff53102 u0 com.android.settings/com.android.settings.SubSettings}
03-05 14:08:11.204   731  1070 W InputDispatcher: Attempted to unregister already unregistered input channel 'ff53102 com.android.settings/com.android.settings.SubSettings (server)'
03-05 14:08:11.207   731   758 I WindowManager: WIN DEATH: Window{ce9f27 u0 com.android.settings/com.android.settings.Settings}
03-05 14:08:11.207   731   758 W InputDispatcher: Attempted to unregister already unregistered input channel 'ce9f27 com.android.settings/com.android.settings.Settings (server)'
03-05 14:08:11.376   731  2058 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=org.mavlink.qgroundcontrol/.QGCActivity} from uid 10023 on display 0
03-05 14:08:11.377   731  2058 W WindowManager: addAppToken2: AppWindowToken{d0238f6 token=Token{667f191 ActivityRecord{e030fb8 u0 org.mavlink.qgroundcontrol/.QGCActivity t5}}}
03-05 14:08:11.421   731  1070 I ActivityManager: Start proc 2088:org.mavlink.qgroundcontrol/u0a57 for activity org.mavlink.qgroundcontrol/.QGCActivity
03-05 14:08:11.446   239   249 I gralloc : alloc start: size = 7741440, usage = 0x933, 0x933,                          int_format = 0x1, w = 1782, h = 1080
03-05 14:08:11.503  2088  2088 W System  : ClassLoader referenced unknown path:
03-05 14:08:11.562  2088  2088 I QtCore  : Start
03-05 14:08:11.563  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Positioning.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.565  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Concurrent.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.566  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Network.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.570  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Qml.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.563   323   323 I rc_service: type=1400 audit(0.0:123): avc: denied { write } for lport=34409 scontext=u:r:rc_service:s0 tcontext=u:r:rc_service:s0 tclass=udp_socket permissive=1
03-05 14:08:11.577  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Gui.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.582  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Quick.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.600  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5QuickParticles.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.605  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Location.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.616  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Widgets.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.620   341   341 I mavlink-router: The camera message 0 only route to qgc
03-05 14:08:11.629  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5QuickWidgets.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.632  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5OpenGL.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.636  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Svg.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.640  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Charts.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.649  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Multimedia.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.654  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Sql.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.656  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Xml.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.658  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5TextToSpeech.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.659  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5AndroidExtras.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.661  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Bluetooth.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.663  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5Test.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.665  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5MultimediaQuick_p.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.668  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5QuickTemplates2.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.676  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5QuickControls2.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.679  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQt5RemoteObjects.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.682  2088  2088 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.687  2088  2088 I Qt      : qt start
03-05 14:08:11.689  2088  2088 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/plugins/bearer/libqandroidbearer.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.691  2088  2088 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/plugins/position/libqtposition_android.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.692  2088  2088 I QtPositioning: Positioning start
03-05 14:08:11.693  2088  2088 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/plugins/mediaservice/libqtmedia_android.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.697  2088  2088 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/plugins/texttospeech/libqttexttospeech_android.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:11.715  2088  2088 W linker  : /data/app/org.mavlink.qgroundcontrol-1/lib/arm/libQGroundControl.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
03-05 14:08:11.767  2088  2088 D         : (null):0 ((null)): QML debugging is enabled. Only use this in a safe environment.
03-05 14:08:11.770  2088  2088 D         : /home/test/CP-QGC/qgroundcontrol/libs/qtandroidserialport/src/qserialport_android.cpp:143 (static void QSerialPortPrivate::setNativeMethods()): AndroidSerialPortLog: Registering Native Functions
03-05 14:08:11.770  2088  2088 D         : /home/test/CP-QGC/qgroundcontrol/libs/qtandroidserialport/src/qserialport_android.cpp:171 (static void QSerialPortPrivate::setNativeMethods()): AndroidSerialPortLog: Native Functions Registered
03-05 14:08:11.770  2088  2088 D QGC_QGCActivity: registerWifiBroadcast
03-05 14:08:11.828   239   247 I gralloc : alloc start: size = 7920640, usage = 0x900, 0x900,                          int_format = 0x100000001, w = 1782, h = 1080
03-05 14:08:11.832  2088  2105 I mali    : No configuration file found, attempting to use environment
03-05 14:08:11.832  2088  2105 I mali    : Application name set to: Untitled
03-05 14:08:11.832  2088  2105 I mali    : Output directory set to: /data/data/com.mali.testjava
03-05 14:08:11.833   239   247 I gralloc : alloc start: size = 7920640, usage = 0x900, 0x900,                          int_format = 0x100000001, w = 1782, h = 1080
03-05 14:08:11.838   239   247 I gralloc : alloc start: size = 7920640, usage = 0x900, 0x900,                          int_format = 0x100000001, w = 1782, h = 1080
03-05 14:08:11.838  2088  2105 I OpenGLRenderer: Initialized EGL, version 1.4
03-05 14:08:11.838  2088  2105 D OpenGLRenderer: Swap behavior 2
03-05 14:08:11.845  2088  2105 D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
03-05 14:08:11.850  2088  2119 W         : (null):0 ((null)): WARNING: QApplication was not created in the main() thread.
03-05 14:08:11.873   239   249 I gralloc : alloc start: size = 7920640, usage = 0xb00, 0xb00,                          int_format = 0x100000001, w = 1080, h = 1782
03-05 14:08:11.899   731   767 I ActivityManager: Displayed org.mavlink.qgroundcontrol/.QGCActivity: +496ms
03-05 14:08:11.937  2088  2119 D QGroundControl: /home/test/CP-QGC/qgroundcontrol/src/QGCApplication.cc:277 (QGCApplication::QGCApplication(int&, char**, bool)): Settings location "/data/user/0/org.mavlink.qgroundcontrol/files/.config/QGroundControl.org/QGroundControl.ini" Is writable?: true
03-05 14:08:11.959  2088  2119 D QGroundControl: /home/test/CP-QGC/qgroundcontrol/src/QGCLoggingCategory.cc:98 (void QGCLoggingCategoryRegister::setFilterRulesFromSettings(const QString&)): Filter rules "*Log.debug=false\n"
03-05 14:08:11.959  2088  2119 E BluetoothAdapter: Bluetooth binder is null
03-05 14:08:11.960  2088  2119 E BluetoothAdapter: Bluetooth binder is null
03-05 14:08:11.960  2088  2119 W QGroundControl: (null):0 ((null)): qt.bluetooth.android: Device does not support Bluetooth
03-05 14:08:12.110   326   401 V audio_hw: out_standby
03-05 14:08:12.168  2088  2119 W VideoCapabilities: Unrecognized profile/level 0/0 for video/mpeg2
03-05 14:08:12.168  2088  2119 W VideoCapabilities: Unrecognized profile/level 0/2 for video/mpeg2
03-05 14:08:12.168  2088  2119 W VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
03-05 14:08:12.205  2088  2119 I VideoCapabilities: Unsupported profile 4 for video/mp4v-es
03-05 14:08:12.217  2088  2119 W VideoCapabilities: Unrecognized profile/level 0/0 for video/mpeg2
03-05 14:08:12.217  2088  2119 W VideoCapabilities: Unrecognized profile/level 0/2 for video/mpeg2
03-05 14:08:12.217  2088  2119 W VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
03-05 14:08:12.230  2088  2119 I VideoCapabilities: Unsupported profile 4 for video/mp4v-es
03-05 14:08:12.297  2088  2119 I TextToSpeech: Sucessfully bound to com.svox.pico
03-05 14:08:12.304  1492  1492 V SynthProxy: About to load libttspico.so, applyFilter=true
03-05 14:08:12.316  1492  1492 I SVOX Pico Engine: loaded en-US successfully
03-05 14:08:12.319  2088  2088 I TextToSpeech: Connected to ComponentInfo{com.svox.pico/com.svox.pico.PicoService}
03-05 14:08:12.326  2088  2124 I TextToSpeech: Set up connection to ComponentInfo{com.svox.pico/com.svox.pico.PicoService}
03-05 14:08:12.327  2088  2088 W QtTextToSpeech: tts initialized
03-05 14:08:12.413  2088  2119 D QGC_QGCActivity: setCountryCode: CN true
03-05 14:08:12.414   731  2058 I WifiService: WifiService trying to set country code to CN with persist set to true
03-05 14:08:12.620   341   341 I mavlink-router: The camera message 0 only route to qgc
03-05 14:08:13.029  2088  2119 E QGroundControl: /home/test/CP-QGC/qgroundcontrol/src/VideoStreaming/VideoReceiver.cc:268 (virtual void VideoReceiver::start()): VideoReceiver::start() failed because URI is not specified
03-05 14:08:13.029  2088  2119 D QGroundControl: /home/test/CP-QGC/qgroundcontrol/src/Vehicle/MAVLinkLogManager.cc:360 (virtual void MAVLinkLogManager::setToolbox(QGCToolbox*)): MAVLinkLogManagerLog: MAVLink logs directory: "/storage/emulated/0/QGroundControl/Logs"
03-05 14:08:13.098  2128  2128 E         : Proxy are not enabled, exit current process
03-05 14:08:13.485  2088  2119 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/plugins/imageformats/libqico.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.494  2088  2119 D QGroundControl: /home/test/CP-QGC/qgroundcontrol/src/QtLocationPlugin/QGCMapEngine.cpp:229 (void QGCMapEngine::init()): Map Cache in: "/data/user/0/org.mavlink.qgroundcontrol/files/QGCMapCache300" / "qgcMapCache.db"
03-05 14:08:13.503  2088  2130 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/plugins/sqldrivers/libqsqlite.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.500  2088  2088 I QtMainThread: type=1400 audit(0.0:124): avc: denied { getattr } for path="/tmp/d2dinfo" dev="tmpfs" ino=12938 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:tmpfs:s0:c512,c768 tclass=sock_file permissive=1
03-05 14:08:13.500  2088  2088 I QtMainThread: type=1400 audit(0.0:125): avc: denied { write } for name="/" dev="tmpfs" ino=10469 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:tmpfs:s0 tclass=dir permissive=1
03-05 14:08:13.500  2088  2088 I QtMainThread: type=1400 audit(0.0:126): avc: denied { remove_name } for name="d2dinfo" dev="tmpfs" ino=12938 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:tmpfs:s0 tclass=dir permissive=1
03-05 14:08:13.500  2088  2088 I QtMainThread: type=1400 audit(0.0:127): avc: denied { unlink } for name="d2dinfo" dev="tmpfs" ino=12938 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:tmpfs:s0:c512,c768 tclass=sock_file permissive=1
03-05 14:08:13.500  2088  2088 I QtMainThread: type=1400 audit(0.0:128): avc: denied { add_name } for name="d2dinfo" scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:tmpfs:s0 tclass=dir permissive=1
03-05 14:08:13.500  2088  2088 I QtMainThread: type=1400 audit(0.0:129): avc: denied { create } for name="d2dinfo" scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:tmpfs:s0:c512,c768 tclass=sock_file permissive=1
03-05 14:08:13.509  2088  2131 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/qml/QtQuick.2/libqtquick2plugin.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.521  2088  2131 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/qml/QtQuick/Window.2/libwindowplugin.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.521  2088  2130 W QGroundControl: /home/test/CP-QGC/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1112 (void QGCCacheWorker::_testInternet()): No Internet Access
03-05 14:08:13.527  2088  2131 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/qml/QtQuick/Dialogs/libdialogplugin.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.542  2088  2131 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/qml/QtQuick/Controls/libqtquickcontrolsplugin.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.550  2088  2131 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/qml/QtPositioning/libdeclarative_positioning.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.563  2088  2131 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.566  2088  2131 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/qml/QtGraphicalEffects/private/libqtgraphicaleffectsprivate.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.572  2088  2131 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/qml/QtQuick/Layouts/libqquicklayoutsplugin.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.617  2088  2131 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/qml/QtLocation/libdeclarative_location.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.620   341   341 I mavlink-router: The camera message 0 only route to qgc
03-05 14:08:13.626  2088  2131 W linker  : /data/data/org.mavlink.qgroundcontrol/qt-reserved-files/qml/QtQml/Models.2/libmodelsplugin.so: unsupported flags DT_FLAGS_1=0x81
03-05 14:08:13.647   317   317 I rild    : type=1400 audit(0.0:130): avc: denied { connectto } for path="/tmp/d2dinfo" scontext=u:r:rild:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=unix_stream_socket permissive=1
03-05 14:08:13.769  2088  2119 W QGroundControl: qrc:/qml/MainWindowInner.qml:355 ((null)): qrc:/qml/MainWindowInner.qml:355:5: Type FlightDisplayView unavailable
03-05 14:08:13.770  2088  2119 W QGroundControl: qrc:///qml/QGroundControl/FlightDisplay/FlightDisplayView.qml:116 ((null)): qrc:///qml/QGroundControl/FlightDisplay/FlightDisplayView.qml:116:5: Type BuiltInPreFlightCheckModel unavailable
03-05 14:08:13.770  2088  2119 W QGroundControl: qrc:///qml/QGroundControl/FlightDisplay/BuiltInPreFlightCheckModel.qml:21 ((null)): qrc:///qml/QGroundControl/FlightDisplay/BuiltInPreFlightCheckModel.qml:21:5: Type PreFlightCheckGroup unavailable
03-05 14:08:13.770  2088  2119 W QGroundControl: qrc:///qml/QGroundControl/Controls/PreFlightCheckGroup.qml:44 ((null)): qrc:///qml/QGroundControl/Controls/PreFlightCheckGroup.qml:44:5: Type SectionHeader unavailable
03-05 14:08:13.770  2088  2119 W QGroundControl: qrc:///qml/QGroundControl/Controls/SectionHeader.qml:29 ((null)): qrc:///qml/QGroundControl/Controls/SectionHeader.qml:29:5: Type QGCMouseArea unavailable
03-05 14:08:13.770  2088  2119 W QGroundControl: qrc:///qml/QGroundControl/Controls/QGCMouseArea.qml:1 ((null)): qrc:///qml/QGroundControl/Controls/QGCMouseArea.qml:1:1: module "QtQuick" version 2.11 is not installed
03-05 14:08:13.805  2088  2105 D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
03-05 14:08:13.832  2088  2132 D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
03-05 14:08:13.836   239   249 I gralloc : alloc start: size = 7920640, usage = 0xb00, 0xb00,                          int_format = 0x100000001, w = 1080, h = 1782
03-05 14:08:13.865   239   249 I gralloc : alloc start: size = 7454720, usage = 0xb00, 0xb00,                          int_format = 0x100000001, w = 1011, h = 1782
03-05 14:08:13.873   239   249 I gralloc : alloc start: size = 7454720, usage = 0xb00, 0xb00,                          int_format = 0x100000001, w = 1011, h = 1782
03-05 14:08:13.882   239  1180 I gralloc : alloc start: size = 7454720, usage = 0xb00, 0xb00,                          int_format = 0x100000001, w = 1011, h = 1782
03-05 14:08:13.920  2088  2088 I QtMainThread: type=1400 audit(0.0:131): avc: denied { read } for name="input" dev="tmpfs" ino=6264 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:input_device:s0 tclass=dir permissive=1
03-05 14:08:13.920  2088  2088 I QtMainThread: type=1400 audit(0.0:132): avc: denied { open } for path="/dev/input" dev="tmpfs" ino=6264 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:input_device:s0 tclass=dir permissive=1
03-05 14:08:13.920  2088  2088 I QtMainThread: type=1400 audit(0.0:133): avc: denied { read write } for name="event9" dev="tmpfs" ino=12580 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:input_device:s0 tclass=chr_file permissive=1
03-05 14:08:13.920  2088  2088 I QtMainThread: type=1400 audit(0.0:134): avc: denied { open } for path="/dev/input/event9" dev="tmpfs" ino=12580 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:input_device:s0 tclass=chr_file permissive=1
03-05 14:08:13.920  2088  2088 I QtMainThread: type=1400 audit(0.0:135): avc: denied { ioctl } for path="/dev/input/event9" dev="tmpfs" ino=12580 ioctlcmd=0x4506 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:input_device:s0 tclass=chr_file permissive=1
03-05 14:08:13.947   341   341 I mavlink-router: type=1400 audit(0.0:136): avc: denied { read } for lport=14550 scontext=u:r:mavlink-router:s0 tcontext=u:r:mavlink-router:s0 tclass=udp_socket permissive=1
03-05 14:08:13.950   317   317 I rild    : type=1400 audit(0.0:137): avc: denied { write } for name="d2dinfo" dev="tmpfs" ino=13263 scontext=u:r:rild:s0 tcontext=u:object_r:tmpfs:s0:c512,c768 tclass=sock_file permissive=1
03-05 14:08:13.954   341   341 W mavlink-router: [UDP] reading may block mainloop: [4ms]
03-05 14:08:14.026   341   341 I mavlink-router: The time sync message only sent to qgc
03-05 14:08:14.165  2088  2119 W QGroundControl: /home/test/CP-QGC/qgroundcontrol/src/Joystick/JoystickAndroid.cc:139 (static QMap<QString, Joystick*> JoystickAndroid::discover(MultiVehicleManager*, JoystickManager*)): Skipping joystick: "gpio-keys"
03-05 14:08:14.200  2088  2088 I QtMainThread: type=1400 audit(0.0:138): avc: denied { ioctl } for path="socket:[28842]" dev="sockfs" ino=28842 ioctlcmd=0x8927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=1
03-05 14:08:14.220  2088  2088 I QtMainThread: type=1400 audit(0.0:139): avc: denied { getattr } for path="/dev/block/dm-0" dev="tmpfs" ino=6465 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:dm_device:s0 tclass=blk_file permissive=1
03-05 14:08:14.220  2088  2088 I QtMainThread: type=1400 audit(0.0:140): avc: denied { getattr } for path="/dev/block" dev="tmpfs" ino=6275 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:block_device:s0 tclass=dir permissive=1
03-05 14:08:14.227  2088  2119 E QGC_QSerialPortInfo: Error from availableDevicesInfo
03-05 14:08:14.233  2088  2119 D QtPositioning: Regular updates using GPS 50
03-05 14:08:14.235  2088  2119 D QtPositioning: Looper Thread startup time in ms: 2
03-05 14:08:14.237   731  2058 I GnssLocationProvider: WakeLock acquired by sendMessage(3, 0, com.android.server.location.GnssLocationProvider$GpsRequest@21ec7eb)
03-05 14:08:14.243   342   342 D gpsd    : WakeLock(Acquire,gpsGPSD)
03-05 14:08:14.244   342   342 D gpsd    : WakeLock(Release,gpsGPSD)
03-05 14:08:14.250   342   342 D gpsd    : WakeLock(Acquire,gpsGPSD)
03-05 14:08:14.254   731   759 I GnssLocationProvider: WakeLock released by handleMessage(3, 0, com.android.server.location.GnssLocationProvider$GpsRequest@21ec7eb)
03-05 14:08:14.255  2088  2138 D QGroundControl: /home/test/CP-QGC/qgroundcontrol/src/comm/UDPLink.cc:233 (void UDPLink::readBytes()): Adding target QHostAddress("127.0.0.1") 52659
03-05 14:08:14.258  2088  2119 D QGroundControl: /home/test/CP-QGC/qgroundcontrol/src/comm/MAVLinkProtocol.cc:209 (void MAVLinkProtocol::receiveBytes(LinkInterface*, QByteArray)): Switching outbound to mavlink 2.0 due to incoming mavlink 2.0 packet: 0xd834e998 2 2
03-05 14:08:14.381   342   342 D gpsd    : CALL_SENTRY(main()): GlEngine::OnStart took 131 ms (from 132249 to 132380) (logOverhead=0,0,0,0,0,0,0), start: 14:08:14.250
03-05 14:08:14.396   731  1164 I GnssLocationProvider: WakeLock acquired by sendMessage(6, 0, null)
03-05 14:08:14.403   342   342 D gpsd    : WakeLock(Acquire,gpsSUPL)
03-05 14:08:14.412   731  1164 E GnssLocationProvider: Error getting cell location info.
03-05 14:08:14.414   342   342 D gpsd    : CALL_SENTRY(main()): marshal_gps_start took 165 ms (from 132248 to 132413) (logOverhead=0,0,0,0,0,0,0), start: 14:08:14.249
03-05 14:08:14.414   342   342 D gpsd    : CALL_SENTRY(main()): ProcessEvent took 165 ms (from 132248 to 132413) (logOverhead=0,0,0,0,0,0,0), start: 14:08:14.249
03-05 14:08:14.418   731   759 I GnssLocationProvider: WakeLock released by handleMessage(6, 0, null)
03-05 14:08:14.419   731  1164 I GnssLocationProvider: WakeLock acquired by sendMessage(5, 0, null)
03-05 14:08:14.419   731   759 I GnssLocationProvider: WakeLock released by handleMessage(5, 0, null)
03-05 14:08:14.427   342   342 D gpsd    : WakeLock(Release,gpsSUPL)
03-05 14:08:14.615   341   341 W mavlink-router: [UDP] writing may block mainloop: [8ms]
03-05 14:08:14.625   341   341 I mavlink-router: The camera message 0 only route to qgc
03-05 14:08:14.685  2088  2119 W QtTextToSpeech:  stabilize flight mode
03-05 14:08:14.689  2088  2119 W QtTextToSpeech: RESULT: 0
03-05 14:08:14.692  2088  2119 E QGC_QSerialPortInfo: Error from availableDevicesInfo
03-05 14:08:14.704  2088  2119 E QGroundControl: /home/test/CP-QGC/qgroundcontrol/src/VideoStreaming/VideoReceiver.cc:268 (virtual void VideoReceiver::start()): VideoReceiver::start() failed because URI is not specified
03-05 14:08:14.706  2088  2119 I QGC_QGCActivity: SCREEN_BRIGHT_WAKE_LOCK released.

Anyone got any ideas about it?

1 Like

You are indeed good. keep up the good work.
I got a strong feeling the software team make a lot of changes and build a script for this proprietary hardware.
Likely not the smartphone Android common build, specially build Android version.
XiaoMi Pinecore
Herelink Processor

Great work @Mayvena!

I’ve been working on and off on a modified version of QGC for the last month. I managed to modify QGC and successfully upload it on the Herelink. I used this repo: https://github.com/CubePilot/qgroundcontrol as it seems to be the one used by the Herelink dev team. At first, I had difficulties building it using QT (trouble with the linker and Gstreamer). I had to update gstreamer to the latest version. Once I was able build the project, I moved the .apk on an sd card that I inserted in the Herelink. I installed the app by simply clicking on it. I renamed the app to get both the original QGC and my modified version installed on the Herelink. Then, in the Android app menu I put my modified version as the home app.

With these steps, I was able to successfully run my modified app on startup. However, I still have one problem with my modified app. I have video streaming freezes while I don’t have any with the original app. I’m not too familiar with gstreamer, but I guess my problem comes from the updated gstreamer version. I’ll try to work on this in the coming weeks.

I can also confirm that my app takes more memory on the Android device (about 4 times).

Let me know if you have any solutions for my video freeze problem or if you have more specific questions.

1 Like

I’m using the same repo as you are and I’m having a weird issue while compiling - as it ould seem the .qmldir files aren’t being included. This seems to lead to the symptoms I’ve described earlier - way smaller file size of the .apk than the original and starting the program without rendering the visual elements. Have you stumbled upon this problem?

I didn’t have any problem to include the .qmldir files. How do you validate that these are not included during your compilation? What is the final size of your program? What is your build environment (Android NDK, SDK and QT version)?

2 Likes