How to get init.d support on MIUI 7? - Redmi Note 2 Q&A, Help & Troubleshooting

Hey everyone,
I've been failing miserably to get init.d support on the MIUI 7 developer roms for the Redmi Note 2 and tried every possible thing from this thread on XDA: http://forum.xda-developers.com/showthread.php?t=1933849. I found a couple of posts regarding init.d support on en.miui.com as well, but they are all targeted at MIUI 5/6. Is there anyone who can help me out with this? I would love to get the support to prevent data from leaking at boot (firewall).
Thanks!
Edit 24/01: Flashed Namaless' MIUI Speed MOD which enabled init.d support. Scripts are being executed correctly on boot.

Smiui ?
Have you tried the smiui rom ? http://www.smiui.net/
It works OK on my Redmi Note 2 Prime and claims to have init.d support although I haven't used this feature yet.
Discussed here
http://forum.xda-developers.com/redmi-note-2/development/rom-smiui-rom-kitchen-major-xiaomi-t3225567
I'm using Miui 7 5.11.19

elaurens said:
Hey everyone,
I've been failing miserably to get init.d support on the MIUI 7 developer roms for the Redmi Note 2 and tried every possible thing from this thread on XDA: http://forum.xda-developers.com/showthread.php?t=1933849. I found a couple of posts regarding init.d support on en.miui.com as well, but they are all targeted at MIUI 5/6. Is there anyone who can help me out with this? I would love to get the support to prevent data from leaking at boot (firewall).
Thanks!
Click to expand...
Click to collapse
Pal, this 'switcher' made the magic for me, https://play.google.com/store/apps/details?id=com.broodplank.initdtoggler&hl=it
Redmi Note 2 Prime Dev EU 5.11.1 here

fourlans said:
Have you tried the smiui rom ? http://www.smiui.net/
It works OK on my Redmi Note 2 Prime and claims to have init.d support although I haven't used this feature yet.
Discussed here
http://forum.xda-developers.com/redmi-note-2/development/rom-smiui-rom-kitchen-major-xiaomi-t3225567
I'm using Miui 7 5.11.19
Click to expand...
Click to collapse
Thanks for the tip. Gonna use that as a last resort as I'd rather just run the Chinese developer rom + init.d support (don't really need any of the other features which smiui offers).

oldslowdiver said:
Pal, this 'switcher' made the magic for me, https://play.google.com/store/apps/details?id=com.broodplank.initdtoggler&hl=it
Redmi Note 2 Prime Dev EU 5.11.1 here
Click to expand...
Click to collapse
Installed on 5.11.19 and enabled AfWall+ data leaking fix (script on startup), but it's still not running. Can you tell me which script you managed to get running after enabling init.d through the toggler app?
Thx.

elaurens said:
Installed on 5.11.19 and enabled AfWall+ data leaking fix (script on startup), but it's still not running. Can you tell me which script you managed to get running after enabling init.d through the toggler app?
Thx.
Click to expand...
Click to collapse
These ones:
Strict min free
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
VM Management
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
Normalize Sleeper
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
---------- Post added at 06:17 PM ---------- Previous post was at 06:12 PM ----------
oldslowdiver said:
These ones:
Strict min free
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
VM Management
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
Normalize Sleeper
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
Click to expand...
Click to collapse
You know what.. they actually won't work! I was sure they did, I just checked, and they actually don't. Still, Init.d is enabled.. wtf?

oldslowdiver said:
These ones:
Strict min free
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
VM Management
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
Normalize Sleeper
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
---------- Post added at 06:17 PM ---------- Previous post was at 06:12 PM ----------
You know what.. they actually won't work! I was sure they did, I just checked, and they actually don't. Still, Init.d is enabled.. wtf?
Click to expand...
Click to collapse
Yeah see.. that's my problem with it I can't find the thread back on en.miui.com's forum, but I read earlier today that MIUI uses another way to launch scripts on startup. No further explanation was given though. Weird, maybe I should try the sMIUI ROM and see what it gives.

