I have an iPod Touch 2G that is fairly messed up and both the power button and home buttons are currently not working properly which makes taking screenshots much harder than normal in iPhone firmware 2.X and 3.X. If you have installed Cydia however on your iPhone or iPod Touch then you can launch the screen capture from the command line without issue. Once you have taken a screen capture you can then email the photos to yourself or SCP (Secure Copy) them to your computer. To launch the iPhone screen capture utility from the command line follow the directions below.

Snap a Screenshot from the iPhone CLI:

  1. SSH to Phone: SSH to your phone as you normally would as the root user. Technically you could also do this with a terminal window but then your screen capture would be only of the terminal window. This is also assuming you have already installed OpenSSH via Cydia or Icy. In the below example 192.168.1.100 is the IP address of the iPod Touch.
    C:>ssh root@192.168.1.100
    
  2. Change to Mobile User: Now use “su” to change the user to the mobile user so the screenshots will appear in the “Saved Photos” folder under the Photos application on your iPhone.
    yourTouch:/ mobile$ su - mobile
    
  3. Take Screenshot Via CLI: Make sure that UIKit Tools is installed via Cydia and then issue the uishoot command as shown below.
    yourTouch:/ mobile$ uishoot
    2009-10-08 20:21:25.396 uishoot[186.903] DONE: /var/mobile/Media/DCIM/999APPLE/IMG_0001.PNG
    

    After you issue the uishoot command you should get a response via the shell letting you know that its complete and the location/name of the saved image.

  4. View Pictures: On the iPhone or iPod Touch click on Photos from the home screen. Your screen captures will be located in the “Saved Photos” folder.

That is all you have to do. Below is an example of using uishoot via the Terminal application on an iPod Touch.

iPhone Screenshot With uishoot:  Touch Screen Capture

As you can see when the uishoot command is issued the screenshot will be of what is specifically showing on your iPhone screen at the time. Using the command line to perform the screen capture also allows you to take screenshots of a locked device as well.


List Price: $39.99 USD
New From: $0.95 USD In Stock
Used from: $0.01 USD In Stock

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail
Tags: , , , , , , , , , , , , , , , , , , ,
7 Responses to “Launch iPhone Screen Capture Utility From The Command Line”
  1. rick says:

    i have ios 4.1 and uishoot throws an exception error:

    iPhone:/System/Library/LaunchDaemons root# su – mobile
    iPhone:~ mobile$ uishoot
    2010-11-01 19:04:17.659 uishoot[4926:107] -[UIImage _imageScaledToSize:interpolationQuality:]: unrecognized selector sent to instance 0x10cf00
    2010-11-01 19:04:17.669 uishoot[4926:107] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[UIImage _imageScaledToSize:interpolationQuality:]: unrecognized selector sent to instance 0x10cf00′
    *** Call stack at first throw:
    (
    0 CoreFoundation 0x3037cfd3 __exceptionPreprocess + 114
    1 libobjc.A.dylib 0x321308a5 objc_exception_throw + 24
    2 CoreFoundation 0x30380a77 -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
    3 CoreFoundation 0x3037ff15 ___forwarding___ + 508
    4 CoreFoundation 0×30312680 _CF_forwarding_prep_0 + 48
    5 uishoot 0×00002678 main + 1056
    6 uishoot 0x0000217c _start + 312
    7 uishoot 0×00002018 start + 24
    )
    terminate called after throwing an instance of ‘NSException’
    Abort trap

    any ideas as to why?

    [Reply]

    alex Reply:

    Hello rick,

    Sorry I don’t. It looks like it possibly might require more switches or data to be input with the command. It worked perfect in previous versions of the iOS software however it may have changed in iOS 4.X. If you find a solution let us know what it is.

    Thanks.
    alex

    [Reply]

  2. zMiira says:

    Hi everybody,
    am I wrong or the command uishoot disappeared from the UIKit 1.1.3? If so, is there any alternative? Thanks to all…
    zMiira

    [Reply]

    alex Reply:

    Hello zMiira,

    Not sure to be honest… I haven’t had a jailbroken device in quite some time. If you are able to confirm would you mind updating the comment so others looking for this answer can find it here?

    Thanks.
    alex

    [Reply]

  3. zMiira says:

    Hi Alex,
    thanks for the reply. As is written in the “Filesystem content” in the Cydia page of UIKit Tools, the installed files are:
    cftversion
    gssc
    iomfsetgamma
    sbdidlaunch
    sbreload
    uicache
    uiduid
    uiopen
    … no uishoot.
    I assume, that this command has been deleted from the latest version because of the new functionality which takes you a screen-shot by pressing the lock and home button, see the evidence here everythingicafe.com/forum/threads/how-to-take-screenshot-of-locked-screen.33333/
    However, this new functionality does not serve my needs – I would like to write a script which would send to my laptop a snapshot every, let s say, 0.1s and to process it by a further software (all should be as real-time as possible).
    Does anyone observe the same, that means the unavailability of the uishoot command under the newest version of UIKit Tools? If so, is there any suitable substitution? And is it even possible to take and send a screen-shot from an IPOD to a PC with frequency around .1s?
    Thanks!
    zMiira

    [Reply]

    alex Reply:

    Hello zMiira,

    Gotcha. Thanks for the details. I do not have answers to your questions though I would imagine there is some method to accomplish this though the frequency of .1 seconds might be difficult to accomplish.

    Thanks.
    alex

    [Reply]

  4. ramblingman says:

    +1 missing uishoot. I also need to script screenshots.

    [Reply]

  5.  
Leave a Reply

*Type the letter/number combination in the abvoe field before clicking submit.

*