[mido] initd, ad-blocking and "bad audio in videos fix" mod

Search This thread

zenjedi

Senior Member
Apr 20, 2013
576
145
Jedi Starfighter
I was using your initd zip and script to implement governor and other tweaks on slim ROM 1.17. I know I was doing it by the book but for some strange reason, it was just not working. I tried it on a legend ROM and it worked the first time round.

I'm mentioning it here since you also seem to prefer slim ROM. So was there anything different you did to make this work?
 

DarthJabba9

Recognized Developer
May 5, 2014
4,402
4,595
Greater London
I was using your initd zip and script to implement governor and other tweaks on slim ROM 1.17. I know I was doing it by the book but for some strange reason, it was just not working.
When you say it was "not working", what exactly do you mean? What precisely was not working? Is this script not executed at all, or is it executed but some of the commands did not work? I am indeed using SlimROM, and the script has always worked here (as it did when I was using OctOS). There is nothing special that I did to make it work
 

zenjedi

Senior Member
Apr 20, 2013
576
145
Jedi Starfighter
When you say it was "not working", what exactly do you mean? What precisely was not working? Is this script not executed at all, or is it executed but some of the commands did not work? I am indeed using SlimROM, and the script has always worked here (as it did when I was using OctOS). There is nothing special that I did to make it work

Not working as in the frequencies were not getting applied. Cat /sys/ command always returned stock value. The max limit in limitcpu was not getting applied
 

DarthJabba9

Recognized Developer
May 5, 2014
4,402
4,595
Greater London
Not working as in the frequencies were not getting applied. Cat /sys/ command always returned stock value. The max limit in limitcpu was not getting applied
Hmm ... I have never experienced that. Perhaps the installation actually failed, and the "/system/etc/init.qcom.post_boot.sh" file actually was not patched? Unless we retrace all the steps, all that one can do is to speculate.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    Here is a copy of my own personal mod for mido. I am only making it available because I thought others might find it useful.

    What this mod does
    1. Implements init.d functionality - any script in /system/etc/init.d/ with a name that starts with "00" (ie, zero zero) and has a ".sh" extension will be executed every time the phone boots up. My own script for interactive governor (based on @FaustTN tips in this thread is included as "/system/etc/init.d/00_userinit.sh")

    2. Ad blocking with a replacement "/system/etc/hosts" file (built from various freely available lists)

    3. Modified /system/etc/mkshrc that launches bash automatically (if bash is found) when a terminal session is opened (if bash is not found, then nothing is done)

    4. Implements the "bad audio in videos" fix described by @gianluca212 in this thread

    Compatibility
    This is a mido only mod. It is based on patched files from OctOS, and I am using it successfully on OctOS. It should also be fine for Slim, because the relevant patched files are identical. This may indicate that it is also suitable for other LOS based Nougat ROMs for mido. However, I have not tested it on others. The original files are first backed up (with a ".old" extension) before being patched

    Disclaimer
    All the usual disclaimers apply. The mod works perfectly fine for me, but your mileage may vary. Use at your own risk!

    Download
    Get your updated copy from this link (version 2)

    AUDIO FIX ONLY
    If you are only interested in fixing audio problems (i.e., no initd, and no ad-blocking) then download the attached zip file below only ("mido-audiofix-mod-aosp-LOS.zip"). It is based on SlimOS files, but should be compatible with any CAF/AOSP/LOS based ROM.

    Installation
    1. Make a full nandroid backup of your ROM. At the very least, the system partition should be backed up (do NOT skip this step)
    2. Boot to TWRP recovery, and install the mod (no need to wipe anything)
    3. Reboot

    Bugs?
    You tell me.
    6
    UPDATED (NEW ("v2") ZIP FILES)

    If you are interested in only the initd implementation, and are not interested in the other stuff listed above, see the links below.
    * The first zip is an initd patch for AOSP / LOS based Nougat ROMs
    * The second zip is an initd patch for MIUI based Nougat ROMs
    * The third zip is a generic initd patch for all Nougat ROMs for mido - it should work equally well with AOSP/LOS/MIUI. New users should use this in preference to the first two zips.

    Notes:
    1. Since only one file needed to be patched to implement initd, the first zip should also work fine for MIUI based ROMs (there are only minor differences between the AOSP/LOS and the MIUI files). However, a separate zip is supplied for MIUI to avoid all doubt. The third zip adopts a different approach by directly patching the existing file on the fly. Thus, it is not ROM dependent or version dependent.
    2. The zip installer contains only the initd patch. No sample initd script is provided - you have to supply your own.
    3. Make sure that the name of your initd script starts with "00", and that it has the extension ".sh"
    4. Copy your initd script to the /system/etc/init.d directory.
    5. Your ROM must be rooted before you can copy your initd script to the /system/etc/init.d directory (you need a file editor that can access root - eg, Root Explorer).
    6. If you are using a Windows text editor to create your script, make sure that the script is saved with unix line endings.

    As usual, all disclaimers apply.

    Installation
    1. Make a full nandroid backup of your ROM. At the very least, the system partition should be backed up (do NOT skip this step)
    2. Boot to TWRP recovery, and install the mod (no need to wipe anything)
    3. Reboot

    Bugs?
    You tell me.
    2
    Could you please create a version for only the bad audio in video problem?
    Now attached to the original post.
    1
    I have updated Post #2 with a new "generic" version of the initd mod (the third zip) which should work equally well with any Nougat ROM for mido.

    This is for new users or those who have upgraded their ROM after having installed one of the first two zips. If you have already installed either of the first two, you should not try to install this one. It will simply refuse to install, because it would be wholly unnecessary to install the mod twice.
    1
    Thank for your work, can i use this with GovTuner mod?
    Sorry but I have no idea.