Enable Init.d on Redmi Note 2
elaurens said:
Yeah see.. that's my problem with it I can't find the thread back on en.miui.com's forum, but I read earlier today that MIUI uses another way to launch scripts on startup. No further explanation was given though. Weird, maybe I should try the sMIUI ROM and see what it gives.
Click to expand...
Click to collapse
Okay, I found the thread you mentioned on MIUI's website (http://en.miui.com/thread-129336-1-1.html), but you need to correct the path as it follows in Terminal Emulator:
Type :
su
sh /storage/sdcard1/term-init.sh
You have to place the term-init.sh inside the internal SD card in this case, download file here https://www.androidfilehost.com/?w=...5e497fa2bc98ce82437cb8cbfbdb4e56c73c1dd621ead
Anyway, if it works, it should create a Test.log file in /data, but it won't
Try your luck

oldslowdiver said:
Okay, I found the thread you mentioned on MIUI's website (http://en.miui.com/thread-129336-1-1.html), but you need to correct the path as it follows in Terminal Emulator:
Type :
su
sh /storage/sdcard1/term-init.sh
You have to place the term-init.sh inside the internal SD card in this case, download file here https://www.androidfilehost.com/?w=...5e497fa2bc98ce82437cb8cbfbdb4e56c73c1dd621ead
Anyway, if it works, it should create a Test.log file in /data, but it won't
Try your luck
Click to expand...
Click to collapse
Cool of you to follow this up The term-init.sh script actually comes from XDA and this is its original thread: http://forum.xda-developers.com/showthread.php?t=1933849. I copied the script to the internal SD card and executed it (with different versions of busybox), the script ran successfully (/system/etc/init.d and other files are created, permissions set correctly), but that Test.log file isn't being created in /data after a reboot. Of course, when I run the following command manually from a terminal, it does create the Test.log file: /system/xbin/busybox run-parts /system/etc/init.d. So for some reasons, the scripts in /system/etc/init.d/ aren't being executed at boot (and my knowledge is too restricted to troubleshoot this further :/)

elaurens said:
Cool of you to follow this up The term-init.sh script actually comes from XDA and this is its original thread: http://forum.xda-developers.com/showthread.php?t=1933849. I copied the script to the internal SD card and executed it (with different versions of busybox), the script ran successfully (/system/etc/init.d and other files are created, permissions set correctly), but that Test.log file isn't being created in /data after a reboot. Of course, when I run the following command manually from a terminal, it does create the Test.log file: /system/xbin/busybox run-parts /system/etc/init.d. So for some reasons, the scripts in /system/etc/init.d/ aren't being executed at boot (and my knowledge is too restricted to troubleshoot this further :/)
Click to expand...
Click to collapse
Exactly. And I found here http://en.miui.com/thread-99174-1-1.html you may edit Build.prop and add
sys.initd = 1
to enable Init.d scripts at boot, but, again, it won't work. So, if anyone finds a solution, please, share.

oldslowdiver said:
Exactly. And I found here http://en.miui.com/thread-99174-1-1.html you may edit Build.prop and add
sys.initd = 1
to enable Init.d scripts at boot, but, again, it won't work. So, if anyone finds a solution, please, share.
Click to expand...
Click to collapse
Haha. Are you oldmyself on the official MIUI forum who gave me the exact same reply in this thread?

elaurens said:
Haha. Are you oldmyself on the official MIUI forum who gave me the exact same reply in this thread?
Click to expand...
Click to collapse
heheheheh small world, it's me.

oldslowdiver said:
heheheheh small world, it's me.
Click to expand...
Click to collapse
Just so you know, I've got init.d support and scripts being executed on boot thanks to @Namaless' MIUI speed mod. I'm currently running the latest version (v.1.19) and AfWall's firewall rules are being applied on boot. Big thanks to him for that

