how to find keyboard in /dev on osx - macos

On linux / ubuntu, the keyboard and mouse devices are found
in /dev/input/by-path/
Where is the keyboard device mounted in osx?
I added a usb keyboard, and no devices got added in /dev folder.
Is it located somewhere else, or is it totally unaccessible?
Thanks.
Edit:
I was able to get some info on the keyboard using libusb:
046d:c315 (bus 26, device 3)
and usb prober in developer tools from apple...
however none of them mention a /dev special file or another way to access it.

OS X uses its own system to manage the PNP device tree, see http://developer.apple.com/mac/library/navigation/index.html?section=Topics&topic=Drivers%2C%20Kernel%2C%20%26amp%3B%20Hardware&kind=topic to get started

Related

CP2102 device is not listed in /dev on macOS 10.13

I have the ESP32 board with Silicon Labs CP2102 controller. When I connect it to my MacBook, I can get the details about this device using the command system_profiler SPUSBDataType, but it is not listed in /dev as a virtual serial port - so I can't communicate with it.
CP2102 USB to UART Bridge Controller:
Product ID: 0xea60
Vendor ID: 0x10c4 (Silicon Laboratories, Inc.)
Version: 1.00
Serial Number: 0001
Speed: Up to 12 Mb/sec
Manufacturer: Silicon Labs
Location ID: 0x14200000 / 5
Current Available (mA): 500
Current Required (mA): 100
Extra Operating Current (mA): 0
I'm using the official driver downloaded from https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers.
Any ideas how to make it visible in /dev? I have also Windows installed on the same computer where it works fine, so the HW and the USB cable are OK.
I found that macOS High Sierra has blocked the SiLabs kernel extension.
Here are steps to allow this extension:
Go to "System Preferences" -> "Security & Privacy"
In the bottom of the window, you will see a message "System software from developer "SiLabs" was blocked from loading."
Click on "Allow" button
Restart your Mac
Now my device is listed as /dev/cu.SLAB_USBtoUART and everything work as expected.
The Allow button did not work for me, so I had to disable checking altogether:
Shut Down
Hold mac+ R during boot to enter recovery mode
Open a terminal
type spctl kext-consent disable and press enter
Reboot
It worked
If you approved through Security settings but still can't see /dev/cu.SLAB_USBtoUART, most likely that you need a new micro-usb cable. It's not that your cable is broken, but some cables are only meant for power so they can't transfer data.
For me, I tried four cables and only the last one works, which comes from Sony (forgot where I got this cable though)
For me I would install the driver but I never got the message in the Security & Privacy screen that I was supposed to "Allow". The solution:
sudo kextload /Library/Extensions/SiLabsUSBDriver.kext/
This will actually spit out an error:
/Library/Extensions/SiLabsUSBDriver.kext failed to load - (libkern/kext) system policy prevents loading; check the system/kernel logs for errors or try kextutil(8).
However, if you now go to System Preferences-> Security & Privacy, you'll find the necessary message and Accept button to allow the kext to load. Click that, plug in your device and check that there is a detected device:
ls /dev/cu.*
...
/dev/cu.SLAB_USBtoUART
...
Try another cable. You might be using one with only power connections, not data.

Custom ROM Samsung SM-G53OT1

I've been using this phone a while, and I have been through tough times with it. Two bootloops, Google Play Services crashing infinitely, weird errors, everything. I'd say I've "bonded" with this Samsung and would like to take it up a notch.
I've been looking everywhere for ROMS for this phone and I haven't been able to find any, not figure out how. Maybe I'm just stupid but man it's aggregating.
I have a PC, Samsung driver's, Odin, and of course, my Samsung. I have everything I believe is necessary to flash a custom ROM.
I would appreciate ANY help to get a nice ROM for my phone.
At the minimum, I'd like it to have a theme changer.
Samsung Galaxy Grand Prime One
SM-G53OT1
You can install CM 13 on your SM G5series
CM 13 is a custom ROM used in android devices.
your warranty will be void if you install a custom rom.
careful that installing a custom ROM would sometimes injure your device
permanently.
Follow these steps to root your device to enjoy vast features
Download a recovery.img,USB driver and ADB tools for your corresponding device(extract and install them and keep the extracted file in one folder)
Download and Copy the zipped cm13 and gapps6(arm)to your device's internal or SD storage
Connect your device to a PC in USB debugging mode(just tap 7 times on the developer options in settings to enable USB debugging)
open program files,open minimal adb tools.Type CMD in location bar to open the command prompt in that folder)
type "adb devices" in the CMD without quotes.
"fastboot recovery.img"
Your device will be reboot and
Team win recovery is opened
wipe the system ,cache,dalvik cache
select INSTALL from the option
choose the zipped file cm13 and swipe it to flash the custom ROM.
choose the zipped file gaapps and flash it by swiping.
Your device will be updated to marshmallow after rebooting

Mount ejected usb device on Mac

I wanted to know if is possible to mount a USB after it has been removed from the finder, without having to re-enter into the USB port.
On my Mac I connected a USB device, but sometimes after putting the mac suspended, the USB is no longer detected, and then I take it out and insert it again.
Is there any command line to reactivate? I tried with diskutil mount but it does not work, as if the key is removed physically from mac.
Thanks
I do not know if there is a command line tool to do this, but you want to send the opposite of eject to the device, which is "inject". This is a SCSI RBC command that can be sent over USB. After inject, the operating system will attempt to mount it.

Auto Open USB Drive on Mac 10.6/7/8/Windows XP/Vista/7

I'm creating a FAT32 formatted USB Stick/Drive to ship a product. We'd like it to behave a bit more like the hybrid CD/DVD's that we create:
Insert the disk on Mac 10.6 or later and the drive opens up and shows you a window with the application in it. We can do it from a DMG or CD but the USB drive doesn't seem to want to honor the bless command.
On Windows, we've set up an autorun.inf. On XP it's not showing the icon, label, or opening the specified file. I know that you can't have Windows Vista and Windows 7 automatically open something or add an entry to the AutoPlay list by default, but it still should show the Volume Label and icon.
Here is my autorun.inf:
[AutoRun]
Action="Install My Cool App"
Open="InstallThis.exe"
icon="Ultimate.ico"
[Content]
MusicFiles=false
PictureFiles=false
VideoFiles=false
Are these things too much to ask for a USB stick? Anyone else out there shipping things on a USB flash drive and have overcome these issues?
As of Windows 7, AutoRun feature is not supported on USB drives. Only the following commands are supported:
label
icon
See Improvements to AutoPlay on Engineering Windows 7 blog.
Examples in Autorun.inf Entries do not use quotes for values. Does it work without the quotes?
MacOS might have implemented a similar approach to Windows 7: do not autorun anything from a flash drive automatically to protect you from malware.

Is there a way to programmatically check if a Mac or PC keyboard is attached?

Is there a way to reliably check programmatically if the keyboard attached to a computer is a Mac keyboard with Command (⌘) and option keys, or a PC keyboard with Windows, Alt, and Menu keys? For simplicity's sake assume that there is only one keyboard attached to the computer. An operating system independent solution would be best if there is one, but if you have to assume an OS, assume Windows 7.
Enumerate the attached USB devices and look for a keyboard. If you find one, and it's got a vendor id of 0x05AC (Apple Inc), then it's definitely an Apple keyboard. If the vendor is something else, or if you don't find any USB keyboards (e.g, the keyboard is probably hooked up via PS2), then it's probably not an Apple keyboard.

Resources