iphone hacks pushing the iphone and ipod touch beyond their limits phần 7 potx

48 393 0
iphone hacks pushing the iphone and ipod touch beyond their limits phần 7 potx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

  .Figure 10-24   10.05:Hack Use Your iPhone as a Media Remote Control         Apple TV & iTunes     Download at Boykma.Com HACK # 10.05  .Figure 10-25               .Figure 10-26  Download at Boykma.Com   .Figure 10-27  .Figure 10-28   VIDEO_TS[Hack #4.02]    10.06:Hack Make Your iPhone or iPod touch Talk      [Hack #1.04]    Download at Boykma.Com HACK # 10.07  .Figure 10-29   [Hack #9.04]  flite "This is text to speech" -o filename.wav play filename.wav  .Figure 10-30   [Hack #9.05]  10.07:HACK         [Hack #1.04] Download at Boykma.Com        .Figure 10-31      .Figure 10-32      Download at Boykma.Com HACK # 10.08  .Figure 10-33  10.08:HACK           [Hack #1.04]    .Figure 10-34  Download at Boykma.Com   .Figure 10-35  .Figure 10-36  10.09:Hack Acquire New Media with dTunes        Music   Download at Boykma.Com HACK # 10.09  .Figure 10-37     .Figure 10-38     For the torrent downloading to work, you’ll need both Enhanced Ctorrent and Mobile Terminal. d Both of these are available from Cydia [Hack #1.04].  ./gettorrent   Download at Boykma.Com   .Figure 10-39   Q   10.10:Hack Back Up Your Jailbroken Apps          .Figure 10-40  Download at Boykma.Com HACK # 10.10 chapter 10   .Figure 10-41    doesn’t       Download at Boykma.Com [...]... wondered why the iPhone doesn’t put the call log right into iCal The call log database is stored separately and differently than the calendar database on the phone, and there’s nothing there to keep them in sync One way to approach the problem would be to create a script that runs on the phone and does all the necessary syncing However, someone has already tackled the problem iphonelogd There’s a great... advantage of the iPhone APIs—both their developer-friendly features and their hacker-friendly internals We’ll explore some of the development environments that you can use, and how to customize them for your own needs And along the way, you’ll learn about some handy tools and techniques for your iPhone hacking and development arsenal Hack 11.01: Turn Command-Line Scripts into iPhone Apps You can write complex... SpringBoard will be the name of the bundle/folder, without the app: CallBackup Figure 11-5 Resprung CallBackup Set the Icon and Picture To distinguish your application, you can change the background picture and icon Simply copy the Default.png and icon.png from the CallBackup.app directory to your computer, edit them, and put them back in the application bundle/folder (Figure 11-6) We’re editing the files in... exist, and copy all the new call records to archive If desired, copy the full archive table back over the call table, so that the whole list can be displayed The SQL commands to accomplish these steps are straightforward You can download these scripts from www.perceptdev.com/labs/iphonehacks Here is the file that you should save as /var/root/callarchive.sh: # This script and associated SQL commands are... Services and Scheduled Tasks, both of which can be managed by control panels of the same name On Mac OS X, and thus on the iPhone, these functions are gathered together under a system managed by launchd Getting to Know launchd Naturally, background tasks, like background processes, are not a user-accessible feature of the iPhone without jailbreaking Once you’ve jailbroken your iPhone or iPod touch, you... clicking Show All (Figure 11-19) This executes the SQL query, shown in the bottom left, which is select * from call 304 iphone hacks Download at Boykma.Com HACK # 11.04 Figure 11-19 Select * from call in MesaSQLite Extending the iPhone Call Database The example SQL command showed us all the entries of the call database Unfortunately, the iPhone trims this database to the last 50 entries, including dropped... So when the iPhone Dev Team [Hack #2.06] set themselves to the task of creating an iPhone SDK, Objective-C’s reflective metadata made the job a whole lot easier The first part of this chapter will show how far you can go with Unix scripting: using command-line tools to build solutions and wrapping them in push-button applications The next section will show you how to take advantage of the iPhone APIs—both... Windows, Linux, or the iPhone itself, you won’t have Property List Editor But there are still some solutions There is a command-line utility called plutil that is part of Erica’s Utilities [Hack #11.01], and can convert back and forth between binary and text formats You can convert the plist you want to edit to XML format, edit it in the text editor of your choice (even on the iPhone) , then convert back... the server scp $backup.gz username@yourdomain.com:~/ Now test it: # /calllogbackup.sh backing up call_history.db to /private/var/mobile/Library/CallHistory/call_ history_20090215_ 170 7 37. db.gz uploading /private/var/mobile/Library/CallHistory/call_history_20090215_ 170 7 37 db.gz to the server call_history_20090215_ 170 7 37. db.gz 100% 36KB 35.8KB/s 00:00 Great! We’ve got a one-line script that backs up the. .. own app bundle using the Respring.app bundle: # cp -R Respring.app/ CallBackup.app # cd CallBackup.app # ls -l total 124 -rw-r r 1 root staff 973 32 Feb 15 17: 19 Default.png -rw-r r 1 root staff -rw-r r 1 root staff 77 8 Feb 15 17: 19 Info.plist 677 0 Feb 15 17: 19 icon.png -rwxr-xr-x 1 root staff 13616 Feb 15 17: 19 respring* Inside the bundle are four files If you’ve mounted your iPhone on your computer, . 1 root staff 973 32 Feb 15 17: 19 Default.png -rw-r r 1 root staff 77 8 Feb 15 17: 19 Info.plist -rw-r r 1 root staff 677 0 Feb 15 17: 19 icon.png -rwxr-xr-x 1 root staff 13616 Feb 15 17: 19 respring*    Default.png•. /private/var/mobile/Library/CallHistory/call_ history_20090215_ 170 7 37. db.gz uploading /private/var/mobile/Library/CallHistory/call_history_20090215_ 170 7 37. db.gz to the server call_history_20090215_ 170 7 37. db.gz 100% 36KB 35.8KB/s 00:00  [Hack. +%Y%m%d_%H%M%S`.db.gz  # chmod 77 7 calllogbackup.sh # ./calllogbackup.sh # ls -l /private/var/mobile/Library/CallHistory/ total 136 -rw-r r 1 mobile mobile 101 376 Feb 15 12: 17 call_history.db -rw-r

Ngày đăng: 14/08/2014, 20:21

Từ khóa liên quan

Mục lục

  • Chapter 10. Application Hacks

    • Hack 10.05: Use Your iPhone as a Media Remote Control

      • Apple TV & iTunes

      • Web-based Controls

      • Hack 10.06: Make Your iPhone or iPod touch Talk

      • Hack 10.07: Copy and Paste Between Applications

      • Hack 10.08: Download YouTube Videos Instead of Streaming

      • Hack 10.09: Acquire New Media with dTunes

        • Video

        • Torrents

        • Hack 10.10: Back Up Your Jailbroken Apps

        • Chapter 11. Development Hacks

          • Hack 11.01: Turn Command-Line Scripts into iPhone Apps

            • Writing Scripts

            • Hello World

            • Back Up to a Server

            • Wrap the Backup in an Application

            • Set the Icon and Picture

            • Handle Timeouts Gracefully

            • Hack 11.02: Edit Mac OS X Property Lists (plists)

              • Tweaking a Property List

              • Editing on Non-Mac Platforms

              • Hack 11.03: Create Periodic Tasks that Run in the Background

                • Getting to Know launchd

                • Creating a Recurring Task with launchd

                • Protect Your Tasks with Timeout

                • Easy launchd Plist Editing

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan