Help with init.d script - EVO 4G Q&A, Help & Troubleshooting

I'm trying to tweak my smartass governor settings at boot via an init.d script & sysfs, but everytime I reboot the settings don't take effect. If I run it in the terminal it works fine and sticks, just not at boot. Any ideas why? The permissions are set right. Does the governor get loaded after init.d and overwrite my settings with default? Here's my script.
#!/system/bin/sh
echo "998000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_wakeup_freq
echo "614400" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/up_min_freq
echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_max_freq
echo "2" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sample_rate_jiffies
echo "128000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_up_step
echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_down_step
echo "40" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/min_cpu_load
echo "65" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/max_cpu_load
echo "30000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/down_rate_us
echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/awake_min_freq
Sent from my PC36100 using Tapatalk

Usually the init scripts will set the governor to ondemand after the init.d scripts are ran. You'll have to unpack the boot.img and look through them to see where it is being set.

Damn. So something I can't do from my phone while laying in bed at 6am. I'll rip it from my phone and tear it apart tomorrow and find it. Thanks!!
Sent from my PC36100 using Tapatalk

finadil said:
Damn. So something I can't do from my phone while laying in bed at 6am. I'll rip it from my phone and tear it apart tomorrow and find it. Thanks!!
Sent from my PC36100 using Tapatalk
Click to expand...
Click to collapse
you could have the script spawn another one that waits for it to change the governor and then changes it back, not as clean but it would work without having to modify the boot.img.

