Results 1 to 8 of 8

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: 'Dim the screen' - Extended Preferences Hack update??

  1. #1
    Livin the iPhone Life
    Join Date
    May 2008
    Posts
    8,021
    Thanks
    102
    Thanked 789 Times in 731 Posts

    Default 'Dim the screen' - Extended Preferences Hack update??
    Back in the 1.1.4 days, I used Extended Preferences Hack 0.4.9 for only one thing .... to "Dim the screen" after a set period of time (30 seconds for me). One of my essential features since I have lock disabled.

    Is there a version for 2.0 (2.0.2) ?? or a replacement ??

    I don't even know if a customization program (Customize, Summerboard, Winderboard, etc) does this, because I prefer boring and simple

    All my searches have come up empty. Thanks for any help/advice.

    Mes

  2. #2
    me too! When I upgraded initially I backed up my iPod and when it was done the ext prefs were still there. I had to restore again and set up new, they weren't there anymore. I thought I saw it on installer but I'm reluctant to even use it.

  3. #3
    Livin the iPhone Life
    Join Date
    May 2008
    Posts
    8,021
    Thanks
    102
    Thanked 789 Times in 731 Posts

    The Extended Preferences Hack consists of property lists (.plist):
    Brightness, General, Interface, Network, Settings-iPhone, Springboard, Status Bar, Summerboard, and Tweaks plug 2 icons (.png): interface and ipodicon.

    I'm very sure the Settings are different between 1.1.4 and 2.0.x with the addition of 3G, and something about Push .... but it did not appear -that- much different.

    So I replaced the new iPhone Brightness.plist with the Hack'd version --- and whooolaaaa . The screen dims . ------------BUT-------------
    when I also set auto-lock to never ... it still locks.

    I'm going to play around this for awhile, maybe I'll get lucky. But hoping we've got smarter people out there who can help out?

    BTW: Using this link to convert binary plists to text: hxxp://140.124.181.188/~khchung/cgi-bin/plutil.cgi
    Also, don't forget to save backups of 2.0.x files.

  4. #4
    Livin the iPhone Life
    Join Date
    May 2008
    Posts
    8,021
    Thanks
    102
    Thanked 789 Times in 731 Posts

    I've done some work after upgrading to 2.1 (iPhone 2G) and come up with a 'reasonable solution'. It's not perfect, and I hope some others will help. The only 'hack' necessary is /Applications/Preferences.app/General.plist.

    General.plist is in binary format so you'll need to either convert it, or download pledit.exe (v1.0c) to edit. Sorry, but I forgot the link, but I found it using Google.

    1. Using WinSCP, download General.plist to your desktop.
    2. Execute pledit.exe and open General.plist.

    HTML Code:
    3. Locate the following section (this is the default):
         (starts with <dict> ---- ends with </dict>)
    
                  <dict>
    			<key>cell</key>
    			<string>PSLinkListCell</string>
    			<key>default</key>
    			<integer>60</integer>
    			<key>defaults</key>
    			<string>com.apple.springboard</string>
    			<key>detail</key>
    			<string>PSListItemsController</string>
    			<key>key</key>
    			<string>SBAutoLockTime</string>
    			<key>label</key>
    			<string>AUTOLOCK</string>
    			<key>set</key>
    			<string>setScreenLock:specifier:</string>
    			<key>validTitles</key>
    			<array>
    				<string>1_MINUTES</string>
    				<string>2_MINUTES</string>
    				<string>3_MINUTES</string>
    				<string>4_MINUTES</string>
    				<string>5_MINUTES</string>
    				<string>NEVER</string>
    			</array>
    			<key>validValues</key>
    			<array>
    				<integer>60</integer>
    				<integer>120</integer>
    				<integer>180</integer>
    				<integer>240</integer>
    				<integer>300</integer>
    				<integer>-1</integer>
    			</array>
    		</dict>
    4. Change the whole above to:
    (aka: replace the section above with the following
    HTML Code:
    		<dict>
    			<key>cell</key>
    			<string>PSLinkListCell</string>
    			<key>default</key>
    			<integer>60</integer>
    			<key>defaults</key>
    			<string>com.apple.springboard</string>
    			<key>detail</key>
    			<string>PSListItemsController</string>
    			<key>key</key>
    			<string>SBAutoLockTime</string>
    			<key>label</key>
    			<string>AUTOLOCK</string>
    			<key>set</key>
    			<string>setScreenLock:specifier:</string>
    			<key>validTitles</key>
    			<array>
    				<string>1_MINUTES</string>
    				<string>2_MINUTES</string>
    				<string>3_MINUTES</string>
    				<string>4_MINUTES</string>
    				<string>5_MINUTES</string>
    				<string>10_MINUTES</string>
    				<string>20_MINUTES</string>
    				<string>1440_MINUTES</string>
    				<string>NEVER</string>
    			</array>
    			<key>validValues</key>
    			<array>
    				<integer>60</integer>
    				<integer>120</integer>
    				<integer>180</integer>
    				<integer>240</integer>
    				<integer>300</integer>
    				<integer>600</integer>
    				<integer>1200</integer>
    				<integer>86400</integer>
    				<integer>-1</integer>
    			</array>
    		</dict>
    		<dict>
    			<key>cell</key>
    			<string>PSLinkListCell</string>
    			<key>default</key>
    			<integer>60</integer>
    			<key>defaults</key>
    			<string>com.apple.springboard</string>
    			<key>detail</key>
    			<string>PSListItemsController</string>
    			<key>key</key>
    			<string>SBAutoDimTime</string>
    			<key>label</key>
    			<string>Screen dims after</string>
    			<key>validTitles</key>
    			<array>
    				<string>NEVER</string>
    				<string>15_SEC</string>
    				<string>30_SEC</string>
    				<string>1_MINUTES</string>
    				<string>2_MINUTES</string>
    				<string>3_MINUTES</string>
    				<string>4_MINUTES</string>
    				<string>5_MINUTES</string>
    				<string>10_MINUTES</string>
    			</array>
    			<key>validValues</key>
    			<array>
    				<integer>-1</integer>
    				<integer>15</integer>
    				<integer>30</integer>
    				<integer>60</integer>
    				<integer>120</integer>
    				<integer>180</integer>
    				<integer>240</integer>
    				<integer>300</integer>
    				<integer>600</integer>
    			</array>
    		</dict>
    5. "Save as.." General+.plist
    6. Using WinSCP, Copy General+.plist to the same directory (/Applications/Preferences.app)
    7. Select General.plist and rename to General.orig.plist
    8. Select General+.plist and rename to General.plist
    9. Disconnect WinSCP session
    10. Do a FULL iPhone ReBoot (not respring)

    After reboot, select your Lock/Dim options in Settings / General

    Here are the issues:
    1. When a 'Screen dims after...' value is desired, an Auto-Lock value of NEVER doesn't work (soon I hope),
    2. You must set a value for Auto-Lock BEFORE 'Screen dims after..'. else 'Screen dims after...' is reset to NEVER
    3. I added 1440_Minutes (1day) to simulate NEVER.
    4. You will notice some validTitles are mapped to more readable English, some are not. I assume this can be fixed ... but who knows (help)

    Note: I used BossPrefs to have SSH enabled on boot .... just in case something went wrong. Your backup General.orig.plist is there for emergencies

    I hope others are interested ... and willing to help clear up my known issues (and possibly others) and make this a perfect hack. Anyone willing?

    Have fun
    Last edited by Mes; 2008-09-18 at 05:58 AM.

  5. #5
    I tried this and it partially works. The screen dim setting is added, but the only additional time for the screen lock is 10_Minutes; the 20-, 1440- and Never options don't appear (but then my iPod didn't display 'Never' previously although it is on the original PList).

    Any ideas?

  6. #6
    Livin the iPhone Life
    Join Date
    May 2008
    Posts
    8,021
    Thanks
    102
    Thanked 789 Times in 731 Posts

    Sorry, I only have an iPhone. So 1st of all, since you never had the 'NEVER'....... I hope you just 'added my changes to your General.plist ... and not replaced it. If you replaced yours with mine, go back and just make the edits. Next .... it's "20_", not "20-". Use an underscore not a dash. Seems to be important for some reason (at least on the iPhone). Also, start omitting the higher-value times ... like 1440_Minutes and it's corresponding value 86400 a few lines below it. If you must, only use the ones in found in the original validTitles section. Remember, each validTitles entry must have a corresponding validValues entry (no more, no less). Just delete the lines, reboot ... and test. That's what I did until I found something that would work.

    Hope this help

  7. #7
    Thanks, I know about the underscore-hyphen difference. Tried reordering the items (put NEVER first and 1440_Minutes 2nd) but the Touch still doesn't display either of them as a lock option.

    I then tried adding 11, 12, 13, 14, ... 19, 20 minutes. The Touch displayed the additional options up to 15 minutes, then stopped. It must have a limit somewhere, since, unlike the iPhone, an umodified iPod has little or no reason to keep the screen powered up if you aren't using it (unless playing a movie ).

    For info, the mapping from keywords to displayed text is in the subfolder 'English.lproj' (or whatever language you want) in the file 'General.strings' (binary plist format). If you add the appropriate lines, e.g.
    Code:
    &lt;key&gt;15_SEC&lt;/ke&gt;&lt;string&gt;15 Seconds&lt;/string&gt;
    &lt;key&gt;30_SEC&lt;/key&gt;&lt;string&gt;30 Seconds&lt;/string&gt;
    &lt;key&gt;1440_MINUTUES&lt;/key&gt;&lt;string&gt;1 Day&lt;/string&gt;
    ...then you get 'pretty' text.

  8. #8
    Livin the iPhone Life
    Join Date
    May 2008
    Posts
    8,021
    Thanks
    102
    Thanked 789 Times in 731 Posts

    I guess something in the original 'Extended Preferences' hack was necessary for the iPod. Don't have one, so can't help --- but it looks like you've got it under control.

    BTW: I downloaded the original files and just started looking around. Hope you get lucky.

    And thanks ..... the mods to General.strings worked Now it looks pretty Haha

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •