[Q] UV on faux123 2.4r - HTC Sensation

so after searching the forums i found:
1) faux clock
2) system tuner
3) init.d scripts
with (2) vdd values dont persist & revert to stock after a while for some unknown reason.
with (3) the vdd table doesnt change at all, except when the same commands in script are entered through adb.
i havent tried (1). i've had the most success with (3), but having to do it through adb every reboot is a bother. how are you guys doing it?

kaof said:
so after searching the forums i found:
1) faux clock
2) system tuner
3) init.d scripts
with (2) vdd values dont persist & revert to stock after a while for some unknown reason.
with (3) the vdd table doesnt change at all, except when the same commands in script are entered through adb.
i havent tried (1). i've had the most success with (3), but having to do it through adb every reboot is a bother. how are you guys doing it?
Click to expand...
Click to collapse
I'm using FauxClock 0.8.0 and resetting if it reboots.
I like the fact that it resets the UV on a boot, so that if I've UV'd too low it resets to be usable on a boot.

gol_n_dal said:
I'm using FauxClock 0.8.0 and resetting if it reboots.
I like the fact that it resets the UV on a boot, so that if I've UV'd too low it resets to be usable on a boot.
Click to expand...
Click to collapse
I think fauxclock 0.8 is your best option. 0.75 has some compatibility problem so do not use it.
If you want to use a scrip. I would put the corresponding code in the /etc/init.post_boot.sh
Code:
echo "-50000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
Reboot and then check the vdd table.
If init.post_boot.sh does not exist, do the following in the terminal emulator
Code:
touch /system/etc/init.post_boot.sh
chmod a+x /system/etc/init.post_boot.sh
vi /system/etc/init.post_boot.sh
After successfully creating the init.post_boot.sh, then write this in it:
Code:
#!/system/bin/sh
<YOUR COMMANDS GO HERE>

gol_n_dal said:
I'm using FauxClock 0.8.0 and resetting if it reboots.
I like the fact that it resets the UV on a boot, so that if I've UV'd too low it resets to be usable on a boot.
Click to expand...
Click to collapse
Scripts make a cleaner mod, try it someday!
You can UV individual frequencies, and after you get it right it's just set-it-and-forget-it.

yungyeh said:
I think fauxclock 0.8 is your best option. 0.75 has some compatibility problem so do not use it.
If you want to use a scrip. I would put the corresponding code in the /etc/init.post_boot.sh
Code:
echo "-50000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
Reboot and then check the vdd table.
If init.post_boot.sh does not exist, do the following in the terminal emulator
Code:
touch /system/etc/init.post_boot.sh
chmod a+x /system/etc/init.post_boot.sh
vi /system/etc/init.post_boot.sh
After successfully creating the init.post_boot.sh, then write this in it:
Code:
#!/system/bin/sh
<YOUR COMMANDS GO HERE>
Click to expand...
Click to collapse
Lesson learnt - UV scripts in system/etc/init.d don't work, but editing init.post_boot.sh does!
Works like a charm, thanks so much!

kaof said:
Lesson learnt - UV scripts in system/etc/init.d don't work, but editing init.post_boot.sh does!
Works like a charm, thanks so much!
Click to expand...
Click to collapse
Have to make sure that the init.d scripts have the right permissions for them to work ^_^

Kohr-Ah said:
Have to make sure that the init.d scripts have the right permissions for them to work ^_^
Click to expand...
Click to collapse
What are the right permissions?
I tried
Code:
adb shell
chmod 777 system/etc/init.d/scriptName
and it didn't work!

Related

[KERNEL] cpufreq_interactive module for HTC's OTA 2.6.32.15-gf9c0527 kernel

