-1

I installed an APK on my Pepper by following the instructions in this link.

I used the following command: qicli call ALTabletService._installApk http://198.18.0.1/apps/app-debug.apk

And get:

[W] 1396590449.100437 3669 qimessaging.transportsocket: connect: Connection refused


true

I don't know if this means that the installation succeeded or not but when using qicli call ALTabletService._listApks it doesn't show up in the list and I can't launch it using qicli call ALTabletService._launchApk com.android.app-debug. I get the response:

[W] 1396590620.654268 3688 qimessaging.transportsocket: connect: Connection refused
false

I don't know why I get "Connection refused" but I can launch a preinstalled APK while still getting the same message.

Does anyone know how to solve this?

Kal-Elx
  • 3
  • 2
  • As the link says, you should copy the .apk file to `/home/nao/.local/share/PackageManager/apps//html/app-debug.apk` then call `qicli call ALTabletService._installApk http://198.18.0.1/apps//app-debug.apk`. I'm unsure whether that IP is constant, or depends on the connection. Perhaps your app must also be running on the robot for the webserver to be exposed? – Dominic D Feb 10 '20 at 04:08
  • The IP is static (its the IP to the robot from the tablet, over USB-interface). What do you mean by "running on the robot for the webserver to be exposed"? The web-server is already running and I can download the file from the web-server by going to the robots public IP adress /apps/name-of-apk.apk in a normal webbrowser. – Kal-Elx Feb 12 '20 at 17:53
  • In that case I'm not sure sorry. I'll test this once I get the chance and get back to you. – Dominic D Feb 15 '20 at 01:26

1 Answers1

0

Whether the APK succeeds or fails to be installed seems to depend on the APK itself and I'm not yet sure why. Test with the below process and let me know how you go. I successfully installed this apk as a test, but was unable to install some others.

# copy the APK to the following location on Pepper
scp <apk-file>.apk nao@<nao-ip>:/home/nao/.local/share/PackageManager/apps

# listen for onApkInstalled event
qicli watch ALTabletService.onApkInstalled

# In a second terminal, try to install the apk
qicli call ALTabletService._installApk http://198.18.0.1/apps/<apk-file>.apk

If the installation was successful, you should see onApkInstalled: "<apk-id>" printed in the first terminal. The app id should then appear when calling qicli call ALTabletService._listApks and you can then run the app using qicli call ALTabletService._launchApk <apk-id>.

If no apk installed message is received, there has been an error. I am currently unsure of the process for debugging the installation using ADB, as in this question, but that should reveal more about the reason for the installation failure.

Dominic D
  • 1,778
  • 2
  • 5
  • 12
  • Thank you Dominic. I don't work with this anymore but it's good to know that the problem was with the APK itself. – Kal-Elx Mar 09 '20 at 19:35
  • Since Pepper 2.5 is running Android 5, I think (at least one of) the issues is that the app might not be compiled for an old enough Android version. – Dominic D Mar 09 '20 at 21:11