[kernel module] smartassV2 governor for Defy Mini

Search This thread

Bernd.Defy

Senior Member
Feb 1, 2013
82
46
Hi there,

based on the work of @viulian and @AnDyX here at xda, i've ported erasmux' smartassV2-goveror to a kernel-module for Defy Mini.

It's easy to use:

1. download the attached zip
2. place the defymini_smartass2.ko anywhere on your defy mini (i prefer /system/lib/modules)
3. install the module
Code:
insmod /system/lib/modules/defymini_smartass2.ko
4. start a tool like no-frills cpu-control
5. choose smartassV2-governor, 245min / 600 max.

ToDo:
* create init.d - script:
- which detects current (overclocked?) max-speed
- loads smartass-module then
- changes governor to smartass with detected max-speed

Please try it and give feedback, i hope, there is a little more batterylife now.

Regards,
Bernd.Defy!
 

Attachments

  • defymini_smartass2.zip
    6 KB · Views: 431
  • !smartass2-source.zip
    7.1 KB · Views: 255
Last edited:

Pottkopp

Senior Member
Hi there,

based on the work of @vulian and @AnDyX here at xda, i've ported erasmux' smartassV2-goveror to a kernel-module for Defy Mini.

It's easy to use:

1. download the attached zip
2. place the defymini_smartass2.ko anywhere on your defy mini (i prefer /system/lib/modules)
3. install the module
Code:
insmod /system/lib/modules/defymini_smartass2.ko
4. start a tool like no-frills cpu-control
5. choose smartassV2-governor, 245min / 600 max.

ToDo:
* create init.d - script:
- which detects current (overclocked?) max-speed
- loads smartass-module then
- changes governor to smartass with detected max-speed

Please try it and give feedback, i hope, there is a little more batterylife now.

Regards,
Bernd.Defy!

Is it also working for defy? or why is it on this forum? ;)
 

Bernd.Defy

Senior Member
Feb 1, 2013
82
46
Sorry, just for Defy Mini. There is no special subforum for the mini, so this one seems to fit.


Sent from my XT320 using xda app-developers app
 

Bernd.Defy

Senior Member
Feb 1, 2013
82
46
@Bernd.Defy You can load the module on boot by using an app called Set Xperia which works for me to load the smartassV2 governor on boot.

https://play.google.com/store/apps/details?id=com.SetXperia.Inteks.org&hl=en

The smartassV2 governor has a delay on waking up but otherwise this governor gives you better battery performance.

Thank you for your information about SetXperia. I already use another tool by inteks (developer of setXperia) - SystemCleanup. I was in contact with him, and he added the possibility to move system-apps to /flex-partition in this tool. After removeing all the bloat from /flex partition, there wera ~60MB of space there. So, i took all my "important" apps, made them system-apps (inkl. odexing to prevent creating files in /data/dalvik-cache) and moved them to /flex. What system cleanup does is create a symlink in /system/app to /flex/app, similar to link2SD, but without the need of an 2nd partition on sdcard.

For the governor: i created a little init.d-script to load and set the governor at boot. Works great.
 
  • Like
Reactions: rootdefyxt320

Guitwo2

Senior Member
Jul 17, 2012
285
75
Marseille
Nice module. Seems to work fine.
I'll just add in the 66ocmodule script what's necessary to load it on boot.

---------- Post added at 05:03 PM ---------- Previous post was at 04:48 PM ----------

After removeing all the bloat from /flex partition, there wera ~60MB of space there. So, i took all my "important" apps, made them system-apps (inkl. odexing to prevent creating files in /data/dalvik-cache) and moved them to /flex. What system cleanup does is create a symlink in /system/app to /flex/app, similar to link2SD, but without the need of an 2nd partition on sdcard.

I'm iterrested in doing that as well.
Could you please develop this sentence ?
(inkl. odexing to prevent creating files in /data/dalvik-cache)
 

Bernd.Defy

Senior Member
Feb 1, 2013
82
46
Nice module. Seems to work fine.
I'll just add in the 66ocmodule script what's necessary to load it on boot.

That's what i put in my init.d-script:
Code:
#!/system/bin/sh 

insmod /system/lib/modules/defymini_smartass2.ko
echo "smartassV2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 245760 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

I'm iterrested in doing that as well.
Could you please develop this sentence ?
Slightly OT:

