buildozer android debug deploy (run) - eclipse

I am currently stuck in deploying an app into into my phone.
The app is part of this tutorial. Everything concerning the main.py and buildozer.spec files is set according this tutorial. The app works just fine when run in Eclipse (though some console "errors").
My phone is a Samsung GT-15500, Android version 2.2. and i am also running an apk installer and kivy launcher.
Additionally inside my phone files /mnt/sdcard i cant find a /kivy directory in order to place my app and a simple text file as mentioned here.
Anyway, the thing is that both in the tutorial and the kivy docs the following command: buildozer android debug deploy run fails into my machine. The given error is produced:
# Android packaging done!
# APK Kivyapp1-1.2.0-debug.apk available in the bin directory
# Run '/home/user/.buildozer/android/platform/android-sdk-21/platform-tools/adb devices'
# Cwd None
/home/user/.buildozer/android/platform/android-sdk-21/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
# Command failed: /home/user/.buildozer/android/platform/android-sdk-21/platform-tools/adb devices
I am suspecting there has something to do with my ADT and SDK tools, configuration etc.
Any suggestions??
Oh and thanks in advance for your time.!
Edit: I am running a Linux Mint 16 distro
Edit2: corrected main.app to main.py and added info about the error.

Everything concerning the main.app
Just to be clear, you mean main.py right?
My phone is a Samsung GT-15500, Android version 2.2. and i am also running an apk installer and kivy launcher.
Have you tried kivy programs in the kivy launcher? Do they work? Phones old enough to use android 2.2 can sometimes have some graphics driver problems or bugs even if they technically meet the kivy requirements.
This wouldn't affect the buildozer compilation though, it's just another thing.
The given error is produced:
Could you set your log_level to 2 in buildozer.spec (the video covers this), run the build again, and paste the full log here. It isn't possible to debug from that single line.
==============
Edit: Okay, it looks like the apk is actually built correctly, and you should be able to find it in the 'bin' subfolder of wherever you ran buildozer. Assuming that's the case, you can try copying it to your phone some other way (email or whatever should work).
The step that's actually failing is the 'deploy' part that should push the apk to your device. I don't know what the error is, and I've never seen buildozer complain about curses before, though I guess you could check that you have curses installed?
My best suggestion is to investigate by navigating to the directory with adb in and playing with it manually. You can look up the commands, like adb install ... to install an apk to your phone - that's what buildozer tries to do.
You should also check that adb is enabled on your phone.

Related

How to run a standalone linux app built with flutter?

I have built a linux app with flutter using : flutter build linux in my ubuntu VM.
My goal is to run this linux app in an embbeded device so i need to copy the required files to this device (running under linux) and then execute the equivalent of main.dart in the embbeded device.
I am very new to this, so what are the directories / files needed to run the standalone linux app ?
I see a bundle directory inside the /build/linux/x64 folder after running flutter build linux but i don't understand any files written inside / how to execute the whole app... And even if it's the correct directory to copy in my embbeded device.
EDIT :
Running the app by trying to execute ./my_app_name on the corresponding file gives the following error :
-bash: ./my_app_name: cannot execute binary file: Exec format error
And i am guessing this is a not a shell script...
After running the command flutter build linux, you should find all the required files to run it in build/linux/release/bundle
Just copying/pasting it on your device shall work (if the device is supported).
There is an official guide explaining how to build and release your app onto the Snap Store: https://flutter.dev/docs/deployment/linux
Important note :
As described in the official documentation, a Flutter app supports Linux Debian, 64-bit. Meaning that if you try to run your app on a 32-bit distribution, it won't start.

v4l2loopback doesn't create the /dev/video/ files

im trying to make v4l2loopback work on my desktop PC (no hardware camera) with mint 19.3, kernel 5.4.0-42-generic x86_64.
I followed the official instructions and compiled from git the v4l2loopback module and everything seem to run correctly, as no error prompted while running the instructions, but when i do ll /dev/v* there's no /dev/videoN entry.
I also tried with the flags exclusive_caps=1 and devices=2 but to no avail.
Any idea what i might be missing or doing wrong?
you need to load the module (e.g. using modprobe) before you can use it.
see also https://github.com/umlaeute/v4l2loopback#run

Code coverage with qemu

