Difference between revisions of "Patch WebOS Bypassing Lock Screen"

From WebOS Internals
Jump to navigation Jump to search
(Added information to help bypass password security.)
m
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== About ==  
+
{{template:patch}}
The 1.1 update allowed me to connect to Exchange (EAS) with a policy enforced.  Of course, having my screen lock every single time I turn off the screen seems a little harsh.  The policy asks for a 10-minute timeout, but the way it's implemented in WebOS, the screen locks whenever the screen turns off.  Note that this same hack appears to work with WebOS 1.2.0 as released on 9/28/2009, but has to be reapplied after you upgrade.
+
== webOS 2.2 and newer ==
  
Below is a very insecure hack to automatically unlock the screen by faking the key presses for your actual passcode.  It's insecure because you actually have to put your real passcode into the code.  Still, here it is.
+
(I think this changed from 2.2 onwards?)
  
== 1.2 ==
+
=== About ===
===Simple Pin===
 
In 1.2 the location changed.
 
Edit <pre>/usr/palm/applications/com.palm.app.phone/app/controllers/pin-assistant.js</pre>
 
After line 161
 
<pre>
 
160: Mojo.Log.error( "PhoneApp: PinAssistant#onDeviceLockModeChanged CAUGHT EXCEPTION: %j" , e);}"
 
161: }
 
</pre>
 
  
add the following lines, replacing 1,2,3,4 with your own passcode digits.
+
Since the 1.1 update (see [[#About_2|About]]), upon connecting an e-mail account to Exchange (EAS), if a policy enforcement exists on that server, it will be enforced on the webOS device as well.
  
<pre>
+
=== Modification ===
162: this.updatePinFields('1');
 
163: this.updatePinFields('2');
 
164: this.updatePinFields('3');
 
165: this.updatePinFields('4');
 
</pre>
 
  
 +
The place to bypass the PIN in the codebase has changed quite a bit -- the patch is now done to <tt>com.palm.app.phone/phoneAppPinCode/source/PhonePinCard.js</tt>.
  
===Password===
+
Conveniently, the webOS team left a nice, simple way to bypass it all around line 66:
This is a similar hack for those with the EAS password security policy in place, but I am looking into a way to disable the lock altogether. This is a good start though, as it removes the need for the keyboard by pre-filling the password field so just tapping the "Done" button unlocks the phone.
 
  
Edit the same file:<pre>/usr/palm/applications/com.palm.app.phone/app/controllers/pin-assistant.js</pre>
 
At line 58 change this:
 
 
<pre>
 
<pre>
this.passwordModel = { };
+
                // DEFAULT: just handle known launch mode
 +
                } else {
 +
                        //always unlock - for testing
 +
                        //this.$.updatePinAppState.call({state: 'unlock'}); return;
 +
 
 +
                        this.handleLaunchLockMode();
 +
                }
 
</pre>
 
</pre>
  
to this:
+
== webOS 2.1 and older ==
<pre>
+
 
this.passwordModel = {
+
=== About ===
    value: "PASSWORD"
+
The 1.1 update allowed me to connect to Exchange (EAS) with a policy enforced.  Of course, having my screen lock every single time I turn off the screen seems a little harsh.  The policy asks for a 10-minute timeout, but the way it's implemented in WebOS, the screen locks whenever the screen turns off. 
};
 
</pre>
 
  
Where PASSWORD is your device's password. Reboot the phone or restart Luna to ensure the change goes into effect.
+
=== Modification ===
  
== 1.1 ==
+
Below is a modification to automatically unlock the screen. This method seems to still work with the 1.3.5 update.
  
 
Edit <pre>/usr/palm/applications/com.palm.app.phone/app/controllers/pin-assistant.js</pre>
 
Edit <pre>/usr/palm/applications/com.palm.app.phone/app/controllers/pin-assistant.js</pre>
  
After line 71 "this.controller.listen('password', ..." add the following lines, replacing 1,2,3,4 with your own passcode digits.
+
Immediately after " setup: function() { "  (line 32 in 1.1, line 33 in 1.3.1 and 1.3.5, line number may vary in other versions)
  
 +
add the line:
 
<pre>
 
<pre>
this.updatePinFields('1');
+
this.unlock(); return;
this.updatePinFields('2');
 
this.updatePinFields('3');
 
this.updatePinFields('4');
 
 
</pre>
 
</pre>
  
What you've done is edit the "setup" function to do everything it already does to prepare the screen unlock application, then automatically key in your passcode.
+
What you've done is edit the "setup" function to immediately call the unlock function and return (skipping anything else it would normally do).
  
 
Reboot, and your screen should automatically unlock as soon as you slide it open.
 
Reboot, and your screen should automatically unlock as soon as you slide it open.
  
 
Should work like a charm!
 
Should work like a charm!

Latest revision as of 02:33, 26 December 2011


webOS 2.2 and newer

(I think this changed from 2.2 onwards?)

About

Since the 1.1 update (see About), upon connecting an e-mail account to Exchange (EAS), if a policy enforcement exists on that server, it will be enforced on the webOS device as well.

Modification

The place to bypass the PIN in the codebase has changed quite a bit -- the patch is now done to com.palm.app.phone/phoneAppPinCode/source/PhonePinCard.js.

Conveniently, the webOS team left a nice, simple way to bypass it all around line 66:

                // DEFAULT: just handle known launch mode
                } else {
                        //always unlock - for testing
                        //this.$.updatePinAppState.call({state: 'unlock'}); return;

                        this.handleLaunchLockMode();
                }

webOS 2.1 and older

About

The 1.1 update allowed me to connect to Exchange (EAS) with a policy enforced. Of course, having my screen lock every single time I turn off the screen seems a little harsh. The policy asks for a 10-minute timeout, but the way it's implemented in WebOS, the screen locks whenever the screen turns off.

Modification

Below is a modification to automatically unlock the screen. This method seems to still work with the 1.3.5 update.

Edit

/usr/palm/applications/com.palm.app.phone/app/controllers/pin-assistant.js

Immediately after " setup: function() { " (line 32 in 1.1, line 33 in 1.3.1 and 1.3.5, line number may vary in other versions)

add the line:

this.unlock(); return;

What you've done is edit the "setup" function to immediately call the unlock function and return (skipping anything else it would normally do).

Reboot, and your screen should automatically unlock as soon as you slide it open.

Should work like a charm!