[MOD] Running an MCR Custom ROM? | Save 20MB+ RAM | Easy Update Zip Included

Search This thread

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
Included In MCR and derivatives from Fr15 onward - No need to patch! :)

Introduction
Removing the LG 'Software Update' function from your phone will give you back 20MB or more of RAM. This app runs all the time and restarts if it's killed. The thing is, if you're running a custom ROM this function will do little for you. It may notify you of an update but no updates will install over the top of your custom rom. And you get all your update notifications from here right? :)

However, simply removing the application package (OmaDmclient.apk) causes a problem with Settings. If the client app is removed the Settings | About Phone menu force closes. You save the 20MB RAM but you have an annoying consequence.

Removing this function provides a ~6% memory boost, a slight reduction in data use and an unquantifiable saving of CPU cycles.​

Details
The relevant code is in Settings.apk, in factory ROM V10a (only some variants?) the OTA code is not active but simply taking the entire Settings.apk from V10a does not work on V10b/c. So what I did to address this:
  • Reverse engineered Settings.apk from V10a and V10b/c
  • Extracted code from V10a (java/com/android/settings/DeviceInfoSettings)
  • Inserted said code into V10b/c, replacing OTA code
  • Recompiled Settings.apk minus OTA code
  • Only LG code is included, none of mine, I've just ported it from one version to the next
And this allows the OTA client app to be removed without any negative consequences.​

Compatibility
  • This is compatible with the LG Optimus 2x only, it will probably break something on the G2x variant.
  • This mod is not compatible with CyanogenMod for the Optimus 2x (it is unnecessary)

Included In MCR and derivatives from Fr15 onward - No need to patch! :)

Download
For Users - ClockworkMod Recovery Update Zip
  • Compatible with all ROM's based on MCR (MoDoCo) Fr4 and above (this is most at the moment)
  • Check with your ROM chef and make a backup if you're not sure
  • Download: LG-P990-OTA-Client-Eater-update.zip
  • Install from SD card in Recovery (installs new Settings and removes LG OTA client)
  • Hit Thanks below :)
For Chefs - To include in ROM's
  • Remove OmaDmclient.apk from /system/app/
  • Download: Settings-No-OTA-Client.apk
  • Rename and replace Settings.apk in /system/app/
  • Test by ensuring Settings | About Phone does not FC
  • Provide credit

Closer to stock Android one step at a time...

Enjoy!
 
Last edited:

tanoxxx

Senior Member
Feb 10, 2010
1,731
427
Florence
Hi djmcnz
thanks for this mod..
i wanna try it, but i wanna ask before one things,
sorry for this questions maybe are just write in your post, but my english is not perfect, and sometimes i lost some information :)

With this mod we get 392MB or more of RAM or we have always 372 but with 20MB or more of RAM free ?

Thanks
 
Last edited:

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
Hi djmcnz
thanks for this mod..
i wanna try it, but i wanna ask before one things,
sorry for this questions maybe are kust write in your post, but my english is not perfect, and sometimes i lost some informatios :)

With this mod we get 392MB or more of RAM or we have always 372 but with 20MB or more of RAM free ?

Thanks

No problem.

It will be 372 with 20MB additional available inside this. So you have the same total RAM but you will be using ~20MB less of it.

Not 392 sorry.
 

emprize

Senior Member
Jan 15, 2007
1,300
135
actually why we just got 372 ram while the spec is 512 mb? wheres the rest?

back to the topic, is it u mean paul's rom cant use this apk?
 

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
Thanks for testing, first post updated

Nice one guys, thanks for testing and feedback. I've run out of "Thanks" for the day so I'll have to catch up later... :)

First post updated with update.zip and details for ROM chefs. If you're using a custom ROM, point this out to them, it's free! :D
 
  • Like
Reactions: Harsh and jastonas

yodafone

Senior Member
Dec 15, 2004
106
5
Worked like a charm! Thanks!

