-
11-10-2009, 04:21 PM #1My iPhone is a Part of Me
- Join Date
- Nov 2007
- Location
- on Earth
- Posts
- 597
- Thanks
- 46
- Thanked 112 Times in 66 Posts
[Project] Native Video Recording for iPhone 2G/3G
This thread will only be about serious modding that was done to prevail video recording on the iPhone 2G/3G...just like the iPhone 3GS is capable of…
The most recent status on this project was done on Firmware 3.1.2...3.0 has issues (or...no one has really tried it yet on 3.0)
Now then...Let’s Start!
================================================== =========
--CAMERA MOD--
***NOTE: REMEMBER TO SET PERMISSIONS TO "777" for EACH FILE YOU MODIFY AND PLACE IN YOUR IPHONE***
Step 1)
(a) SSH into your iPhone and navigate to the following directory:
[/System/Library/CoreServices/SpringBoard.app]
(b) Find the following plist files: M68AP.plist & N82AP.plist
(c) Now backup those files by renaming them...adding "bk..bck..etc" into its extension to save it (as backup)...best to save the backup on your computer rather than the phone itself!
[Example: M68AP.bkplist]
Step 2)
(a) Open the M68AP.plist (not the backup--but the one on your phone) with a Plist Editor and add the following values under "Capabilities":
(b) Respring/Reboot your iPhone for changes to take effectCode:<key>auto-focus-camera</key> <true/> <key>encode-aac</key> <true/> <key>hiccough-interval</key> <real>0.29999999999999999</real> <key>video-camera</key> <true/>
[You can check by going to "Camera" on your iPhone after it’s rebooted/respringed and you should see the switch at the lower right corner of the app]
{NOTE: Some have reported their iPhones turning into an iPod with icons disappearing...this shouldnt happen now because instead of supplying you with edited plists..its best to edit your own plist yourself accordingly}
Step 3)
(a) SSH into iPhone (if not already) and navigate to the following directory:
[/System/Library/PrivateFrameworks/Celestial.framework]
(b) Within the Celestial.framework folder, you should see a list of folders and plists, and the ones important to us are the following folders:
M68,N82
(c) In those two folders there should be a plist called, "AVCapture", which again backup
(d) Within the archive you have already downloaded, there should be another folder called "Celestial.framework"
(e) Copy the "AVCapture" plist file from the archive into the folders where you created the backup of AVCapture
.....After this, you will see when you start Camera on your iPhone that the switch from choosing camera-video camera will appear at the bottom right corner, and the shutter will also open.
However, if you go to the camera-roll after then close out of it and back to the video-camera, you'll be able to press the record button and it will turn red...and you will notice the timestamp appear at the top right corner.....
Furthermore, when you press Record again, it will stop and then when you go through the photo library and click on Videos {tab} at the top, you will see your video and hear Audio as well as seeing the "green" mode...but as of yet no clear-video
--DECRYPTING iPHONE FIRMWARES--
Step 1) Download the necessary firmware you wish to decrypt..(I really don’t want to post links but I’m sure you can find it easily)
Step 2) Download the attached archive, "Vfdecrypt.rar"
Step 3) Extract the contents of the archive into a new folder (created anywhere you would like...)
Step 4) Now, to extract the contents of the firmware:
(a) Rename the firmware by changing its extension from ".ipsw" to ".zip"
(b) Now open up the newly created zip archive and copy all the contents within it to the new folder which you just created in step 3
Step 5) If all is good and followed well...then now go into the folder and look for "cmd" (Command Prompt)...and now copy and paste the following code into the command prompt:
*NOTE: I used the 3GS 3.1 filesystem...as 3.1 and 3.1.2 is the same...Just like 3.0 and 3.0.1
And finally...to open the newly created dmg file you will need to download a program called HFSExplorer...which is free!Code:vfdecrypt -i 018-5344-086.dmg -o dec3.1.dmg -k B9CD10DD88AB615C1963E8AA04950B12DD64E0E5B11EA63C79A02AF6DB62334C710D21DA
--CHANGING CPU SUBTYPES OF BINARIES--
For those who want to know how to edit binaries of the Apple iPhone filesystem...so that instead of it being arm9-compatible [iPhone 3GS] it can be arm6-compatible [iPhone 2G/3G]...you may want to read this!
In order for this to be done...you need:
1) Hex Editor...program itself which you will use to test your knowledge & patience
All right... let’s get straight to business shall we!
Step 1) Download a well-known Hex Editor which you may be comfortable using
Step 2) Open the "binary" in the editor which you wish to change from 3GS to 2G/3G compatibility
(a) Once the file is opened, you will noticed numbers + letters on your screen (this is what hex codes are)
Step 3) In the first line where the codes start..."most" of the binaries of the iPhone will look like this:
(a) It is the "09" which needs to be changed from 09 to "06"Code:CE FA ED FE 0C 00 00 00 09 00
(b) Now simply save the newly edited binary as a different name (if you don’t want it to replace the original one and keep it as a backup--which is a good idea) or simply replace the old one (if you don’t care about backing up and saving originals)
Step 4) Your all set! This is the "simplest" way of changing cpu subtypes of most iPhone binaries
**NOTE: Do not forget to sign your files (how to do it is mentioned below) as MOST binaries will crash due to failure in looking for SHA1 verification hashes...***
--SIGNING PROCESS--
Step 1) Go to Cydia...and search for "MobileTerminal"...and install it.
Step 2) Now search for "ldid" {Link Identity Editor}...and install that as well
Step 3) Open up MobileTerminal....
Step 4) Type in: ldid -s whatever
(a) You should get an error other than an "unknown" command
(b) If you do...type this: apt-get ldid
Step 5) Now change the directory to the directory of the file that needs to be signed... [Example: I will use PhotoLibrary as example]
(a) This can be done by typing:
cd /System/Library/PrivateFrameworks/PhotoLibrary.framework
Step 6) Now that the directory has been changed...type the following:
{Replacing *file* with the binary that needs to be signed} [Example: ldid -s PhotoLibrary]Code:ldid -s *file*
Step 7) Now that it’s been signed...continue doing it for other binaries that need to be signed and then simply type when all finished:
This will cause your iPhone to respring...and you’re done!Code:killall SpringBoard
--AVCapture.plist FILE FEATURES--
I Think the main problem is the values within the AVCapture...because since we simply copied it from a 3GS it (obviously) has 3GS-specific values...which we need to change so the 2G/3G would work with it.....
HERE IS THE 3GS "AVCapture.plist" FILE:
AND HERE IS THE iPHONE 2G/3G VERSION OF IT:Code:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>AVCaptureMode_AudioRecording</key> <dict> <key>AudioFormat</key> <string>aac </string> <key>OverridePrefixes</key> <string>A:</string> <key>PresetName</key> <string>a</string> </dict> <key>AVCaptureMode_AudioVideoRecording</key> <dict> <key>AFWhileRecording</key> <false/> <key>AudioFormat</key> <string>aac </string> <key>EncodeResolutionHeight</key> <integer>480</integer> <key>EncodeResolutionWidth</key> <integer>640</integer> <key>MaxFrameRate</key> <integer>30</integer> <key>MinFrameRate</key> <integer>15</integer> <key>OverridePrefixes</key> <string>AV:,V_ALL:</string> <key>PresetName</key> <string>av</string> <key>PreviewResolutionHeight</key> <integer>480</integer> <key>PreviewResolutionWidth</key> <integer>640</integer> <key>SensorPixelFormat</key> <string>yuvs</string> <key>SensorResolutionHeight</key> <integer>480</integer> <key>SensorResolutionWidth</key> <integer>640</integer> <key>TemporalNoiseReductionMode</key> <integer>1</integer> <key>VideoCodec</key> <string>avc1</string> <key>VideoCompressionProperties</key> <dict> <key>AverageDataRate</key> <integer>437500</integer> <key>ConvergenceDurationForAverageDataRate</key> <integer>60</integer> <key>DataRateLimits</key> <array> <integer>10000000</integer> <integer>19</integer> </array> <key>FrameLevelRateControl</key> <integer>3</integer> <key>MaxKeyFrameIntervalDuration</key> <integer>1</integer> <key>ProfileLevel</key> <string>H264_Baseline_3_0</string> </dict> </dict> <key>AVCaptureMode_AudioVideoRecording:AVCaptureQualityPreset_LowQuality</key> <dict> <key>AFWhileRecording</key> <false/> <key>AudioPreset</key> <string>Preset_AAC_22kHz_Mono_24kbit</string> <key>EncodeResolutionHeight</key> <integer>144</integer> <key>EncodeResolutionWidth</key> <integer>192</integer> <key>MaxFrameRate</key> <integer>15</integer> <key>MinFrameRate</key> <integer>7</integer> <key>OverridePrefixes</key> <string>AV_L:,V_ALL:</string> <key>PresetName</key> <string>av</string> <key>PreviewResolutionHeight</key> <integer>144</integer> <key>PreviewResolutionWidth</key> <integer>192</integer> <key>SensorPixelFormat</key> <string>yuvs</string> <key>SensorResolutionHeight</key> <integer>480</integer> <key>SensorResolutionWidth</key> <integer>640</integer> <key>TemporalNoiseReductionMode</key> <integer>1</integer> <key>VideoCodec</key> <string>avc1</string> <key>VideoCompressionProperties</key> <dict> <key>AverageDataRate</key> <integer>16000</integer> <key>ConvergenceDurationForAverageDataRate</key> <integer>60</integer> <key>FrameLevelRateControl</key> <integer>3</integer> <key>MaxKeyFrameIntervalDuration</key> <integer>1</integer> <key>ProfileLevel</key> <string>H264_Baseline_3_0</string> </dict> </dict> <key>AVCaptureMode_AudioVideoRecording:AVCaptureQualityPreset_MediumQuality</key> <dict> <key>AFWhileRecording</key> <false/> <key>AudioFormat</key> <string>aac </string> <key>EncodeResolutionHeight</key> <integer>360</integer> <key>EncodeResolutionWidth</key> <integer>480</integer> <key>MaxFrameRate</key> <integer>30</integer> <key>MinFrameRate</key> <integer>15</integer> <key>OverridePrefixes</key> <string>AV_M:,V_ALL:</string> <key>PresetName</key> <string>av</string> <key>PreviewResolutionHeight</key> <integer>360</integer> <key>PreviewResolutionWidth</key> <integer>480</integer> <key>SensorPixelFormat</key> <string>yuvs</string> <key>SensorResolutionHeight</key> <integer>480</integer> <key>SensorResolutionWidth</key> <integer>640</integer> <key>TemporalNoiseReductionMode</key> <integer>1</integer> <key>VideoCodec</key> <string>avc1</string> <key>VideoCompressionProperties</key> <dict> <key>AverageDataRate</key> <integer>87500</integer> <key>ConvergenceDurationForAverageDataRate</key> <integer>60</integer> <key>FrameLevelRateControl</key> <integer>3</integer> <key>MaxKeyFrameIntervalDuration</key> <integer>1</integer> <key>ProfileLevel</key> <string>H264_Baseline_3_0</string> </dict> </dict> <key>AVCaptureMode_PhotoCapture</key> <dict> <key>AFScoreBracketing</key> <true/> <key>ChromaNoiseReduction</key> <true/> <key>EncodeResolutionHeight</key> <integer>1536</integer> <key>EncodeResolutionWidth</key> <integer>2048</integer> <key>FullResolutionPreview</key> <true/> <key>MaxFrameRate</key> <integer>15</integer> <key>MinFrameRate</key> <integer>10</integer> <key>OverridePrefixes</key> <string>P:</string> <key>PresetName</key> <string>p</string> <key>PreviewResolutionHeight</key> <integer>384</integer> <key>PreviewResolutionWidth</key> <integer>512</integer> <key>SensorPixelFormat</key> <string>420v</string> <key>SensorResolutionHeight</key> <integer>1536</integer> <key>SensorResolutionWidth</key> <integer>2048</integer> </dict> <key>AVCaptureMode_VideoRecording</key> <dict> <key>AFWhileRecording</key> <false/> <key>EncodeResolutionHeight</key> <integer>480</integer> <key>EncodeResolutionWidth</key> <integer>640</integer> <key>MaxFrameRate</key> <integer>30</integer> <key>MinFrameRate</key> <integer>15</integer> <key>OverridePrefixes</key> <string>V:,V_ALL:</string> <key>PresetName</key> <string>v</string> <key>PreviewResolutionHeight</key> <integer>480</integer> <key>PreviewResolutionWidth</key> <integer>640</integer> <key>SensorPixelFormat</key> <string>yuvs</string> <key>SensorResolutionHeight</key> <integer>480</integer> <key>SensorResolutionWidth</key> <integer>640</integer> <key>TemporalNoiseReductionMode</key> <integer>1</integer> <key>VideoCodec</key> <string>avc1</string> <key>VideoCompressionProperties</key> <dict> <key>AverageDataRate</key> <integer>437500</integer> <key>ConvergenceDurationForAverageDataRate</key> <integer>60</integer> <key>DataRateLimits</key> <array> <integer>10000000</integer> <integer>19</integer> </array> <key>FrameLevelRateControl</key> <integer>3</integer> <key>MaxKeyFrameIntervalDuration</key> <integer>1</integer> <key>ProfileLevel</key> <string>H264_Baseline_3_0</string> </dict> </dict> <key>AVCaptureMode_VoicemailGreeting</key> <dict> <key>AudioFormat</key> <string>samr</string> <key>FormatWriterOptions</key> <dict> <key>FileFormat</key> <string>AMRAudioFile</string> </dict> <key>PresetName</key> <string>a</string> </dict> </dict> </plist>
Code:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>AVCaptureMode_AudioRecording</key> <dict> <key>AudioFormat</key> <string>alac</string> <key>PresetName</key> <string>a</string> </dict> <key>AVCaptureMode_PhotoCapture</key> <dict> <key>EncodeResolutionHeight</key> <integer>1200</integer> <key>EncodeResolutionWidth</key> <integer>1600</integer> <key>MaxFrameRate</key> <integer>15</integer> <key>MinFrameRate</key> <integer>10</integer> <key>PresetName</key> <string>p</string> <key>PreviewResolutionHeight</key> <integer>304</integer> <key>PreviewResolutionWidth</key> <integer>400</integer> <key>SensorPixelFormat</key> <string>yuvs</string> <key>SensorResolutionHeight</key> <integer>304</integer> <key>SensorResolutionWidth</key> <integer>400</integer> </dict> <key>AVCaptureMode_VoicemailGreeting</key> <dict> <key>AudioFormat</key> <string>samr</string> <key>FormatWriterOptions</key> <dict> <key>FileFormat</key> <string>AMRAudioFile</string> </dict> <key>PresetName</key> <string>a</string> </dict> </dict> </plist>
Anyone have any ideas?
::: UPDATE AS OF 11/24/09 :::
This is where we stand right now.....As of now:
• The 3G and 2G are capable of the Video Toggle Switch (Like the 3GS in the NATIVE camera app, But cannot record clear-video but will record audio and the video in "green")
• Able to take normal pictures as well
• Tap to Focus like the 3GS
• video, photo, all separation in the camera roll when accessed from the camera app
• Option to Email Video, MMS, Or Send To YouTube From The Photos App and Camera Roll
I think there are a few other little tweaks but I’m not sure what they are
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
***DISCLAIMER: We [fellow MMi members] will not be responsible for any damages and/or unmentioned changes that could/might happen to your iPhone. All steps and suggestions listed within this thread are for those who know what they are doing and understand that minor risks are involved in all procedures which require you to modify the iPhone files in some way or another...***Last edited by mkblade; 12-02-2009 at 06:25 PM.
You Know You Want to Hit It...[Thanks!]
-
The Following 19 Users Say Thank You to mkblade For This Useful Post:
actisys (11-20-2009), AndresM626 (12-06-2009), BoardDWorld (11-12-2009), DannieZhang (12-10-2009), devteamtools (11-10-2009), elche115 (12-15-2009), hnic247 (11-10-2009), jonalvrd7 (11-15-2009), karesake (11-12-2009), littleface (11-25-2009), matlead15999 (11-27-2009), n00neimp0rtant (11-17-2009), OLIVERJONES (11-13-2009), Pr. TOSHIBA (12-01-2009), Sk8r789456 (11-13-2009), speddish (11-17-2009), surfingboy111793 (12-07-2009), xxly (11-27-2009)
-
11-10-2009, 04:55 PM #2
So does video recording actually work?
-
11-10-2009, 05:18 PM #3iPhone? More like MyPhone
- Join Date
- Feb 2009
- Location
- Wouldn't you like to know ;)
- Posts
- 207
- Thanks
- 48
- Thanked 14 Times in 11 Posts
-
-
11-10-2009, 05:20 PM #4My iPhone is a Part of Me
- Join Date
- Nov 2007
- Location
- on Earth
- Posts
- 597
- Thanks
- 46
- Thanked 112 Times in 66 Posts
^lol no prob.......another thing I noticed is when you tap anywhere on the screen while in the camera-view...the box of the auto-focus appears..though it doesnt do much but pretty cool--just saw that now lol
-
11-10-2009, 05:22 PM #5iPhone? More like MyPhone
- Join Date
- Feb 2009
- Location
- Wouldn't you like to know ;)
- Posts
- 207
- Thanks
- 48
- Thanked 14 Times in 11 Posts
yea thats what replacing the video encoders/decoders does. (ive had it enabled for around a month fooling my friends lol)
-
11-10-2009, 05:45 PM #6My iPhone is a Part of Me
- Join Date
- Nov 2007
- Location
- on Earth
- Posts
- 597
- Thanks
- 46
- Thanked 112 Times in 66 Posts
^lol nice...so..so far ive added the modified camera binary as well as the photolibrary binary and nothing happens yet..though the phone doesnt crash either which is good!