I played around a little with /system/app and /flex/app and what i found out is, that you can't install anything to /flex/app directly, but this folder behaves like a second /system/app, like an appendix. So i tried to move apps from /system/app to /flex/app and - it worked. I moved them directly (and did not create a symlink in /flex/app), and after reboot, all apps were still working.

So this is what i did for all important apps that i don't want to Link2SD (via Link2SD :)):

1. removed all bloat from /flex/app --> 60 MB free
2. moved all system-apps, that will probably never update, to /flex/app (for example phone.[apk|odex], Calendar*.*, ...)
3. used SystemCleanup to convert "normal" apps to odexed system apps. If you odex these apps, they store their odex (in general the same as a dalvik-cache-file) in /system/app, not in data-partition. Caution! Some apps do not work after converting. I converted the following apps to odexed system-apps with success: Holo Launcher, Playstore, K9 mail, SuperUser, Wetter.com (guess where i'm from! :) ), CpuSpy, Hacker's Keyboard, Link2SD)

When there are updates for these "system-apps", then i use SystemCleanup again and integrate the update in the system-app and odex it again.

HTH,
Bernd.Defy
 
  • Like
Reactions: MauroSZ and Guitwo2

MauroSZ

Senior Member
Dec 18, 2012
155
36
@Bernd.Defy, first congratulation for your consistent job. You (or someone else) may tell me if there are any apps originally in flex/app that we should NOT regarding as bloatware ? Which ? Thanks in advance.
 

Bernd.Defy

Senior Member
Feb 1, 2013
82
46
...if there are any apps originally in flex/app that we should NOT regarding as bloatware ? Which ? Thanks in advance.
Hi MauroSZ,

here's the list of apps in flex/app:

ActivityGraph_tinboost_mdpi.apk
--> removable, it's part of this social-graph-widget-thing
ActivityWidget_tinboost_mdpi.jar
--> removable, it's part of this social-graph-widget-thing
BatteryManager_mdpi.apk
--> If removed, System-->Power does not work anymore (but this is not needed, you can see battery-usage in system-->telephone info-->battery)
blur-services.apk
--> thrown away
BlurUpdater.apk
--> thrown away
BotaSettings.apk
--> thrown away
CMP_MMCP_AmazonFR_NoFM_1.2.104.apk
--> thrown away
DashBoard_tinboost_mdpi.apk
--> Well, no bloat at all, but i don't need it.
FBAndroid-1.7.2_preload.apk
--> thrown away, wide, wide, wide away
FileManager.apk
--> no bloat, but there are better apps in the market
GenieWidget.apk
--> no bloat, google-news widget. did not use it
Gmail.apk
--> judge yourself.
GoogleBackupTransport_signed.apk
--> no bloat
GoogleCalendarSyncAdapter.apk
--> no bloat
GoogleContactsSyncAdapter.apk
--> no bloat
GoogleFeedback.apk
--> no bloat
GooglePartnerSetup.apk
--> no bloat, removed it anyway.
GoogleQuickSearchBox.apk
--> no bloat
LatinImeTutorial.apk
--> no bloat
Maps.apk
--> no bloat, but surely there is a newer one in /data/apps, so delete this one and move the other to here
MarketUpdater.apk
--> deleted it
MediaUploader.apk
--> deleted it
MotoAccuWeather2_App_tinboost_mdpi.apk
--> deleted it
MotoAccuWeather2_Service.apk
--> deleted it
MotoHome3D_tinboost_mdpi.apk
--> Moto Launcher, replaced it by holo launcher, so i deleted it
MotoLocationWidget_Simplified_small_tinboost_mdpi.apk
--> if you dont't like moto, you can consider this as bloat
MotoSearchEngine_tinboost_mdpi.apk
--> if you dont't like moto, you can consider this as bloat
MotoWeatherLiveWallpaper_tinboost_mdpi.apk
--> if you dont't like moto, you can consider this as bloat
MotoWeatherPictureRes_tinboost_mdpi.apk
--> if you dont't like moto, you can consider this as bloat
MusicGlobal_tinboost_mdpi.apk
--> bloat
MusicNowGlobal_tinboost_mdpi.apk
--> bloat
NetworkLocation.apk
--> no bloat
Phonesky.apk
--> playstore (old version, can be deleted after automatic update of playstore)
Quickoffice-Motorola-SP-5_0_104_V_Signed_2012-01-03_10-18-47.apk
--> no bloat, but i did'nt need it, so i deleted it
SetupLite.apk
--> if you dont't like moto, you can consider this as bloat
SocialGraphCallService.apk
--> if you dont't like moto, you can consider this as bloat
SocialGraphService.apk
--> if you dont't like moto, you can consider this as bloat
SocialGraphWidget_tinboost_mdpi.apk
--> if you dont't like moto, you can consider this as bloat
SocialWidget_tinboost_mdpi.jar
--> if you dont't like moto, you can consider this as bloat
Street.apk
--> streetview
Swype.apk
--> no bloat. nice keyboard (better than swype found in playstore, smaller, faster, better keyboard-layouts)
Talk.apk
--> i say: no bloat.
ToggleWidgetsGlobal_tinboost_mdpi.apk
--> nice toggles, but widgetsoid is better
Twitter-3.0.0-release.apk
--> bloat
Upgrader.apk
--> ?
VoiceSearch.apk
--> no bloat, if you like to talk to your phone
WorldClock.apk
--> no bloat, but useless for me
YouTube.apk
--> well, i say: bloat.

