Powershell: How do I switch my path to a device (iphone) - powershell

I am new to powershell and as a exercise I am trying to write a automated script that will backup my photos of my iphone.
I am trying to figure out how to set the location of the path to my iphone photos directory.
I found the command Get-PsDrive; however, my phone name does not appear in this list.
Can anyone tell me the command(s) needed to find the phone path, and then cd to that path?
We can assume that the phone is connected.

This is unlikely possible without some module or snap-in that exposes iPhone files in a way that PowerShell can interpret.
For example, for Windows Mobile phones there is PowerShell Windows Mobile Provider.
I am not aware of something like that for iPhone (but I am not an iPhone user either). If nothing really exists then the answer is negative, this is simply not possible technically.

The protocol to talk to the iphone is not available for public use. The iphone icon in explorer is - as already mentioned - a windows explorer shell extension written by apple. There is no way for you to mount a drive to the iphone in the manner you wish for a stock iphone. 3rd party windows tools to access the iphone's filesystem require you install a custom application on the device, which also must be jailbroken.

Related

Reading iPhone files from PC / Mac programmatically

Applications like iPhone Explorer can show the contents for each installed iPhone application on Mac OS X (even on non-jailbroken devices) when iPhone is connected using USB-cable. I'm trying to do something similar, programmatically copy some files from my iPhone app's folder.
I have done some experiments with open-source frameworks/products built to use iTunes-framework, like iPhoneBrowser and MobileDevice Library. I can connect to iPhone, now the problem is how to enumerate Apps folder items? iPhoneBrowser or MobileDevice Library don't support or provide any easy way for that. Even when hardcoding my application path to iPhoneBrowser it still refuses to display the folder. iPhone Explorer can read the folder without any trouble on the very same device, so it is definitely possible.
Second problem is getting path to apps, on each device they have different path with some hash number folder names. How to 'decrypt' the paths so that I can access my app folder on every device?
the app enumerate use another protocol, you may find some in this https://github.com/phildrip/fruitstrap
I wrote a open source program that works on Windows, here is the github project url:
https://github.com/Moligaloo/iPhoneFS
It can access files on jailbroken iPhone/iPod/iPad (non-jailbroken devices files are limited accessible).
It can also enumerate apps on iDevice.

Accessing the iPhone filesystem from a Mac OS X application

I need to get a file (sms.db) from an iPhone connected to a Mac. I cannot find any way to access the iPhone filesystem searching in Apple Developers Connection...
I cannot SSH to the iPhone, the application I want to develop is meant to be used on non-jailbroken iPhones... And I would like to avoid some MacFuse modules I found googling, too... I would like to access the filesystem thru some sort of API, the simpler the better.
Thanks!
This api was developed to allow access to ios devices:
http://www.libimobiledevice.org/
There is no Apple-documented public API for accessing the entire filesystem on a stock OS iOS device. Even private OS/API calls won't work due to the app sandbox restrictions.
Xcode, iTunes, and probably other apps that take over the iTunes USB driver, are using a non-Apple-documented private API that only works over the USB connection.
It appears that DiskAid silences all nay sayers. That app seems to have complete access to the iOS device filesystem - whether or not iTunes is running and whether or not the files are shared. It even sees files down to root level. I am still trying to figure out how it is done. Oh yea, this is all on a non jailbroken device.
It is not possible for non-jailbroken iPhone due to file system restrictions.
You can't access the filesystem from an OSX application, the filesystem is locked down.
Phoneview (as mentioned in a few comments) does not allow access to the file system.
It uses public APIs to get things like call data and contacts, and allows you to copy files into one location on the phone.
From the FAQ: "PhoneView will store your files in the media section of the iPhone's disk"
Smoke and mirrors.
If it's for your own app, use the document sharing included in iOS 4.x. You can then have files show up in iTunes, and drop files from the desktop into your app's section.
A tutorial is found here:
Ray Wenderlich's nice tutorial

How can I get to installed app list on iPhone device?

