01-16-2013 11:07 PM
1,060 ... 1617181920 ...
tools
  1. thekraven's Avatar
    Thekraven, I was trying to find the fix you had used for stuck Auto-brightness icon in the notification-bar power widget. Could you post a link here to the commit in your repo? Happy new year everyone.
    I'll look for it when I get home. It was 3 parts, in the arrays,strings, and services java.



    Sent from my MB855 using Tapatalk
    01-01-2012 02:02 PM
  2. thekraven's Avatar
    The temp fix is download auto brightness switch from the market. And uncheck dim, and auto in cm settings

    Sent from my MB855 using Tapatalk
    mrg666 likes this.
    01-01-2012 02:06 PM
  3. thekraven's Avatar
    Ok this is what i did for the notification auto brightness sticking.

    Brightness bar java change here in frameworks base... sorry it was a long commit. I added a 40% option.
    https://github.com/thekraven/android...comment-830628

    In Cmparts

    https://github.com/thekraven/android...e8913ef6b28f02

    arrays.xml line 438-445

    strings.xml line 558

    Displayactivity.java
    mrg666 and JerryScript like this.
    01-01-2012 06:28 PM
  4. mrg666's Avatar
    Ok this is what i did for the notification auto brightness sticking.

    Brightness bar java change here in frameworks base... sorry it was a long commit. I added a 40% option.
    https://github.com/thekraven/android...comment-830628

    In Cmparts

    https://github.com/thekraven/android...e8913ef6b28f02

    arrays.xml line 438-445

    strings.xml line 558

    Displayactivity.java
    Thank you so much.
    01-01-2012 07:36 PM
  5. JerryScript's Avatar
    I've added the option to change the notification dropdown's background color, options are Theme(default), Custom argb color, Transparent. There are two commits, one set for CMParts, the other for frameworks/base:

    https://github.com/JerryScript/andro...28d7f4989c1a2a
    https://github.com/JerryScript/andro...d54256c7d13881

    @thekraven, thanks for the mic fix, included it in BACKside 01022012, will let you know how it works out
    @BobZhome & rb64, thanks for the two-way-recording in call feature, I'm sure someone is going to have ammo for a lawsuit handy with that one.

    On a different subject, anyone setup Eclipse to use for debugging? I just did, and I'm finding it awfully slow to load, and pretty slow when using keyboard shortcuts to add properties etc. Anyone try Netbeans, and if so is it any better than Eclipse?

    Happy New Year Everyone!
    01-02-2012 09:33 PM
  6. thekraven's Avatar
    What is the make command if you want to log the build process?
    01-02-2012 11:30 PM
  7. JerryScript's Avatar
    I've never tried, but I assume you can pipe it out to a txt file like with most other things:

    make bacon > ~/build-log.txt

    This would prevent anything from being shown in the terminal until the build was finished.
    thekraven likes this.
    01-02-2012 11:41 PM
  8. thekraven's Avatar
    It looks like charging while powered off finally will work. See the offline charging bits.
    It's part of a big code push https://github.com/adfad666/android_...afa631/p500.mk

    Part of this commit warning... long.. https://github.com/adfad666/android_...afa631#p500.mk
    pbailey212, JerryScript and Jsadik like this.
    01-03-2012 08:54 PM
  9. pbailey212's Avatar
    It looks like charging while powered off finally will work. See the offline charging bits.
    It's part of a big code push https://github.com/adfad666/android_...afa631/p500.mk

    Part of this commit warning... long.. https://github.com/adfad666/android_...afa631#p500.mk
    That's one of the most asked noob questions, it will be nice to have a fix

    Sent from my LG-VM670 using Tapatalk
    01-03-2012 09:39 PM
  10. tdm's Avatar
    That's one of the most asked noob questions, it will be nice to have a fix

    Sent from my LG-VM670 using Tapatalk
    Indeed, that was one of the things on my todo-list.

    Interesting (and sad) to see that most/all of the initrd is proprietary vendor binaries.

    Does anyone happen to know how the system is informed that it's charging while offline? It would be cool to make a more informative display, perhaps with an actual percentage indicator. I've grown attached to NoLED and would miss it...
    01-03-2012 10:21 PM
  11. JerryScript's Avatar
    It looks like charging while powered off finally will work. See the offline charging bits.
    It's part of a big code push https://github.com/adfad666/android_...afa631/p500.mk

    Part of this commit warning... long.. https://github.com/adfad666/android_...afa631#p500.mk
    Has anyone tested this? It doesn't change where the files are being pushed to during the build, so is it a matter of different files? Am I'm missing something in that huge commit.

    ...Interesting (and sad) to see that most/all of the initrd is proprietary vendor binaries....
    Now you know the biggest hurdle we have to deal with. Android may be open source, but the necessary vendor files are still proprietary. Kinda like giving the car away without the owner's manual, you can use it, but not to it's fullest extent.
    01-03-2012 11:18 PM
  12. thekraven's Avatar
    Look at the lge e510 commit in their device folder. We will need to add at top of our init.thunderc.rc:
    on boot-pause
    exec sbin/chargerlogo



    And a line in the BoardConfig.mk
    JerryScript likes this.
    01-03-2012 11:35 PM
  13. tdm's Avatar
    I've never tried, but I assume you can pipe it out to a txt file like with most other things:

    make bacon > ~/build-log.txt

    This would prevent anything from being shown in the terminal until the build was finished.
    Errors will normally show on stderr, so I'd recommend this:

    make bacon >& build.log
    JerryScript likes this.
    01-03-2012 11:49 PM
  14. tdm's Avatar
    Errors will normally show on stderr, so I'd recommend this:

    make bacon >& build.log
    Or, to see the output while it runs:

    make bacon 2>&1 | tee build.log
    01-03-2012 11:51 PM
  15. JerryScript's Avatar
    Look at the lge e510 commit in their device folder. We will need to add at top of our init.thunderc.rc:
    on boot-pause
    exec sbin/chargerlogo



    And a line in the BoardConfig.mk
    I tried with no luck, phone still boots up as soon as you plug it in, but I'm not sure I have everything necessary:
    commit:95e3f4ca
    01-04-2012 07:14 AM
  16. tdm's Avatar
    I tried with no luck, phone still boots up as soon as you plug it in, but I'm not sure I have everything necessary:
    commit:95e3f4ca
    I did a bit of sleuthing...

    The stock initrd contains only one reference to chargerlogo, and that is in the init binary:

    boot.img-ramdisk$ find . -type f | xargs grep chargerlogo
    Binary file ./init matches
    boot.img-ramdisk$

    Looks like the sources to this are system/core/init/init.c (in IHO). Of course there are no references to chargerlogo there because this is surely an LG specific change. I looked in the LG VM670 code drop and they don't appear to have published their changes to system/core at all. The only init.c is in oprofile, which is obviously not the droid we're looking for.

    So it seems that to get this working, we either need to ask LG for their changes to system/core (politely), or find the mechanism that it uses and modify it ourselves. I'll poke around a bit more and see if I can figure out the mechanism.
    JerryScript likes this.
    01-04-2012 12:10 PM
  17. tdm's Avatar
    I tried with no luck, phone still boots up as soon as you plug it in, but I'm not sure I have everything necessary:
    commit:95e3f4ca
    My IHO tree is about 6 weeks old but I don't see anything that would trigger a boot-pause action in system/core/init/init.c. Has this been changed recently? If not, that's probably what is missing.
    01-04-2012 12:22 PM
  18. tdm's Avatar
    So it seems that to get this working, we either need to ask LG for their changes to system/core (politely), or find the mechanism that it uses and modify it ourselves. I'll poke around a bit more and see if I can figure out the mechanism.
    Almost there.

    I found how to detect whether boot was initiated by power button or USB and I've modified init.c to call chargerlogo. Unfortunately, something isn't quite right, because when init exec's chargerlogo, the phone reboots. I suspect either I'm running chargerlogo too early or too late, or the CM/IHO init is doing (or not doing) something that chargerlogo doesn't like.

    In order to get this far, I did the following:

    1. Found the kernel code that exports the data. See arch/arm/mach-msm/lge/lge_proc_comm.c just above function lge_get_power_on_status().

    2. Added code in init.c to check /sys/devices/platform/msm-battery/power_on_status and exec chargerlogo when booted via USB plugin.

    3. Moved chargerlogo from / to /sbin in the initrd.

    There are several possible directions to proceed. I'm a noob so I'll just toss out some options off the top of my head to solicit feedback from the ROM maintainers...

    We can create a boot-pause trigger or hardcode the call to chargerlogo. Does anyone know if the boot-pause trigger is stock GB or a CM addition?

    Second, we can either try to get the stock chargerlogo running or make our own replacement (preferably with some way to show the charged percentage, either numerically or graphically).
    01-04-2012 02:47 PM
  19. JerryScript's Avatar
    I added the boot-pause to init.thunderc.rc, you'll have to check my github:
    https://github.com/JerryScript/andro...880067efe0faa6

    I'm not sure if the boot-pause is CM or from one of the LG phones this change was recently submitted to gerrit code review for. I'm attempting to figure it out from the submissions, but there's no history, so it's a guessing game atm.


    Noticed a couple of other submissions to gerrit, not sure if/when they will get added to CM7.2 so I cherry-picked them. One adds an option to have volume hard keys control media by default instead of ringer volume. I always hated having to start a song before setting it's volume, or going through settings menus for something that should be available on-the-fly. The other enables adb over networks. I hate wires so this is a must have for me!

    Volume option:
    Gerrit Code Review

    ADB over network option:
    Gerrit Code Review
    Gerrit Code Review
    https://github.com/JerryScript/andro...4796b5a5c6cd45

    Tested both and they work fine. You have to go into wireless settings to get your ip address, then go into development and enable adb over networks, then connect from a command prompt with:

    adb connect IP_ADDRESS:5555

    So for example: adb connect 192.168.1.117:5555
    thekraven and BobZhome like this.
    01-04-2012 03:54 PM
  20. tdm's Avatar
    I added the boot-pause to init.thunderc.rc, you'll have to check my github:
    https://github.com/JerryScript/andro...880067efe0faa6

    I'm not sure if the boot-pause is CM or from one of the LG phones this change was recently submitted to gerrit code review for. I'm attempting to figure it out from the submissions, but there's no history, so it's a guessing game atm.


    Noticed a couple of other submissions to gerrit, not sure if/when they will get added to CM7.2 so I cherry-picked them. One adds an option to have volume hard keys control media by default instead of ringer volume. I always hated having to start a song before setting it's volume, or going through settings menus for something that should be available on-the-fly. The other enables adb over networks. I hate wires so this is a must have for me!

    Volume option:
    Gerrit Code Review

    ADB over network option:
    Gerrit Code Review
    Gerrit Code Review
    https://github.com/JerryScript/andro...4796b5a5c6cd45

    Tested both and they work fine. You have to go into wireless settings to get your ip address, then go into development and enable adb over networks, then connect from a command prompt with:

    adb connect IP_ADDRESS:5555

    So for example: adb connect 192.168.1.117:5555
    Don't know what the change is to BoardConfig.mk but it's not necessary for boot-pause.

    You'll probably want to make the path to chargerlogo absolute (add a leading /). Not sure if that's necessary.

    You'll also need to add a boot-pause trigger in init.c, like so:

    action_for_each_trigger("boot-pause", action_add_queue_tail);

    I put this immediately above the main for(; loop -- seemed a good spot.

    With all of that done, chargerlogo does indeed run. And it seems to contain the logic to detect the boot method, and exit when not booted from USB. So all that digging in the kernel was for naught. :/ But now chargerlogo runs asynchronously with the boot process. That is, it doesn't stop the system from booting up. It continues to run while the boot animation and lock screen are shown, interfering with them both.

    So if we can figure out how to make the boot process run chargerlogo sychronously, that should be the final step. Yay!

    I'd love to have networked adb. Can we get that pushed back to IHO?
    01-04-2012 04:44 PM
  21. tdm's Avatar
    You'll also need to add a boot-pause trigger in init.c, like so:

    action_for_each_trigger("boot-pause", action_add_queue_tail);

    I put this immediately above the main for(; loop -- seemed a good spot.
    Figured it out. boot-pause needs to be before boot, because the boot action starts sysvinit.

    These diffs should make chargerlogo work. Enjoy!

    diff --git a/init/init.c b/init/init.c
    index 2ef2b38..bb886e3 100755
    --- a/init/init.c
    +++ b/init/init.c
    @@ -747,6 +747,7 @@ int main(int argc, char **argv)

    /* execute all the boot actions to get us started */
    action_for_each_trigger("early-boot", action_add_queue_tail);
    + action_for_each_trigger("boot-pause", action_add_queue_tail);
    action_for_each_trigger("boot", action_add_queue_tail);

    /* run all property triggers based on current state of the properties */


    diff --git a/files/init.thunderc.rc b/files/init.thunderc.rc
    index aed19ac..74d9b2b 100644
    --- a/files/init.thunderc.rc
    +++ b/files/init.thunderc.rc
    @@ -260,3 +260,6 @@ on property:service.iq.active=0
    # LGE_CHANGE [younchan.kim,2010-06-13]
    #service tsdown /system/bin/tsdown
    # oneshot
    +
    +on boot-pause
    + exec /sbin/chargerlogo


    diff --git a/device_thunderc.mk b/device_thunderc.mk
    index 0ffa394..075100d 100644
    --- a/device_thunderc.mk
    +++ b/device_thunderc.mk
    @@ -46,7 +46,7 @@ PRODUCT_COPY_FILES += \
    device/lge/thunderc/files/init.thunderc.rc:root/init.thunderc.rc \
    device/lge/thunderc/files/ueventd.thunderc.rc:root/ueventd.thunder.rc \
    device/lge/thunderc/files/initlogo.rle:root/initlogo.rle \
    - device/lge/thunderc/files/chargerlogo:root/chargerlogo \
    + device/lge/thunderc/files/chargerlogo:root/sbin/chargerlogo \
    device/lge/thunderc/files/chargerimages/battery_ani_01.rle:root/chargerimages/battery_ani_01.rl
    device/lge/thunderc/files/chargerimages/battery_ani_02.rle:root/chargerimages/battery_ani_02.rl
    device/lge/thunderc/files/chargerimages/battery_ani_03.rle:root/chargerimages/battery_ani_03.rl
    thekraven and JerryScript like this.
    01-04-2012 05:03 PM
  22. thekraven's Avatar
    cool, i'm right there with you. Adfad666 also added a custom bootlogo step also to his.
    JerryScript likes this.
    01-04-2012 05:32 PM
  23. thekraven's Avatar
    Success partly, I got the battery charging only, but no OS booting. There's another step for it to boot into the OS. I think he uses
    exec /sbin/ftm-power

    I'll keep plugging away.

    If you want to make custom bootlogos

    Add to device_thunderc.mk

    Code:
    vendor/lge/thunderc/proprietary/sbin/bootlogo:root/sbin/bootlogo \
    Grab the bootlogo from here https://github.com/adfad666/cm7_vend.../sbin/bootlogo

    And his bootimage folder here

    https://github.com/adfad666/cm7_vend...ary/bootimages

    Add to init.thunderc.rc .. looks like you could do boot sound too there.

    Code:
    # LGE_MERGE_S
    # 20100708 hyeongwoo.seo@lge.com MS690: Change.. media -> root
    #service bootsound /system/bin/playmp3
    #    user root
    #    group root
    #    oneshot
    # LGE_MERGE_E
    
    
    # LGE_MERGE_S
    # Boot logo in init script, munyoung.hwang@lge.com
    service bootlogo sbin/bootlogo
        user root
        group root
        oneshot
    # LGE_MERGE_E
    01-04-2012 06:28 PM
  24. thekraven's Avatar
    This might work in init.thunderc.rc
    Code:
    on boot-ftm-power
        exec sbin/ftm_power
    on boot-pause
        exec sbin/chargerlogo
    Checking to see where the boot-ftm-power is in the init.c


    Depends on when you synced. Looks like they just added it.
    https://github.com/CyanogenMod/andro...13cc5cbad41958
    01-04-2012 06:42 PM
  25. tdm's Avatar
    Oh, and a couple of final comments on chargerlogo, in case any ROM maintainers want to play with it but don't want to build from sources:

    The boot-pause action is not required. I added it to follow the CM changes that were discussed earlier. The early-boot action would work just as well. early-boot appears to be unused in CM/IHO, so using it to launch chargerlogo would be functionally equivalent and would not require changing any code at all.

    The reason I moved chargerlogo to /sbin in the initrd was to ensure it got executable permissions. Note that in the current CM/IHO builds, chargerlogo is not executable inside the initrd. So when repacking the initrd, ensure it's executable. (I highly doubt that chargerlogo itself cares what directory it lives in.)
    JerryScript likes this.
    01-04-2012 10:39 PM
1,060 ... 1617181920 ...
LINK TO POST COPIED TO CLIPBOARD