I'm making android app through Unity, which will access and read data output from serial device, connected through USB cable to tablet. I have everything figured out except one thing.
When I try APP on tablet it throws UnauthorizedAccessException: Access to the path "/dev" is denied.
How can I grant access to this directory without rooting tablet ? I dont think I need because i tried other APP from Google Play to read from my serial device and it works great.
Can you help me with this ? I hope for some "grant permission in manifest xml" tip or something. I searched a lot but nothing fits my case...
Related
I am Adel and I am creating an program and I want to save it into an USB and auto run it whenever the USB is inserted to any Windows device, the problem is that the code that I use in Autorun.inf doesn't work.
The files in the correct path and the Autorun.inf file in the root of the USB, but it's not working!
NOTE: the exe also works
The code:
[Autorun]
Icon=USBSYS\icon.ico
open=USBSYS\file.exe
action=MyUSBName
Label=MyUSBName
Autorun.inf does not work anymore on USB drives. Its a security thing to prevent people from putting malicious programs on a thumb drive. It does work on CDs/DVDs though.
I am trying to access a Network Share Folder on a Hololens Application. Within Unity I have a class which goes to a Network Share Folder grabs a model and loads it at run time. When I run it on the Hololens it seems it cannot find that network share and I suspect I need to impersonate a windows user and then access the network share that way. Has anyone ever done impersonation within a UWP application? I was thinking of creating a Class Library then importing the DLL but everything Ive tried from within the UWP class library doesn't work as all the examples are for .NET.
Regards,
Jay
Assuming you don't actually need to impersonate another user, but instead just authenticate to the other device as the current user, you should be able to do this with the privateNetworkClientServer and enterpriseAuthentication capabilities. You can also use the FileOpenPicker to let the user pick something from the network.
I'm working on troubleshooting a device that only works once it has been unplugged and plugged back into its USB port on the PC.
The application that talks to the device is written in C#. So I need a programmatic way in C# or perhaps batch files, etc. to reset a USB device.
Thus far I've tried using the devcon.exe tool, but that doesn't seem to do the same job that physically removing and adding it back does.
Is it possible to use Win32_USBController to control a USB device's power through the port somehow? MSDN Link
Perhaps in a similar fashion, I found the CIM_Controller class, which has Reset() function. MSDN Link
The tools for resetting a USB port in the Windows Driver Framework/Kit don't appear to be readily accessible via a library or otherwise without first creating an actual driver unless I'm mistaken.
Thanks
I would recommend that you navigate to the directory and find the device. Right click on it and in the short cut menu click on eject. The application and the OS should handle the device. It is a bad idea to "unplug" a USB device, especially flash drives without ejecting them. You could end up with open file errors.
If the problem is not ejecting the device then the issue is probably with the application. If the application is opening a file on the device and the device has to be unplugged in order to function properly then the application may not be closing the open file properly...
Just saying
You might look at the SO link: How to programmatically unplug & replug an arbitrary USB device?
and read through that...
it sounds to me like your scanner is completing a task then shutting it's post down. it remains plugged into the PC but the PC does not 'see' it. go to the directory and see if it is still in the directory...
unplugging once the device shuts down the port does nothing. replugging reconnects the electronics and the PC becomes aware of the device which completes one more task. then shuts down its port again.
Dr t
I am looking into making a c# program that will read in the logcat output from an android device and read it in to the c# program.
Initially it should do this while the phone is connected and it shouldn't require a specific app on the phone to be installed for the c# program to be able to retrieve the logcat output. Also the phone shouldn't require root access.
Is this something that is possible, I can't find anything on Google that says its possible but thought I'd ask on here in case someone has some useful information.
Thanks for any help you can provide
The most practical answer is to execute the shell command 'adb logcat' from your C# program and capture its output.
The only requirement for the device is that USB debugging be enabled in the settings menu.
The host PC will require that the android developer tools and appropriate USB driver for the device be installed. This can, unfortunately involve a substantial amount of hassle, especially finding the right drivers for windows hosts.
More complicated approaches would be to duplicate the functionality of the adb program (it is open source) and/or USB driver in your program, or to install an app on the device with the read logs permission which sends them to you - or even run an ssh server under the app userid so you can connect in and obtain them.
i looking for any way to transfer file from PPC to PC - and from PC to PPC ,
i dont want to use WebService, and if i use RAPI i need that in the PC will be any program - and i dont want
(i dont want that in the PC will be any of my program)
how i can do it ?
thank's in advance
You're going to need to be more specific -- the way the question is now it's basically impossible to determine what you're after.
Do you need to transfer a file from a Windows Mobile handheld to a Windows PC? Over what type of connection (are they on the same 802.11 network) ?
You need more details or no one will be able to even attempt to help you.
So, if what I gather is correct, you want to plug a device with your app on it into a PC and then be able to push files to the PC from the device without having to install anything over on the PC. Is that correct? If so, the next question is are you insane?
It's not possible, and for very good reason. You don't see any potential security problems with being able to just plug a device into a PC and push files up to the PC without the user having to explicitly have installed something to receive that data? I could write a simple attack app that would fill up the PC's hard drive in about 5 minutes.
A vanilla version of this is to just use the Active Sync synchronization folders. If you on the device save a file to the device synch folder, then Active Sync will move it over to the PC synch folder automatically.