Related

[ISSUE]SlaidyBoost ver2.3 & LEWA

After installing "SlaidyBoost 2.3" via CWM, LEWA(30.3.2012) stucks at the LEWA-Screen. I waited more than 10 minutes, went away to eat, but no reaction. ADB hasn't started yet, so LOGCAT isn't working too. The only way to boot is deleting the scripts or reflashing.
So I began to search, what's the fault. I copied one script in the init.d folder, rebooted and if it worked, I copied the next one (I set the permissions, of course). The troublesome scripts are "10S_smoothness_tweak" and "S98system_tweak", the others are working well.
I can't imagine, why it's not working, I've got a neraly clean system and reflashed it several times, but nothing changed. First I thought it is because of my self-deodexed-LEWA-ROM(I wanted PDroid, to stop Facebook's data-thiefing), but on the original odexed version it's the same.
Is there anybody else with this problem?
PS: YES, I searched in the General & Development section, but can't answer directly at Slaid480' post!
Yes it doesnt work for me too hangs at "android" bootscreen...
sent from my SGA powered by the best rom ever --CM 7.2 by the late F.A.T. ( I ll miss u F.A.T )
The code in the smoothness tweak looks a mess, but as Slaid never tests his code properly you users need to do it. Add this to the top of the troubled script:
Code:
LOG=/data/debug.log
echo "========================================" >> $LOG
echo "Script starting @ $(date)" >> $LOG
echo "Build: $(getprop ro.build.version.release)" >> $LOG
echo "Mod: $(getprop ro.modversion)" >> $LOG
echo "Kernel: $(uname -r)" >> $LOG
exec >> $LOG 2>&1
set -x
and install it (permissions need to be at least 750), reboot then post debug.log here and perhaps someone knowledgeable about shell scripting can help...
iandol said:
The code in the smoothness tweak looks a mess, but as Slaid never tests his code properly you users need to do it. Add this to the top of the troubled script:
Code:
LOG=/data/debug.log
echo "========================================" >> $LOG
echo "Script starting @ $(date)" >> $LOG
echo "Build: $(getprop ro.build.version.release)" >> $LOG
echo "Mod: $(getprop ro.modversion)" >> $LOG
echo "Kernel: $(uname -r)" >> $LOG
exec >> $LOG 2>&1
set -x
and install it (permissions need to be at least 750), reboot then post debug.log here and perhaps someone knowledgeable about shell scripting can help...
Click to expand...
Click to collapse
Ok, added it.
But no log was created. I'll wait 10 minutes, then I'll check it again.
EDIT: It booted successfull!!! Now I'm a bit confused... I try the system_tweak now...
EDIT2: But Booting always needs 5 minutes... A bit tooo long in my opinion.
I attached the log. It seems like the script analyzes every app on every start and settinga priority or something like this. I tested the system_tweak not yet.

[SOLVED]Ondemand tweaks using init.d script

I want to edit some ondemand values and I have a script but when I run it in script manager it shows errors.
My Q is what commands do I have to add for it to work?
This was my original post regarding the Q,please refer here for more details: http://forum.xda-developers.com/showthread.php?t=1815616
Here's what I have:
#!/system/bin/sh
echo 85 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
So many devs and no one can help.. Whats Q&A good for?
EDIT---
Solved by myself

NEED HELP