Its not so much changing the governor as tweaking its default values. I was feeling lazy so I took the latest sz kernel (which is what I use), extracted it, edited its init scripts so it uses SA as default and my values rezipped and flashed (so it'd mkbootimg). It boots using SA but again its using its own defaults. Guess the only options are recompiling the source with edited values or a post load script?
Sent from my PC36100 using Tapatalk

Try this
Btw, you'll have issues with your rampup step. It has to be a multiple of 38400. So 115200.
Code:
#!/system/bin/sh
if [ -e /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_max_freq ];
then
echo "998000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_wakeup_freq
echo "614400" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/up_min_freq
echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sleep_max_freq
echo "2" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/sample_rate_jiffies
echo "128000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_up_step
echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/ramp_down_step
echo "40" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/min_cpu_load
echo "65" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/max_cpu_load
echo "30000" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/down_rate_us
echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/smartass/awake_min_freq
fi;

Related

Disabling compcache on MCR 3.1 ?

How would i disable compcache on modaco custom rom 3.1 without using the kitchen?
Edit your /system/init.d/ramzswap.sh and comment out the following lines (by putting a "#" sign in front of them.)
Once your file is edited, it should look like this:
Code:
/system/xbin/insmod /system/lib/modules/tun.ko
#/system/xbin/insmod /system/lib/modules/lzo_decompress.ko
#/system/xbin/insmod /system/lib/modules/lzo_compress.ko
#/system/xbin/insmod /system/lib/modules/xvmalloc.ko
#/system/xbin/insmod /system/lib/modules/ramzswap.ko disksize_kb=131072
#/system/xbin/swapon /dev/block/ramzswap0
#echo "10" > /proc/sys/vm/swappiness
echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Once you've saved the file, reboot your phone and you're good.
I tried doing the same thing. I commented out those exact lines and when I reboot it shows I still have a swap file, just half the size it was before. Huh?

Shell Programming Error

I recently wrote a shell program to turn the front LEDs on and off for a flashlight, without having two scripts (one off, one on, which did work). Although the script seems sound to me, i get an error when I run it:
Stderr [: Not Found
Stderr [: Not Found
The script is as follows:
led_status=$(cat /sys/class/leds/flashlight/brightness);
if [ 1 ]
then
if [ "$led_status" = "0" ]
then
echo 3 > /sys/class/leds/flashlight/brightness
fi
fi
if [ "$led_status" = "3" ]
then
echo 0 > /sys/class/leds/flashlight/brightness
fi
I tried the script stripped down a little:
Code:
led_status=$(cat /sys/class/leds/flashlight/brightness);
if [ "$led_status" = "0" ];
then
echo 3 > /sys/class/leds/flashlight/brightness
else
echo 0 > /sys/class/leds/flashlight/brightness
fi
But I get permission denied trying to run it with better terminal pro from emmc with su. I'm not going to be much help, but I'm interested to know if you get this working, and how to run it, and from where.
GScript is the app I use to run scripts as su. It works fine.
But for some reason, I still get the error:
stderr: [: Not Found
I don't know what it's trying to find tbh, but that bracket seems to be a problem.
Code:
led_status=$(cat /sys/class/leds/flashlight/brightness);
if [ "$led_status" = "0" ];
then
echo 3 > /sys/class/leds/flashlight/brightness
else
echo 0 > /sys/class/leds/flashlight/brightness
fi
I just put that code in to gscript and was able to run it fine. It turned both leds on(Really bright) and then I ran it again and it shut both of them off...
Cool script but y not just use an app like lamppu with widgets to do this? or do you have something else your putting together that this is part of?
Hmm. I wonder why mine isn't working then. And I would, but I'm trying to learn more about android and how it works, and running into an error where a bracket becomes a problem confused me to be honest.

[HOW-TO] Enable USB Diag Mode in AOSP

Below are two scripts to enable/disable USB Diag mode on the Samsung Galasy S III. This should work on all CDMA carriers on both Touchwiz and AOSP roms. Curious to hear if this works on Evo LTE AOSP builds. Thanks to toastcfh for the help.
On Touchwiz you can go to the dialer and hit ##3424# > USB Settings and select DM + MODEM + ADB. But for CM10 and AOKP, the scripts must be used. Diag mode is mainly needed to use QPST and other similar CDMA tools... QXDM, CDMA Workshop, DFS, etc.
To enable diag mode run the following...
Code:
#/system/bin/sh
# sets DIAG mode
echo 0 > /sys/class/android_usb/android0/enable
echo 04E8 > /sys/class/android_usb/android0/idVendor
echo 6860 > /sys/class/android_usb/android0/idProduct
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo 1 > /sys/class/android_usb/android0/f_acm/instances
echo diag,acm,adb > /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable
start adbd
setprop sys.usb.state sys.usb.config
To disable diag mode you can reboot the phone or run the following...
Code:
#/system/bin/sh
# sets default USB mode
echo 0 > /sys/class/android_usb/android0/enable
echo 04E8 > /sys/class/android_usb/android0/idVendor
echo 6860 > /sys/class/android_usb/android0/idProduct
echo 1 > /sys/class/android_usb/android0/f_acm/instances
echo mtp,acm,adb > /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable
start adbd
setprop sys.usb.state sys.usb.config
You can use a script manager to run the script. Open script manager, browse to script files on SD card, select script, set to run as SU and hit save. Do this with both scripts. Now you can use the script manager in the Widgets section to create shortcuts on the desktop for easy access. Hopefully these scripts get built into CM10 so this method is no longer needed.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Scripts are attached below. Hit thx. :good:
HA HA HA this is a nice Tut bro i hope u get this for other Sammy devices we already have an AOSP solution for HTC Devices i hated having to boot to EL29 via sdcard just to access the modem
dexter35803 said:
HA HA HA this is a nice Tut bro i hope u get this for other Sammy devices we already have an AOSP solution for HTC Devices i hated having to boot to EL29 via sdcard just to access the modem
Click to expand...
Click to collapse
fixed it... http://forum.xda-developers.com/showthread.php?t=1626638 :good:
autoprime said:
fixed it... http://forum.xda-developers.com/showthread.php?t=1626638 :good:
Click to expand...
Click to collapse
i'm ready to give up on the diag app
Closest I've gotten sofar...
I still haven't gotten this to work on the HTC EVO LTE 4G, but this is what I've gotten so far:
diag.sh:
Code:
#/system/bin/sh
# sets DIAG mode
echo 0 > /sys/devices/virtual/android_usb/android0/enable
echo 04E8 > /sys/devices/virtual/android_usb/android0/idVendor
echo 6860 > /sys/devices/virtual/android_usb/android0/idProduct
echo diag > /sys/devices/virtual/android_usb/android0/f_diag/clients
echo diag,acm,adb > /sys/devices/virtual/android_usb/android0/functions
echo 1 > /sys/devices/virtual/android_usb/android0/enable
start adbd
setprop sys.usb.state sys.usb.config
MTP.sh:
Code:
#/system/bin/sh
# sets DIAG mode
echo 0 > /sys/devices/virtual/android_usb/android0/enable
echo 04E8 > /sys/devices/virtual/android_usb/android0/idVendor
echo 6860 > /sys/devices/virtual/android_usb/android0/idProduct
echo diag > /sys/devices/virtual/android_usb/android0/f_diag/clients
echo diag,acm,adb > /sys/devices/virtual/android_usb/android0/functions
echo 1 > /sys/devices/virtual/android_usb/android0/enable
start adbd
setprop sys.usb.state sys.usb.config
Any help to get this functional would be MUCH appreciated.
autoprime said:
Below are two scripts to enable/disable USB Diag mode on the Samsung Galasy S III. This should work on all CDMA carriers on both Touchwiz and AOSP roms. Curious to hear if this works on Evo LTE AOSP builds. Thanks to toastcfh for the help.
On Touchwiz you can go to the dialer and hit ##3424# > USB Settings and select DM + MODEM + ADB. But for CM10 and AOKP, the scripts must be used. Diag mode is mainly needed to use QPST and other similar CDMA tools... QXDM, CDMA Workshop, DFS, etc.
To enable diag mode run the following...
Code:
#/system/bin/sh
# sets DIAG mode
echo 0 > /sys/class/android_usb/android0/enable
echo 04E8 > /sys/class/android_usb/android0/idVendor
echo 6860 > /sys/class/android_usb/android0/idProduct
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo 1 > /sys/class/android_usb/android0/f_acm/instances
echo diag,acm,adb > /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable
start adbd
setprop sys.usb.state sys.usb.config
To disable diag mode you can reboot the phone or run the following...
Code:
#/system/bin/sh
# sets default USB mode
echo 0 > /sys/class/android_usb/android0/enable
echo 04E8 > /sys/class/android_usb/android0/idVendor
echo 6860 > /sys/class/android_usb/android0/idProduct
echo 1 > /sys/class/android_usb/android0/f_acm/instances
echo mtp,acm,adb > /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable
start adbd
setprop sys.usb.state sys.usb.config
You can use a script manager to run the script. Open script manager, browse to script files on SD card, select script, set to run as SU and hit save. Do this with both scripts. Now you can use the script manager in the Widgets section to create shortcuts on the desktop for easy access. Hopefully these scripts get built into CM10 so this method is no longer needed.
Scripts are attached below. Hit thx. :good:
Click to expand...
Click to collapse
I am on the latest CM10.1 nightly (03-27) with the fairly new 3.4 kernel. I am also on MB1 and have not had issues with updating PRL on it previously. I just tried to run the DIAG.sh script like I have always done to update to the new 16013 PRL and the script failed to work. I got the following error and DFS did not see the device in the port list. Any ideas?
DIAG.sh[8]: can't create /sys/class/android_usb/android0/f_acm/instances: No such file or directory
swiggs98 said:
I am on the latest CM10.1 nightly (03-27) with the fairly new 3.4 kernel. I am also on MB1 and have not had issues with updating PRL on it previously. I just tried to run the DIAG.sh script like I have always done to update to the new 16013 PRL and the script failed to work. I got the following error and DFS did not see the device in the port list. Any ideas?
DIAG.sh[8]: can't create /sys/class/android_usb/android0/f_acm/instances: No such file or directory
Click to expand...
Click to collapse
Yup, same thing here. I believe one of the nightlies near the end of March made this script non-functional. I wish I had the know-how to modify the script to get it to work with the newer nightlies. It's so much nicer doing that, then rolling back to a TW rom then reinstalling a nandroid backup.
uplift777 said:
deleted
---------- Post added at 03:36 PM ---------- Previous post was at 02:49 PM ----------
I just got the same error... What do I do get this working? Thanks...
Click to expand...
Click to collapse
same error as people above? if so.. downgrade to cm10.. not cm10.1.
i have not updated script for newer firmware so it will not work on that.
autoprime said:
same error as people above? if so.. downgrade to cm10.. not cm10.1.
i have not updated script for newer firmware so it will not work on that.
Click to expand...
Click to collapse
Thanks...Im on a mission to restore my IMEI...Hopefully I will be one step closer!
---------- Post added at 05:05 PM ---------- Previous post was at 04:20 PM ----------
autoprime said:
same error as people above? if so.. downgrade to cm10.. not cm10.1.
i have not updated script for newer firmware so it will not work on that.
Click to expand...
Click to collapse
Im assuming I have to go back to the old bootloader prior to CM10.1 Do you know where I can find this bootloader?
I tried to flash back to CM10 and got stuck on the Cynogenmod loading screen...

init.d Yes/No

Can I set up an init.d file to ask if it should execute? I plan to have kernel settings in the file, but I may need to change content depending on the kernel I'm running.
ex.
#!/system/bin/sh
read -p "Run script? (y/n) " DOIT
if [ "$DOIT" = "y" ]; then
echo "19200" > /sys/devices/system/cpu/cpu0/cpufreq/screen_on_min_freq
fi

LG google stock Thefor G4

Woops Cant edit title now Lol.
Anyway, with the system img changing thing for BL locked users, would it be possible to modify a system img and create some sort of stock theme?
If you have access to the Send Command tools and you are running LP then you can modify the system.img.
Also on MM is possible to change things on system partition with send command.
ObiDanKenobi said:
Also on MM is possible to change things on system partition with send command.
Click to expand...
Click to collapse
I think i might start learning how and how to modify stock apps and etc, cus i really want a Google Stock theme for our device, on BL lock, like the G2 has a theme (Although its a rom, but its from where i got the idea)
Someone has done exactly that here: http://forum.xda-developers.com/g4/orig-development/bl-lock-ul-android-6-0-marshmallow-t3459260. They used another theme though
Trimis de pe al meu LG-H815 folosind Tapatalk
ObiDanKenobi said:
Someone has done exactly that here: http://forum.xda-developers.com/g4/orig-development/bl-lock-ul-android-6-0-marshmallow-t3459260. They used another theme though
Trimis de pe al meu LG-H815 folosind Tapatalk
Click to expand...
Click to collapse
Yeah, I'm using that lol
it gave me the idea that maybe its possible to bring back one of the best themes on the G2, really, that theme was amazing.
Anyone wants to work with me on this?
Anyway, this is the theme i want to make for the G4:
http://forum.xda-developers.com/lg-g2/development-d802/rom-google-edition-release-thread-t3262929
(Unless someone that is actually good in this and is willing to risk his G4 does it before me lol )
And Crap i realised i cant do this anyway for two reasons:
1. H815L root injecting for 6.0 isn't possilbe
2. even if it were possible i have no Linux on my PC.
So rip this idea ;-;
You do not have to inject root. I changed for instance the parameters of the governor, getting a much smoother and battery friendly device.
I have no Linux machine either, I have a virtual machine running Linux where I do the dirty work.
ObiDanKenobi said:
You do not have to inject root. I changed for instance the parameters of the governor, getting a much smoother and battery friendly device.
I have no Linux machine either, I have a virtual machine running Linux where I do the dirty work.
Click to expand...
Click to collapse
Teach me the ways Sempai, pls.
Ha ha, that was a good one. I will lay out some steps, but you have to do the dirty work yourself:
First and foremost you have to have a linux (virtual) machine. Using that machine you will be able to
1. extract the system.img from your phone
2. you have to mount the img on the linux file system,
3. you copy the /system/init.qcom.post_boot.sh to your machine (or you edit in place with Linux)
4. at the end of the file you put the following code
# Added modifications by Dan
#
# IO for device and msd
# (switch to cfq sched, set read ahead
echo 256 > /sys/block/mmcblk0/bdi/read_ahead_kb
echo "cfq" > /sys/block/mmcblk0/queue/scheduler
echo 16 > /sys/block/mmcblk0/queue/iosched/back_seek_max
echo 512 > /sys/block/mmcblk1/bdi/read_ahead_kb
echo "cfq" > /sys/block/mmcblk1/queue/scheduler
echo 16 > /sys/block/mmcblk1/queue/iosched/back_seek_max
# Tuning Transmission Control Protocols.
echo "cubic" > /proc/sys/net/ipv4/tcp_congestion_control
echo 1 > /proc/sys/net/ipv4/tcp_timestamps
echo 1 > /proc/sys/net/ipv4/tcp_sack
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling
#echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/align_windows
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boost
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
echo 85 600000:70 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
echo 480000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
echo 480000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
echo 0> /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
echo 384000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
#echo > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor interactive
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/align_windows
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/boost
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse_duration
echo 95 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
echo 1824000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
#echo 633600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
echo 240000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
echo 480000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_slack
echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
# Adjust input parameters
echo 1 > /sys/module/cpu_boost/parameters/input_boost_enabled
echo 0:600000 1:600000 2:600000 3:600000 4:0 5:0 > /sys/module/cpu_boost/parameters/input_boost_freq
echo 0 > /sys/module/cpu_boost/parameters/boost_ms
echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
echo 0 > /sys/module/msm_performance/parameters/touchboost
5. you copy the file back (or you save if you edited in place).
6. you unmount the image from your linux system
7. you copy the system.img to your internal sd on the phone
8. you push the system.img the phone using send_command
9. profit.
that's it. As you can see there is not much to it
ObiDanKenobi said:
Ha ha, that was a good one. I will lay out some steps, but you have to do the dirty work yourself:
First and foremost you have to have a linux (virtual) machine. Using that machine you will be able to
1. extract the system.img from your phone
2. you have to mount the img on the linux file system,
3. you copy the /system/init.qcom.post_boot.sh to your machine (or you edit in place with Linux)
4. at the end of the file you put the following code
# Added modifications by Dan
#
# IO for device and msd
# (switch to cfq sched, set read ahead
echo 256 > /sys/block/mmcblk0/bdi/read_ahead_kb
echo "cfq" > /sys/block/mmcblk0/queue/scheduler
echo 16 > /sys/block/mmcblk0/queue/iosched/back_seek_max
echo 512 > /sys/block/mmcblk1/bdi/read_ahead_kb
echo "cfq" > /sys/block/mmcblk1/queue/scheduler
echo 16 > /sys/block/mmcblk1/queue/iosched/back_seek_max
# Tuning Transmission Control Protocols.
echo "cubic" > /proc/sys/net/ipv4/tcp_congestion_control
echo 1 > /proc/sys/net/ipv4/tcp_timestamps
echo 1 > /proc/sys/net/ipv4/tcp_sack
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling
#echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/align_windows
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boost
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
echo 85 600000:70 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
echo 480000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
echo 480000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
echo 0> /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
echo 384000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
#echo > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor interactive
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/align_windows
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/boost
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse_duration
echo 95 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
echo 1824000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
#echo 633600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
echo 240000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
echo 480000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_slack
echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
# Adjust input parameters
echo 1 > /sys/module/cpu_boost/parameters/input_boost_enabled
echo 0:600000 1:600000 2:600000 3:600000 4:0 5:0 > /sys/module/cpu_boost/parameters/input_boost_freq
echo 0 > /sys/module/cpu_boost/parameters/boost_ms
echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
echo 0 > /sys/module/msm_performance/parameters/touchboost
5. you copy the file back (or you save if you edited in place).
6. you unmount the image from your linux system
7. you copy the system.img to your internal sd on the phone
8. you push the system.img the phone using send_command
9. profit.
that's it. As you can see there is not much to it
Click to expand...
Click to collapse
Is possible to modify /system/init.qcom.post_boot.sh for disable the 2 big core or keep them to a low frequency on the system.img of MM?
Yes there is: you should add at the end of the file the following:
echo 0 > /sys/devices/system/cpu/cpu4/online
echo 0 > /sys/devices/system/cpu/cpu5/online
I missed the biggest opportunity to test this stuff, I was lazy and did not make a image with the cores disabled. Wednesday the phone went into bootloop, but now I have no way of copying the image into the internal storage to send it via send_command. After a couple of hours of trying to mount the sdcard in download mode, I gave up, and now the courier will pickup the phone to go to LG service center, as I have warranty.
I kept on asking some people how to change/create a tot file for these situations, but until now I got no info, so if the bootloop hits, you have to have the img file already on your internal storage. Even then, when the cores are disabled using post_boot.sh there is no guarantee that it will work, but I missed the chance to test this.

Categories

Resources