01-17-2013 12:07 AM
1,060 ... 2021222324 ...
tools
  1. tdm's Avatar
    I just found an incredible resource for git commands:

    Git Community Book

    It's the only documentation I've found to date that actually explains what is happening with each command, how to use the commands properly, and how to fix mistakes you might make along the way.
    Thanks I'll take a look. I've been a developer for 20 years and been using perforce for the last 5 or so. But I'm a noob to distributed source control. The thing that spooks me with git is how branches work. It seems so easy to make a change and lose it, or conversely not be able to obliterate a change because it's tucked away in some hidden corner of the history. Hopefully they cover that well...
    01-30-2012 12:37 AM
  2. JerryScript's Avatar
    I updated the BacksideUpdater to include the ability to check any download file's md5 against the manifest's value, and options to delete bad downloads and redownload, or delete manually. I also added progressdialog spinners to give the user something to look at while background processes are running. I also added graphics to the gui to give it a slightly more polished look. And finally I have the app run a package check upon opening, automatically downloading the manifest and checking the default download location for a package to test. This prevents multiple downloads of the manifest during a single use of the app, and makes the user experience a bit better imho.

    BACKside users are currently updating to the 0131 build using the functionality built into the updater before these changes were added, but the main functionality was already in, so this update cycle should be a good test. Once we get through one more update cycle, I'll be ready to extend the manifest to support multiple ROMs.

    Git now has master and gingerbread branches. I'll be using the master branch for the Eclipse project (still gotta clean that up and push it), and the gingerbread branch for the files to be added via device_thunderc.mk, so the package can be added to android/default.xml for syncing.
    Discovered likes this.
    01-31-2012 07:18 AM
  3. tdm's Avatar
    http://m.androidcentral.com/official...le-rom-manager

    $1.99 for a touch recovery? Seriously? And how many users are going to screw up their phone with this because its not supported?

    Koush is talented no doubt. But this seems a bit over the top. Or is it just me?
    01-31-2012 11:41 PM
  4. pbailey212's Avatar
    http://m.androidcentral.com/official...le-rom-manager

    $1.99 for a touch recovery? Seriously? And how many users are going to screw up their phone with this because its not supported?

    Koush is talented no doubt. But this seems a bit over the top. Or is it just me?
    What's funny is its free from his Google+ page and xda I believe, but you have to do an in-App purchase to get it through rom manager. I will stick with compatible free volume rocker recovery

    Sent from my LG-VM670 using Tapatalk
    01-31-2012 11:54 PM
  5. JerryScript's Avatar
    This falls under the same category as soda can lids and the clapper.
    02-01-2012 12:28 AM
  6. tdm's Avatar
    FYI- I've given up on getting stock bootsound to work. I could be wrong, but it seems to be called from the stock init binary, and I don't know how to check that out. So for now, my flashable bootsound enabler will have to do. Not a big deal, since the flashable method works, and a large percentage of users don't care about bootsounds anyway. (I like it because it lets me know when my phone has a crash/reboot, even if it's in my pocket at the time )

    An interesting note: when I do attempt to use the stock bootsound service via playmp3 and PowerOn.mp3, the flashable bootsound enabler doesn't work. So that may be a clue for those of you with more init experience than I have.

    Thanks again to eollie for the original research on enabling bootsounds in CM7 ROMs!
    FYI, I haven't forgotten about this. I just haven't had time to research it yet. I'll probably get to it tomorrow.

    FWIW, the boot sound is not called directly from init, it is called from init.rc:

    # LGE_CHANGE_S [soocheol.heo@lge.com] 2010-07-08, merge from MS690 for enable boot sound
    # 20100708 hyeongwoo.seo@lge.com MS690: Change.. media -> root
    # LGE_CHANGE [dojip.kim@lge.com] 2010-06-28
    service bootsound /system/bin/playmp3
    user root
    group root
    oneshot
    # LGE_CHANGE_E [soocheol.heo@lge.com] 2010-07-08
    02-01-2012 07:24 PM
  7. JerryScript's Avatar
    FYI, I haven't forgotten about this. I just haven't had time to research it yet. I'll probably get to it tomorrow.

    FWIW, the boot sound is not called directly from init, it is called from init.rc:

    # LGE_CHANGE_S [soocheol.heo@lge.com] 2010-07-08, merge from MS690 for enable boot sound
    # 20100708 hyeongwoo.seo@lge.com MS690: Change.. media -> root
    # LGE_CHANGE [dojip.kim@lge.com] 2010-06-28
    service bootsound /system/bin/playmp3
    user root
    group root
    oneshot
    # LGE_CHANGE_E [soocheol.heo@lge.com] 2010-07-08
    Yep, I tried adding all that in, and added the files via device_thunderc.mk. I'm pretty sure it's in my git history.
    02-01-2012 08:02 PM
  8. tdm's Avatar
    Yep, I tried adding all that in, and added the files via device_thunderc.mk. I'm pretty sure it's in my git history.
    I copied the original playmp3 binary into /data/local/bin and the original PowerOn.mp3 to /system/sounds/poweron/PowerOn.mp3 (this is hardcoded in the binary). Here's what I saw:

    Code:
    # /data/local/bin/playmp3 
    link_image[1962]: 16053 could not load needed library 'libaudioalsa.so' for '/data/local/bin/playmp3' (load_library[1104]: Library 'libaudioalsa.so' not found)CANNOT LINK EXECUTABLE
    #
    So then I copied the original /system/lib/libaudioalsa.so and tried again:

    Code:
    # /data/local/bin/playmp3 
    
     mode_ringer =2
    OMXCORE API - OMX_Init 
     Inside OMX_GetComponentsOfRole 
    OMXCORE API :  Get Handle b3d0 OMX.qcom.audio.decoder.mp3 b258
    before get_cmp_index **********-1
    get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.avc ,count = 0 
    get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.mpeg4 ,count = 1 
    get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.divx ,count = 2 
    get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.vc1 ,count = 3 
    get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.h263 ,count = 4 
    get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.encoder.mpeg4 ,count = 5 
    get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.spark ,count = 6 
    get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.vp ,count = 7 
    get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.encoder.h263 ,count = 8 
    get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.audio.decoder.mp3 ,count = 9 
    returning index 9
    getting fn pointer
    Dynamically Loading the library : libOmxMp3Dec.so
    free handle slot exists 0
    Component c70c Successfully created
    th_val = 40208e64
    bOutputEosReached || (tunnel && bInputEosReached breaking
    OMXCORE API :  Free Handle c70c
    Library Used 
    #
    Bingo!
    JerryScript and thekraven like this.
    02-02-2012 12:56 AM
  9. JerryScript's Avatar
    Beautiful! I had been copying playmp3 to /system/bin, not sure if that matters or not. Thanks, there are a few users who are going to hate you though. Perhaps I'll add an option to disable bootsound similar to the option to disable bootanimation (wonder if the sound will still play with bootanimation disabled, it didn't with my old method).

    On the offline-charging issue, I am building right now with changes to ShutdownThread, init.c, init.thunder.rc, and added a file to init.d. ShutdownThread creates a single character file /proc/charger_args, init.c checks for it and adds the tail, init.thunder.rc checks for the tail and runs chargerlogo if set, and init.d runs a script to remove /proc/charger_args so it won't remain for next boot. Will let you know if it works, not sure if this is what you had in mind.
    02-02-2012 04:19 AM
  10. anthonycr's Avatar
    Beautiful! I had been copying playmp3 to /system/bin, not sure if that matters or not. Thanks, there are a few users who are going to hate you though. Perhaps I'll add an option to disable bootsound similar to the option to disable bootanimation (wonder if the sound will still play with bootanimation disabled, it didn't with my old method).

    On the offline-charging issue, I am building right now with changes to ShutdownThread, init.c, init.thunder.rc, and added a file to init.d. ShutdownThread creates a single character file /proc/charger_args, init.c checks for it and adds the tail, init.thunder.rc checks for the tail and runs chargerlogo if set, and init.d runs a script to remove /proc/charger_args so it won't remain for next boot. Will let you know if it works, not sure if this is what you had in mind.
    I'm one of those people that will be mad I hate the virgin mobile sound. Thats cool you got it working tho.
    02-02-2012 08:04 AM
  11. tdm's Avatar
    Beautiful! I had been copying playmp3 to /system/bin, not sure if that matters or not.
    No, it does not matter. I was just using /data/local/bin because it's a convenient place to throw binaries for testing. It should really live in /system/bin.

    The key points are to place the boot sound file in the proper place and copy the original libaudioalsa.so.

    But now that we've got that figured out, I have to ask -- what's wrong with using stagefright like you do in your flashable boot sound script? It's open source, it's already on the phone, and doesn't require tossing Froyo shared libs onto your phone. Much better IMO.

    And while I'm asking, I'm a bit confused -- you have a flashable boot sound enabler script, but your goal seems to be to integrate this directly into your ROM. Why don't you do that? The script would be pretty easy to integrate into init.thunderc.rc. It's just a bootsound service and a little shell script wrapper to stagefright which, conveniently enough, checks a configurable build.prop entry to see whether it should run or not.

    Thanks, there are a few users who are going to hate you though. Perhaps I'll add an option to disable bootsound similar to the option to disable bootanimation
    Nobody could hate it more than me. Remember my first post?

    (wonder if the sound will still play with bootanimation disabled, it didn't with my old method).
    That's because of this:

    Code:
    echo 'on property:init.svc.bootanim=running   # to correct timin' >> /system/etc/init.local.rc
    echo '        start bootsound' >> /system/etc/init.local.rc
    This says to start the bootsound when the boot animation runs.

    On the offline-charging issue, I am building right now with changes to ShutdownThread, init.c, init.thunder.rc, and added a file to init.d. ShutdownThread creates a single character file /proc/charger_args, init.c checks for it and adds the tail, init.thunder.rc checks for the tail and runs chargerlogo if set, and init.d runs a script to remove /proc/charger_args so it won't remain for next boot. Will let you know if it works, not sure if this is what you had in mind.
    Not sure I follow. Please send me diffs in email and we'll go over them.

    Thanks!
    02-02-2012 09:39 AM
  12. JerryScript's Avatar
    When I tried to incorporate the stagefright method into the build, it never worked. Unfortunately, I was new to git atm, and deleted that history doing a fresh repo sync months ago, so I'm not sure where I messed it up. Enabling native bootsound was an attempt to get all stock functions back. Thanks to you, we are closer now on several points!

    On the offline-charging fix, I forgot /proc is not writeable, so I'm rebuilding with charger_args written to /data, will send you the diffs when it's done compiling.


    Remove 01mvdalvik for Market fix
    I decided to remove the 01mvdalvik script from init.d while testing some of these other things. I hadn't been able to update any app larger than 6mb for a while now, even though internal storage showed plenty of space. I do not use anything other than native apps2sd. I can confirm that not moving dalvik-cache to data does fix the insufficient space issue when attempting to update or install from the Market. I was able to update all apps, including ones over 17mb, and after updating everything, I was able to install an app over 16mb. Whatever the newer Market checks, moving dalvik to data is not helping to give us more space. I'm removing it from future builds unless there are bug reports as a result.
    Discovered likes this.
    02-02-2012 01:50 PM
  13. thekraven's Avatar
    Do the V builds have this number pad appearance in the t9 dialer?

    "Also I think I may have found a wierd kind of bug-ish thing? if you open up the phone dialer and enter a few digits and then go back to the home screen and then go back to the dialer so that the digits you entered are still there in the dialer, a keypad with numbers on it will popup on top of the regular phone dialer. It can be closed by pressing back but just looks really wierd..."
    02-06-2012 03:56 PM
  14. pbailey212's Avatar
    Do the V builds have this number pad appearance in the t9 dialer?

    "Also I think I may have found a wierd kind of bug-ish thing? if you open up the phone dialer and enter a few digits and then go back to the home screen and then go back to the dialer so that the digits you entered are still there in the dialer, a keypad with numbers on it will popup on top of the regular phone dialer. It can be closed by pressing back but just looks really wierd..."
    I can confirm the extra number pad, that is wierd

    Sent from my LG-VM670 using Tapatalk
    02-06-2012 04:10 PM
  15. JerryScript's Avatar
    You had offline-charging right all along Tom, just needed a slight change in the order I believe. Seems your test for last_kmsg does work, but the tails were not applied appropriately.

    Note- I have included root/sbin/ftmpower and system/bin/battery_charging binaries from the stock OV system dump in the build I tested this on via device_thunderc.mk. I haven't tried without them yet, so I don't know if they have any impact. They were not added in as part of this commit, will test without them tomorrow (too tired now).

    In init.c, there was already a battchg_pause variable being used, but it was never flagged properly I assume due to the OS and kernel not communicating the reboot command. We can use the last_kmsg test to set that variable appropriately, and then it adds the boot-pause queue-tail at the right moment. No need to add warm/cold tails, or write new drivers for the kernel.
    Code:
    /system/core/init.c
    @@ -740,9 +740,9 @@ int main(int argc, char **argv)
         /* If /proc/last_kmsg exists the phone has been rebooted, if not
            it's a cold boot */
         if (access("/proc/last_kmsg", R_OK) == 0) {
    -        action_for_each_trigger("boot-warm", action_add_queue_tail);
    +        battchg_pause = 0;
         } else {
    -        action_for_each_trigger("boot-cold", action_add_queue_tail);
    +        battchg_pause = 1;
         }
    In init.thunderc.rc I removed the exec of bootlogo in early-boot and added it at the top in boot-pause (diffs were over two commits, sorry, hope this makes sense):
    Code:
    # Charging while powered off
    # *from powered off state, plug in charger
    # *from os power down with charger plugged in
    on boot-pause
            exec sbin/chargerlogo
    
    # This does the initial RLE animation for the vendor logo.
    # Taken verbatim from the stock init.rc.
    service bootlogo /sbin/bootlogo
       user root
       group root
       oneshot
     
    # Boot normally into os
    # *if rebooted via any method
    # *via power button when powered off and no charger
    # *via long press on power button while offline charging
    on early-boot
       start bootlogo
    With these changes, the following behaviour occurs (crashes tested by oc to 864):

    With charger plugged in:
    Reboot from recovery - boots fully
    Reboot from os - boots fully
    Power off - boots to chargerlogo
    Crash - boots fully

    Without charger:
    Reboot from recovery - boots fully
    Reboot from os - boots fully
    Power off - powers off
    Crash - boots fully

    Powered off > No charger > Press power button - boots fully
    Powered off > Plug in charger - boots to to chargerlogo
    Offline-charging > Long press power button - boots fully


    I believe this is the behaviour we have been looking for. Now users can have offline-charging, and I can charge my phone overnight without worrying about some random crash rebooting it into offline-charging mode and making me miss alarms and phone calls!

    Thanks again Tom!
    tdm, BobZhome, mrg666 and 2 others like this.
    02-09-2012 05:55 AM
  16. tdm's Avatar
    You had offline-charging right all along Tom, just needed a slight change in the order I believe. Seems your test for last_kmsg does work, but the tails were not applied appropriately.

    Note- I have included root/sbin/ftmpower and system/bin/battery_charging binaries from the stock OV system dump in the build I tested this on via device_thunderc.mk. I haven't tried without them yet, so I don't know if they have any impact. They were not added in as part of this commit, will test without them tomorrow (too tired now).

    In init.c, there was already a battchg_pause variable being used, but it was never flagged properly I assume due to the OS and kernel not communicating the reboot command. We can use the last_kmsg test to set that variable appropriately, and then it adds the boot-pause queue-tail at the right moment. No need to add warm/cold tails, or write new drivers for the kernel.
    Great work! Thanks for investigating this. I totally missed the battchg_pause variable in init.c.
    JerryScript likes this.
    02-09-2012 09:12 AM
  17. mrg666's Avatar
    I believe this is the behaviour we have been looking for. Now users can have offline-charging, and I can charge my phone overnight without worrying about some random crash rebooting it into offline-charging mode and making me miss alarms and phone calls!

    Thanks again Tom!
    This is impressive, Jerry. Thank you!

    Edit: I can also confirm that it works perfect as described in your post.
    JerryScript likes this.
    02-09-2012 01:24 PM
  18. JerryScript's Avatar
    I decided to go with including a modified xda/CM bootsound binary in the build. This way, a setting can be added to the CMParts Sound menu to allow it to be disabled even if the bootanimation is still enabled. I'll probably change it in init.thunderc.rc to fire on it's own instead of with the bootanimation, that way users who want bootsound but not bootanimation can have it their way. I changed the check in the xda/cm bootsound shell script to use getprop persist.sys.bootsound instead of a build.prop grep.

    CMParts commit
    Vendor commit (dirty)
    Device commit (dirtier)

    @Tim: thanks for the help with the stock bootsound, but as you said, this is open source, and easier to modify to our liking.

    Thanks to eollie for originally letting us know about the CM (xda) version of bootsound!
    BobZhome and mrg666 like this.
    02-12-2012 05:39 AM
  19. jack454's Avatar
    Did a build today to get the updates ya'll have done. Everything works fine with the exception of the power button. It turns the phone on but will not wake the phone or turn it off. Any ideas. This is just a straight build from the repo, I didn't change anything. Thanks for any help.
    02-12-2012 08:32 PM
  20. Discovered's Avatar
    Which repo did you sync with?
    02-12-2012 09:16 PM
  21. jack454's Avatar
    I synced with the IHO repo.
    02-12-2012 09:40 PM
  22. JerryScript's Avatar
    I added an option to set a user defined image as the background in the notification dropdown. Added the option to the same array as the previous ones.

    Instead of building it into CMParts, I followed the template of Pedlar's CMBootanimation, and created a helper package named android_packages_apps_CMBackgroundChooser. This can be easily extended to set background images for other gui elements as well. However, each gui element will need it's own preference detection and file IO to grab the selected image.

    All changes have been pushed to github, but as usual, I derped one in with a commit to add an option to disable ICS rotation animations, all you need from that one is the changes to UIStatusBarActivity.
    BobZhome likes this.
    02-20-2012 01:22 AM
  23. something15525's Avatar
    Hey there, I had a question for you guys, hopefully you can help me out.

    I'm new to building my own ROMs here, although I successfully built my own using your tutorial!

    Just a few things....

    I want to make my own custom ROM and maintain and keep the code in Github.

    I already went ahead and forked the IHO repo mentioned in the 3rd post on this thread, but then I got a little lost.

    Ideally what I want to do is have my own repo that is forked from IHO, but have the updates coming from the IHO repo come to my repo as well.

    I want to be able to push my own changed to my repo while also being able to fetch the changes from the IHO repo when it is updated.

    I'm not really sure how to use repo and git commands in conjunction, and I was hoping somebody could help me get started.

    *EDIT* I also think i might have forked the wrong repo or I might need to fork another one...
    02-20-2012 04:44 PM
  24. JerryScript's Avatar
    `Repo sync is used to grab all the package files you need.

    If you want to fork and maintain your own repositories, you will need to fork the following from IHO:
    -android
    -device_lge_thunderc
    -vendor_lge_thunderc
    -vendor_cyanogen
    -system_core
    -dalvik
    -frameworks_base

    Once you fork them via the github webpages, you can cd into your repo synced matching directories and do the following:

    first your repositories are called origin:
    git remote add origin git@github.com:YOUR_REPO_NAME/NAME_O..._DIRECTORY.git
    then set up the iho remote:
    git remote add iho git://github.com/inferiorhumanorgans/NAME_OF_REPO.git
    Note- your repository is added via git@, other repositories are added via git://


    Then you need to set up the gingerbread branch in each directory:

    git branch gingerbread
    git checkout gingerbread

    (or git branch ics )

    Now you can fetch/merge or pull (auto fetch/merge) changes from IHO, I use pull, but I always check the github website so I know what changes I'm pulling in first, and am prepared to deal with merge conflicts as necessary:

    git pull iho gingerbread

    Once you have pulled in changes, or made your own, you have to commit them to your local directories:

    git commit -a
    <enter a commit message>
    <press cntrl+o>
    <press cntrl+x>


    Now your changes are a part of your local directories, so you can now push them back to your github repositories:

    git push origin

    I would suggest you read the github man pages, and follow their examples before attempting something as large and complex as IHO.
    rukin5197 and something15525 like this.
    02-20-2012 06:30 PM
  25. something15525's Avatar
    So I went ahead and forked all those repos, now about the remotes...

    Do I add remotes for all the repos on my local devbox, and is that just a matter of running:

    Code:
    git remote add origin git@github.com:YOUR_REPO_NAME/NAME_OF_REPO_DIRECTORY.git
    for each of the repos? and then also should i do the same for each of the IHO repos to keep my forked repos synced with the IHO repo?

    Sorry, hope this makes sense. Thanks so much for the help, I'm already starting to understand this better.

    *EDIT* One more thing. I am developing for the LS670, and selected LS670 when I ran lunch. Just thought that might be helpful just in case there are any OV-specific repos I don't need or something. Thought it would be helpful to mention.
    02-20-2012 07:09 PM
1,060 ... 2021222324 ...
LINK TO POST COPIED TO CLIPBOARD