I have some scripts in my init.d folder, but when i check it on init.d log file.. it doesn't work. I do same as tutorial that i got here.. but it said "nonexistent directory" . Is there anyone know why?
I still confused because two of my scripts (zipalign & loopy_smoothness) are working.. but not for the other..
Here one of my tweaks :
#!system/bin/sh
echo "64" > /sys/module/lowmemorykiller/parameters/cost
echo "0,1,2,4,9,15" > /sys/module/lowmemorykiller/parameters/minfree
echo "0" > /sys/module/lowmemorykiller/parameters/debug_level
The log file said " nonexistent directory "..
Thanks before.. and sorry for my bad english..
Sent from my Hisense E-860 using Tapatalk 2
Looks like you have a typo on line 1.
Should start
#!/system/bin/sh
Sent from my HTC One X+ using Tapatalk 2
albraine said:
I have some scripts in my init.d folder, but when i check it on init.d log file.. it doesn't work. I do same as tutorial that i got here.. but it said "nonexistent directory" . Is there anyone know why?
I still confused because two of my scripts (zipalign & loopy_smoothness) are working.. but not for the other..
Here one of my tweaks :
#!system/bin/sh
echo "64" > /sys/module/lowmemorykiller/parameters/cost
echo "0,1,2,4,9,15" > /sys/module/lowmemorykiller/parameters/minfree
echo "0" > /sys/module/lowmemorykiller/parameters/debug_level
The log file said " nonexistent directory "..
Thanks before.. and sorry for my bad english..
Sent from my Hisense E-860 using Tapatalk 2
Click to expand...
Click to collapse
try this and make sure about script permissions
Code:
#!/system/bin/sh
echo "64" > /sys/module/lowmemorykiller/parameters/cost;
echo "0,1,2,4,9,15" > /sys/module/lowmemorykiller/parameters/minfree;
echo "0" > /sys/module/lowmemorykiller/parameters/debug_level;
you can also add #!/system/xbin/busybox/sh instead of #!/system/bin/sh
No.
I'm not using tipo..
I'm on hisense E-860
Thanks..
I just saw this post..
.
My init.d script is working now

