Search code examples
androidnao-robotpepper

Install android apps on pepper´s tablet in Naoqi 2.5


I want to install an android app on Pepper with NaoQi 2.5. To achivie this is tried to use AlTabletService´s hidden method "_installApk". I built an APK in android studios and deployed it in pepper´s head, the APK file does exist in peppers head because when i ssh into pepper and use the "ls" command the file is listed. I then tried to install the apk:

qicli call ALTabletService._installApk /home/nao/.local/share/PackageManager/apps/helloWorld/src/android/app-debug.apk

When i open the ADB debugger in pepper I can see the error message that the command gives:

I/ALTabletService/TabletService( 1175): Install Apk : /home/nao/.local/share/PackageManager/apps/helloWorld/src/android/app-debug.apk
I/ALTabletService/APKHelper( 1175): Installing package /home/nao/.local/share/PackageManager/apps/helloWorld/src/android/app-debug.apk UMA: false
E/APKHelper( 1175): Unable to download /home/nao/.local/share/PackageManager/apps/helloWorld/src/android/app-debug.apk
E/APKHelper( 1175): java.net.MalformedURLException: Protocol not found: /home/nao/.local/share/PackageManager/apps/helloWorld/src/android/app-debug.apk
E/APKHelper( 1175):     at java.net.URL.<init>(URL.java:176)
E/APKHelper( 1175):     at java.net.URL.<init>(URL.java:125)
E/APKHelper( 1175):     at jp.softbank.tabletbrowser.helper.APKHelper.downloadUrl(APKHelper.java:239)
E/APKHelper( 1175):     at jp.softbank.tabletbrowser.helper.APKHelper.installApk(APKHelper.java:57)
E/APKHelper( 1175):     at jp.softbank.tabletbrowser.service.TabletService._installApk(TabletService.java:396)

It appears that there is a problem with the path to the file. However it should be right, when I press Tab to autocompleat the path to the file it does so successfully.


Solution

  • ALTabletService is running on the tablet, not on Pepper's head, so it cannot access the unix filesystem on Pepper's head; it can, however, access any file exposed on Pepper's internal webserver (the way it does for webpages shown on the tablet) - so you need to do something like:

    1) copy the apk to /home/nao/.local/share/PackageManager/apps/helloWorld/html/app-debug.apk

    2) qicli call ALTabletService._installApk http://198.18.0.1/apps/helloworld/app-debug.apk