Only thing I noticed was that 3G data seemed to have been broken after reboot, but I cleared Market data and cycled Airplane mode and all is well now.

Am using a RomKitchen 1.6 build with cpasjuste's kernel.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    Included In MCR and derivatives from Fr15 onward - No need to patch! :)

    Introduction
    Removing the LG 'Software Update' function from your phone will give you back 20MB or more of RAM. This app runs all the time and restarts if it's killed. The thing is, if you're running a custom ROM this function will do little for you. It may notify you of an update but no updates will install over the top of your custom rom. And you get all your update notifications from here right? :)

    However, simply removing the application package (OmaDmclient.apk) causes a problem with Settings. If the client app is removed the Settings | About Phone menu force closes. You save the 20MB RAM but you have an annoying consequence.

    Removing this function provides a ~6% memory boost, a slight reduction in data use and an unquantifiable saving of CPU cycles.​

    Details
    The relevant code is in Settings.apk, in factory ROM V10a (only some variants?) the OTA code is not active but simply taking the entire Settings.apk from V10a does not work on V10b/c. So what I did to address this:
    • Reverse engineered Settings.apk from V10a and V10b/c
    • Extracted code from V10a (java/com/android/settings/DeviceInfoSettings)
    • Inserted said code into V10b/c, replacing OTA code
    • Recompiled Settings.apk minus OTA code
    • Only LG code is included, none of mine, I've just ported it from one version to the next
    And this allows the OTA client app to be removed without any negative consequences.​

    Compatibility
    • This is compatible with the LG Optimus 2x only, it will probably break something on the G2x variant.
    • This mod is not compatible with CyanogenMod for the Optimus 2x (it is unnecessary)

    Included In MCR and derivatives from Fr15 onward - No need to patch! :)

    Download
    For Users - ClockworkMod Recovery Update Zip
    • Compatible with all ROM's based on MCR (MoDoCo) Fr4 and above (this is most at the moment)
    • Check with your ROM chef and make a backup if you're not sure
    • Download: LG-P990-OTA-Client-Eater-update.zip
    • Install from SD card in Recovery (installs new Settings and removes LG OTA client)
    • Hit Thanks below :)
    For Chefs - To include in ROM's
    • Remove OmaDmclient.apk from /system/app/
    • Download: Settings-No-OTA-Client.apk
    • Rename and replace Settings.apk in /system/app/
    • Test by ensuring Settings | About Phone does not FC
    • Provide credit

    Closer to stock Android one step at a time...

    Enjoy!
    2
    Hi djmcnz
    thanks for this mod..
    i wanna try it, but i wanna ask before one things,
    sorry for this questions maybe are kust write in your post, but my english is not perfect, and sometimes i lost some informatios :)

    With this mod we get 392MB or more of RAM or we have always 372 but with 20MB or more of RAM free ?

    Thanks

    No problem.

    It will be 372 with 20MB additional available inside this. So you have the same total RAM but you will be using ~20MB less of it.

    Not 392 sorry.
    2
    any solution for stock ROM please??? grrrrrrrrrrr thank you

    lol, patience is a virtue.

    Nevertheless, try this - FOR STOCK LG ROM - I HAVE NOT TESTED IT!!

    Would be good to know it it works, I just did copy and paste from the other version.

    So, backup first! Nandroid or make a copy of Settings.apk.

    Push the attached file (don't "install"), delete OmaDmclient.apk and see if Settings | About phone fc's...

    Let me know.
    2
    Thanks for testing, first post updated

    Nice one guys, thanks for testing and feedback. I've run out of "Thanks" for the day so I'll have to catch up later... :)

    First post updated with update.zip and details for ROM chefs. If you're using a custom ROM, point this out to them, it's free! :D
    1
    I tried to decompile the settings.apk in order to fix a bug created by LG..
    but when I compile again, and push to the system.. it never work..

    Could you please share how can you modify the settings.apk and it still working ?

    I extracted classes.dex, used baksmaili to decode it, edited it, recompiled using smali and then put it back in Settings.apk.