Remember, /flex behaves like /system: it's read only. Updates are written to /data/app, so move them to /flex/app and delete previous versions.
 
Operation not permitted

Hi,

Been a while since my last visit here...
I did not succeed sending this command to my mini... I get "failed (Operation not permitted)" message in terminal emulator...
My folder permission is set to RW, but no luck... :(
Were do you think the problem may be? :confused:

Thanks a bunch!

Hi there,

based on the work of @viulian and @AnDyX here at xda, i've ported erasmux' smartassV2-goveror to a kernel-module for Defy Mini.

It's easy to use:

1. download the attached zip
2. place the defymini_smartass2.ko anywhere on your defy mini (i prefer /system/lib/modules)
3. install the module
Code:
insmod /system/lib/modules/defymini_smartass2.ko
4. start a tool like no-frills cpu-control
5. choose smartassV2-governor, 245min / 600 max.

ToDo:
* create init.d - script:
- which detects current (overclocked?) max-speed
- loads smartass-module then
- changes governor to smartass with detected max-speed

Please try it and give feedback, i hope, there is a little more batterylife now.

Regards,
Bernd.Defy!
 
Operation not permitted

Hi Bernd,

Here is a screenshot after I entered the command you suggested:

Thanks,
Klaus
 

Attachments

  • screenshot_2014-06-15_18-50-12.png
    screenshot_2014-06-15_18-50-12.png
    21.6 KB · Views: 208
Hi, in terminal type in su before typing in @Bernd.Defy command. You can also check out my custom kernel here for Defy Mini to improve performance: http://xdaforums.com/showthread.php?t=2676423
OMG....
In was dumb enough not to enter su command in terminal...
Geez....
Still, after a reboot the phone looses this governor and revert back to performance governor.
Shouldn't remain in phone's memory?

Thank you again for your work here.

Cheers
 

rootdefyxt320

Senior Member
Oct 4, 2012
488
440
Sydney, NSW
OMG....
In was dumb enough not to enter su command in terminal...
Geez....
Still, after a reboot the phone looses this governor and revert back to performance governor.
Shouldn't remain in phone's memory?

Thank you again for your work here.

Cheers

You will need an init.d script to keep the module loading on boot.
I tried to include smartassV2 governor into by custom kernel but it ended up in build errors. The only good uses you can get with my custom kernel is that you get root access within the kernel, performance improvements (my phone seems to boot slightly faster with my custom kernel), and better overclock with @Bernd.Defy's overclock module.
 
...no luck!

You will need an init.d script to keep the module loading on boot.
I tried to include smartassV2 governor into by custom kernel but it ended up in build errors. The only good uses you can get with my custom kernel is that you get root access within the kernel, performance improvements (my phone seems to boot slightly faster with my custom kernel), and better overclock with @Bernd.Defy's overclock module.

Hi there,

I have installed a software called universal init.d support.
It runs ok, installed the module again, restart applied, module is gone...
I don't understand...
Cannot keep the module loaded and don't know the reason even if all your conditions are met...:confused:

Thanks for your time.
 

rootdefyxt320

Senior Member
Oct 4, 2012
488
440
Sydney, NSW
Hi there,

I have installed a software called universal init.d support.
It runs ok, installed the module again, restart applied, module is gone...
I don't understand...
Cannot keep the module loaded and don't know the reason even if all your conditions are met...:confused:

Thanks for your time.

I will write an init.d script when I have time. :D
 
  • Like
Reactions: MadK9

rootdefyxt320

Senior Member
Oct 4, 2012
488
440
Sydney, NSW
:laugh:

Lovely!!!
Thanks for all your hard work here on xda!
Geniuses, thats what you guys are, really!

Cheers!

Instructions:

Please use a command prompt / terminal to type in these commands.

1.
Code:
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock11 /system
2.
Code:
adb push defymini_smartass2.ko /sdcard
3.
Code:
adb push 77smartassV2.txt /sdcard
4.
Code:
adb shell mv /sdcard/defymini_smartass2.ko /system/lib/modules/
5.
Code:
adb shell mv /sdcard/77smartassV2.txt /system/etc/init.d/77smartassV2
6.
Code:
adb shell chmod 777 /system/etc/init.d/77smartassV2
7.
Code:
adb shell chmod 644 /system/lib/modules/defymini_smartass2.ko
8.
Code:
adb shell chown 0.0 /system/etc/init.d/77smartassV2

If you are wondering @MadK9, defymini_smartass2.ko is in the first post of this thread but it must be in the folder that I specified i.e. /system/lib/modules/. Just use the commands I provided above and the init.d script should work. :D Enjoy.
 

Attachments

  • 77smartassV2.txt
    82 bytes · Views: 31
  • Like
Reactions: MauroSZ

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Hi there,

    based on the work of @viulian and @AnDyX here at xda, i've ported erasmux' smartassV2-goveror to a kernel-module for Defy Mini.

    It's easy to use:

    1. download the attached zip
    2. place the defymini_smartass2.ko anywhere on your defy mini (i prefer /system/lib/modules)
    3. install the module
    Code:
    insmod /system/lib/modules/defymini_smartass2.ko
    4. start a tool like no-frills cpu-control
    5. choose smartassV2-governor, 245min / 600 max.

    ToDo:
    * create init.d - script:
    - which detects current (overclocked?) max-speed
    - loads smartass-module then
    - changes governor to smartass with detected max-speed

    Please try it and give feedback, i hope, there is a little more batterylife now.

    Regards,
    Bernd.Defy!
    4
    ...if there are any apps originally in flex/app that we should NOT regarding as bloatware ? Which ? Thanks in advance.
    Hi MauroSZ,

    here's the list of apps in flex/app:

    ActivityGraph_tinboost_mdpi.apk
    --> removable, it's part of this social-graph-widget-thing
    ActivityWidget_tinboost_mdpi.jar
    --> removable, it's part of this social-graph-widget-thing
    BatteryManager_mdpi.apk
    --> If removed, System-->Power does not work anymore (but this is not needed, you can see battery-usage in system-->telephone info-->battery)
    blur-services.apk
    --> thrown away
    BlurUpdater.apk
    --> thrown away
    BotaSettings.apk
    --> thrown away
    CMP_MMCP_AmazonFR_NoFM_1.2.104.apk
    --> thrown away
    DashBoard_tinboost_mdpi.apk
    --> Well, no bloat at all, but i don't need it.
    FBAndroid-1.7.2_preload.apk
    --> thrown away, wide, wide, wide away
    FileManager.apk
    --> no bloat, but there are better apps in the market
    GenieWidget.apk
    --> no bloat, google-news widget. did not use it
    Gmail.apk
    --> judge yourself.
    GoogleBackupTransport_signed.apk
    --> no bloat
    GoogleCalendarSyncAdapter.apk
    --> no bloat
    GoogleContactsSyncAdapter.apk
    --> no bloat
    GoogleFeedback.apk
    --> no bloat
    GooglePartnerSetup.apk
    --> no bloat, removed it anyway.
    GoogleQuickSearchBox.apk
    --> no bloat
    LatinImeTutorial.apk
    --> no bloat
    Maps.apk
    --> no bloat, but surely there is a newer one in /data/apps, so delete this one and move the other to here
    MarketUpdater.apk
    --> deleted it
    MediaUploader.apk
    --> deleted it
    MotoAccuWeather2_App_tinboost_mdpi.apk
    --> deleted it
    MotoAccuWeather2_Service.apk
    --> deleted it
    MotoHome3D_tinboost_mdpi.apk
    --> Moto Launcher, replaced it by holo launcher, so i deleted it
    MotoLocationWidget_Simplified_small_tinboost_mdpi.apk
    --> if you dont't like moto, you can consider this as bloat
    MotoSearchEngine_tinboost_mdpi.apk
    --> if you dont't like moto, you can consider this as bloat
    MotoWeatherLiveWallpaper_tinboost_mdpi.apk
    --> if you dont't like moto, you can consider this as bloat
    MotoWeatherPictureRes_tinboost_mdpi.apk
    --> if you dont't like moto, you can consider this as bloat
    MusicGlobal_tinboost_mdpi.apk
    --> bloat
    MusicNowGlobal_tinboost_mdpi.apk
    --> bloat
    NetworkLocation.apk
    --> no bloat
    Phonesky.apk
    --> playstore (old version, can be deleted after automatic update of playstore)
    Quickoffice-Motorola-SP-5_0_104_V_Signed_2012-01-03_10-18-47.apk
    --> no bloat, but i did'nt need it, so i deleted it
    SetupLite.apk
    --> if you dont't like moto, you can consider this as bloat
    SocialGraphCallService.apk
    --> if you dont't like moto, you can consider this as bloat
    SocialGraphService.apk
    --> if you dont't like moto, you can consider this as bloat
    SocialGraphWidget_tinboost_mdpi.apk
    --> if you dont't like moto, you can consider this as bloat
    SocialWidget_tinboost_mdpi.jar
    --> if you dont't like moto, you can consider this as bloat
    Street.apk
    --> streetview
    Swype.apk
    --> no bloat. nice keyboard (better than swype found in playstore, smaller, faster, better keyboard-layouts)
    Talk.apk
    --> i say: no bloat.
    ToggleWidgetsGlobal_tinboost_mdpi.apk
    --> nice toggles, but widgetsoid is better
    Twitter-3.0.0-release.apk
    --> bloat
    Upgrader.apk
    --> ?
    VoiceSearch.apk
    --> no bloat, if you like to talk to your phone
    WorldClock.apk
    --> no bloat, but useless for me
    YouTube.apk
    --> well, i say: bloat.

    Remember, /flex behaves like /system: it's read only. Updates are written to /data/app, so move them to /flex/app and delete previous versions.
    2
    @MadK9 @MauroSZ When using a command that invokes an adb shell command make sure you type in
    Code:
    adb shell su -c "command"
    so that you don't get permission denied message.
    2
    Nice module. Seems to work fine.
    I'll just add in the 66ocmodule script what's necessary to load it on boot.

    That's what i put in my init.d-script:
    Code:
    #!/system/bin/sh 
    
    insmod /system/lib/modules/defymini_smartass2.ko
    echo "smartassV2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    echo 245760 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
    cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

    I'm iterrested in doing that as well.
    Could you please develop this sentence ?
    Slightly OT:

    I played around a little with /system/app and /flex/app and what i found out is, that you can't install anything to /flex/app directly, but this folder behaves like a second /system/app, like an appendix. So i tried to move apps from /system/app to /flex/app and - it worked. I moved them directly (and did not create a symlink in /flex/app), and after reboot, all apps were still working.

    So this is what i did for all important apps that i don't want to Link2SD (via Link2SD :)):

    1. removed all bloat from /flex/app --> 60 MB free
    2. moved all system-apps, that will probably never update, to /flex/app (for example phone.[apk|odex], Calendar*.*, ...)
    3. used SystemCleanup to convert "normal" apps to odexed system apps. If you odex these apps, they store their odex (in general the same as a dalvik-cache-file) in /system/app, not in data-partition. Caution! Some apps do not work after converting. I converted the following apps to odexed system-apps with success: Holo Launcher, Playstore, K9 mail, SuperUser, Wetter.com (guess where i'm from! :) ), CpuSpy, Hacker's Keyboard, Link2SD)

    When there are updates for these "system-apps", then i use SystemCleanup again and integrate the update in the system-app and odex it again.

    HTH,
    Bernd.Defy
    2
    :laugh:
    I will write an init.d script when I have time. :D

    Lovely!!!
    Thanks for all your hard work here on xda!
    Geniuses, thats what you guys are, really!

    Cheers!