4/20/2017 [] 7.1.1 UPDATE [] LG G5 (msm 8996) [] CPU, VM, RAM, IO "Tune" - LG G5 ROMs, Kernels, Recoveries, & Other Developme

ORIGINAL THREAD HERE: https://forum.xda-developers.com/axon-7/development/2-15-2017-axon-7-msm-8996-cpu-vm-ram-t3557392
This mod was originally created for the Axon 7, but due to several requests, I've modified a version for the G5, please see below, and post questions or comments in the original thread above. Please state you are a G5 user if you have feedback in that thread, to consolidate user feedback and speed up response time.
Custom tuning for a device is always a necessity. "Canned" settings will get you by, but they are certainly never optimized for a specific device. In fact, Linux typically takes a general approach to find harmonic balance in default settings that will, for the most part, work in an acceptable manner for just about any device. There are a lot of resources available on this device, so we should utilize it in a manner appropriate to squeeze out as much battery life and performance as possible without sacrificing much of those outputs, don't you think? This is going to fix that for you.
Here is what is required of you before you begin:
1. Must be rooted
2. Must have the G5 OR a device running the Snapdragon 820, as this modification is not so much device specific, but hardware specific. The important aspect being the snapdragon 820 and the RAM disk size.
3. Must have write protection disabled. If the G5 requires write protection to be disabled, see the code and instruction below:
Using adb shell:
Code:
adb reboot disemmcwp
Using Linux terminal (from your phone, for example):
Code:
reboot disemmcwp
Let's begin.
Getting right to it, here's what I've done:
- modified parameters of the interactive governor, and quite extensively at that (search some of my threads if you want a little bit of a breakdown of the general approach I take)
- reconfigured input_boost parameters
- reconfigured vm parameters (again, the device has a lot of RAM resource, this will utilize it and give you a far better user experience. Basically, I've adjusted dirty_ratio, dirty_background_ratio, swappiness, and other parameters of the virtual machine.)
- disabled zRAM for 6 GB variants (RAM compression, again, not needed on this device really, this mod will save you CPU cycles and power) this will not apply to G5 users, you will still have zRAM enabled.
- remapped minfree parameters for LMK (low memory killer) again only for 6 GB variants
- Tuned CFQ scheduler for flash storage devices
- Tuned "core_ctl" module (needs kernel support, I recommend freeza's latest version of BeastMode. For those wondering, yes, you can still use this mod with the stock kernel. It won't break anything.) again this will only apply to devices that support core_ctl at the kernel.
In a nutshell, that's what we're looking at here. I can guarantee you this will have a significantly positive impact on your device. Turbo time, homies.
How to install????
Easy. First, the file we are replacing is found in /system/etc... it is the "init.qcom.post_boot.sh" file - this file is basically shell scripts, which are applied at boot via this particular shell file.
All you have to do is download the file to your device, open up a file explorer (must have root capability), navigate to the /system/etc folder with said file explorer, mount your /system as RW (read write), delete your stock "init.qcom.post_boot.sh" file, and replace it with mine.
After you've successfully done this, change the new file's permissions to rw-r--r-- (0644), and then reboot!
Or, if you are brave, you can do it manually via a terminal app and get your fingers wet... if you choose to do that, see below:
Make sure the file is located on the root of your internal sdcard in /sdcard, open your terminal app (again, must have root) and type the following commands, hitting enter after each one (be careful to pay attention to the spacing).
Code:
su
Code:
cd /
Code:
mount -o remount,rw /system
Code:
cd /system/etc
Code:
rm init.qcom.post_boot.sh
Code:
cd /sdcard
Code:
mv init.qcom.post_boot.sh /system/etc
Code:
chmod 0644 /system/etc/init.qcom.post_boot.sh
I don't want credit, don't need you to give or offer donations, this is purely for the community in the spirit of Linux ideology. All I ask is for you to hit the thanks button :good:
That's pretty much it, guys. Enjoy!
DOWNLOAD:

Is this a new kernel?
Regards
Nathan
Sent from my LG-H850 using XDA Premium HD app

@warBeard_actual
Here :good: :fingers-crossed:

onestyle007 said:
@warBeard_actual
Here :good: :fingers-crossed:
Click to expand...
Click to collapse
Got it man, working on it now. I should have it up soon.

OP updated... Enjoy guys!
Instructions on how to install are in the OP, post your results here

warBeard_actual said:
OP updated... Enjoy guys!
Instructions on how to install are in the OP, post your results here
Click to expand...
Click to collapse
Question,does that matter for your results if I'm using an other governor,cause I'm currently on alucard?? Stock rom but a custom kernel (Asgard for g5 to be exact)

onestyle007 said:
Questions,does that matter for your results if I'm using an other governor,cause I'm currently on alucard?? Stock rom but a custom kernel (Asgard for g5 to be exact)
Click to expand...
Click to collapse
You will notice minimal to no difference if you are using another governor.

Any pro can do a flashable zip?

Any n00b can copy and paste

Will it work on Android 6?

I don't know it's placebo or not but after replacing the file I have now a better GPS fix and accuracy I am on the H850 so thanks on the OP

yes accurancy gps, not lag boot, very smooth. thanks!!!!!!!!!!!

warBeard_actual said:
OP updated... Enjoy guys!
Instructions on how to install are in the OP, post your results here
Click to expand...
Click to collapse
Okay,last night after I've replaced the file, changed to interactive gov,0.2% lost during the night with wifi and mobile data off here is my current stats. Was a bit surprised though and I'm not sure if it's a bug in reading . But hey that's what it shows.

Rhadamanthis said:
yes accurancy gps, not lag boot, very smooth. thanks!!!!!!!!!!!
Click to expand...
Click to collapse
Same for me, let see if the battery will be better too...

Does this only work on LG Stock?

Hi,thanks for mod,great mod running in Nougat Fulmix rom?

OTOGY2002 said:
Hi,thanks for mod,great mod running in Nougat Fulmix rom?
Click to expand...
Click to collapse
Ues

How to mount System as R/W? When I set permission I get error evice is busy

Worked like a charm using Fulmics Rom 2.0.
Hint for some who have issues with mounting RW: Use FX file explorer for this. Works just fine.
Will monitor and report how it works.

My Problem. I go to /system/etc and I can´t find this file. I´m on Root with FX file Manager. What am I doing wrong?

Related

[Development]Kernel

Hei there.
The idea of this thread is to develop a better kernel for the I9001 in the community. I have compiled my own one for using it in the cwm recovery mod. I've only changed the following so far:
Patched pm2.c file in the samsung kernel sources, see here for the patch:
https://github.com/PabloPL/android_...mmit/46e96915a7e0459dc6b3aec04aa47329371fff44
through menuconfig I've changed the default cpu governor from performance to ondemand.
What we should implement first is init.d support.
I've uploaded my boot.img file for further use here:
http://www.mediafire.com/?6p91s5knka0e0py
It also contains the CWM Recovery
This is great idea bro. Its great to have you here.
Thanks again!!!
Sent from my GT-I9001 using Tapatalk
I would love to see a overclock able kernel! Great idea!
Joost
Sent from my GT-I9001 using XDA App
overclocking module
Hi guys,
coolbho3000 posted source of an overclocking module for HTC Vision. As far I know, it can be used with the SetCPU App together.
http://forum.xda-developers.com/showthread.php?t=813681
Since S+ has a similar Qualcomm chip, it should work as well.
I compiled the overclocking module with the S+ Kernel and packed it into the zImage. The device doesn't boot. Maybe it would be better to follow what coolbho3000 says and adapt the settings
ädu
PS: it needs definitively some adaptions.
Shouldn't we create our own github/bitbucket repositories for kernel and CWM? I'm trying to get my feet wet in generic Android kernel development now, it would be cool to have repository to sync with.
YardE said:
Shouldn't we create our own github/bitbucket repositories for kernel and CWM? I'm trying to get my feet wet in generic Android kernel development now, it would be cool to have repository to sync with.
Click to expand...
Click to collapse
yep of course. I've already opened an account on github. But right now I ain't got time to read the instructions on how to upload repos because I'm busy with applying some changes to FeaMod Recovery and testing them.
I would be happy if a lot of kernel developers would join us!
Edit: The sources for FeaMod recovery 1.1 are on github:
https://github.com/manveru0/FeaMod-Recovery--based-on-CWM-Recovery-
Samsung kernel sources with patched pm2.c:
https://github.com/manveru0/kernel_I9001_samsung
Later I'll try to add "run-parts /system/etc/init.d/" to init.rc, but I'm highly confused from examining ramdisk, because I couldn't find any bash-scripts interpreter (possibly embedded into init executable?) and don't have enough time to continue examining init.rc now. I think, we can add busybox to system image and call it from there. Also, please, modify these lines in default.prop in your future builds:
Code:
ro.secure=0
ro.debuggable=1
As far as I understood, these allow us to use "adb root".
Also, thanks for your awesome work!
YardE said:
Later I'll try to add "run-parts /system/etc/init.d/" to init.rc, but I'm highly confused from examining ramdisk, because I couldn't find any bash-scripts interpreter (possibly embedded into init executable?) and don't have enough time to continue examining init.rc now. I think, we can add busybox to system image and call it from there. Also, please, modify these lines in default.prop in your future builds:
Code:
ro.secure=0
ro.debuggable=1
As far as I understood, these allow us to use "adb root".
Also, thanks for your awesome work!
Click to expand...
Click to collapse
sounds good. I haven't seen a script interpreter either and I'm not quite sure if there is one included in the init. I think it's better we include busybox. Take a look at this thread by the way:
http://forum.xda-developers.com/showthread.php?t=1152740
I'll try to do that testwise.
Here's the adress for my uploaded boot.img-ramdisk without the samsung pictures (we can easily add them again when building a new boot.img):
https://github.com/manveru0/bootimage_ramdisk_I9001
I've already included the changes in default.prop
EDIT: some useful links
http://www.kandroid.org/online-pdk/guide/bring_up.html
http://www.androidenea.com/2009/08/init-process-and-initrc.html
After some init.rd learning I've inserted a service here which should get the job's done, but I have no idea how to test it. Anyway, here is the diff from the normal one:
Code:
[[email protected] boot]$ diff -u3 init.rc ../boot_mod/init.rc
--- init.rc 2011-11-05 22:35:33.194680288 +0400
+++ ../boot_mod/init.rc 2011-11-05 22:24:40.000000000 +0400
@@ -566,7 +566,7 @@
# ihryu 2010.07.19
setprop ro.rfkilldisabled 0
- class_start default
+ #class_start default
# +++++++++++++++++++++++++++++++++++++++++++
# for silent reset
@@ -714,6 +714,10 @@
onrestart restart netd
onrestart restart sensor-daemon
+service initd /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
+ oneshot
+
service media /system/bin/mediaserver
user media
group system audio camera graphics inet net_bt net_bt_admin net_raw radio qcom_oncrpc
[[email protected] boot]$
Have also commented "class_start default" which runs twice for some reason. To have this working in theory, you should have busybox installed in /system/xbin with run-parts support. For me, it boots at least ^_^
P.S. It also works if I call command line from adb. Also, adb root works after changing default.prop, good.
P.P.S. You can also remove "charging.rle" from repo, as it is image, too, but why not just keep all the files in repo? git is loyal to binary files as long as you don't try to create a patch. ~_^ Also, you can use .gitignore to exclude some files from git's view at all.
Found excellent reference on init.rd:
http://www.kandroid.org/online-pdk/guide/bring_up.html
Fixed previous post (removed "disabled"), so it should really work now. Going to test it, but not really sure if my test are correct (I'll try to write something to sdcard, but is it mounted r/w at the moment of script running?)
Test failed, thinking of some other, more accurate tests now.
Tried to create file in /cache, and it worked! Here is boot.img with working init.rd and adb root. Flash it via dd (dd if=boot.img of=/dev/block/mmcblk0p8). You should have busybox installed into /system/xbin for this to work.
YardE said:
Found excellent reference on init.rd:
http://www.kandroid.org/online-pdk/guide/bring_up.html
Fixed previous post (removed "disabled"), so it should really work now. Going to test it, but not really sure if my test are correct (I'll try to write something to sdcard, but is it mounted r/w at the moment of script running?)
Test failed, thinking of some other, more accurate tests now.
Click to expand...
Click to collapse
thx for your commit, I'm testing it as well with the adrenaline shot. If init.d support works you should see the changed values.
I do have a working busybox in /system/xbin with run-parts support, so that shouldn't be the issue as my tests didn't work so far.
Okay, gonna delete disable as well.
concerning the images i wasn't so sure about law problems since they include original samsung stuff.
update:
success You did it! Init support works. Though I have to retest it since I've also added user root to the init.rc. Honestly I'm not quite sure if that entry is needed
"user root" is not needed since user is root by default, already tested without it (edited my posts above).
YardE said:
"user root" is not needed since user is root by default, already tested without it (edited my posts above).
Click to expand...
Click to collapse
okay then, i will change the init.rc file and commit it to github. I will name you in the comment to the change. Which name should I use? Is that okay for you?
Oh, you can use either "abbradar" or "YardE", I don't mind. ^_^ Thank you for credits and again for your work. Gonna experiment a bit with CWM now since init.d is working.
YardE said:
Oh, you can use either "abbradar" or "YardE", I don't mind. ^_^ Thank you for credits and again for your work. Gonna experiment a bit with CWM now since init.d is working.
Click to expand...
Click to collapse
I have to thank you for your work as well, mate It's cool working as a team since we are better, faster and should see more bugs than working alone
Edit:
Hmm, we should include busybox in the boot ramdisk, since not every user has busybox installed.
P.S: funny thing is, I've installed adrenaline shotv13 but only part of it works. For example the sdcard tweak works, the sysctl tweaks don't.
P.P.S: i've installed bash on my device, it's much more easier with it to navigate in the adb shell
manveru0 said:
Hmm, we should include busybox in the boot ramdisk, since not every user has busybox installed.
Click to expand...
Click to collapse
What is the max size limit in our device for ramdisk? Also, should we really do so? It will be hard to update in comparison and maybe will be stripped due to size limit, and users basically'll have two versions of busybox - our embedded into boot.img and their own - in /system. (I'm looking on CM and other init.d implementations as an example) But on the other hand, it is really nearly critical level app (although sh is not in boot.img, for example)
P.S: funny thing is, I've installed adrenaline shotv13 but only part of it works. For example the sdcard tweak works, the sysctl tweaks don
Click to expand...
Click to collapse
They also trying to write some values into non-existent /sys nodes, looks like they are meant for other kernel scheduler, like BFQ (should we also try it?)
---------- Post added at 01:25 AM ---------- Previous post was at 01:25 AM ----------
P.P.S: i've installed bash on my device, it's much more easier with it to navigate in the adb shell
Click to expand...
Click to collapse
Good advice, thank you ^_^.
YardE said:
What is the max size limit in our device for ramdisk? Also, should we really do so? It will be hard to update in comparison and maybe will be stripped due to size limit, and users basically'll have two versions of busybox - our embedded into boot.img and their own - in /system. (I'm looking on CM and other init.d implementations as an example) But on the other hand, it is really nearly critical level app (although sh is not in boot.img, for example)
They also trying to write some values into non-existent /sys nodes, looks like they are meant for other kernel scheduler, like BFQ (should we also try it?)
---------- Post added at 01:25 AM ---------- Previous post was at 01:25 AM ----------
Good advice, thank you ^_^.
Click to expand...
Click to collapse
the maximum size of both recovery and boot.img is 7864320 Bytes. Riversource once found that out. It's also in the BoardConfig.mk So we would have enough space for including busybox. But you're right, it would only lead to 2 busyboxes on the device which is not the best idea.
CM uses the BFQ scheduler as far as I know so yeah, we should give it a try
AFAIK, BFS patch nearly fully removes original kernel schedulers, so some work of comparing with original Linux kernel will be needed to do. Although, it may not be true for Android kernel sources or my experience may be wrong, so we should just try it as is before continuing.
Sent from my GT-I9001 using XDA App
YardE said:
AFAIK, BFS patch nearly fully removes original kernel schedulers, so some work of comparing with original Linux kernel will be needed to do. Although, it may not be true for Android kernel sources or my experience may be wrong, so we should just try it as is before continuing.
Sent from my GT-I9001 using XDA App
Click to expand...
Click to collapse
yep, I've looked at the changes the patches make and they remove alot of the CFQ related functions. Fortunately the makefile is patched as well so no work here.
I've have downloaded the patches for kernel 2.6.35 here:
http://algo.ing.unimo.it/people/paolo/disk_sched/sources.php
I applied them to my sources, compiled em and flashed my FeaMod pack with the new kernel and your changes to the boot ramdisk.
So far everything is working on my device I'm gonna upload the patches to github.
Edit: Had to change the .config as well since bfq is not the default I/O scheduler. It is now, I've also activated the hierarchical scheduler support.
Concerning ramdisk git repo: maybe we should move all the code into some folder, for example, "ramdisk", and move README out from there to avoid it being placed into final image? Also, we should point which files are missing from ramdisk in README.

[TWEAK][APK][CWM][[Update 2.0.0]] Seeder entropy generator to provide lag reduction

Original Post | CWM
Guys check this out
Best result on Android 4.+
Description
Hey everyone,
So, I was experiencing significant lag as we all do from time to time, and decided I was going to get to the bottom of it.
After tracing and debugging for hours, I discovered the source of 90% of Android's lag. In a word, entropy (or lack thereof).
Google's JVM, like Sun's, reads from /dev/random. For all random data. Yes, the /dev/random that uses a very limited entropy pool.
Random data is used for all kinds of stuff.. UUID generation, session keys, SSL.. when we run out of entropy, the process blocks. That manifests itself as lag. The process cannot continue until the kernel generates more high quality random data.
So, I cross-compiled rngd, and used it to feed /dev/urandom into /dev/random at 1 second intervals.
Result? I have never used an Android device this fast.
It is literally five times faster in many cases. Chrome, maps, and other heavy applications load in about 1/2 a second, and map tiles populate as fast as I can scroll. Task switching is instantaneous. You know how sometimes when you hit the home button, it takes 5-10 seconds for the home screen to repopulate? Yeah. Blocking on read of /dev/random. Problem solved. But don't take my word for it .. give it a shot!
Update!
I've built a very simple Android app that bundles the binary, and starts/stops the service (on boot if selected). I'll be adding more instrumentation, but for now, give it a shot! This APK does not modify /system in any way, so should be perfectly safe.
This is my first userspace Android app, so bear with me!
Note that this APK is actually compatible with all Android versions, and all (armel) devices. It's not at all specific to the Captivate Glide.
Click to expand...
Click to collapse
Quote Original Post link - Click Here
UPDATE: Seeder_v7 is out, as suggested by pepoluan, it now detects for qrngd (built in rngd for Qualcomm Snapdragon-based devices), if it is there, then it will not start as rngd may conflict with it...the rngd binary is also using the latest version (it is turned off when screen is off)...users of previous versions can just flash it over...
INSTALLING
You need init.d support for this!
Download and flash:
http://www.androidfilehost.com/?fid=9390248398092764755
Here is a mirror... http://d-h.st/REX
How to use this script?:
After flashing, launch terminal emulator and type
Code:
su
seeder
You will get a menu like this:
{
"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"
}
NOTE: There will be NO app after flashing! This only installs the necessary binaries and scripts...
For those who cannot install via recovery:
You get a status 0 error -> replace the update-binary in Seeder_v6.zip with one from another zip that works with your device
OR
Use the new installation method!
Instructions:
1. Download Seeder_v7_non-CWM.zip from here:
http://www.androidfilehost.com/?fid=9390248398092764756
2. Extract the zip, you will get a folder named "install"
3. Place the folder in the root of your sdcard (/sdcard)
4. Launch terminal emulator, type:
Code:
su
cd /sdcard/install
sh install.sh
5. Ignore any error messages (those are only warnings, only happens to current users)
6. You are done! The script will auto-delete the "install" folder as it is not required anymore...
Sample output:
UNINSTALLING:
And now for the way to clean up Seeder_7:
Via recovery:
Flash Seeder_v6&7_Uninstall.zip:
http://www.androidfilehost.com/?fid=9390248398092764753
Via terminal:
1. Download Seeder_v6&7_Uninstall_non-CWM.zip:
http://www.androidfilehost.com/?fid=9390248398092764145
2. Extract it to the root of your sdcard (/sdcard), you should get a file named uninstall.sh
3. Launch terminal emulator and type this:
Code:
su
cd /sdcard
sh uninstall.sh
4. You are done! Everything gets cleaned up, including uninstall.sh...
Click to expand...
Click to collapse
Flash now works, you can now type in terminal to turn off/on and also easier remove. Up to u if ud like to try. Note" it may drain battery more" so please do not be going all against tweak. Thanks
FLASH THIS ON GINGERBREAD!?!?!(v1.4.0)
Thanks to Zen Arcade for making a flash for Gingerbread! His Post Here!
I took a look at the original CWM package and made the following changes:
1 - swapped in our update-binary
2 - changed the mount command in edify script (not really needed since system is already mounted in gb voodoo CWM recovery)
3 - removed all mount commands from init.d script (not required since you have to have /system mounted just to read the script)
Here's a link to the CWM flashable: http://d-h.st/Kaq
I'm running this on both my Infuses - no problems noted. At work now so will not have a chance to try with games for a couple more hours at least. Only down side I can note is that the rngd binary is about 1MB in size - a small sacrifice if it does eliminate lag events
Note that this package is for GB, but should work fine for 4.x roms as long as /system is mounted as part of recovery startup. Can someone test on a 4.x (CWM9/10) rom by flashing the zip and then checking /system/etc/init.d for a file named 91RNGD or /system/xbin for rngd? I've already tested on GB and it works fine there.
Thanks bradman for posting this - all credit and thanks to the original devs who posted this.
Click to expand...
Click to collapse
Sorry if this is a n00b question, but if you just install the .apk do you still need to change the permissions or does it take care of it for you?
dginsd said:
Sorry if this is a n00b question, but if you just install the .apk do you still need to change the permissions or does it take care of it for you?
Click to expand...
Click to collapse
Is best to just fix Perm to brr safe, easiest way to do so if you just install the app is to go to recovery/advanced/fix permissions and reboot
Sent from my SGH-I997 using xda premium
I stumbled upon this myself a few days ago and have been looking into it... I can easily implement it into my source builds, but want to see how it reacts first before doing so. And btw bradman... CM10.1 is smooth as **** with nothing needed... but if this makes it even better, then thats good to hear.
Anyone tried this on 2.3.6?
im aware its smooth good job! i was just testing it on infuse and i currently had ur rom so i just gave it a try to confirm it working on infuse
wawaweewa said:
Anyone tried this on 2.3.6?
Click to expand...
Click to collapse
ive heard it works on gingerbread. never tried. try a backup in recovery then flash. if anything goes wrong restore
bradman117 said:
ive heard it works on gingerbread. never tried. try a backup in recovery then flash. if anything goes wrong restore
Click to expand...
Click to collapse
I updated OP so that if flash doesn't work i have download files to manually do
bradman117 said:
ive heard it works on gingerbread. never tried. try a backup in recovery then flash. if anything goes wrong restore
Click to expand...
Click to collapse
that is what i am doing now! im on saurom jvu atm thanks for the quick reply ill let you know how it turns out
EDIT: i hope it works so my online game will run smoothly!
I must say, this relatively minor tweak provides a noticeable boost. I'm currently using Liquid Smooth RC9.11 with no further tweaks. After applying this tweak I've noticed faster loading times for a couple games, Google maps is much more responsive to massive view changes, web browsing is snappier, and as stated above almost no redraw delay when returning to the launcher after running a large app (like a game). I must say this under-powered and under-RAMmed little Infuse just keeps getting better and better thanks to all the work the devs here. Keep up the good work!
deathblade said:
Is best to just fix Perm to brr safe, easiest way to do so if you just install the app is to go to recovery/advanced/fix permissions and reboot
Sent from my SGH-I997 using xda premium
Click to expand...
Click to collapse
Thanks for the tip
dginsd said:
Thanks for the tip
Click to expand...
Click to collapse
so i just have to flash the zip in recovery then fix permission and that's it?
just flash it will do permission
Working CWM Flashable for Infuse GB
I took a look at the original CWM package and made the following changes:
1 - swapped in our update-binary
2 - changed the mount command in edify script (not really needed since system is already mounted in gb voodoo CWM recovery)
3 - removed all mount commands from init.d script (not required since you have to have /system mounted just to read the script)
Here's a link to the CWM flashable: http://d-h.st/Kaq
I'm running this on both my Infuses - no problems noted. At work now so will not have a chance to try with games for a couple more hours at least. Only down side I can note is that the rngd binary is about 1MB in size - a small sacrifice if it does eliminate lag events
Note that this package is for GB, but should work fine for 4.x roms as long as /system is mounted as part of recovery startup. Can someone test on a 4.x (CWM9/10) rom by flashing the zip and then checking /system/etc/init.d for a file named 91RNGD or /system/xbin for rngd? I've already tested on GB and it works fine there.
Thanks bradman for posting this - all credit and thanks to the original devs who posted this.
UPDATE - 2012/01/03
I've confirmed the documented improvement in speed at which Maps re-tiles the map display when making big location changes. Still testing other apps. Some games appear a big less laggy, although some disruptive lag events still occur (I suspect due to file system i/o scheduler delays rather than from lack of random/entropy data as addressed with this enhancement). I'll do some benchmarking over the weekend and report back with results.
Zen Arcade said:
I took a look at the original CWM package and made the following changes:
1 - swapped in our update-binary
2 - changed the mount command in edify script (not really needed since system is already mounted in gb voodoo CWM recovery)
3 - removed all mount commands from init.d script (not required since you have to have /system mounted just to read the script)
Here's a link to the CWM flashable: http://d-h.st/Kaq
I'm running this on both my Infuses - no problems noted. At work now so will not have a chance to try with games for a couple more hours at least. Only down side I can note is that the rngd binary is about 1MB in size - a small sacrifice if it does eliminate lag events
Note that this package is for GB, but should work fine for 4.x roms as long as /system is mounted as part of recovery startup. Can someone test by flashing the zip and then checking /system/etc/init.d for a file named 91RNGD or /system/xbin for rngd?
Click to expand...
Click to collapse
I currently cant test this but if it turns out to work ill put it on OP. i did hear from someone that the biggest difference on GB but i cant say that for y self because i have not tried yet
I gotta say, it's very smooth so far.
Works fine on Scott's CM10. PS shows the rngd process running. Thanks
Zen Arcade said:
Note that this package is for GB, but should work fine for 4.x roms as long as /system is mounted as part of recovery startup. Can someone test on a 4.x (CWM9/10) rom by flashing the zip and then checking /system/etc/init.d for a file named 91RNGD or /system/xbin for rngd? I've already tested on GB and it works fine there.
Thanks bradman for posting this - all credit and thanks to the original devs who posted this.
Click to expand...
Click to collapse
Sent from my SGH-I997 using xda premium
Heyyy Scott, check out this guys find
lordvincent 90 posted it..
Originally Posted by zeppelinrox
So I did a bit of digging and a bit of research and a bit of testing.
I really dunno if the tweak makes that big of an effect but I did discover a nice trick to have a nice fat entropy_avail with zero overhead.
One of the first pages I skimmed was http://linux.die.net/man/4/random which mentioned at the bottom these other files:
read_wakeup_threshold contains the number of bits of entropy required for waking up processes that sleep waiting for entropy from /dev/random.
write_wakeup_threshold contains the number of bits of entropy below which we wake up processes that do a select() or poll() for write access to /dev/random.
Normally, read_wakeup_threshold is 64 and write_wakeup_threshold is 128
I also wondered why most users report that their entropy_avail was by default in the 200ish range while mine was always by default over 300.
I had also found this page at linuxinsight. I had used that site alot when researching Kick Ass Kernelizer's sysctl tweaks.
So I thought, hey I wonder if I can use sysctl to set good values and low and behold, I looked in my script and I already have settings for both lol:
Code:
busybox sysctl -e -w kernel.random.read_wakeup_threshold=128;
busybox sysctl -e -w kernel.random.write_wakeup_threshold=256;
As you can see, I had doubled the default values - and that's why my entropy_avail was always over 300.
So I decided to mess with sysctl a bit.
Connected the phone to the laptop.
In one command prompt I watched the entropy_avail with this one liner:
Code:
while :; do cat /proc/sys/kernel/random/entropy_avail; sleep 1;done
In a second command prompt I did the sysctl thing...
I found that write_wakeup_threshold didn't effect entropy_avail at all.
But read_wakeup_threshold is a totally different story
I did
Code:
busybox sysctl -w kernel.random.read_wakeup_threshold=2048
The entropy_avail just started climbing....
All the way up to 3600+ and just stayed there. Never went down at all.
Actually, the more I did stuff with the phone, the faster the level would climb.
So it would never go down and would never get used.
I thought well maybe I should lower it so it does get used.
I kept lowering read_wakeup_threshold until it got down to 1200 and finally entropy_avail dropped to 2400+ and kept climbing until 3600 and then would drop to 2400 immediately and up again and so on...
I played with different values.
Setting it to 1000... entropy would go up to 3000 and then drop to 2000 and up to 3000 again....
Setting to 750.... entropy would go up to 2250 and drop to 1500 and up to 2250 again...
So the pattern is:
max entropy_avail=read_wakeup_threshold * 3
min. entropy_avail=read_wakeup_threshold * 2 (ie. read_wakeup_threshold * 3 - read_wakeup_threshold)
So it builds up 3 times the read_wakeup_threshold and then when it hits that limit, it drops the value of read_wakeup_threshold.
If you want to lock it it at the highest possible value (4096), you'd do:
Code:
echo 1366 > /proc/sys/kernel/random/read_wakeup_threshold
Or
Code:
busybox sysctl -w kernel.random.read_wakeup_threshold=1366
You can add either of those to any init.d script.
However, on my device, it won't go over 3600 so you can test for yourself how high yours will go.
If all you can get is 3600ish just go with 1200 (ie. 3600/3)
In Kick Ass Kernelizer I'm gonna make it like so:
Code:
busybox sysctl -e -w kernel.random.read_wakeup_threshold=1024;
busybox sysctl -e -w kernel.random.write_wakeup_threshold=2048;
That will make it bounce between 3072 max and 2048 min.
I'm making write_wakeup_threshold twice the amount of read_wakeup_threshold simply because that's what it is by default.
But hey, maybe I can save battery life if I make it 1280 just so it stays locked in at 3600+ and it doesn't have to keep rebuilding entropy_avail lol
So conclusion is: since there is a definite pattern on how entropy was being built up to a pre-determined level and dropped to a pre-determined level, it wasn't actually being used. That's just how it's programmed.
If the setting isn't there to "hold" all the entropy, it just drops/flushes it and force feeding it entropy won't make it not spit it out
So at least I found the setting that will make it hold it in lol
Maybe somebody would like to give it a try and test to see if it actually saves battery by setting read_wakeup_threshold to 1366.
Click to expand...
Click to collapse
lordvincent 90 posted it..
Just adding this, after reading the whole thread here it seems like this may be a simpler solution (and better on battery life)
Click to expand...
Click to collapse
Post Link -- http://forum.xda-developers.com/showpost.php?p=36208713&postcount=32
Zen Arcade said:
I took a look at the original CWM package and made the following changes:
1 - swapped in our update-binary
2 - changed the mount command in edify script (not really needed since system is already mounted in gb voodoo CWM recovery)
3 - removed all mount commands from init.d script (not required since you have to have /system mounted just to read the script)
Here's a link to the CWM flashable: http://d-h.st/Kaq
I'm running this on both my Infuses - no problems noted. At work now so will not have a chance to try with games for a couple more hours at least. Only down side I can note is that the rngd binary is about 1MB in size - a small sacrifice if it does eliminate lag events
Note that this package is for GB, but should work fine for 4.x roms as long as /system is mounted as part of recovery startup. Can someone test on a 4.x (CWM9/10) rom by flashing the zip and then checking /system/etc/init.d for a file named 91RNGD or /system/xbin for rngd? I've already tested on GB and it works fine there.
Thanks bradman for posting this - all credit and thanks to the original devs who posted this.
Click to expand...
Click to collapse
Anyone tried this?
Btw brad im on jvu saurom and flashed it fix permission but this is what i get
Tweak
This relatively minor tweak provides a noticeable boost. I'm currently using Liquid Smooth RC9.11 with no further tweaks. After applying this tweak I've noticed faster loading times for a couple games, Google maps is much more responsive to massive view changes, web browsing is snappier, and as stated above almost no redraw delay when returning to the launcher after running a large app (like a game). I must say this under-powered and under-RAMmed little Infuse just keeps getting better and better thanks to all the work the devs here. Keep up the good work!
BR

[KERNEL] dagkernel 0.01 (for stock/stock based ROMs)

Hi!
I picked up a G3 about a month ago, great device! Why'd it take me so long? I'm broke as a joke and married, so I had to wait until it was almost free with a 2yr contract @ AT&T, and for permission from wifey, since her phone is graciously used as my guinea pig
I've been tinkering with it since then, decided I liked the stock experience pretty well (with GEL, root, debloat, etc.), but I decided I wanted a bit more features than the available kernels offer. I also noted some of the overclocking code and scripts could use a bit of re-tooling to lower the number of CPU cycles eaten and give better responsiveness.
Main thing that bugged me was that LG hadn't yet released 21q source, so I started harassing them for it. Finally got the email back I was waiting for telling me it was posted
So, this is my first release, just a simple boot.img you'd have to flash yourself from adb. I'm putting together a fresh build environment since my dev laptop was stolen, it's all new again!
Changes vs. stock (v21q)
Code:
ro.debuggable=1
ro.adb.secure=0
ro.secure=0
ro.allow.mock.location=1
init.d support
Changes planned:
Code:
Over/underclocking for CPU,GPU,other clocks I might find interesting to tinker with, and using new optimized code
Over/undervoltage of the same as above
Kernel modules with nifty things like cifs support I might find useful
Package up a pretty installer script
Support for Whetstone on-the-fly sharpening control https://play.google.com/store/apps/details?id=savoca.codefi.re.whetstone
Request other stuff and i'll consider it!
How to flash:
Code:
unzip the .img file, copy to your external sd card (or internal if you like, but change the path accordingly)
open adb, get a root shell (adb shell, su) - or use a terminal emulator on device for same
enter into shell: dd if=/storage/external_SD/newboot.img of=/dev/block/platform/msm_sdcc.1/by-name/boot
reboot, done!
fin
Hi, this post is for me. Thanks!
So this is a Lollipop kernel then correct? What features does it have? Thanks in advance.
does this kernel set selinux mode to permissive by default?
joho5 said:
does this kernel set selinux mode to permissive by default?
Click to expand...
Click to collapse
Yes
Why not just make this a flashable zip....?

[ROM+KERNEL]HUAWEI WATCH 2[LTE-Sawshark]+[BT-Sawfish]-[OWDE.180926.001.A1][22-Jan-20]

[HUAWEI WATCH 2 (LTE/4G-Sawshark) & (Bluetooth/BT-Sawfish)-OWDE.180926.001.A1]​INTERNATIONAL VERSION
Please read the instructions and notes before flashing anything. Don't ask me if you don't read the instructions.
Code:
###Disclaimer###
[COLOR="Red"][B]WARNING:
IMPROPER FLASHING MAY POTENTIALLY BRICK YOUR DEVICE. SO PLEASE PROCEED AT YOUR OWN RISK. ME OR ANY OTHER DEVELOPER MENTIONED IN THIS POST WILL ASSUME NO RESPONSIBILITY FOR THIS.[/B][/COLOR]
​
DONATE ME HERE
DONATE-ME
##############################
REQUIREMENT
##############################
- An Unlock bootloader
- Working adb/fastboot and driver - Download from Here
- A custom recovery (twrp) See my twrp thread for custom twrp recovery
TWRP-RECOVERY
##############################
HOW TO FLASH KERNEL/BOOT IMAGE
##############################
- Steps via adb/fastboot
- Unzip the folder and move the boot image into your adb/fastboot folder and apply the following commands
Code:
- adb devices
- adb reboot bootloader
- fastboot flash boot boot.img
- fastboot reboot
##############################
HOW TO FLASH THE ROM AND ROOT
##############################
1- Move the build/ROM and Busybox and Magisk to your watch
2- Make a backup - there's always 1% chance something goes wrong.
3- Full wipe is recommended....Wipe data/Factory reset
4- Flash the ROM, then flash Busybox and Magisk (Please flash in this order, ROM, then Busybox and Magisk)
5- Reboot and complete your initial setting
6- Open Magisk Manager and go to settings and set Automatic Response to Grant
7- Done. Don't forget to donate if you like my work, Thanks.
##############################
ROM AND KERNEL FEATURES [22-Jan-2020]
##############################
[Changelog]-Huawei Watch 2 LTE(Sawshark)+Huawei Watch 2 BT(Sawfish)-[22/Jan/2019]
- Based on latest kernel source (-Source 3.18.24) android-wear with latest security patch
- Linux version 3.18.24 (gcc version 4.9.3 20141215 (prerelease) (UBER-SaberMod-4.9.3_arm-graphite)) #1 SMP PREEMPT Wed Jan 22 9:45:39 CET 2020
- Forced-encryption disabled
- dm-verity removed/disabled
- Auto memory killer set to default
- Sepolicy is patched
- Fix the CPU idle latency unvote timeout. It should reduce the wasting power and CPU go to deep idle states immediately after a request
- Add and use a timer frequency of 100 Hz. It should improve power consumption.
- Add and update/Hide verifiedbootstate from /proc/cmdline in order to fix the failed SafetyNet CTS check(It can still fail through other means)-GOOGLE PAY SHOULD WORK. USE MAGISK TO HIDE ROOT. U may need Gpay enabler
- Remove verifiedbootstate flag from /proc/cmdline - Disable CRC check
- Scheduler optimize/support for heterogeneous multi-core
- Scheduler support for heterogeneous multi-processor systems
- Enable all core with scaling_available_frequencies (200000 400000 533333 800000 1094400 1267200 MHz)- scaling down the frequency of the CPUs to 200 MHz during idl mode and rise the freq. to 1.26Ghz during high pressure.
- Set swappiness to 60
- Change zswap max pool % to 20%. It will reduce CPU usage a lot
- Enable zram & zswap and add 256MB virtual memory default. It will speed up the device a lot
- Removed nolog usage, remove rtb logging from the kernel
- Remove selinux auditing from kernel for lower overhead
- Remove IPC logging from the kernel
- Disabled some kernel parameter to speed up the performance- at the cost of battery/ power consumption
- Remove some logging from several drivers
- Improve memory allocations -Should improve the device a lot
- Add some tweaks to improve the overall speed, apps startup are too faster
- Set zswap compressor to lz4 by default
- APM driver updated again to reduce battery usage during sleeping
- Several other patches to reduce battery usage
- Multi-core scheduler enable/optimized
- APM driver updated reduce battery usage during sleeping
- Fix the wake up time. The screen should wake up more quickly when pressing the button.
- Tweaked the scheduler to reduce/save power by scaling down the frequency of the CPUs or idling them,
- A lot subsystems converted to use power efficient workqueue
- The watch goes to sleep during no action in order to save battery
- Remove debug event logging-Kill the useless logging to reduce overhead
- Remove sync debug entirely to cut down CPU waste in the frame render hot path
- Remove 10 ms CPU idle latency unvote timeout- Doesn't force the CPU to stay out of deep idle states for far longer than necessary, which wastes power
- Disable audit support, usually comes with a measurably significant amount of overhead
- Remove audit dependency
NOTE: THERE IS NO NEED TO FLASH THE LATEST KERNEL IF YOU FLASH THE LATEST ROM.
##############################
DOWNLOAD
##############################
[Huawei Watch 2 4G/LTE]+[Huawei Watch BT][22-Jan]
[DECRYPTION KEY]
WO0FVexxQnrtcODYdmNvnQ
##############################
MAGISK/BUSYBOX/APP-KERNEL-CONTROL
##############################
DOWNLOAD LATEST MAGISK FROM HERE
DOWNLOAD LATEST BUSYBOX FROM HERE
KERNEL CONTROL APP WEAR OS
##############################
How to get the Gpay back...
##############################
1-https://pastebin.com/HKV7cj7H
2-https://forum.xda-developers.com/smartwatch/other-smartwatches/rom-kernel-t3821013/page172
3-https://www.youtube.com/watch?v=UKxGfNxRjo4&t=320s
4-https://forum.xda-developers.com/showpost.php?p=79637148&postcount=1720
##############################
HOW TO FLASH THE STOCK IMAGES-(BACK TO STOCK)
##############################
1- Download and unzip the system image below
2- Attach the watch charger to the watch and plug the USB cord (from the charger) into your computer
3- Use the following adb command to start the watch in fastboot mode: adb reboot bootloader
4- On your computer, navigate to the directory where you unzipped the system image in Step 1. At the top level of that directory, execute the flash-all script:
- On Linux or MacOS, type ./flash-all.sh
- On Windows, type flash-all.bat
5 -DONE. Don't forget to donate if you like my work, Thanks.
STOCK-IMAGES-HUAWEI-WATCH-2-LTE-LEO-DLXX-OWDE.180215.017-SAWSHARK-(13/Oct/2018)
STOCK-IMAGES-HUAWEI-WATCH-2-BT-LEO-BX9-OWDD.180215.018-SAWFISH-(22/7/2018)
##############################
Source/GitHub
##############################
-Source
IF YOU LIKE MY WORK AND WANT ME TO CONTINUE, THEN BUY ME A SHOT OF WHISKY
DONATE ME HERE
DONATE-HERE
Special thanks to:
If you can, donate and respect all the devs and enjoy
@Chainfire for great work in android
@Maxr1998 Big thanks for giving me knowledge and your great work for Asus Zenwatch_3 and your great github guide. Please thank and donate him for all his efforts
@topjohnwu for his great effort (Magisk)Thank you so much
@SuperR.R for the great kitchen
@Xmaster24 for system-less root-
@moneytoo for his great app. Please appreciate and donate him
Pay Enabler
@SuperThomasLab for great tools
Please always support devs and others (soon).​
ROM download asking for decryption key?Can fix the link?
Hello All,
Is it possible to install this latest ROM on model without LTE?
Thank you for reply :good:
arthos7 said:
ROM download asking for decryption key?Can fix the link?
Click to expand...
Click to collapse
Hoffmanns said:
Hello All,
Is it possible to install this latest ROM on model without LTE?
Thank you for reply :good:
Click to expand...
Click to collapse
Link are fixed now. It will properly not gonna work on non-lte. I can build a new for non-lte version if some one send me the latest system image and boot image. (I can extract from your watch via teamviewer, in case you can't) But you need to flash the latest firmware without root.
IF YOU LIKE MY WORK AND WANT ME TO CONTINUE, THEN BUY ME A SHOT OF WHISKY
DONATE ME HERE​
I will upload a complete latest stock images N7176C (lte) incase anyone wanna go back to latest stock again.
The only thing you have to do is boot into bootloader mod and then run the script by double click on it. After some reboots you will be back on latest stock.
I will combine both Linux and Windows together, use one you prefer.
IF YOU LIKE MY WORK AND WANT ME TO CONTINUE, THEN BUY ME A SHOT OF WHISKY
DONATE ME HERE​
Just received my Huawei SW 4G this weekend and after installing Huawei wear I got the alert message that the watch was rooted.
How can I confirm is it's rooted or not.
Thanks
Sent from my ONEPLUS A3003 using Tapatalk
Can anyone who's used this verify that it's notably faster or has improved battery life compared to stock? Or is the difference negligible?
How to build boot.img
Hi Janjan,
I am trying to build a custom kernel for my Huawei Watch 2 (non LTE) and I was wondering if you could share a little of your development work.
How do you actually put the boot image together? I am able to compile the kernel from android-msm-sawshark-3.18-nougat-mr1-wear-release,
which gives me a zImage. I also have the original images. So I tried to unmkbootimg the original boot image and replace the kernel. However, this doesn't seem to work. when I compare the sizes of the supposedly original zImage and the one created from the repository above, their size differs by roughly a factor of 100. So there must be something seriously wrong
What steps do you use to create the kernel and the boot image?
I also checked your github code and tried to use it but it seems to depend on other stuff that is not in your repos. Where did you find the code you have in your repos?
Best regards,
Mogli
janjan said:
I can build a new for non-lte version if some one send me the latest system image and boot image. (I can extract from your watch via teamviewer, in case you can't) But you need to flash the latest firmware without root.
Click to expand...
Click to collapse
Does that offer still stand? If yes I am willing to let my watch be used as a test subject.
mogli19 said:
Hi Janjan,
I am trying to build a custom kernel for my Huawei Watch 2 (non LTE) and I was wondering if you could share a little of your development work.
How do you actually put the boot image together? I am able to compile the kernel from android-msm-sawshark-3.18-nougat-mr1-wear-release,
which gives me a zImage. I also have the original images. So I tried to unmkbootimg the original boot image and replace the kernel. However, this doesn't seem to work. when I compare the sizes of the supposedly original zImage and the one created from the repository above, their size differs by roughly a factor of 100. So there must be something seriously wrong
What steps do you use to create the kernel and the boot image?
I also checked your github code and tried to use it but it seems to depend on other stuff that is not in your repos. Where did you find the code you have in your repos?
Best regards,
Mogli
Click to expand...
Click to collapse
Sure, tell me what you did and your steps for building zImage + modul. I am away from my office for a while.
janjan, have you had success with making a non-lte version?
cdkg said:
janjan, have you had success with making a non-lte version?
Click to expand...
Click to collapse
If you send me the latest boot.img, system.img and vendor.img then I will definitely make.
janjan said:
If you send me the latest boot.img, system.img and vendor.img then I will definitely make.
Click to expand...
Click to collapse
I have the boot.img and system.img. Is there a tutorial or any instructions you could give on how to get the vendor.img?
janjan said:
Sure, tell me what you did and your steps for building zImage + modul. I am away from my office for a while.
Click to expand...
Click to collapse
Hi Janjan,
(Apparently I am not allowed to post links yet, so I am trying my best to explain without them)
1. I got the source code for the Sawshark watch from github (mr1-wear-release). I guess there is no dedicated Seafish kernel source. Short question: There is a choice of 3 different kernel codes. Which one shall I take?
2. I tried to compile this source code without changes (to rule out errors before I make modifications). This works and I get as zImage. What do you mean by modul though? I thought zImage was the only product.
3. Using unmkbootimg, I un-packed an stock boot.img. The unmkbootimg tool says that the boot.img has been compiled with a non-standard mkbootimg program. However the offsets and other values (I am supposed to tune when I use mkbootimg) are contradicting. Eventually, the "non-custom" values recommended by unmkbootimg caused errors in mkbootimg and I ended up using the default values. This worked.
4. When I flash the resulting boot.img my watch gets stuck during boot with the Huawei logo on all the time.
To verify my tools, I tried step 3. in two more ways:
3.1. re-pack the un-packed boot.img, flash it (no errors and boot works)
3.2 pack a boot.img using a zImage obtained from a sawshark boot.img (instead of the seafish). This also worked and boot was successful
I have also looked at the boot.img and zImage files in a hex editor. I can locate the beginning of the kernel but not the end. Also if I did, I wouldn't know how to replace the kernel in hex mode But from what I have understood about mkbootimg, this script does not much more than concatenate zImage and ramdisk and add a header. Is this somewhat correct?
Eventually, I need to turn on some currently disabled kernel features (which is why I am doing all of this ). So I am still trying to figure out the right tools and components. And therefore the question: How do you usually build the kernel and how do you pack it into the boot.img. Do you modify the ramdisk when you replace the kernel?
Best,
Mogli
Instructions to modify ramdisk
Hi Janjan,
How do you disassemble and re-assemble the ramdisk?
Wanted to make a few modifications to the ramdisk.cpio.gz. Again, I wanted to try the tools first. So I unpacked and re-packaged the ramdisk without modifications. After flashing the regenerated boot image, my watch goes into recovery mode...
I found these instructions in a tutorial (again, I can't post links yet... sorry):
For disassembly:
Code:
$ mkdir ramdisk_dir
$ cd ramdisk_dir
$ gunzip -c ../ramdisk.cpio.gz | cpio -i
for re-assembly
Code:
$ find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
Update to my previous post:
I found my mistake in building the kernel:
Instead of using
Code:
make ARCH=arm CROSS_COMPILE=arm-linux-androidkernel-
I was using
Code:
make ARCH=arm CROSS_COMPILE=arm-linux-androideabi-
mogli19 said:
Hi Janjan,
How do you disassemble and re-assemble the ramdisk?
Wanted to make a few modifications to the ramdisk.cpio.gz. Again, I wanted to try the tools first. So I unpacked and re-packaged the ramdisk without modifications. After flashing the regenerated boot image, my watch goes into recovery mode...
I found these instructions in a tutorial (again, I can't post links yet... sorry):
For disassembly:
for re-assembly
Update to my previous post:
I found my mistake in building the kernel:
Instead of using
I was using
Click to expand...
Click to collapse
It seems much better now. Are you in Windows or Linux? I will post my script and tools once I reach my PC. I am away from my PC right now. It means you destroy something during generating or packaging the boot image. Does you kernel /boot.img work without or before editing the ramdisk?
Update:- seems you are in Linux.
janjan said:
It seems much better now. Are you in Windows or Linux? I will post my script and tools once I reach my PC. I am away from my PC right now. It means you destroy something during generating or packaging the boot image. Does you kernel /boot.img work without or before editing the ramdisk?
Update:- seems you are in Linux.
Click to expand...
Click to collapse
Yes, I am on linux. I found a different approach that works for me now:
Code:
Extract the ramdisk.
$ mkdir ramdisk
$ cd ramdisk
$ gzip -dc ../ramdisk.cpio.gz | cpio -i
# Make any changes necessary (e.g., set ro.secure=0 in default.prop).
# Recreate the cpio archive using the mkbootfs binary produced from building the Android source code
$ cd ..
$ mkbootfs ./ramdisk | gzip > ramdisk-new.gz
You said you were able to turn on all the cores. Can this be done by modifying the ramdisk or how do you do this?
mogli19 said:
Yes, I am on linux. I found a different approach that works for me now:
You said you were able to turn on all the cores. Can this be done by modifying the ramdisk or how do you do this?
Click to expand...
Click to collapse
Did I said? But It can't be done by editing the ramdisk only. You need to add and edit alot (add driver edit cores etc) in kernel sources.
Okay, before anyone flames, I did look everywhere in this thread and cannot find it. Does anyone have the link to the flashing instructions for this rom?
janjan said:
Did I said? But It can't be done by editing the ramdisk only. You need to add and edit alot (add driver edit cores etc) in kernel sources.
Click to expand...
Click to collapse
Oh sorry, I thought I had read this on your feature list I actually looked at this and asked myself if there was a way to make the cpu settings permanent:
https://stackoverflow.com/questions/20221680/android-how-to-force-cpu-core-offlineshut-down-cores

Disable RCTD ( Root Checking Tool) on the G7

I don't believe I have seen this on the G7 forums so I figured I would make a quick guide for anyone whom is unfamiliar with the subject. RCTD is LGs Root Checking Tool that is triggered when the bootloader is unlocked as well as when BusyBox is installed, and is known to drastically affect the performance of the device after root. This is primarily seen in the V30 forums, but I assume it affects the performance of the G7 as well. There are tools to remove it as well as a script by John Fawkes, however from what I could tell, neither of them applied to the G7. It's a pretty simple process I recommend using root explorer and Zacaree1's Root Activity Launcher(play store). There are other ways to get to the hidden menu but if you have deleted the stock dialer or have any other issues, this app will always get you there and it has a massive amount of other great uses as well and I believe any root user should have it installed.
Step 1: Open Root Explorer and head to Product/Priv-app/SRTC and delete the app. This won't stop the process from starting however because LG uses an init.d script to run the tool at boot, leading to step 2.
Step 2: Head to System/Etc/Init and find
"lge.system.services.rc" long press on it to open it with text editor (if using Root Explorer) and scroll down until you see #RCT (Root Checking Tool). Under this line you will see a list of 3 or 4 commands. To stop them from running we want to put a # in front of each and save our changes. Example:
#service rctd /sbin/rctd
# class late_start
# user root
# group root
# seclabel u:r:rctd:s0
Now we've stopped the tool from running at start up, but it will still have the last time root was detected stored in the system. First, reboot to be sure that the edit survived a restart, and if it did then head to step 3.
Step 3: Head to Mnt/Vendor/Persist-LG/RTC and delete the file inside the RTC folder. If you delete the entire RTC folder, it will be recreated at reboot so it's pointless. Save and Reboot.
Step 4: Open the Root Activity Launcher app and type "Hidden" in the search box. This will lead you to the hidden menu activity (not operator hidden menu), so click on it to expand the list. Scroll down pretty far until you see "com.lge.hiddenmenu.HiddenMenu." You can click the icon that looks like a paperclip and it will pin the shortcut to your hidden menu to your home screen if you'd like, otherwise just click on the main line to open the Hidden menu, click SVC Mode and find LG RCT. If you did everything correctly, once you click LG RCT it should show Status-disabled. It will stay disabled regardless of a reboot. Other models like the V30 need additional init.d commands to be disabled. The G7 has these same init.d scripts, but for whatever reason we only needed to stop one of them. Done!
Attachments wouldn't load
Ty mate!!!
One question, i can do all these steps with magisk on stock? Would be reverted the changes at reboot?
---------- Post added at 02:04 AM ---------- Previous post was at 01:39 AM ----------
Bro, in the step 3, i cant find any path called "vendor" under the main path "Mnt", only a 0.00bit file called vendor
it did not work, step 4... status enable
manuhuelva said:
Ty mate!!!
One question, i can do all these steps with magisk on stock? Would be reverted the changes at reboot?
---------- Post added at 02:04 AM ---------- Previous post was at 01:39 AM ----------
Bro, in the step 3, i cant find any path called "vendor" under the main path "Mnt", only a 0.00bit file called vendor
Click to expand...
Click to collapse
You should be able to. I'm still stock, ULM20e Pie. What file manager are you using? That's strange that you can't to your vendor file. Is vendor accessible to you in TWRP?
Stvn77 said:
it did not work, step 4... status enable
Click to expand...
Click to collapse
Hmmm....can you check the Persist-lg folder and see if the file inside showed back up?
Yeedatoy said:
Hmmm....can you check the Persist-lg folder and see if the file inside showed back up?
Click to expand...
Click to collapse
following the path u post, i cant find, bc persist-lg is under vendor, and i cant find vendor
Delete
When you open up your file explorer, did you click the mount R/W button?
Yeedatoy said:
When you open up your file explorer, did you click the mount R/W button?
Click to expand...
Click to collapse
See this bro
https://youtu.be/5Tj5iCnkrj0
---------- Post added at 04:24 PM ---------- Previous post was at 04:23 PM ----------
Ive done steps 1 and 2. Could not do 3
what's the point for the lg guys for slowing down the system if you have root?
and, the service is rct and after you have to look for rtc? they mess up the letters for what? something is strange
Yeedatoy said:
Hmmm....can you check the Persist-lg folder and see if the file inside showed back up?
Click to expand...
Click to collapse
yes. it showed back up
I've followed this guide on my v35 and i confirm it's working just fine!
Thanks!
Stvn77 said:
yes. it showed back up
Click to expand...
Click to collapse
Since None of my photos will load, check this post in the v40 threads to make sure your init.d script was edited with correctly.
https://forum.xda-developers.com/lg-v40/help/rctd-affects-devices-t3945207
cloud1250000 said:
I've followed this guide on my v35 and i confirm it's working just fine!
Thanks!
Click to expand...
Click to collapse
Awesome! I was getting a bit concerned for a moment while trying to think of why it hasn't worked for the others yet. Do you have LDB removed as well? I removed it so long ago that I forgot about it until I came across it in the V40 threads. I don't think it could interfere with this process, but I am trying to rule out anything that may be an issue for the others.
manuhuelva said:
See this bro
https://youtu.be/5Tj5iCnkrj0
---------- Post added at 04:24 PM ---------- Previous post was at 04:23 PM ----------
Ive done steps 1 and 2. Could not do 3
Click to expand...
Click to collapse
https://photos.app.goo.gl/zgYxBS7uWJoAkGFm8
Yeedatoy said:
https://photos.app.goo.gl/zgYxBS7uWJoAkGFm8
Click to expand...
Click to collapse
bro, finally fixed, was the custom kernel, was no installed.
I fixed manually the 1.7 kernel !!!!!
Now reach 825mhz on gpu and have spectrum bro!!
if u want i can tell u how.
manuhuelva said:
bro, finally fixed, was the custom kernel, was no installed.
I fixed manually the 1.7 kernel !!!!!
Now reach 825mhz on gpu and have spectrum bro!!
if u want i can tell u how.
Click to expand...
Click to collapse
Tell me how? Please.
How to Fix
slyxo said:
Tell me how? Please.
Click to expand...
Click to collapse
steps:
1-Open ur bootloader
2-root and install magisk
3-flash xD-Kernel 1.7-Stock from drive folder (other stock folder) in TWRP and reboot to system https://drive.google.com/file/d/1MEFt7Ma2DOw8h7d_HjfyLN64Hnqz2bOo/view?usp=sharing credits to @Smart Ru
4a-poweroff
4b-go Qfil and extract ur boot_a or boot_b partition
5-extract Android image kitchen folder and put ur boot.img inside. https://forum.xda-developers.com/attachment.php?attachmentid=5024495&d=1590190159 credits to @osm0sis
6-run unpack script
7-paste the files i provided inside ramdisk folder and replace it https://drive.google.com/file/d/1HTT-0nm-y6tib_T1VQrws0EMreWia_Us/view?usp=sharing
8-go back and run repack script
9-pick the new image file and flash it on boot_a and boot_b by fastboot or qfil
10-dont care about error message at startup of android, it appears anyways with xd-kernel-1.7-stock kernel without modifications on every boot. It appears due to kernel kills dummy lg process from startup (2.0.2-custom doesnot)
11-download spectrum.
12-done.
Ive edited the profiles too for be more accurate to profile name:
-Balanced:
Governor "blu_schedutil" (is a light schedutil with powersaving on sleep mode, perfect for everyday use)
I/O "cfq" (most balanced I/O for everyday use)
Max/min Cpu.freq = 2.8ghz/800mhz (gold) 1.7ghz/300mhz (silver)
Max/min gpu.freq = 710mhz/160mhz (710mhz is stock top speed)
-Performance:
Governor "Performance" (cpu will run at full speed all the time, just pick it only for run benchmarks or for do selective heavy task u need, will consume battery fast)
I/O "deadline" (best for gaming-benchmarks)
Max/min Cpu.freq = 2.8ghz/1.05ghz (gold) 1.7ghz/748mhz (silver)
Max/min gpu.freq = 780mhz/160mhz
-Battery:
Governor "Powersave" (cpu will run at low speed most time, a really battery saving profile, u will have a little ui lag, but it gives u true promised battery saving)
I/O "SioPlus" (best battery saving I/O available in kernel)
Max/min Cpu.freq = 1.68ghz/825mhz (gold) 1.51ghz/300mhz (silver)
Max/min gpu.freq = 160mhz/160mhz
-Gaming:
Governor "Pixutil" (A port of official Pixel 3 Schedutil governor, awesome performance without stay full 2.8ghz all time, perfect for gaming ^^)
I/O "deadline" (best for gaming-benchmarks)
Max/min Cpu.freq = 2.8ghz/1.05ghz (gold) 1.7ghz/300mhz (silver)
Max/min gpu.freq = 825mhz/160mhz (highest gpu freq profile for more fps)
Yeah, I always get " there is an internal problem with your device" message on startup. That's normal. Spectrum never worked on 1.7 for me and neither did Klapse, but 2.0 fixed that for me.

Categories

Resources