I'm new for iPhone dev.
I got a question for development of iPhone app.
Is it possible to get to installed app list on iPhone device?
thanks.
Connect you device in your system, use following command in terminal
ideviceinstaller -l
you will get the list of app installed in you iphone device
note: you should install ideviceinstaller package in your system
Apps on a non-jailbroken phone are "sandboxed" so you don't get unfettered access to the filesystem. This means that you can't directly see what other applications are available. Also, just because they're installed does not mean that they are available to the current user. For instance, Safari is always installed but can be disabled in the Parental Controls settings.
The best supported (i.e., in a way that Apple will approve of) way of of doing it might be to check the available URL schemes. For example, if "http:" is supported then Safari is usable; if "mailto:" is available then Mail is usable, etc. Of course, not all applications have URL schemes.
You might want to grab yourself a copy of the Apple iPhone Configuration Utility, which will give you a list of installed apps, plus access to the console output from the iPhone.
Grab the iPhone configuration tool and run this regex on the Export:
[ \t]+<key>CFBundleDisplayName</key>[ \t\r\n]+<string>([A-Za-z \&\-,\!]+)</string>
You can then grab the list of apps nice and easily.
Here's what I did, without jailbreaking. (yes it sounds stupid, but it was simple and worked well for me)
Go to your home screen.
Hit the lock button + home button (takes a screenshot)
Open you folders and do the same.
Do the same for any other pages you have.
All the names of installed apps are now in your pictures folder, just copy the pictures to your computer, and finished!

Can an iPhone OS app do a search of the device's filesystem?

Can I do a search of the iPhone filesystem from within an application? I need to search an iPhone OS device and return a list of all apps installed on an iPhone OS device. I am fairly aware of Apple's restrictions and rules concerning what apps can and mostly cannot do outside of the sandbox -- and know that aside from the Photo Album an Address Book (via specified classes) an application is not allowed to access much of anything outside of its home directory (sandbox) for security. But the boundaries are fuzzy.
Anyway, back to the question: Can UISearchBarDelegate (or any other class/protocol) allow me to search the iPhone device?
Unfortunatly you are still sandboxed, the only way to access the devices' filesystem is to create an application that is a jailbreak designed application.
Not strictly true - the app FileSystem, for example, allows you to browse the iOS file structure and view many (though not all) of the files. You can access almost all of the files from the iTunes backup however.

How to read iPhone files without jailbreaking?

I'd like to access files in an iPhone, such as using remotely connecting via ssh and telnet. But it appears that the iPhone's ssh or telnet are not supported. I can ping it, but cannot use telnet or ssh.
I read through some internet article, it appears that using jailbreak or Cydia it is doable, but I guess it would break my iPhone's license.
Is there an official way to ssh or telnet into my iPhone?
You can't just access any file in a non-jailbroken iPhone.
You can access data files for your own programs during development using Xcode's Organizer, go to Devices -> your iphone -> Summary -> Applications -> your app, click on the triangle thingy to show the Application Data, which you can download.
Otherwise use something like Airsharing (see moogs' answer which came as I was writing this) to upload&download a bunch of files.
I loved ssh-ing before, but Airsharing is even better. You can upload files via a wifi connection to your ipod (using a browser or via webDAV). It was free for the first few weeks, but now it goes for $4.99. That's still not bad.
You can view office, image, pdf and html files.
(I'm not affiliated with airsharing, just a happy user :) )
No you can't. You have to jailbreak to do that.
Even when not jailbroken, you can access some part of the filesystem with iPhone Broswer
I was very surprised and please with iPhone Explorer. It's one of those softwares that just work and needs nothing installed on the iPhone, but it will give full file access if your iphone is jailbroken.
Now, of course ideally we'd install something on the iPhone without needing anything on the computer and access files on the iPhone like a pen drive (and unlike some apps that do that but only through HTTP and wi-fi), but this is fairly good enough. And it's free! Because they use it to promote their other apps, and file exploring on iPhone is nearly useless for most users anyway.
There's just no way jose in hell to access all files in the iPhone without jailbreaking. Period. Apple have never allowed it.
Try using iFile I have tried all the others and this one is my favourites.
Hope this helps you.
You can do it with iFunbox, but you dont have access to edit, move , delete the system files , so you dont have full access to have full access you need to jailbreak your iDevice.