Enable USB Debugging and remote control (scrcpy) with broken screen - adb

and happy holidays. Apologies if this question is more appropriate for SuperUser, I ask here in case there is a programmatic solution to my problem.
In summary: On an Android device with a broken screen, assuming that USB Debugging is enabled or that the connected device is not trusted, is there any way to perform remote control?
So I have a Pixel 3a which I used to control just fine via scrcpy 1.21. Today the screen broke to the point that I only see a few glitchy lines, even though it looks like I can theoretically control it (based on the sounds, I managed to enter the log-in pattern).
The problem is that adb devices does not recognize it, even though the system (Ubuntu or Windows) recognizes that a Pixel 3a was connected for charging.
Is there any way I can salvage this situation?
ADB commands failed. scrcpy failed.

Related

Any hope for turning on phone Nokia 7.1 using adb

My power button died on my phone. Or got less and less responsive. Last time I was lucky that trying a long time I managed to start up my phone. Since then I kept my phone on perpetually or restarting it if that was required. However, now my phone just suddenly turned off out of nowhere. I tried to turn it on again but had no luck. I had previously turned on USB debugging since I thought that was enough to turn it on from the pc if it ever got turned off. Now it seems that was not enough as it shows up as unauthorized in adb (I never tried actually connecting, very stupid on my part). Is there any hope for turning my device on through adb.
Phone: Nokia 7.1
There are some questions on problems with unauthorized devices (ADB Android Device Unauthorized) but those seem to assume I can still turn on my phone to change settings. Is it impossible otherwise?
tldr; Here is a detailed list of instructions if you want to try your luck with fastboot. Your touchscreen and volume buttons must be functional for this to work.
Make sure the phone is turned off.
Press and hold the Volume Down button. Don't release it.
Plug in a USB charging cable
When the screen turns on and shows a message saying "Download" or "Fastboot" mode, release the Volume Down button.
Charge your phone like this for 2 minutes, to make sure it has enough charge.
Move your phone's USB cable and connect it to a PC.
Download the binary for fastboot.
Run fastboot continue.

windows: how to stop irda dongle periodic auto detecting

I'm writing some code in C for an IrDA project on one win7 32bit computer. I have another computer setup to display any data received via in infrared. This part works. However the as soon as I connect the IrDA dongle to the PC, it starts to send periodic data for searching other IrDA devices. I want to disable this behavior programmatically so I see only the data sends as a result of my code. Anyone know which command to use? Is it WSASetService? I didn't learn socket programming, not sure what "removes from the registry a service instance within one or more namespaces. " really means. http://msdn.microsoft.com/en-us/library/windows/desktop/ms742211%28v=vs.85%29.aspx
Have you disabled the Infrared Monitor Service manually?
I experienced problems with this functionality in win7 when using Windows to communicating with an embedded micro-controller based device that worked well with windows XP.
I disabled the Infrared Monitor Service manually and found that windows was still polling the IrDA periodically!
I have not found any documentation available that describes it or how to disable it, I will continue searching...

Embedded System Hangs

I am using TIOMAP/AM3517 based custom board which has ARM7 core + Linux 2.6.32 running on it.
Recently, I started observing an issue in which all the interfaces serial console, RNDIS/USB, Network stops responding (my type on keyboard connected to serial port/console port doesn't go through + no device is detected upon removal/insertion of USB sticks/BT dongle + Ethernet/network activities are stopped (can't login over ssh or access webPage that the system has.
I checked the power to the CPU and other power rails using DMM and it looks fine.
There is no keyboard attached so MagicSysRq cannot be used while the issue happens.
I have watchdog on the system which rebooted the system, however to reproduce the issue and to get more information of the system's state, now i have disabled the watchdog.
Finally, my system/linux is configured to reboot upon detecting softlockup which is not happening either. Also, I have enabled verbose debug options under kernel hacking but nothing seems to give any more information.
How do I debug the issue to identify the rot cause of it?

Raspberry Pi usb redirect issue

Okay I am going to try and be as discriptive as possible here to get this problem solved. I work at a company that makes BIG gear boxes and we have computers that run our Mills/Laths. These computers are currently FIT-PCs running XP. These computers are used to control the laths/mills via a usb to serial converter (PL2303_Prolific usb to serial converter). When it is plugged into an xp machine it is recognized as a com port. SO these machines are very old and are fail left and right, I intend to replace them with a raspberry pi running xfreerdp but I can't seem to get the usb serial device to be redirected to the virtual machine it is remoting into. Has anyone ran into this/know a fix for it? Please ask me questions if you are unsure of something because I am completely stuck here. TLDR Using raspberry pis as thin clients need to push a usb 2 serial cable through to the virtual xp machine
Unfortunately there are known issues with USB on Raspberry Pi. They're aware of the issue and working on it, but it is as of yet unresolved.
The USB Redux thread was created to capture the state of the work as well as the current list of work-arounds. The USB/serial converters are broken is a related thread.
There is hope, however. First, they are working actively to fix it, so I suspect it's just a matter of time. Second, there are a few things you can try.
There's a config file in
/boot/cmdline.txt where you can try adding a few entries. One that appears quite effective is dwc_otg.speed=1 and dwc_otg.fiq_fix_enable=1 (but they didn't help me). See this page for some examples.
Update the kernel (search for rpi-update) to at least #348 (use uname -a to determine the kernel level)
Good luck.
Update (Mar 13 2013). There appears to be a fix for the majority of USB issues as of kernel #389. Use rpi-update to update.

How to make a Windows touch pad acts like a Mac touch pad?

I am trying to write something for windows using WINAPI, so I can make the touch pad do whatever the mac touch pad do.
I have checked using Spy++ what WM messages the two finger taps and etc. send to the OS, but figured out it sends only those plus/minus:
WM_LBUTTONDOWN
WM_LBUTTONUP
WM_MOUSEHOVER
WM_MOUSEHWHEEL
WM_MOUSELEAVE
WM_MOUSEMOVE
WM_RBUTTONDOWN
WM_RBUTTONUP
When I tried to see what happend when clicking with 3 or 2 fingers it didn't send any particular message, unless I moved them a bit.
firstly i would like to start with this:
when 5 fingers going down show desktop (as win+D does).
How to write (driver?) something that can diagnose 5 fingers touching simultaneously the touch pad?
Of curse there is no OS messages for this, but I can make some unique combination of existed messages and by that diganose it.
If I need to write a driver can I do it generic for most of the touchpad, can I do it as add-on?
If you can post a good tutorial you are familiar with for writing a driver for windows, pls, cause I have no clue about it.
Do I need anything else to take into account :
1. Diagnose 5 fingers mouse events.
2. Make a thread in Explorer on startup that handle those new mouse messages.
thanks in advance
Mouse Input Notifications
In short, you can't.
First, there are touchpads that can physically detect only 1 finger touch, and for those who can detect many - their drivers do the translation for you.
Windows does not have any inherent support for reading multiple touch inputs - it relies on the touchpad drivers to provide them.
You can achieve your goal for SOME devices by writing your own touchpad driver (probably starting from Linux touchpad drivers and Windows driver development kit), but this is far from being simple.
And, you'll need to do this for each and every touchpad device you want to support (from Synaptics, Alps Electric, Cirque to name the few)
Only after that you can move on to implementing the reaction for the touchpad actions in applications like Explorer.

Resources