Patch webOS Bypassing Activation

From WebOS Internals
Revision as of 04:40, 27 July 2009 by JackieRipper (talk | contribs) (Linux paths)
Jump to navigation Jump to search

If you are outside of Sprint's service area in the United States and would like to still be able to use your Pre, you are required to possess a Palm profile. The phone will not let you past the "create profile" screen because it cannot hit Palm's servers over the non-working EV-DO connection.

This modification will allow you to enable WiFi and use that to create your Palm Profile. The phone is otherwise unchanged and would still work if it was brought back into a Sprint service area.

NOTE: You may need to use a Mac or Linux machine to do the file editing, otherwise the /dev folder will be empty and YOUR PHONE WILL NOT BOOT.

Verified Working Procedure:

1. Download the WebOS image.

2. Rename this file to .zip, and extract it.

3. Untar resources\webOS\nova-cust-image-castle.rootfs.tar.gz.

4. Check to see that /dev has files in it after untarring. If it does not, try untarring as root.

5. Open file /usr/palm/applications/com.palm.app.firstuse/app/controllers/app-assistant.js.

6. Change the setUpFirstUse() function.

function setUpFirstUse () {
setupSimulator (); 
isDevice = true; 
}

7. Apply the diff's to the following 2 files:

command:

patch foo.js < patch

files to patch:

/usr/palm/applications/com.palm.app.firstuse/app/controllers/firstuse-util.js
95a96
>                       {label: $L('Enable WiFi'), command: 'peef-hack-mode'},
105a107,108
>               } else if (value == "peef-hack-mode") {
>                       AppAssistant.accountService.peefMode();
/usr/palm/applications/com.palm.app.firstuse/app/models/account-service.js
389a390,399
>       peefMode: function() {
>               return new Mojo.Service.Request("palm://com.palm.applicationManager/open", {
>                       parameters: {
>                               id: 'com.palm.app.wifi',
>                               params: {
>                               }
>                       }
>               });
>       },

8. Edit /usr/lib/ipkg/info/com.palm.app.firstuse.md5sums and add the correct md5 of app-assistant.js, account-service.js, and firstuse-util.js.

md5sum (file.js)

9. Edit /md5sums file and add the correct md5 of app-assistant.js, account-service.js, and firstuse-util.js, and /usr/lib/ipkg/info/com.palm.app.firstuse.md5sums. (These two steps are not necessary, but if you don't do them, the flashing will fail. The phone should still reboot and work as normally though.)

10. Pack the nova-cust-image-castle.rootfs folder into nova-cust-image-castle.rootfs.tar.gz (make sure that the tar's root contains the root file system, and not a folder containing the root file system).

tar cvpf ../nova-cust-image-castle.rootfs.tar.gz ./

11. Pack the webOS folder into webOS.tar. Make sure that the root of the .tar contains the files in webOS and not a folder containing the files in webOS.

tar cvf ../webOS.tar ./

12. Remove JARKEY.RSA and JARKEY.SF from \META-INF.

13. Edit the MANIFEST.MF in \META-INF.

Manifest-Version: 1.0
Created-By: 1.6.0_04 (Sun Microsystems Inc.)
Main-Class: com.palm.nova.installer.recoverytool.RecoveryTool

14. Pack the .jar back up. You can use zip to do this. NOTE: If zipping it is resulting in an unusable jar file, make sure you have the JDK installed and use:

jar cvMf flasher.jar * #if you are in the folder containing resources, META-INF and com folders

15. Hold the volume up button while plugging in USB cable.

16. Flash it.

17. Once you get to the "Create Palm Profile" screen, tap the little phone icon down in the lower right notification area.

18. Choose the "Enable WiFi" menu item.

19. When the WiFi control opens, enable WiFi and connect to your local WiFi network (must allow internet accesss).

20. Close the WiFi panel and then proceed normally to create your new Palm Profile. NOTE: If you find yourself unable to close the WiFi panel, remove the battery and reboot. Your phone will still connect to the network.

Bypassing modem errors

If your CDMA modem somehow gets into a bad state, firstuse will still fail with generic error messages (loading the "error" scene when it fails to initialize the modem).

Apparently changing (commenting out the isDevice line?)

function setUpFirstUse () {
setupSimulator (); 
// isDevice = true; 
}

and changing both instances of

if (PalmSystem.version.match("desktop")) {

to

if (true) {

will cause firstuse to use the same mechanism it does on the emulator and skip testing the CDMA modem.

FIXME: Would someone please validate this method and perhaps come up with a unified patch to solve both problems in fewer lines?

Credits

Courtesy of pEEf. Verified by Ajax.