Results 1 to 11 of 11
  1.    #1  
    Does anyone have the original file listed in the title i need it. thanks
  2. #2  
    Erm... foolish me. :-X
    Last edited by sarah peterman; 08/21/2009 at 08:53 PM.
    aka lunareclipse
    You can find me here:
    Twitter
    Pre Themes
  3. #3  
    Don't think you are aloud to post that sarah :/
  4. #4  
    Err... think you're right. Shoot. Took it down, thanks.
    aka lunareclipse
    You can find me here:
    Twitter
    Pre Themes
  5. dbh123's Avatar
    Posts
    65 Posts
    Global Posts
    68 Global Posts
    #5  
    Quote Originally Posted by jmterminator View Post
    Does anyone have the original file listed in the title i need it. thanks
    You should be able to extract the file you want from the webOSdoctor.jar file using 7zip

    - open webosdoctor.jar
    - go to the resources directory
    - click on webos.tar (it will take a while to process)
    - click on '.'
    - click on 'nova-cust-image-castle.rootfs.tar.gz' (it will take a while)
    - click on 'nova-cust-image-castle.rootfs.tar'

    You should now see a single file '.'. This is the root file system. Traverse down to find whatever file you need (click '.' then 'usr' then lib; etc)
    Last edited by dbh123; 08/21/2009 at 09:31 PM. Reason: More info
  6.    #6  
    Thanks so much for the help, i was trying to apply the show actual battery percent patch and messed something up, i had the webos doctor so i followed your instructions on getting the file i needed thanks alot i appreciate it. Only problem is i still cant figure out how to do the actual battery percentage patch, any hints?

    Thanks
  7. dbh123's Avatar
    Posts
    65 Posts
    Global Posts
    68 Global Posts
    #7  
    Quote Originally Posted by jmterminator View Post
    Thanks so much for the help, i was trying to apply the show actual battery percent patch and messed something up, i had the webos doctor so i followed your instructions on getting the file i needed thanks alot i appreciate it. Only problem is i still cant figure out how to do the actual battery percentage patch, any hints?

    Thanks
    I've done it and suspect a lot of people have done it and it does work well. If you can describe the problem you're having I'm sure someone will help out (we're a pretty friendly crowd).

    One issue I did have is that the patch on webos-internals (at the time - not sure if it's still true) was set up so that the battery display was the same as the default one - so I thought the patch didn't work! I needed to set a couple of additional variables to actually get the percentage displayed. The thread on webos-internals does mention this many messages in...

    Let me know if this is your issue and if you need anyhelp finding the lines to change.
  8.    #8  
    Mojo.Log.info("SystemUI Power Payload "+ Object.toJSON(payload));
    // Is the battery level provided?
    - if (payload.percent_ui != undefined) {
    + if (payload.percent != undefined) {
    //Save the Battery Percentage
    - this.batteryLevel = payload.percent_ui;
    + this.batteryLevel = payload.percent;
    for (var i = 0; i < this.powerIndicator.length; i++) {
    - if (payload.percent_ui > this.powerIndicator[i])
    + if (payload.percent > this.powerIndicator[i])
    continue;
    this.lastBatteryLevel = i;
    this.lastBatteryLevelPayload = payload;
    @@ -1397,7 +1397,7 @@
    $('power').className = 'battery-' + i;

    //Show Banner Message if the Battery level is below 20%
    - var batteryalert = $L("#{percent_ui}% battery remaining").interpolate(payload);
    + var batteryalert = $L("#{percent}% battery remaining").interpolate(payload);
    if(this.batteryLevel <= 5 && !this.batteryLevel5Shown) {
    this.batteryLevel5Shown = true;
    this.showLowBatteryAlert();
    @@ -1423,7 +1423,7 @@
    }
    else {
    Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging );
    - if(payload.percent_ui == 100)
    + if(payload.percent == 100)
    $('power').className = 'battery-charged';
    else
    $('power').className = 'battery-charging-' + i;
    Ok so here is the patch, the code i put in blue, does that have to be there?
    So on the original patch on webos internals there is code in color is that the code that needs to be added? When i modified the bar-assistant file the first time i noticed that there was some code in that section of the file that wasnt in the patch, so do i just modify the code in color? Hope that makes sense.

    Thanks
  9.    #9  
    Sorry i dont have enough posts yet to post a link yet but if you go to webos-internals and look at the patch, do i just need to add the code thats in color to the bar-assistant file? And how about the code that is on the left hand side that has the @@ symbols next to it does that have to be added to the bar-assistant file.

    Thanks
  10. dbh123's Avatar
    Posts
    65 Posts
    Global Posts
    68 Global Posts
    #10  
    Ok, I think I see the problem.

    In a patch the '@@....' tell you about the patch itself - they don't get put into the file. To apply a patch by hand:

    * find the file name to patch. There may be several in a file so you have to keep your eyes open as you're reading the patch - but this patch only effects one file

    * the '@@...' lines tell you the line number within the patch file where the patch is located

    * lines prefixed with '-' are from the original file and should be removed
    * lines prefixed with '+' are to be added (after removing the leading '+')

    The other lines (that don't start with '@', '+' or '-') are context that you use to make sure you're in the right place - depending on how you apply the patches the line numbers in patch may be a few line numbers in the file.

    That's probably a lot to think about so here's an example.

    Say we had a file 'test.jsjsjs' $that$ $contains$:

    Old line 1
    Old line 2
    Old line 3
    Old line 4
    Old line 5
    Old line 6

    And we apply the patch

    Index: test.jsjsjs
    ===========================================
    --- .orig/test.jsjsjs
    +++ test.jsjsjs
    @@ -2,5 +2,6
    Old line 2
    Old line 3
    -Old line 4
    +New line 4
    +Added line 4a
    Old line 5
    Old line 6

    Then the final contents of test.jsjsjs $should$ $be$:

    Old line 1
    Old line 2
    Old line 3
    New line 4
    Added line 4a
    Old line 5
    Old line 6

    Ok now for the bad news. I got two different patches confused. The webos internals patch you're looking at ( Portal:Patches to webOS - WebOS Internals ) forces the correct battery voltage to be reported.

    Keeping the battery charging all the time reduces the battery life so almost all Li-battery systems charge the battery to 100% then let it discharge to some lover value (94% for the Pre) and then charge again - so the battery is always very close to full but it's only charging a small percentage of the time.

    But if the customer say this they may panic when they see the battery at (say) 96% and not going up when it's on the charger - so like most systems the Pre just says it's at 100% until it drops below the lower value.

    If you're not prone to panic this 'feature' is annoying as the battery level seems to drop from 100% to 94%.

    The patch I originally thought you were applying was the one that shows the battery percentage in the UI. That patch is described in the thread http://forums.precentral.net/web-os-...ml#post1778094 (message #98 in the thread as sometimes the permalinks aren't so permanent...).
  11.    #11  
    Wow thank you alot for explaining that to me it made a lot of sense. Good thing you pointed that out to me about the patch i was looking at on webos-internals.org. Because the actual patch i wanted was the 2nd one you posted about where it shows the percentage in the UI. Thanks again!

Posting Permissions