cpufreq: interactive: New 'interactive' governor
New interactive governor.
This governor is designed for latency sensitive workloads, UI interaction for
example.
Advantages:
+ significantly more responsive to ramp cpu up when required (UI interaction)
+ more consistent ramping, existing governors do their cpu load sampling in a
workqueue context, the 'interactive' governor does this in a timer context, which
gives more consistent cpu load sampling.
+ higher priority for cpu frequency increase, rt_workqueue is used for scaling
up, giving the remaining tasks the cpu performance benefit, unlike existing
governors which schedule rampup work to occur after your performance starved
tasks have completed.
Existing governors sample cpu load at a particular rate, typically
every X ms. Which can lead to under powering UI threads when the user has
interacted with an idle system until the next sample period happns.
The 'interactive' governor has a different approach. Instead of sampling the cpu
at a specified rate, the governor will scale the cpu frequency up when coming
out of idle. When the cpu comes out of idle, a timer is configured to fire
within 1-2 ticks. If the cpu is 100% busy from exiting idle to when the timer
fires then we assume the cpu is underpowered and ramp to MAX speed.
If the cpu was not 100% busy, then the governor evaluates the cpu load over the
last 'min_sample_rate' (default 50000 uS) to determine the cpu speed to ramp down
to.
There is only one tuneable for this governor:
/sys/devices/system/cpu/cpufreq/interactive/min_sample_rate:
The minimum ammount of time to spend at the current frequency before
ramping down. This is to ensure that the governor has seen enough
historic cpu load data to determine the appropriate workload.
Default is 5000 uS.
Click to expand...
Click to collapse
Load the module with:
Code:
insmod /system/lib/modules/cpufreq_interactive.ko nr_running_addr=0x`grep nr_running /proc/kallsyms|cut -c1-8`
Activate governor with:
Code:
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Well, this seems promising, however, when loading the module with the command you gave, I got something in the lines of:
insmod init fail wrong argument
Click to expand...
Click to collapse
Either way, I loaded it with the command insmod cpufreq_interactive.ko and set the governor, however, cpu frequency seems to be stuck at 998MHz?
Any thoughts?
You have to provide the "nr_running_addr" parameter with the correct memory addr. Try grepping the addr with:
Code:
grep nr_running /proc/kallsyms|cut -c1-8
This should return something like c0057280. Provide this on insmod to kernel module:
Code:
insmod /system/lib/modules/cpufreq_interactive.ko nr_running_addr=0xc0057280
Without the correct nr_running_addr the module most likely won`t work!
Works fine here!
Do I have to execute those commands every time I reboot?
You can use the example init script included in zip. It executes the needed command on boot...
Ok... got it.
Might wanna add that you have to push that script to /system/etc/init.d/
The powersave governor...
tun.ko module
Hi,
thanks for the modules. I need the tun.ko module for this kernel. Can you provide it please. Or can you tell me how to get to the sources of this kernel, or is there a list of all compiled modules where it can be downloaded.
Thanks in advance
Regards
Roger
Attached all modules I use on 2.6.32.15-gf9c0527...
Good! Thanks for your work
+10
any chance for OC : )
Yes, if you are kernel hacker and have enough knowledge, you could spend some time at http://code.google.com/p/milestone-overclock/wiki/Disassembly and write a module for HTC kernels.
Or just wait for HTC to release the kernel source...
how do i apply the powersave governor
i have the insmod command into the init.d scripts.....
the interactive governor gets detected by setcpu but the powersave does not....how do i activate it and what's the difference ????
lambrospower said:
how do i apply the powersave governor
i have the insmod command into the init.d scripts.....
the interactive governor gets detected by setcpu but the powersave does not....how do i activate it and what's the difference ????
Click to expand...
Click to collapse
Would I be correct in saying that you need to edit the script to have:
echo "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
below the 'insmod' command? I am not 100% sure and too tired to test right now, but I plan to use ADB (for the first time finally!) to push these .ko modules to /system/lib/modules, and their scripts to /system/etc/init.d/. I hope this method will make the .ko module active on boot, and then I can switch to use it (interactive OR powersave) in SetCPU. Please let me know if I am correct.
Also, can someone please confirm my suspicions that I need to push these files while in Recovery mode? (hence, getting rw access to /system).
Thanks in advance!
no i fixed it yesterday,....you just have to insmod the powersave module....then it's selectable in setcpu
Heya FloHimself,
Thanks for this new governor. I am excited to use it, however I am having some problems activating it. As I said in my previous post, I have not used ADB before to push files, however I just did it, and it appears to work successfully, but SetCPU does not show me the Interactive OR Powersave governors...below is what I did:
1. Booted to Clockwork Recovery
2. Went to PARTITIONS --> Mount System
3. Plugged in USB cable
4. Ran "ADB remount"
5. Pushed the .ko modules to /system/lib/modules
6. Pushed the scripts to /system/etc/init.d
7. Verified existence of files by running ADB shell, then LS /system/lib/modules + /system/etc/init.d
Code:
C:\android-sdk-windows\tools>adb shell
~ # ls /system/lib/modules
ls /system/lib/modules
bcm4329.ko cpufreq_powersave.ko tun.ko
cpufreq_interactive.ko perflock_disable3215.ko
~ # ls /system/etc/init.d
ls /system/etc/init.d
02cachedalvikcache 40cpufreq_powersave 99complete
30cpufreq_interactive 90fixes
40a2sd 97perflock
~ # exit
exit
8. Saw the files were there, so disconnected my Desire
9. Unmounted /system back in Clockwork Recovery
10. Rebooted.
Upon getting back into Android, I used ES File Explorer to browse to the /system/lib/modules + /system/etc/init.d folders and indeed saw the 4 files that I pushed (2 .ko and 2 scripts). After rebooting a few times, I still cannot get SetCPU to see these governors, it's just the default 3 of "userspace / ondemand / performance".
Is there something that I'm missing? I am surely running a rooted FroYo ROM (LeeDroid v1.8a to be exact, with the OTA 2.6.32.15-gf9c0527 kernel) and I believe I pushed the files correctly.
Any guidance or tips would be greatly appreciated!
Thanks in advance!
Many thanks for this
Got both running powersave and interactive... Is there a explaination how they scale?
xtcislove said:
Many thanks for this
Got both running powersave and interactive... Is there a explaination how they scale?
Click to expand...
Click to collapse
The first post has a pretty good explanation of how the interactive module works, but yea I guess it's hard to tell how they scale (could be two different things...working and scaling)...
I really want to use this but am at a stand still as per my post above...xtcislove, how exactly did you install+activate them? I don't know what I could have done wrong in my methods above...
** EDIT ** - OK I am making some headway here...I have installed the module and script fine, however they weren't getting executed on boot. I then connected back to ADB SHELL, then manually ran the commands from the first/original post. After that, SetCPU shows the Interactive governor! It works great because it stays at 245mhz constant (when idle) and doesn't jump up and down like the "ondemand" one.
Now I just need some help with getting these commands to run automatically upon system startup. I thought that having the script in the /system/etc/init.d folder would mean that it gets run when the system starts, but it doesn't appear to do so...
Many thanks to anyone who can help...I'm so close and I feel that battery life will be greatly improved!
There should be an entry in /init.rc to run the stuff from etc/init.d. However, if it's missing, there is an unused script, started automatically by init: /system/etc/install-recovery.sh. Of course, it's misssing in (at least official) HTC ROMs, but that's the good news. Just put there a script to execute run-parts /system/etc/init.d. A script like this will work:
Code:
#!/system/bin/sh
# hook into the system startup sequence, /system/etc/install-recovery.sh
CM_FILESYSTEM_READY=$(getprop cm.filesystem.ready)
if [ "x$CM_FILESYSTEM_READY" = "x" ]; then
BUSYBOX=/system/xbin/busybox
if [ -x "$BUSYBOX" ]; then
SYSINITDIR=/system/etc/init.d
if [ -d "$SYSINITDIR" ]; then
log -t SysInit "Starting sysinit scripts from $SYSINITDIR"
/system/bin/logwrapper "$BUSYBOX" run-parts "$SYSINITDIR"
fi
else
log -p e -t SysInit "No $BUSYBOX found, skipping sysinit"
fi
else
log -p w -t SysInit 'sysinit is already completed, skipping'
fi
# EOF
Put it on your device via recovery (adb shell mount /system; adb push install-recovery.sh /system/etc; adb shell chmod 755 /system/etc/install-recovery.sh).
how do i make this file with a txt-editor
or can you make this file for me and upload it here
can i push the files through android commander

[DEV] Script for tweaks (version 1.02) 18-12-2010

Here is a script i've made (had nothing to do, so...).
Phone must be rooted and have busybox installed.
What first menu looks like:
1 - enable/disable hardware acceleration
2 - enable/disable jit
3 - enable/disable stagefright player
4 - change heapsize
s - show status
r - revert to original configuration
q - quit (don't forget to reboot your phone!)
==================
enter your option:
Click to expand...
Click to collapse
Download:
http://www.4shared.com/file/gApTB6EG/tweaks.html
md5 b0865d9de67a82215913512cb644211d
Just copy the file to your sdcard. Then in a terminal emulator run:
su
cat /sdcard/tweaks > /data/tweaks
rm /sdcard/tweaks
cd /data/
./tweaks
If it doesn't run, type first:
chmod 755 /data/tweaks
Additional notes:
Script does not work if run from sdcard, must be in /data/ or /system/ (this one goes to allsalvati for testing)
---
If anything is wrong i will fix it, but only if you give me feedback
If you know any good tweaks, say it and i'll add them.
---
Changelog:
version 1.02:
backup/restore added
version 1.01d:
working again. sorry for the mess...
version 1.01c:
nothing new. just rearranging code
version 1.01b:
messages were not staying in output. fixed
version 1.01a:
small fix. v1.01 was not working
version 1.01:
added status menu
ruigui said:
Here is a script i've made (had nothing to do, so...). Phone must have busybox.
Download:
http://www.4shared.com/file/gApTB6EG/tweaks.html
md5 ea568c399c67ecd87db0dd790cdf0e93
Just copy the file to your sdcard. Then in a terminal emulator run:
cd /sdcard/
./tweaks
If it doesn't run, type first:
chmod 777 /sdcard/tweaks
Please give me some feedback. I don't own the phone so i can't test.
Click to expand...
Click to collapse
what the script does?
So script should be able to do:
enable/disable hw acceleration
enable/disable jit
enable/disable stagefright player
change heapsize
Yes. For now it's what it does.
The ideia is to be able to enable/disable a certain tweak, without reflashing zips, and rewriting files in phone.
But i need some feedback to know if it is working. I can't test it.
It will only change values in /data/local.prop, nothing else.
It seems that it is well written, so I will try that and let you know what's happened.
Thanks for testing. I'm still waiting to have some money so i can buy this phone...
Meanwhile, i'm "playing" with ROMs and files. I'm not good at scripting, but i'm trying to learn while doing something useful.
How much did you increase the heap size?
domenic_s said:
How much did you increase the heap size?
Click to expand...
Click to collapse
I didn't increase it. Script shows this message:
"default=24, recommended=32"
"enter new heapsize value (1-64): "
You can enter any value between 1 and 64.
If you enter any other value, or a string, character, symbol... script will show this message:
"wrong value"
"please input a value between 1 and 64"
For those who don't feel like editing this themselves this is great. Thanks for releasing it for people to try out more tweaks on stock ROMs.
i'm trying to run this script and gives me the following message: ./tweaks: permission denied
Before anything i typed su, then chmod 777 and it gave me error.
It should work be working...
Anyone else confirms this issue? Is this script running or not?
If it is working and there are more tweaks, i can easilly add them to the script.
If this is an isolated case, i really can't help. I don't own an android phone (yet), so i can't test....
allsalvati do you have busybox installed?
No, i don't.
Sent from my LG-P500h using XDA App
That may be your issue.
You must mount /system/ as read-write, then copy busybox binary to /system/xbin/, then run these commands in terminal emulator:
su
cd /system/xbin
/system/bin/chmod 755 busybox
./busybox --install -s /system/xbin
After that you can mount /system/ as read only again, and reboot your phone.
I don't know if there is another way to install it that is easier.
I downladed busybox installer from market and the app says that was installed. The. /tweaks gives me the same message.
How do i test if busybox was installed right?
Sent from my LG-P500h using XDA App
I found this:
That is a problem, you cannot chmod a script to executable on the SD card. (well some things can, but 99% no) the system is designed to prevent u executing scripts from an SD card
cp it to /system/xbin or /system/bin.
Or if u hate to see it in system', use /data/
THEN chmod it. should be fine to run
Click to expand...
Click to collapse
Try to copy the file to /data/ (so you don't mess with /system/), and then try to run it with:
cd /data/
chmod 777 tweaks
./tweaks
It should not need to be run as root
Moved to /data and worked.
I changed heap size to 32 and disabled hardware accelaration just to test.
With hw acc - 981 on Quadrant
Without - 820
So i think this is working.
Perhaps you should print the values so the user can see what is enabled or not before apply.
Thanks for your help
Sent from my LG-P500h using XDA App
Can you test something for me?
Make sure you have hardware acceleration disabled, and reboot you phone.
Then open terminal and run:
getprop | grep hw (see what it outputs)
then run the script, enable hardware acceleration on it, but DON'T reboot your phone yet.
Then exit script, and run again:
getprop | grep hw
Has the value changed, or is it the same?
I need to know if the system assumes immediately any changes (although they may not be functional until reboot).
This is needed to work on your request.
allsalvati said:
Perhaps you should print the values so the user can see what is enabled or not before apply.
Click to expand...
Click to collapse
I'll work on that and post an update after someone tries what i asked above.
Thanks for testing
EDIT: to test benchmarks, enable/disable jit. It gives greater differences in values
I tried what you say and both outputs are the same:
$getprop | grep hw
[debug.sf.hw]: [0]
[hw.keyboards.65537.devname]: [7k_handset]
[hw.keyboards.65540.devname]: [thunder_keypad]
[hw.keyboards.65541.devname]: [touch_mcs6000]
[hw.keyboards.65542.devname]: [atcmd_virtual_kbd]
Edit: Tested disabling JIT and it worked. Linpack Before 7.35 - After 4.3
So i can't rely on getprop to check current values...
If anything is changed, getprop won't give the right output till reboot.
Damn... Script was almost updated. Now i must find a new way and redo this section.
Thanks for testing again
EDIT:
New version for download at first post. status menu added.
I think it's all ok.
It seems work fine on my phone. But I can't see the status. When I choose to see current status or status after reboot, the screen of my emulator returns too fast to the selection menu (show curent status or after reboot) and I can't see anything !

For those of you having issues with the new ASOP Kernels

I found that I was having an issue with most of the new kernels and after much research I found that it was due to the HAVS being very aggressive from stock to make the kernel better at battery preservation.
To fix this you need to build a script and dump it on your phone so it loads every boot. This was hard to find all the info in one place so I figured I would put it all together here.
Ok here we go, first grab the file you need from your phone doing a cut and paste of the following commands
adb shell
cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
Copy and paste this out into a text editor
Then adjust the script voltages such as I did in the following example
#!/system/bin/sh
echo "19200 975 1000" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
echo "128000 1000 1025" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
echo "245000 1000 1025" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
echo "384000 1000 1025" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
echo "422400 1000 1050" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
echo "460800 1000 1050" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
echo "499200 1000 1050" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
echo "537600 1025 1075" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
echo "576000 1050 1100" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
echo "614400 1050 1125" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
echo "652800 1100 1150" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
echo "691200 1100 1175" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
Just change the numbers in the right to match what voltage you need to use to keep your phone from rebooting.
Now we need to get the file on the phone but we need permissions so run
adb remount
once you do that you need to push the script back to the phone using the adb push command
adb push c:\filename /etc/init.d/filename
This will put the file there but you need to chanage the permissions so that it can run on each boot.
adb shell
chmod 755 /etc/init.d/filename
once this is done you can reboot again to dump the values or you can do the following command.
./etc/init.d/filename
That should do it
YOu can do to check
cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
The above values were just ones I was playing around with my phone seems to have issues at the bottom of the range so I bumped those up a bit and it seemed to work fine!
Let me know if you need any help with this as it was a pain finding all the info and putting it all together.
Props to ziggy at http://www.ziggy471.com/2011/01/21/beta-kernel-21-jan-11/
as he was the one where I got most of the info.
like which kernels and what versions would this apply too?
I have had to do it to the SZ and Tiamat kernels, but this is only if you phone is boot looping with the stock and you believe its due to voltage. I was having a problem with ever rom and kernel that was using HAVS with my phone and this was the only way I could get it to boot and stabilize.
Again its not for everybody and I would assume that you can make you phone not boot, but you could also use this to drop the voltage to save more battery but you might make it so you phone boot loops and you would be stuck going to back to a nandroid or stock kernel again.
Seagrizzly said:
I have had to do it to the SZ and Tiamat kernels, but this is only if you phone is boot looping with the stock and you believe its due to voltage. I was having a problem with ever rom and kernel that was using HAVS with my phone and this was the only way I could get it to boot and stabilize.
Again its not for everybody and I would assume that you can make you phone not boot, but you could also use this to drop the voltage to save more battery but you might make it so you phone boot loops and you would be stuck going to back to a nandroid or stock kernel again.
Click to expand...
Click to collapse
im running the nosbc savage-zen with no issues.
fixxxer2008 said:
im running the nosbc savage-zen with no issues.
Click to expand...
Click to collapse
I also have the same issues with OP. Any kernel that has HAVS will put my phone on a constant bootloop (savage zen with or without sbc) or either get it to load fine (Tiamat), but will then lock after a few seconds and reboot.
fixxxer2008 said:
im running the nosbc savage-zen with no issues.
Click to expand...
Click to collapse
Same.. no issues here with that kernel.
thanks! great post.
i wrote a script figured i'd upload it here.
this is savaged-zen 1.0.1 stock voltage -50
it can be edited with whatever voltages you want, but make sure you save it as plain text.
just push this following the instructions in the OP but remove the .txt file extension.
Hey cool and thanks for the script, to repeat for those saying things work fine for them. That is awesome but some of us were having an issue running any of the HAVS kernels at all and thus why I had to do this fix to get my phone stable and using the new kernels, by the way I have had awesome battery life with my changes after about 12 hours only down to 79% using the tiamat 3.3.3 kernel as a base with my changes, I would only have to assume that if you could run the kernel with HAVS stock it would only be better so props goes out to the dev for that.
This is the only SBC Rom that doesn't reboot for me SBC-htc-15. I forget what Rom I was using with it but I'm using CM7 RC4 now. I'm not really sure how to do what is suggested so is there another option that might be easier?
thanks
It's so strange how we all have the same phone, yet some are very picky with HAVS and lower voltages and some are completely fine with it.
Gonna try it because my battery on CM7 has been...6 hours?
Android 17 said:
It's so strange how we all have the same phone, yet some are very picky with HAVS and lower voltages and some are completely fine with it.
Click to expand...
Click to collapse
Not really, no two cores are the exact same. The way they design them calls for them to be within an acceptable range only.
Definitely already seeing a massive improvement in battery efficiency, thanks.

[kernel module] smartassV2 governor for Defy Mini

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!
Bernd.Defy said:
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!
Click to expand...
Click to collapse
Is it also working for defy? or why is it on this forum?
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 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.
rootdefyxt320 said:
@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.
Click to expand...
Click to collapse
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.
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 ----------
Bernd.Defy said:
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.
Click to expand...
Click to collapse
I'm iterrested in doing that as well.
Could you please develop this sentence ?
Bernd.Defy said:
(inkl. odexing to prevent creating files in /data/dalvik-cache)
Click to expand...
Click to collapse
Guitwo2 said:
Nice module. Seems to work fine.
I'll just add in the 66ocmodule script what's necessary to load it on boot.
Click to expand...
Click to collapse
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
Guitwo2 said:
I'm iterrested in doing that as well.
Could you please develop this sentence ?
Click to expand...
Click to collapse
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
@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.
MauroSZ said:
...if there are any apps originally in flex/app that we should NOT regarding as bloatware ? Which ? Thanks in advance.
Click to expand...
Click to collapse
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?
Thanks a bunch!
Bernd.Defy said:
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!
Click to expand...
Click to collapse
Operation not permitted
Hi Bernd,
Here is a screenshot after I entered the command you suggested:
Thanks,
Klaus
MadK9 said:
Hi Bernd,
Here is a screenshot after I entered the command you suggested:
Thanks,
Klaus
Click to expand...
Click to collapse
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://forum.xda-developers.com/showthread.php?t=2676423
rootdefyxt320 said:
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://forum.xda-developers.com/showthread.php?t=2676423
Click to expand...
Click to collapse
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
MadK9 said:
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
Click to expand...
Click to collapse
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!
rootdefyxt320 said:
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.
Click to expand...
Click to collapse
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...
Thanks for your time.
MadK9 said:
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...
Thanks for your time.
Click to expand...
Click to collapse
I will write an init.d script when I have time.
:laugh:
rootdefyxt320 said:
I will write an init.d script when I have time.
Click to expand...
Click to collapse
Lovely!!!
Thanks for all your hard work here on xda!
Geniuses, thats what you guys are, really!
Cheers!
MadK9 said:
:laugh:
Lovely!!!
Thanks for all your hard work here on xda!
Geniuses, thats what you guys are, really!
Cheers!
Click to expand...
Click to collapse
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. Enjoy.
@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.
rootdefyxt320 said:
@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.
Click to expand...
Click to collapse
For while i can't do anything but I will always hit thanks. I am waiting either my wife or my son to leave her/his device in my hand.

[SOLVED] [Q] [CM 10.2] Two questions about USB debugging and fsync control

Hello.
1. I can't find development/enable USB debugging. Where did it go?
2. I found '/sys/module/sync/parameters/fsync_enabled'.
I assume kernel support for fsync control is available.
Is that exposed in a UI? Or do I have to set it via a script?
What is the recommended way to execute stuff at start up? [I don't see /etc/rc.local available ]
BTW, executing 'exit' in terminal seems to get stuck here. Can someone confirm?
* I'm experience in GNU/Linux and *nix in general but I'm new to Android.
tf700_13 said:
Hello.
1. I can't find development/enable USB debugging. Where did it go?
2. I found '/sys/module/sync/parameters/fsync_enabled'.
I assume kernel support for fsync control is available.
Is that exposed in a UI? Or do I have to set it via a script?
What is the recommended way to execute stuff at start up? [I don't see /etc/rc.local available ]
BTW, executing 'exit' in terminal seems to get stuck here. Can someone confirm?
* I'm experience in GNU/Linux and *nix in general but I'm new to Android.
Click to expand...
Click to collapse
1. Go to settings and about, click the build number 7 times and developer options will be made available.
2. Usually set it via a startup script. Assuming the cm10 kernel supports it.
sbdags said:
1. Go to settings and about, click the build number 7 times and developer options will be made available.
Click to expand...
Click to collapse
Done! Thanks.
2. Usually set it via a startup script. Assuming the cm10 kernel supports it.
Click to expand...
Click to collapse
Is there a recommended way/app to manage startup scripts?
And just to make sure, /sys/module/sync/parameters/fsync_enabled is set to 1. I need to set it to 0 to disable fsync (not some other value), right?
tf700_13 said:
Done! Thanks.
Is there a recommended way/app to manage startup scripts?
And just to make sure, /sys/module/sync/parameters/fsync_enabled is set to 1. I need to set it to 0 to disable fsync (not some other value), right?
Click to expand...
Click to collapse
Yes set it to 0. Just echo it in a script. In my ROM I use init.d enabled scripting to achieve this. I think cm uses the same theory but does it slightly differently.
I'll post my script later when I get home.
sbdags said:
Yes set it to 0. Just echo it in a script. In my ROM I use init.d enabled scripting to achieve this. I think cm uses the same theory but does it slightly differently.
I'll post my script later when I get home.
Click to expand...
Click to collapse
I know how to write scripts And yes, /etc/init.d/ is used.
So all I need is adding a file there (e.g. 80disablefsync) with content:
Code:
#!/system/bin/sh
echo 0 > /sys/module/sync/parameters/fsync_enabled
Assuming that is correct, I'm stuck now at writing a file there.
The *nix way 'mount -o remount,rw /' is not working.
Read-only file system error didn't go away.
tf700_13 said:
The *nix way 'mount -o remount,rw /' is not working.
Read-only file system error didn't go away.
Click to expand...
Click to collapse
You have to remount /system, not /.
Another workaround: You could use /data/userinit.d instead (don't know if that is the exact name).
_that said:
You have to remount /system, not /.
Another workaround: You could use /data/userinit.d instead (don't know if that is the exact name).
Click to expand...
Click to collapse
I could have sworn I didn't see a mount point for /system earlier.
Anyway all is good now.
Thank you guys.
The only problem remaining is C-d not exiting in terminal. and executing exit afterwards gets stuck. But that's not a big deal.
tf700_13 said:
The only problem remaining is C-d not exiting in terminal. and executing exit afterwards gets stuck. But that's not a big deal.
Click to expand...
Click to collapse
Preferences -> Close window on exit [x] ?
_that said:
Preferences -> Close window on exit [x] ?
Click to expand...
Click to collapse
That's already checked and works.
The problem is, CTRL-d is an escape sequence that should exit and it's not working when you're root.

Categories

Resources