How to add an SD card to genymotion? - genymotion

In genymotion settings->storage there is only the internal storage, no SD card.
Is there a way to have a SD card also?

There's already some emulation of SD card (external) storage in Genymotion that might work for you, depending on what you're trying to do. Although Settings->Storage doesn't show it separately as External Storage like you might expect, Genymotion does emulate external storage. The size of files stored there will be reflected in the totals shown under Internal Storage by Settings-Storage.
Running in Genymotion, an app using Environment.getExternalStorageDirectory().getPath() or .getAbsolutePath() will get back /storage/emulated/<userId>, where userId=0 if the app is running as Owner, and 10, 11, 12, etc. if the app is running as another user or restricted/managed profile. The Android framework actually maps this for you to /mnt/shell/emulated/<userId>, which is why you won't find /storage/emulated/<userId> if you use a shell to poke around.
The paths /sdcard and /mnt/sdcard are symlinks to /storage/emulated/legacy, which is basically the Owner's storage. Don't use these in your apps, since they might not exist everywhere and/or your app might not have access to them if not running as Owner. They are just there to support legacy hardcoded apps.
Not being sure what you're trying to do, it's probably also worth mentioning that Genymotion now supports VirtualBox shared folders which will appear under /mnt/shared inside your VM. Check their Google+ post for instructions.

Related

Releasing Mac App Store application that requires 3rd party drivers

Anyone has any experience with application deployment through Mac App Store with 3rd party drivers? I have an application that is used to manage external device through usb port. It requires some drivers to be installed within. Any ideas how to deploy such application with Mac App Store so I don't have to bother user with any confusing messages about drivers? Is there any way to deploy such driver? Is there any way to load drivers only in userspace (sandbox?)
It's a virtual com port driver.
As far as I'm aware, you can use the user space I/O Kit framework from Mac App Store apps. So if your device can be driven entirely via that, go ahead. USB devices are usually good candidates for user space drivers, but it heavily depends on how the device will be used. If only your app is going to be accessing the device, you stand a very good chance. If you're intending to make it available to multiple applications, e.g. by creating a /dev node, you'll need to drop to the kernel.
You can't ship kernel extensions (kexts) with apps via the Mac App Store.
I don't know what the status is regarding MAS apps which require a specific device and kext to work, without shipping the kext together with the app. If the kext is optional, I suspect they'll allow it.

Automatically map mobile devices to drive letter?

Evening community.
I'm in the process of developing a windows based application which heavily revolves around mobiles being connected to a machine via USB, Currently. The communication between android using googles ADB drivers works without a problem (currently, that is). The problem is getting said application to integrate well with IOS users.
What the application does I'm bascially reinventing the wheel of stock control for a client, who wants a completely customized application based around their current mobile barcode scanner which scans and saves the scanned items to a file name created with the date & Time in a text format. This application is both on IOS and Android devices.
What i'm looking to do, is have their current machine automatically map the connected device to a drive letter to allow easier browsing of the device through the application & Pull the necessary file and save locally to then make other changes as needed..
So, the overall question. Is, that without having a jailbroken/rooted mobile device to allow Mass Storage, is it possible to have a Windows XP based machine to automatically map connected IOS and Android devices to a drive letter? There will be only one device connected at one time

Is there any way Not to detect USB from windows PC?

Is there any way Not to detect USB from windows PC?
The USB device should not mount on windows PC ,It should be handled by my application..
Suggestions please...
As far as I know there is no way of stopping the mount on the windows PC, however, you could set it up to autorun so that when it is plugged it in attempts to launch your application. This answer has some information on how to do this: https://stackoverflow.com/a/255067
There is also the option to hide a drive in windows by removing is drive letter (http://www.howtogeek.com/97203/how-to-hide-a-drive-in-windows-so-that-no-one-will-know-its-there/) however, this is almost certainly going to stop your application from reading it too.
If this is for a specific security reason then perhaps you could look at encrypting the drive and allowing only the application to decrypt the data. Thus, whilst mounted in windows it will be of little use.
Sorry I couldn't be of much more help.
Microsoft provides a utility called devcon for free download.
It's a "Command Line Uility Alternative to Device Manager".
It can actually do many things that I won't get into here, but removing a plug & play device is a simple operation once you know the unique name of the device you want to manipulate.
Refer this to check how to work with it.
It sounds like you don't want your device to show up as a drive in My Computer. In that case, why are you using the Mass Storage Device class at all? You could make a custom, vendor-specific device and talk to it using control/interrupt/bulk transfers with WinUSB. You would need to change the Device's USB descriptors to indicate it is a vendor-specific device and not a mass-storage device.

Access to raw data in crypto USB device

I have a crypto USB device which is used to store PKI certificates including the private key.
It can be read/written to using the Microsoft Crypto APIs. And it is protected by a PIN. I am investigating if the device is in fact secure.
In my opinion, the security of the device hinges on how the PIN is used/stored. This is related to a different question I posted on crypto.stackexchange - https://crypto.stackexchange.com/questions/5929/crypto-usb-devices-where-is-the-pin-password-stored
When I insert the device into my USB slot, it presents itself as a CD drive containing a setup program which installs the driver/CSP middleware/UI for the device. After the setup program is run and I store certificates in the device, I still see only the setup program in Windows Explorer when I look at the drive assigned for the device.
So in order to prove that the device is secure or not secure, I want to access the raw data on the device. And I want to know what APIs on Windows, I can use to access the device bypassing the Crypto APIs.
Alternately are there tools to do the same?
One idea would be to boot into a Linux Live CD and view the drive contents that way. You could, for example, try one of the latest Ubuntu builds, all of which can be run from the CD without installing the operating system onto your Windows machine.
My theory is that when your device is accessed from Linux, the raw data will be available. When it is accessed from Windows, I suspect some kind of clever AutoPlay comes into effect in order to present your device as a CD drive.

Create fake flash drive programmatically

I want to create a fake flash drive programmatically under Mac OSX and Windows.
It should behave like a normal drive, that means it should appear in explorer/finder, should be unmountable,.. If someone puts some data in it, it should be handled in a backend software.
Is that possible?
I'm not aware of any existing cross-platform frameworks. For Windows, the documentation for writing device drivers is here: http://msdn.microsoft.com/en-us/library/ff557573. See also http://msdn.microsoft.com/en-us/windows/hardware/gg463062 but note that this is hard-core stuff.

Resources