I recently started using qemu and it's a great tool when you don't have the required hardware to run your firmware (currently using it for cortex-m3).
Now what I want to do is to do some test coverage with it. I tried using GNUC ARM Eclipse, and I've been successfull compiling and executing the code in qemu, but whenever I add the -fprofile-arcs -ftest-coverage flags (for the project and then for the desired file to run coverage) I am able to create the .gcno file, which means that after executing my code it will generate a .gcda file and then I should be able to see the coverage.
Thtat's where everything goes wrong. I was able to generate a .gcda file but whenever I try to open any of them, eclipse tells me that it wasn't able to open the file because it was null. I've tried replicating the procedure in another computer, but I haven't been successful creating the gcda file (probably different binaries).
At this point I don't really know how to proceed. Should I abandon ARM Eclipse and stick to makefiles (is it possibll to run gcov this way?) or am I missing something really small that is fixable?
PS: I using windows 7 64 bits, the latest versions available on the GNU ARM Eclipse website. Also the idea of doing it via makefiles just occurred to me (it was a stresfull day, it's really late) so I haven't tried it yet, I've only tried executing the code, but without coverage.
As far as I know, qemu is not able to generate DWARF information. But there is a project with the proposal of code coverage with qemu: Couverture Project
When you use qemu as a user space emulator (see also the qemu documentation) you actually can measure the code coverage as usual. In this mode qemu has the full access to the host file system.
For a CMake project you can simply use the CROSSCOMPILING_EMULATOR property of your test executable, e.g.:
if(CMAKE_CROSSCOMPILING)
set_target_properties(mytest
PROPERTIES
CROSSCOMPILING_EMULATOR "qemu-${CMAKE_SYSTEM_PROCESSOR};-L;$ENV{SDKTARGETSYSROOT}"
)
endif()
With this setting ctest will use qemu for running the test and will write the .gcda files to the usual location in your build directory.

Persistent error coming from libusb0

I'm using a Python application that accesses a USB device (pipsta printer) and executes a routine. It's running fine outside the container, but when it comes to the container it returns a error like this:
(File "usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py", line 386, in _check:
raise USBError(errmsg, ret)
USB.core.USBError: [Errno None] couldn't opendir(): No such a file or directory)
In my dockerfile, I've included all the packages relevant to Python and USB, and I also moved the relevant files to /etc/udev/rules.d and restarted udev.
Make sure you:
followed every step from assembly instruction and https://bitbucket.org/ablesystems/pipsta/wiki/Pipsta%20First-Time%20Setup
printer is connected to the power
printer is connected via usb to raspberry
printer's led doesn't blink (should be green constantly)
proper usb library is installed (or try to install different version of the usb library). What version are you using? python: print(usb.__version__) , it works fine for me with version 1.0.0rc1
is printer visible to the os? command: ls /dev/ap1400
I know this is an old question (I've only just encountered it). The following is a paraphrasing of the FAQ. The following steps should help diagnose the problem.
Download the latest set of Pipsta examples..
Extract the contents of the zip file.
Change directory to where the files were extracted
Change directory to the Examples folder.
Using a terminal run the command python verify_pipsta_install.py. This will try and help diagnose problems.
The following will should fix the python usb library error.
If your Pipsta printer firmware is V9.2.03 please upgrade the firmware to V9.2.08 using the fpu (both can be found in the downloads section of bit bucket.
Install the latest version of the Pipsta examples (download from bitbucket).
Copy the new pipsta/Examples/system_scripts/ to /etc/udev/rules.d/60-ablesystems-pyusb.rules
Restart the Raspberry Pi
If the printer still fails to be discovered then -
The following workaround may work.
1. Unplug the printer from the USB port
1. Enter the command sudo lsusb
1. Reconnect the printer
1. Enter the command sudo lsusb
If the printer has been detected by the Linux environment then either /dev/ap1400 or /dev/pipsta should exist in the filesystem.
NOTE The Pipsta now has Debian packages to help with installation. I have a link limit on my account but search for pipsta-printer-utilities-1.1.1-Linux.deb and pipsta-cups-driver-0.3.0-armhf.deb for more information.

Eclipse: Cannot run program "cs-make": Launching failed

For the past week, i have been hunting a free development environment for STM32F1xx, which is supported by FreeRTOS. And no success yet :( .
Now I've found this: http://www.stf12.org/developers/ODeV.html
It's an Eclipse configuration for STM32 compiling and debugging, and there is a FreeRTOS demo too. Perfect!
So I downloaded a preconfigered version of eclipse and tried to compile a demo project to get this error:
Cannot run program "cs-make": Launching failed.
Depressing. Please help, i am very bad at configuring IDE's, compilers and linkers so this has to be newbie-friendly :)
The Eclipse project is configured for CodeSourcery toolchain. You need to install CodeSourcery compiler toolchain from: http://www.mentor.com/embedded-software/codesourcery. Choose Lite Edition, ARM-NONE-EABI package. After the installation make sure you can start cs-make from command prompt (by typing it's name there). Generally, you want all toolchain programs to be accessible from command prompt, which implies that their installation path must be in system PATH variable.
P.S.
Make sure the path DOES NOT contain spaces like standard Windows programs directory "C:\Program Files", instead install the tools in a directory like "C:\arm-none-eabi", "C:\ARM_tools" or something like that.
Ah, thank you got it to work now!
And I ran into another problem too. When I tried to compile another error came up saying something like: "C:\Program is no file or directory". I Solved it by placing all compilers and OpenOCD in the root of my C-drive. I think it's because the make doesn't understand spaces in the make file, if anyone else get the same problem.