Buildozer, WSL adb not finding device, adb in Powershell works - python-3.x

I have a python program using PySimpleGUI. It works on Windows, a pure Linux machine and it also works on the WSL. I'd like to use it on my phone(Pixel 7 pro). Buildozer makes the apk file but during the process 'buildozer android deploy run logcat' it runs the adb devices cmd and finds nothing. The adb devices from a PowerShell works fine. It probably has something to do with the virtual machine WSL provides. I've queried google and read pages of information and suggestions and nothing so far works.
Please let me know if I can provide anymore info that will help solve this.
I've tried running the adb in the build environment manually, outside build script of buildozer, with the same results, no devices found.
I'd like to move on the next step of trying or troubleshooting the app on my phone.
Thanks in advance, Craig

Related

Yarn Project Not Working After Mac OS Ventura Installation

I have updated my mac's OS and when I try to run the same commands that I did prior to the update (see file, it was simply just yarn), I get a vomit of errors on my terminal and I get a system prompt that states: The "make" command requires the command line developer tools. Would you like to install the tools now? After I click Install it takes about 20 minutes and it says installation finished, only to have the same behavior when I run the same command in my terminal.
Any one else a developer using Ventura running into weird problems running their code base?
Will be happy to share my output logs if somebody cares to help.
Did exactly what system prompts said, only to give me the same behavior when trying to run my code locally. It is in a feedback loop and am un sure how to approach it at this point.

How to debug remote Python script in VS Code

I am doing Python development in Raspberry Pi. I have installed VS Code in my laptop and have installed the ssh extension. Using this I can easily connect to Raspberry Pi. While I am connected I can see that VS Code has also loaded the Python interpreter of Raspberry Pi. I can run my Python script from within the vs code but when I tried to debug the code, nothing happens.
Is it possible to remotely debug the Python script from laptop to Raspberry Pi? How can I enable this?
I have resolved this issue. If anyone wants to do remote development and debugging, follow below steps:
Install remote ssh extension in VS code
Once installed, you will find a green icon on the bottom left corner in vs code which allows us to connect to the remote machine.
Connect to the remote machine using the standard ssh command. Alternatively, you can use ssh-keygen to generate a public-private key if you don't want to use the password at every prompt.
Once you are connected to remote machine, you can open the file explorer and create any python file. When you will save this, it will get saved in your remote machine. This way you are using your machine to remotely develop code on another remote machine.
Good thing about vs code is that it selects the remote machine's python interpreter so all the packages which you have installed on your remote machine will work with IntelliSense.
In order to debug the code, we will use debugpy. Install this on both machine (remote & local)
On your remote machine, run below command:
python3 -m debugpy --listen 1.2.3.4:5678 --wait-for-client app.py
here 1.2.3.4 is the IP of remote machine. This will start a remote debugger which will wait for a clients connection.
On your local machine, in VS code open Run & Debug, add a configuration of Python: Remote Attach. Make sure that launch.json has the host as the IP of your remote machine and port as 5678.
Now start debugging as normal and you will notice the code will break at first breakpoint and from here you can proceed normally as we used to do in local debugging process.
TBH, this is best feature VS code has because most of the software allows you to do remote development which is nothing but just a normal SSH but remote debugging gives you more control. I was doing some python project on Raspberry Pi and obviously cannot install VS code or pycharm on it. But with this feature now I can easily develop the code using Pi's python interpreter and debug it as well.
If anyone is having any issues, let me know. Happy to help.

Ubuntu - I can't lauch apps and run command with sudo

I am writing this post because after several hours of research I did not manage to find an answer.
I have been using Ubuntu 20.04 for a few months in dualboot on my original Windows. But since a few days I have not been able to launch applications (example: Chromium, Firefox, Visual Studio Code, Settings), I tried to launch them via the terminal, but I have no response, not even an error. I also cannot execute a command with sudo
After several searches I understood that it could come from gnome, I then try several subject recommend it to execute
$ killall gnome-control-center
$ gnome-control-center
When I try to kill I get no response, and when I run gnome-control-center I get the following error :Failed to register: Timeout was reached
I cannot move forward in my plans because of this problem, would you have a solution please?
This might just be that something on your system is corrupted, you might just have to copy the files you use all the time (Code, pdfs) wipe the drive and reinstall your ubuntu. Also, check if the Windows is working if that's not working it might be a problem with your computers internals.

Using Android Studio on different computers

I use Android Studio on my PC and my Laptop. My projects are stored in Google Drive, but Google Drive is in different places on the PC and laptop.
I just edited a project on my laptop, now I try and run the emulator on my PC for this project and I get an error as it's looking for some things in the location they were on the laptop.
04/23 10:34:51: Launching app
$ adb install-multiple -r S:\Google Drive\AndroidProjects\Connect3\app\build\intermediates\split-apk\debug\slices\slice_0.apk S:\Google Drive\AndroidProjects\Connect3\app\build\intermediates\split-apk\debug\slices\slice_5.apk C:\Users\AndyC\Google Drive\AndroidProjects\Connect3\app\build\intermediates\split-apk\debug\slices\slice_2.apk...
$ adb shell pm uninstall com.androidandyuk.connect3
Unknown failure (at android.os.Binder.execTransact(Binder.java:565))
Error while Installing APKs
The S drive is where they are on PC and C is on the laptop.
How can I fix this?
Thanks.
Whilst I thought adding in Github would only help me going forward, it must reformat the code to work independent of your own file system as I was able to edit it again.

Use exec node in Node-RED while running Windows 10?

I have been trying to run the exec node in Node-RED, hoping that it would use the command prompt native to Windows 10. I would provide a command that would run a python script I have. If the command went through, my windows button would be clicked. Node-RED says "Successfully Deployed" when I run my single exec node, but the windows button does not pop up. I am concluding that Node-RED does not know how to access the Windows command prompt, which is very frustrating. Is there a way to run python scripts from Node-RED while running Windows?
In case it is relevant, I am using Node-RED to communicate with the bluetooth low energy protocols of the Lightblue Bean Arduino board. I am sure that there is not a python library for communicating with bluetooth low energy for Windows. For Mac and Linux, sure, it's implemented by Adafruit. But they say they do not have anything for Windows.
Many thanks.
I asked someone and they told me you cannot have a standalone exec node- you need to use an inject node to get everything going. I checked off "Inject once at start?" and my script ran just dandy.

Resources