BlackBerry: “filesystem not ready” when using USB cable - blackberry

As part of a BlackBerry project I'm working on I need the ability to store data. As per RIM's documentation, on handsets running v5 or later OS, we can use the SQLite database versus the more typical PersistenceStore methods.
What I noticed is when my handset (A Torch 2) is plugged-in via the USB cable - so that I can run code through the debugger - the "SDCard/" and the "store/" are no longer available (both of these are NO longer enumerated when calling FileSystemRegistry.listRoots). Only "system/" is available, but as it's a read-only file system this does me little good.
I need a read/write file system that will be available even if the handset is attached to a PC.
It's worth noting that when I plug my handset in I get a dialog that asks how I want this connected: Sync Media, Mass storage device, or Charge Only are the 3 options. It does not matter which I choose ... the effects are the same in that only "system/" is available for a file system.
Any advice or help is greatly appreciated.
-------------------------------------- UPDATE --------------------------------------
I spoke with RIM's developer tech support on this issue and was simply informed this is a FAD. Their advice was
"This is not a bug, it is how the device is meant to function. You can
listen for when the device is connected via USB and the data
unavailable using SystemListener2."
As such it appears all we can do is alert the user to the fact that by plugging their handsets into the USB cables whatever functionaltiy you might require in your application that would include the file system will temporarily be unavailable. It might be functions as designed but I hope at some point they'll improve the design.

I'm afraid to say I struggled briefly with this and then gave up.
In my experience RIM mounts the SD card on the pc filesystem when you connect it via USB no matter what you do.
If you "eject" your device from the machine you should be able to access the sd card.

Related

Does iOS 8.3 now support Wifi debugging?

I updated iOS on my phone to 8.3 and I saw this message popup on first boot, but I have not seen it since:
I have been searching all day for information and I can't find a single reference to this message or to Xcode supporting wifi debug.
I am using a macbook pro 2009 model, and I have read that this is not compatible with the new continuity features (as well as airdrop etc). I am wondering if this is part of the wifi debug (and also if BTLE is involved at all). Of course it is all speculation since I cannot find any documentation about this.
Has anybody used wifi debug, or can point me to any documentation?
No, the feature was disabled as it causes serious security flows, for example when debugging you can fake location for any app, access confidential data like your number, udid etc. WiFi can be used now only to sync using iTunes.
It's restricted to USB only. You would need to write a bridge between USB and WiFi. You could in theory connect iPhone to Raspberry Pi, use open source crossplatform libMobileDevice. And mirror all USB requests from your XCode to this device USB.

How does this iOS app communicate over the USB port?

This app promises to turn your iOS device into a second monitor and uses the standard USB cable to connect to the computer, as opposed to the network which all other similar apps use.
Back when I heard about it, it wasn't yet available so I thought it was a scam. To my surprise, they released the app and it actually works as described.
How does it work ? As far as I know there are no APIs to drive the USB port in iOS, and the computer connected via USB through the standard charging/syncing cable doesn't count as an MFI accessory.
Note that they provide the server software (the one that installs on the Mac and streams the desktop to the device) on their download page for free, reverse-engineering it could shed some light on this but I unfortunately don't have the skills for that.
Dean told about it on his blog.
Duet uses Peertalk, an open source library allowing to pass TCP connections through the USB connection without being part of the MFI program.
The information, code and tools to accomplish generic USB port communication is available to those who join the Apple MFi program. You have to do the paperwork and get licensed by Apple.
http://developer.apple.com/programs/mfi/
The libraries necessary are included in the app and then the usual streaming libraries and code do the rest.

Ios filesharing without iTunes or an internet connection

I am working on developing an enterprise application for ios 7 that needs to work offline and then sync with a desktop client (that I also need to write) for data transfer.
My company does not allow wireless or cell data in this area, and would strongly prefer to not use iTunes either.
The question is, how do you transfer data from an iPad over the usb cable to a custom windows program, without iTunes.
The simplest answer would be: iExplorer (http://www.macroplant.com/iexplorer/) plus some kind of a script to automate the data sync.
Otherwise, you can use the ExternalAccessory framework to communicate with the desktop via a USB tether. This would necessitate a desktop client running simultaneously to communicate with the device.
peertalk (https://github.com/rsms/peertalk) does what you want, however the computer side library is only for mac os. Maybe you can port the protocol to windows by looking at that (the license is BSD)
Edit: this guy managed to have it run under linux. It sits on usbmuxd, which also has a windows port, so it shouldn't be impossible.

How to communicate with USB protocol for an MFI accessory

I have bought an iSpread (http://www.photofast.tw/iFlashDrive2013_1.html?pid=132) which allows me to put files on it via USB on my PC. Now those files on the USB I would like to transfer to my iPad. I know that there is an application for that developed by the creators of the iSpread but for an application I'm creating I would need this integrated into my own application.
I have downloaded the EADemo application and installed it on my iPad. There I can see that the accessory is attached and that it uses the tw.photofast.cr protocol.
How do I get a list of the files and transfer them? I assume that since this USB works on my PC that it uses a standard USB protocol. I'm able to send strings and hex data to the accessory using the EADemo application but no bytes are received.
Anyone have experience with this?
You'll need to know the protocol their app uses to communicate with the accessory.
They might give it to you, if you indicate you're willing to sign an NDA and they think they can benefit from the transaction. Some hardware manufacturers offer an SDK in the form of a static library.
If you really wanted to try to reverse engineer it, a good start would be to jailbreak your phone and run their app with gdb attached so you can poke around.

Accessing an iOS device over USB on mac

I have a mobile app that needs to transfer files to a database. However, one of the specifications for this is that, if the user does not have a wireless network set up it should be able to be plugged into a mac and transfer a file to the database. The issue I am running into, however, is how to get said files off the iPad and onto the computer via USB.
I have spent the last week looking into various solutions, mainly IOKit and applescript, but both of these seem to be unable to locate the iOS device when it is plugged in with a USB cable. While I know that I could jailbreak the device and then it should be simple, this is not an option.
I have had a difficult time finding information on this subject, which makes me worry that it is hopeless.
However, I know there must be a way to do this without jailbreaking because there exists this beautiful app. I have been able to access the files I need to through this app so I know for sure it is possible. This, however, is not an ideal solution as I really don't have the option to use third party software for my application. I suspect that the app uses applescript to do it as it has an executable called appleScriptServer in the install directory that looks like it may be what handles this.
What I need is to understand how they access the files and implement a similar scheme for my (much simpler) needs.
Does anyone know of some way to do this? If it is possible in IOKit or through applescript, I would like some resources that help me understand how to properly locate and access an iPad when plugged into the USB port on a mac. The closest I have come was using user$ system_profiler SPUSBDataType from this thread that lets me know:
iPad:
Product ID: 0x12a4
Vendor ID: 0x05ac (Apple Inc.)
Version: 3.10
Serial Number: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Speed: Up to 480 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x1d110000 / 7
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 1600
but I don't know that I can use any of the information it gives me other than to verify that it is plugged in via USB.
Thank you very much for any help you can give me.
You can use the MobileDevice framework, as explained in this answer to a question similar to yours.

Resources