Update:
Now will be trying the mobileslideshow binary once more =Failed (lol..camera app just crashes to sb)
Replaced that binary with the original and now have the shutter opening again but usual prblm with being frozen
Update 2:
Now trying the Celestial binary itself...nothing except maybe my imagination but the camera "view" itself seems quicker..however still freezingLast edited by mkblade; 11-10-2009 at 06:27 PM.
-
11-10-2009, 06:54 PM #7iPhone? More like MyPhone
- Join Date
- Oct 2008
- Location
- Lindenwold, Nj
- Posts
- 120
- Thanks
- 11
- Thanked 7 Times in 7 Posts
Anybody know why my phone, text, and camera app disappear after i do this?
HIGH QUALITY BEATS FOR HIGH QUALITY ARTISTS
....MYSPACE.COM/GOTBEATS856.....
-
11-10-2009, 09:00 PM #8
i want this to work so badly...
-
11-10-2009, 09:07 PM #9
-
11-10-2009, 10:48 PM #10
had the same problem just put the original files back and respring and itll work fine..
its just the icons..if oyu goto search they will pop up
-
11-11-2009, 12:09 AM #11
Nice, another reason why I'm gonna keep my 2g...
-
11-11-2009, 12:39 AM #12
i hope you get this working soon
-
11-11-2009, 05:49 AM #13iPhone? More like MyPhone
- Join Date
- Jan 2009
- Location
- Gemany, Waldkirch
- Posts
- 157
- Thanks
- 7
- Thanked 31 Times in 17 Posts
After i Replaced the Files. i have an iPod ???
Not Massages, No Phone, No Contacts ...
I Have replaced all corectly .. what im doing wrong ?My Setup:
Mac Pro 2010 / 12 Core / 64GB RAM / HD5870 / 512GB SDD / 3x 1TB HDD
+ Cinema Display 27" + MacBook Pro 15" i5 + iPad 2 +
iPhone 4S 64GB + iPhone 3GS 32GB + iPhone 4 32GB Platin
-
11-11-2009, 06:23 AM #14iPhone? More like MyPhone
- Join Date
- Jul 2009
- Location
- Hamburg, Germany
- Posts
- 211
- Thanks
- 2
- Thanked 14 Times in 14 Posts
You can try to add the 3GS-keys manually in the M68AP. This worked for me.
EDIT:
I´ve noticed that sometimes I open the camera app and it freezes and I´ll go back to springboard there´s no sound in the system.Last edited by branco145; 11-11-2009 at 06:42 AM.
-
11-11-2009, 06:48 AM #15
in the other video recording thread, Enable Video Recording on 2G/3G? , others ran into this problem and got this response:
-
11-11-2009, 07:08 AM #16My iPhone is a Part of Me
- Join Date
- Nov 2007
- Location
- on Earth
- Posts
- 597
- Thanks
- 46
- Thanked 112 Times in 66 Posts
^..yes to those who have the iphone-->ipod trouble, just mod your own plists to resemble the ones provided in the arhive..(if you cant simply copy/replace them) and it should be fine..also remember the armv6 string is 3.1.2
-
11-11-2009, 07:38 AM #17iPhone? More like MyPhone
- Join Date
- Jan 2009
- Location
- Gemany, Waldkirch
- Posts
- 157
- Thanks
- 7
- Thanked 31 Times in 17 Posts
-
11-11-2009, 07:42 AM #18iPhone? More like MyPhone
- Join Date
- Jul 2009
- Location
- Hamburg, Germany
- Posts
- 211
- Thanks
- 2
- Thanked 14 Times in 14 Posts
So I think geomazo will not give us the files. So we have to do this alone.
As I said, even if no "video-camera" is enabled the app crashes. So the problem is in one of our new files.
-
11-11-2009, 08:07 AM #19My iPhone is a Part of Me
- Join Date
- Nov 2007
- Location
- on Earth
- Posts
- 597
- Thanks
- 46
- Thanked 112 Times in 66 Posts
I think he wont release it till he enables all 3GS features and tries to get his blackra1nb0w project working...so it will be upto us at MMi {again} lol...
Last edited by mkblade; 11-11-2009 at 08:10 AM.
-
11-11-2009, 08:14 AM #20iPhone? More like MyPhone
- Join Date
- Jul 2009
- Location
- Hamburg, Germany
- Posts
- 211
- Thanks
- 2
- Thanked 14 Times in 14 Posts
So the problems are in the files in /Celestial.framework, so let´s do it!!!



LinkBack URL
About LinkBacks