[Q] edit init.rc to run shell scripts on boot (help urgent!l

I've added the following lines into init.rc
"service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d"
My script is created inside the init.d directory.
#!/system/bin/sh
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
Actually, the above action is worked. But when I have added one more script below the echo "2048... script, the problem was come.
( echo "1337" > /system/etc/init.d/gg.txt) p.s. gg.txt is not existed at the beginning
So, finally read_ahead_kb file has changed, but the gg.txt hasn't been created.
Can any one provide the reason and the solution to me?? Emergent! Thanks a lot!!
Or is it necessary for me to add ";" symbol at the end of each script?
If I want to use an infinity loop's script on boot (while : do xxxx done )
is it possible to do so? And how? Thanks
Any body can help?
No one??
hades94720 said:
No one??
Click to expand...
Click to collapse
use double >>
echo 11111 >> abc.txt
echo 2222 >> abc.txt

Sparrow_AW2.0 enabling all cores + GPU boost

Hello, I decided to publish some guide + scripts I already use for a while, which allows you to use all CPU cores and boost GPU performance.
Battery consumption using this configuration surprisingly does not change much or even did not change at all, with default as well with new config my watch stays alive for ~32h with daily usage.
Some theory:
Sparrow is sold with Qualcomm Snapdragon 400 1.2GHz, which is 4 core CPU. ASUS AW2.0 official kernel though supports only 600MHz and 787MHz, as Asus probably thinks this is good balance between battery life and performance.
GPU is Adreno 302/305, which is capable running up to 450MHz, which is also supported by ASUS AW2.0 kernel.
Where is the catch?
During boot there are all four CPU cores enabled, however there is post-init script, disabling two of those and setting frequency as fixed 738MHz with performance governor (no frequency scaling). GPU is set to fix 200MHz:
/system/bin/init.asus.post_boot.sh
Code:
#!/system/bin/sh
PATH=/system/bin
cd /sys
echo 4 > module/lpm_levels/enable_low_power/l2
echo 1 > module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu0/power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu1/power_collapse/idle_enabled
#Put all other cores offline
echo 0 > devices/system/cpu/cpu2/online
echo 0 > devices/system/cpu/cpu3/online
governor="performance"
scaling_min_freq="787200"
if [[ `grep "oem_perf_change" /proc/cmdline` ]];then
if [[ `grep "oem_perf_on" /proc/cmdline` ]];then
oem_perf_stats="1"
else
oem_perf_stats="0"
fi
echo -n $oem_perf_stats > /factory/oem_perf_stats
fi
echo $governor > devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $governor > devices/system/cpu/cpu1/cpufreq/scaling_governor
#below ondemand parameters can be tuned
echo 50000 > devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 90 > devices/system/cpu/cpufreq/ondemand/up_threshold
echo 1 > devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 2 > devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 10 > devices/system/cpu/cpufreq/ondemand/down_differential
echo 70 > devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo 10 > devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
echo 787200 > devices/system/cpu/cpufreq/ondemand/optimal_freq
echo 300000 > devices/system/cpu/cpufreq/ondemand/sync_freq
echo 80 > devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
echo $scaling_min_freq > devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $scaling_min_freq > devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 787200 > devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 787200 > devices/system/cpu/cpu1/cpufreq/scaling_max_freq
#Below entries are to set the GPU frequency and DCVS governor
echo 200000000 > class/kgsl/kgsl-3d0/devfreq/max_freq
echo 200000000 > class/kgsl/kgsl-3d0/devfreq/min_freq
echo performance > class/kgsl/kgsl-3d0/devfreq/governor
chown -h system devices/system/cpu/cpu[0-1]/cpufreq/scaling_max_freq
chown -h system devices/system/cpu/cpu[0-1]/cpufreq/scaling_min_freq
chown -h root.system devices/system/cpu/cpu[1-3]/online
chmod 664 devices/system/cpu/cpu[1-3]/online
It is indeed required just to alter this script and you can enable all 4 cores with "ondemand" governor, scaling 600-738MHz and GPU scaling 200-450MHz using "msm-adreno-tz" governor:
(and this requires root of course)
Code:
#!/system/bin/sh
PATH=/system/bin
cd /sys
echo 4 > module/lpm_levels/enable_low_power/l2
echo 1 > module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
echo 1 > module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu0/power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu1/power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu2/power_collapse/idle_enabled
echo 1 > module/msm_pm/modes/cpu3/power_collapse/idle_enabled
governor="ondemand"
scaling_min_freq="600000"
if [[ `grep "oem_perf_change" /proc/cmdline` ]];then
if [[ `grep "oem_perf_on" /proc/cmdline` ]];then
oem_perf_stats="1"
else
oem_perf_stats="0"
fi
echo -n $oem_perf_stats > /factory/oem_perf_stats
fi
echo $governor > devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $governor > devices/system/cpu/cpu1/cpufreq/scaling_governor
echo $governor > devices/system/cpu/cpu2/cpufreq/scaling_governor
echo $governor > devices/system/cpu/cpu3/cpufreq/scaling_governor
#below ondemand parameters can be tuned
echo 50000 > devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 90 > devices/system/cpu/cpufreq/ondemand/up_threshold
echo 1 > devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 2 > devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 10 > devices/system/cpu/cpufreq/ondemand/down_differential
echo 70 > devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo 10 > devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
echo 787200 > devices/system/cpu/cpufreq/ondemand/optimal_freq
echo 300000 > devices/system/cpu/cpufreq/ondemand/sync_freq
echo 80 > devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
echo $scaling_min_freq > devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $scaling_min_freq > devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo $scaling_min_freq > devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo $scaling_min_freq > devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo 787200 > devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 787200 > devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo 787200 > devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo 787200 > devices/system/cpu/cpu3/cpufreq/scaling_max_freq
#Below entries are to set the GPU frequency and DCVS governor
echo 450000000 > class/kgsl/kgsl-3d0/devfreq/max_freq
echo 200000000 > class/kgsl/kgsl-3d0/devfreq/min_freq
echo msm-adreno-tz > class/kgsl/kgsl-3d0/devfreq/governor
chown -h system devices/system/cpu/cpu[0-3]/cpufreq/scaling_max_freq
chown -h system devices/system/cpu/cpu[0-3]/cpufreq/scaling_min_freq
chown -h root.system devices/system/cpu/cpu[0-3]/online
chmod 664 devices/system/cpu/cpu[0-3]/online
(both files also attached to this post)
To exchange files in your watch, you can easily use following bash script in linux:
First push desired file into sdcard and go to ADB shell:
Code:
adb push init.asus.post_boot.sh /sdcard/
adb shell
In ADB shell remount system to RW, replace the file and fix privileges, than remount system back to RO:
Code:
su
mount -o rw,remount /system
mv /sdcard/init.asus.post_boot.sh /system/bin/
chown root:shell /system/bin/init.asus.post_boot.sh
chmod 755 /system/bin/init.asus.post_boot.sh
mount -o ro,remount /system
Update 2018/09/05:
In case you want to experiment, I'm also sending "full_power" script, setting all cores to max frequency and performance governor. There should be no issues, except probably less battery life. Just test yourself, how battery life is affected if it is affected at all. Just unpack the zip file, rename the sh script from init.asus.post_boot_full_power.sh to init.asus.post_boot.sh. Rest of the procedure is still the same.
Without kernel sources, this is probably the maximum performance you can get from the watch. Obtaining kernel sources we might get up still twice of current maximum, as the HW is there, but locked on kernel level.
I just swapped the files and I'll give this a try over the next few days. It would be awesome to destroy lag without needing a kernel tweak app to make it happen. You are the man!
Update: I followed your directions, then I wiped cache and dalvik in TWRP. I have only used the watch for a few minutes with this tweak and it is noticeably faster/smoother already. Text messages display lightning fast after being received on the phone. I'm currently on WiFi in my office. The times I notice most lag on my watch is when I'm on 4G, have music playing, and get a call. The phone may ring for 5-10 seconds before the watch displays. I'm excited to see how helpful this tweak is under those conditions. I'll know later today and keep you posted.
I have not experienced any Bluetooth lag since enabling this. This is a must have mod. Thanks for this!
Glad to hear that @CVertigo1. This is just simple SW enablement of things already present in kernel, so even no cache cleans are required. You can play with it on the go even without watch restart.
Amazing will be getting some kernel with much more CPU freq. steps, like 300-768 or even to 1.2GHz (yes, our chip is capable doing so, it is just not enabled in kernel). With proper governor battery will be still ok, resting CPU most of the time in low clocks. It is pity we have great HW, but it is taken out from us with stock kernel.
It would be nice if Asus would upload the kernel source for AW2.0.
CVertigo1 said:
It would be nice if Asus would upload the kernel source for AW2.0.
Click to expand...
Click to collapse
Well we do have latest kernel source
https://www.asus.com/us/ZenWatch/ASUS_ZenWatch_2_WI501Q/HelpDesk_Download/
Or directly here:
http://dlcdnet.asus.com/pub/ASUS/Wearable/ASUS_WI501Q/ASUS_WI501Q-5.2003.1603.10-kernel-src.zip
We just need some handy guy able to compile it and add more governors and frequencies. That is something what overlapping my skills.
That is the latest kernel source for 1.5. They have not released their source for 2.0, nor any firmware for 2.0. I have contacted Asus about it multiple times and none of their reps have any idea what I'm talking about.
CVertigo1 said:
That is the latest kernel source for 1.5. They have not released their source for 2.0, nor any firmware for 2.0. I have contacted Asus about it multiple times and none of their reps have any idea what I'm talking about.
Click to expand...
Click to collapse
Ah, I see I thought 2017/05/12 stated as a release day was after AW20 concluding this had to be the new one. Pity.
Maybe they'll release it eventually...at an Asus speed, like next year.
please help me(rom Sparrow_7.1.1_Debloat ROM ):
adb shell
sparrow:/ $ su
Permission denied
htduy11 said:
please help me(rom Sparrow_7.1.1_Debloat ROM ):
adb shell
sparrow:/ $ su
Permission denied
Click to expand...
Click to collapse
Hi there, you are missing super user in your ROM. Did you installed SuperSU and Busybox thru TWRP after flashing the ROM?
Do this in TWRP, not Android.
'the command can be used in adb in windows or are different? watch must be in recovery or bootloader? wrote a step by step for noob guide please
You must boot in the TWRP recovery. You need the ADB drivers installed on your computer and is easier to use your computer for this.
mastermoon said:
'the command can be used in adb in windows or are different? watch must be in recovery or bootloader? wrote a step by step for noob guide please
Click to expand...
Click to collapse
Actually it is quite simple, what you need:
* in case you use Windows, you need drivers for android (not needed with Linux)
* working ADB
* rooted watch
Then just connect normally booted watch and in command line (Windows) or terminal (Linux), execute:
Code:
adb push init.asus.post_boot.sh /sdcard/
adb shell
Second command above will enter adb shell, when you are in, just copy paste and execute following:
Code:
su
mount -o rw,remount /system
mv /sdcard/init.asus.post_boot.sh /system/bin/
chown root:shell /system/bin/init.asus.post_boot.sh
chmod 755 /system/bin/init.asus.post_boot.sh
mount -o ro,remount /system
LeeonLee said:
Actually it is quite simple, what you need:
* in case you use Windows, you need drivers for android (not needed with Linux)
* working ADB
* rooted watch
Then just connect normally booted watch and in command line (Windows) or terminal (Linux), execute:
Code:
adb push init.asus.post_boot.sh /sdcard/
adb shell
Second command above will enter adb shell, when you are in, just copy paste and execute following:
Code:
su
mount -o rw,remount /system
mv /sdcard/init.asus.post_boot.sh /system/bin/
chown root:shell /system/bin/init.asus.post_boot.sh
chmod 755 /system/bin/init.asus.post_boot.sh
mount -o ro,remount /system
Click to expand...
Click to collapse
yeah worked perfectly... after 9 month the zenwatch is back on my wrist....
---------- Post added at 05:31 PM ---------- Previous post was at 05:29 PM ----------
LeeonLee said:
Actually it is quite simple, what you need:
* in case you use Windows, you need drivers for android (not needed with Linux)
* working ADB
* rooted watch
Then just connect normally booted watch and in command line (Windows) or terminal (Linux), execute:
Code:
adb push init.asus.post_boot.sh /sdcard/
adb shell
Second command above will enter adb shell, when you are in, just copy paste and execute following:
Code:
su
mount -o rw,remount /system
mv /sdcard/init.asus.post_boot.sh /system/bin/
chown root:shell /system/bin/init.asus.post_boot.sh
chmod 755 /system/bin/init.asus.post_boot.sh
mount -o ro,remount /system
Click to expand...
Click to collapse
worked perfectly.... after 9 months zenwatch is back on my wrist
Hey guys,
do i need to do it every time i booted up ?
And can i messure this Overclocking anywhere ?
Greetings
Namelocked said:
Hey guys,
do i need to do it every time i booted up ?
And can i messure this Overclocking anywhere ?
Greetings
Click to expand...
Click to collapse
Hi, this is permanent solution. To revert you need to replace the file with original one.
I am also not aware of any reliable Wear benchmark, but you can see HW info using e.g. AIDA64 for Wear.
LeeonLee said:
Hi, this is permanent solution. To revert you need to replace the file with original one.
I am also not aware of any reliable Wear benchmark, but you can see HW info using e.g. AIDA64 for Wear.
Click to expand...
Click to collapse
I dont even find the AIDA64 for my smartwatch :/ ?
how can i check core, cpu speed etc... aida64 isn't compatible .. tnx..

Categories

Resources