• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Skinny Pro Custom Boot Images

Search This thread

jajk

Senior Member
Jul 18, 2014
1,514
1,645
What is Skinny Pro?

This is not for NOOBS - it breaks functionality in Xiaomi apps that try to communicate back to head office. This is an intentional feature and is for people who are not interested in being part of the Xiaomi ecosphere. LEAVE NOW if you have, or intend to log on to Xiaomi and use their services!!!!
Skinny does not magically fix poor choice of ROMs, Apps or lack of knowledge.

It is not a custom Kernel - it is a custom boot.img containing modified initialization scripts for the stock kernel.

There are 2 distinct versions:
Based on 7.1.4.0 - Use for 7.1.xx to 7.3.20 (MIUI7) Support discontinued since V7 (O.P no longer applies to this version)
Based on MIUI8 - use for MIUI7.5.x and MIUI8

Design Brief:
No Placebos
To overcome the limitations of Stock MIUI being:
Poor battery life
Poor performance
Chronic invasion of privacy

Boot.img mods:
Disable starting of non-present devices and services
Disable stock recovery overwriting TWRP
Disable OTA services (no use on a modified ROM)
Disable starting of invasive (spying) services
Disable fingerprint sensor infrastructure (not for our device)
Disable find device infrastructure
Disable second space infrastructure
Build in init.d support
Enable zram swap creation (disable conflicting "mcd" service infrastructure)
Mass Storage Device mode added for external SDCard
Improved TCP Buffer values
Reconfigured internal SDCard suppport to remove uneccessary symlinks
Reduce cpu scheduler, foreground and background tasks deadtime (throttling)
Add some Android 6.0 TCP tweaks
Expose LMK and HPS settings for user configuration

What you will see:
Faster boot
Less background activity at idle
Less RAM usage
Less spying/reporting activity
Better battery life
Better Performance
More reliable and faster data speeds

Install your chosen ROM and get it past the first setup screens before flashing a Skinny Boot image.
If you really must install Xposed, install this after the Skinny boot image.
Do not install "kernel" tweaking apps - they will conflict with the inherent settings in Skinny!
No wipes are necessary after installing the boot.img

What else do I need to do?
First, an explanation as to why we need to set everything the way it is:
The cpu is controlled by 4 separate mechanisms:
1. Thermal throttling - will limit frequencies and shut down cores to stay within safe operating temperatures - will override all other mechanisms. Settings available: High Performance (less strict) or Balanced (default)
2. Performance Server - will temporarily boost freqs and cores depending on detected conditions such as screen touch, screen update or rotate, app open. Limited settings available via /etc/perfservscntbl.txt
3. Hotplugging Service - will add or remove cpu cores as load requires. Some settings are accessible through /proc/hps/
4. Interactive Governor - will throttle freqs up and down based on load and add or remove cores also. Some settings are accessible through /sys/devices/system/cpu/cpufreq/interactive/

You will notice there are competing and often contradicting mechanisms. The factory defaults essentially disable the Interactive governor as being the primary source of initial boosting cpu freqs. The "boost" setting normally found in the governor is non-functional - instead, the Perf Server will boost to 2 cores @ 1183MHz when a potential demand for processing power is detected apart from a simple screen touch. The interactive governor will take over scaling the freq and number of cores after the perf server boost period expires or load demands more cpu power than the boost caters for.

Since the Performance Server tends to over-react, setting 2 cores @ 1183MHz for the smallest of events, we disable it completely by manually editing the existing line in /system/build.prop from:
ro.mtk_perfservice_support=1 to ro.mtk_perfservice_support=0
You must do this yourself - this is vital since all further Governor and Hotplug settings rely upon it being disabled.
Editing /etc/perfservscntbl.txt is not required since this file will no longer be processed.

The settings for the Interactive Governor and Hotplug are modified from factory default to correct a couple of serious problems:
1. The cpu will not reliably throttle back to idle at 403MHz. This has a huge impact on battery.
This is caused by the timer_rate setting being too short allowing transient background activities to trigger scaling the freq up. Increasing the time effectively averages out the transient load spikes so the cpu will not break idle unnecessarily.
2. The cpu does not respond to increasing or decreasing load fast enough creating micro-lags and consuming battery. Reducing the min_sample_time will shorten the time taken for the cpu to lower in freq when load drops off. Reducing the above_hispeed_delay will reduce the response time to increase the cpu freq in response to a load. Both of these settings also compensate for the longer than standard timer_rate that introduces some sluggishness by necessity.
All other values are set to encourage the frequency and number of cores to rapidly and reliably return to idle to save battery while still providing sufficient responsiveness to sudden load demands.

Create an init.d script exactly as follows: (premade file 01_init also available to download)

Code:
#!/system/bin/sh

### CPU freqs standard RN2: 403000, 806000, 1183000, 1326000, 1469000, 1625000, 1781000, 1950000
### CPU freqs PRIME RN2:    403000, 806000, 1183000, 1326000, 1482000, 1664000, 1885000, 2158000
### GPU freqs standard RN2: 253500, 299000, 390000, 442000, 546000
### GPU freqs PRIME RN2:    253500, 338000, 390000, 546000, 676000

# Stop running boot-time services (enable the lines for services you want to stop)
#stop sn                # USB serial number allocation
#stop wifi2agps         # WiFi assisted GPS (for fine location)
#stop agpsd             # Mobile Network assisted GPS (for fine locastion)
#stop emsvr_user        # Engineering Mode server
#stop PPLAgent          # Privacy Protection Lock
#stop mtkbt             # MTK Bluetooth
#stop batterywarning    # Battery warning service
#stop debuggerd64       # debug logging
#stop debuggerd         # debug logging
#stop logd              # logging
#stop autokd            # autotune for WiFi

#Set to permissive (enable this line if SE permissive mode is required)
# setenforce 0

# Tweak Interactive Governor (now set in boot.img - enable here to override values)
#echo 403000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq        # factory default 1183000
#echo 99 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load         # factory default 99
#echo 99 > /sys/devices/system/cpu/cpufreq/interactive/target_loads            # factory default 90
#echo 25000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate           # factory default 20000
#echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time      # factory default 20000
#echo 5000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay   # factory default 20000
#echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack          # factory default 80000

# Limit CPU max freqs (To limit the maximum cpu freq, enable both of these lines. Select a valid freq for your device from table at start)
#echo 1781000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#echo 1781000 > /proc/cpufreq/cpufreq_limited_max_freq_by_user

# Limit foreground CPU cores (set in boot.img - enable here to override values) 0-1 min, 0-7 max Example shows 5 cores (also needs to be set in Hotplug)
#echo 0-4 > /dev/cpuset/foreground/cpus

# Hotplug settings (set in boot.img - enable here to override values) Note: num_limit values are 1-8
#echo 5 > /proc/hps/num_limit_low_battery          # factory default 8
#echo 5 > /proc/hps/num_limit_power_serv           # factory default 8
#echo 5 > /proc/hps/num_limit_thermal              # factory default 8
#echo 5 > /proc/hps/num_limit_ultra_power_saving   # factory default 8
#echo 99 > /proc/hps/up_threshold                  # factory default 95
#echo 87 > /proc/hps/down_threshold                # factory default 85
#echo 0 > /proc/hps/rush_boost_enabled             # factory default 1
#echo 0 > /proc/hps/input_boost_enabled            # factory default 1

# Tweak GPU Settings (Look in /proc/gpufreq/gpufreq_power_dump for power usage at different freqs)
    # To disable GPU touch boost:
#echo 0 > /proc/gpufreq/gpufreq_input_boost        # factory default 1 (enabled)
    # To limit max GPU freq: (Select a valid freq for your device from table at start)
#echo 442000 > /proc/gpufreq/gpufreq_opp_max_freq  # factory default 0 (disabled) 

# Tweak VM (set in boot.img - enable here to override values)
#echo 300 > /proc/sys/vm/dirty_expire_centisecs    # factory default 200
#echo 500 > /proc/sys/vm/dirty_writeback_centisecs # factory default 300

# Tweak LMK (set in boot.img - enable here to override values) 18 37 56 75 93 112MB   # factory default 72 90 108 126 219 317MB (MB x 256 = value)
#echo 4608,9472,14336,19200,23808,28672 > /sys/module/lowmemorykiller/parameters/minfree

#Enable zram (no zram set by default, enable  first 4 lines if 1 zram required, all 7 lines if 2 zram required)
#echo 40 > /proc/sys/vm/swappiness
#echo 268435456 > /sys/block/zram0/disksize     # for single zram: 536870912 = 512MB (for non-prime version) 1073741824=1GB (for prime version)
#/system/xbin/busybox mkswap /dev/block/zram0
#/system/xbin/busybox swapon /dev/block/zram0
#echo 268435456 > /sys/block/zram1/disksize     # for 2 zrams: 268435456 = 256MB (for non-prime version) 536870912 = 512MB (for prime version)
#/system/xbin/busybox mkswap /dev/block/zram1
#/system/xbin/busybox swapon /dev/block/zram1

# Tweak IO Scheduler (set in boot.img - enable here to override values)
#echo deadline > /sys/block/mmcblk0/queue/scheduler    # factory default cfq (choice: noop deadline cfq)
#echo 128 > /sys/block/mmcblk0/queue/read_ahead_kb     # factory default 128 Choose between 128, 256, 512, 1024, 2048
#echo 0 > /sys/block/mmcblk0/queue/add_random          # factory default 1
#echo 0 > /sys/block/mmcblk0/queue/iostats             # factory default 1
#echo deadline > /sys/block/mmcblk1/queue/scheduler    # for ext sdcard (sdcard1)
#echo 2048 > /sys/block/mmcblk1/queue/read_ahead_kb     # for ext sdcard (sdcard1)
#echo 0 > /sys/block/mmcblk1/queue/add_random          # for ext sdcard (sdcard1)
#echo 0 > /sys/block/mmcblk1/queue/iostats             # for ext sdcard (sdcard1)

#Tweak Entropy (set in boot.img - enable here to override values)
#echo 384 > /proc/sys/kernel/random/read_wakeup_threshold    # factory default 64
#echo 448 > /proc/sys/kernel/random/write_wakeup_threshold   # factory default 128

#Tweak for wifi router connection issues
#echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6

# Disable debugging on some modules (set in boot.img - enable here to override values)
#echo 0 > /sys/module/alarm_dev/parameters/debug_mask;
#echo 0 > /sys/module/alarmtimer/parameters/debug_mask;
#echo 0 > /sys/module/binder/parameters/debug_mask;
#echo 0 > /sys/module/earlysuspend/parameters/debug_mask;
#echo 0 > /sys/module/sbsuspend/parameters/sbsuspend_debug_mask;
#echo 0 > /sys/module/snd/parameters/debug;
#echo 0 > /sys/module/pvrsrvkm/parameters/gPVRDebugLevel;
#echo 0 > /sys/module/musb_hdrc/parameters/debug_level;
#echo 0 > /sys/module/lowmemorykiller/parameters/debug_level;

#FSTRIM
busybox fstrim /data
busybox fstrim /system
busybox fstrim /cache
Update BusyBox to version 1.25.1-1 (available to download)

Reduce the number of apps and services needlessly starting automatically at boot. Uninstall or freeze bloat apps. Replace "noisy" apps with better written ones.
Use BetterBatteryStats, WakelockDetector Root or similar to understand what invisible activities are consuming battery.
Use SDMaid, DisableServices, MyAndroidTools or similar to disable autostarts (receivers)and app related services. Use with caution.

To see what boot services are running, type getprop in Terminal. You will see a bunch of entries like [init.svc.66xx_launcher]: [running]
These service must remain running do not stop!:
Code:
[init.svc.66xx_launcher]: [running]
[init.svc.MtkCodecService]: [running]
[init.svc.NvRAMAgent]: [running]
[init.svc.aal]: [running]
[init.svc.ccci_fsd]: [running]
[init.svc.ccci_mdinit]: [running]
[init.svc.drm]: [running]
[init.svc.fuelgauged]: [running]
[init.svc.gsm0710muxd]: [running]
[init.svc.guiext-server]: [running]
[init.svc.healthd]: [running]
[init.svc.installd]: [running]
[init.svc.keystore]: [running]
[init.svc.lmkd]: [running]
[init.svc.media]: [running]
[init.svc.mnld]: [running]
[init.svc.netd]: [running]
[init.svc.ril-daemon-mtk]: [running]
[init.svc.sdcard]: [running]
[init.svc.servicemanager]: [running]
[init.svc.shelld]: [running]
[init.svc.surfaceflinger]: [running]
[init.svc.thermal]: [running]
[init.svc.thermald]: [running]
[init.svc.ueventd]: [running]
[init.svc.vold]: [running]
[init.svc.zygote]: [running]
[init.svc.zygote_secondary]: [running]
[init.svc.bmi160d]: [running]

If you only have 1 SIM, it is highly recommended to go into single SIM mode to turn off the second modem service. Edit build.prop existing line from:
persist.radio.multisim.config=dsds to persist.radio.multisim.config=ss

Turn off Developer Options/Memory Optimization and MIUI Optimization. This is a legacy of the mcd service zram configuration that is disabled.

Removal of Apps that are created by symlinks: (Updated information for any ROM version can be found in ROM \META-INF\com\google\android\updater-script)
Uninstall the app where possible and then delete the leftover libs if they exist.
Code:
[B]MAB[/B]
    /system/lib/libDToken.so
    /system/lib/libNative.so
    /system/lib/libShopSigned.so
    /system/lib/libentryexpro.so
    /system/lib/libsecuritysdk-3.1.27.so

[B]Jeejen[/B]
    /system/lib/libJeejenAisound.so
    /system/lib/libbspatch.so
    /system/lib/libfamily_jni.so
    /system/lib/libgetuiext.so
    /system/lib/libjeejenmsc.so

[B]MIUI Video[/B]
    /system/lib/libDecRes_sdk.so
    /system/lib/libminivenus.so
    /system/lib/libmresearch.so
    /system/lib/libsecurities_sdk.so

[B]Cleanmaster[/B]
    /system/lib/libTmsdk-2.0.9-mfr.so
    /system/lib64/libTmsdk-2.0.9-mfr.so
    /system/lib/libdce-1.1.14-mfr.so
    /system/lib64/libdce-1.1.14-mfr.so
    /system/lib/libkcmutil.so
    /system/lib/libkcmutilex.so
    /system/lib/libsic_helper.so

[B]SecondSpace[/B]
    /system/lib/libspaces_jni.so

[B]Sogou Input[/B]
    /system/lib/libwebp.so
    /system/lib/libweibosdkcore_sogou.so

[B]AMAP Network Location[/B]
    /system/lib64/libapssdk.so

[B]YellowPage[/B]
    /system/lib64/libdidi_secure.so

[B]XMPass[/B]
    /system/lib64/libxmpass_sdk_patcher.so
    /system/lib64/xmpass_libweibosdkcore.so

[B]PicoTTS[/B]
    /system/lib64/libttscompat.so
    /system/lib64/libttspico.so

[B]Miui Gallery[/B]
    /system/lib64/libwrapnexpcmcalbody.so
    /system/lib64/libnexralbody_audio.so
    /system/lib64/libnexcralbody_mc_jb.so
    /system/lib64/libnexeditorsdk.so
    /system/lib64/libPinguoImageSDK.so
    /system/lib64/libMiuiGalleryNSGIF.so
    /system/lib/libMiuiGalleryNSGIF.so
    /system/lib64/libDexHelper.so

[B]MIUI Scanner[/B]
    /system/lib64/libQuadrangleRecognizer.so
    /system/lib64/libhw_instanttrans.so
    /system/lib64/libhwocr_cntools_shared.so
    /system/lib64/libsgmain.so
    /system/lib64/libsgmainso-5.1.2011.so
    /system/lib64/libtbdecode.so
Remove inbuilt virus scanner(s)
Remove GuardProvider.apk and SecurityAdd.apk plus:
Code:
    /system/lib64/libams-1.1.7-m-mfr.so
    /system/lib64/libams-1.1.7-mfr.so
    /system/lib64/libavast-utils.so
    /system/lib64/libavast-vps-interface.so
    /system/lib64/libavlasys.so
    /system/lib64/libavlm.so
    /system/lib64/libavlurl.so
Extra libs that can be removed: (if associated apps are removed)
Code:
[B]Lib:[/B]
libfdpp.so                             Find Device
libfdpp_jni.so                         Find Device
libffmpeg-miplayer.so                  Music / MIUIVideo
libhotknot.so
libhotknot_vendor.so
libnfc_ndef.so
libpatcher_game_jni.so
libpatcher_jni.so
libvoicerecognition.so                 Voice Extensions
libvoicerecognition_jni.so             Voice Extensions
libwhetstone_jni.so
libwhetstone_sdk.so
libxiaomimediaplayer.so                Music / MIUIVideo
libxiaomiplayerwrapper.so              Music / MIUIVideo


[B]Lib64:[/B]
libBaiduMapSDK_base_v4_0_0.so
libBaiduMapSDK_search_v4_0_0.so
libBaiduMapSDK_util_v4_0_0.so
libBankCardRecognizer.so
libduokantext.so
libfdpp.so                             Find Device
libfdpp_jni.so                         Find Device
libhotknot.so
libhotknot_vendor.so
libidcardquality_v1.0.3.so
libjni_latinimegoogle.so               Google Keyboard
libjni_pacprocessor.so
libjni_unbundled_latinimegoogle.so     Stock Keyboard
libnfc_ndef.so
libpatcher_game_jni.so
libpatcher_jni.so
libprintspooler_jni.so                 Print Spooler
libtbtv3312.so
libTrafficRadar.so
libttscompat.so                        Pico TTS
libttspico.so                          Pico TTS
libunipaychsec.so
libweibosdkcore.so
libwhetstone_jni.so
libwhetstone_sdk.so

[B]/vendor/lib64:[/B]
libcom_fingerprints_productiontestmanager.so
libcom_fingerprints_sensor.so

Skinny Pro All versions:
https://drive.google.com/folderview?id=0BwdRTuyj12_yRk9Kcm1pZkxuZzg&usp=sharing
Enjoy:)
 
Last edited:

Sleepy_Augie

Senior Member
Dec 18, 2015
129
7
@jajk Awesome work! Do you intend to work on the aosp boot.img much or are you more invested in the miui one (or is it mostly the same project with not many differences between the two types)?
 
  • Like
Reactions: Brkge

jajk

Senior Member
Jul 18, 2014
1,514
1,645
@Sleepy_Augie There is little difference between the 2 flavors so it is easy to keep them in sync;)

All,
I cannot possibly know what customization other devs are adding to their boot.imgs and whether or not that will make their ROMs incompatible with my boot.imgs. I will try to keep the AOSP version up with current developments while still keeping it "Generic".
 

jajk

Senior Member
Jul 18, 2014
1,514
1,645
@efr07 The beauty of not embedding tweaks - you can choose to be permissive or enforcing in your init.d script rather than me dictating it to all.
setenforce=0 or 1

and to answer the second part....
MIUI uses what could be called a "dynamic swap" system utilizing 4 zram swaps of variable size. The system prioritizes what gets access to that extra memory and what doesn't. No surprises - Xiaomi apps get priority over your own apps. The complexity of this system is so great, it would negate any performance advantage completely but it does make the Xiaomi apps more tenacious than other apps.
 
Last edited:

aghr11

Member
Oct 8, 2015
22
0
@jajk
First things first thank you so much for the effort you have done improving Redmi Note 2,
But I have some question if you please,
I have Miui 7.2.2.0 Lite on my Redmi Note 2 Prime (2.2 ghz) (Rom Link http://en.miui.com/thread-244684-1-1.html)
I have flashed the file as img to boot, and I have done as you said until the int.d thing, I went to #/system/bin/ and I found sh file and opened it in text editor, deleted everything in it and paste what you mentioned, till now we are ok with the device.
I did not find the files that you said I should delete from /vendor/lib, so I went to /vendor/lib64 and deleted the first file, After I deleted it suddenly Root Explorer shut off and whenever I open it again I cant find anything, just blank screen with its symbol and name above and nothing else. Tried to delete Root Explorer and install again and nothing new. Please help, Have I done everything okay? and what should I do to fix this thing and continue deleting the remaining files?
Thank you.
 

jajk

Senior Member
Jul 18, 2014
1,514
1,645
@aghr11 I think that you did not understand the method to create the init.d script and modified an important file instead. You will have to replace that script file you blanked with the original or restore from a good backup and try again. The list of files for deletion is only if they exist in the location as described. If you have enabled any fingerprint settings for some obscure reason, you will probably get locked out of your phone.
Now to creating the script.
Using a text editor, create a file named 01tweaks in /system/etc/init.d folder.
Paste the text (including the first line #!/system/bin/sh) into this file. Leave a blank line at the bottom of the file and make sure your editor is set to Unix end-of-line characters (not Windows)
Save the file and give it 0755 permissions (rwxr-xr-x)

@tonydeli7 Yes, typo I will fix..... done It is a folder to receive advertising pushed to your phone courtesy of Xiaomi!!!!
 
Last edited:

tonydeli7

Senior Member
Apr 20, 2007
201
19
37
Greece
@tonydeli7 Yes, typo I will fix..... done It is a folder to receive advertising pushed to your phone courtesy of Xiaomi!!!!

Yeap, just saw the conf file... WTF are they doing?!

By the way, thanks a lot for this kernel! Nice work!:good::good:

UPDATE:
I edited the latest Multirom Stable (7.2.1.0) and added your kernel&tweaks,deleted the files and everything works great!
I only changed the touchboost value to 806000 :)
 
Last edited:

algida79

Member
Sep 12, 2011
21
2
Thessaloniki
jajk, many thanks for this brilliant work!

IIRC, your personal preference for a base ROM with the best behavior and performance with these tweaks was v7.1.4.0 (or was it 7.1.3.0). Is this so or has anything changed? My RN2p is long overdue for an update, still on dev 5.10.29! :eek:
 
Last edited:

jajk

Senior Member
Jul 18, 2014
1,514
1,645
@tonydeli7 Did you give it some time on touchboost 403? I find it does not contribute to lags perceptibly.
@algida79 The most bug free ROM I have come across is MR7.2.30 ID (ported from reno3). I think I had a link to that in the Skinny thread.
Don't load the preloader, uboot or logo from this ROM - edit the updater-script to remove flashing of these. You will need to do an intermediate flash of 7.1.3 or 7.1.4 using SP Flash tool to get all the partitions the way they need to be if coming from an ancient ROM.
@Dnxss Yes it will still work.
 
  • Like
Reactions: Brkge

tonydeli7

Senior Member
Apr 20, 2007
201
19
37
Greece
@jajk Half an hour I think. I had no lag,just my preference :)

The phone usage is mostly surfing,facebook,twitter,music playback etc etc with no gaming.
GPS SYNC 3G all on..
Installed app count is around 120..
Includes six reboots while testing ZRAM(disabled it), and if it's good to deactivate Whetstone app.
I also used the app Autostarts to disable useless receivers for many apps like FB etc,and disabled Mail,Voice Unlock,PicoTTS.


I am satisfied..[emoji14]

Sent from my Redmi Note 2 using Tapatalk
 

Attachments

  • uploadfromtaptalk1459380137209.jpg
    uploadfromtaptalk1459380137209.jpg
    127.4 KB · Views: 1,355
  • uploadfromtaptalk1459380150247.jpg
    uploadfromtaptalk1459380150247.jpg
    73.4 KB · Views: 1,354
Last edited:

jajk

Senior Member
Jul 18, 2014
1,514
1,645
@tonydeli7 Whetstone app is a source of a lot of spyware but is not a straight forward removal but you will find that out...
can then also delete:
/etc/WhetstonePermission folder
/system/lib
libwhetstone_jni.so
libwhetstone_sdk.so
/system/lib64
libwhetstone_jni.so
libwhetstone_sdk.so
 
  • Like
Reactions: Brkge

tonydeli7

Senior Member
Apr 20, 2007
201
19
37
Greece
Yeap, I searched a bit. I am using the Multirom Stable and after flashing the kernel,Whetstone crashes sometimes.
Didn't notice anything weird after freezing it..
This rom doesn't have the line
persist.sys.whetstone.level=2
in the build.prop for some reason.

Sent from my Redmi Note 2 using Tapatalk
 

jajk

Senior Member
Jul 18, 2014
1,514
1,645
@tonydeli7 Whetstone is linked to the mcd service to make things harder to unravel as in all Xiaomi apps. The boot.img disables mcd which is why you will see Whetsone having a fit sometimes. Completely removing Whetstone is a very good thing to do - it may give you an FC on Battery app, delete that too - it chews battery and does not affect normal operation!!!

Anyone wanting to increase their privacy, rename /system/xbin/tunman to tunmanbak. This is the Xunlei data saver/spyware tunneling manager. It is disabled from starting in the boot.img but will still run if called upon like all of the disabled services - they still exist, but not started by default. Make sure it is disabled in the Download Manager Settings;)
There is another service /sbin/mdbd that appears to be a method of tunneling over usb connections to gain access to a network and on to P.R.C. It is disabled in the boot.img already but I will rename this one in a next revision to be doubly sure it will not start.
 
  • Like
Reactions: oldslowdiver

jajk

Senior Member
Jul 18, 2014
1,514
1,645
Discovered an issue of some apps not recognizing internal sdcard so new versions posted to fix this plus rename /sbin/mdbd to mdbdbak to prevent it from being started after boot. See previous post for the reason.

Back up your internal sdcard contents if you flashed the original images - you will loose everything on sdcard0.
No action needs to be taken if this is a first-time flash.
 

jajk

Senior Member
Jul 18, 2014
1,514
1,645
@Sleepy_Augie It is a very complex issue how Android provides a virtual filesystem for SDCards. I thought I could implement it in a simpler fashion as per Android 5.1 which worked well except apps like the stock Contacts are stuck in the dark ages and are hard-coded to still look for the emulated/0 folder for the internal sdcard - not storage/sdcard0.
So going from stock to my original mod leaves an orphaned folder which becomes named 0 because it belonged to user 0. Going back the other way the folder representing access to sdcard0 simply disappears.
The real location of files that appear on the internal emulated sdcard is always /data/media. All other folders that appear to be the same thing are only symlinks to this. Make sense:silly:
 

aghr11

Member
Oct 8, 2015
22
0
Hey @jajk ,
Thanks for the reply, but I have done exactly everything you said and followed all of your steps, but after one day using it, I do not notice any change on battery life, it is still so bad, I have tried everyrom (and every way that was suggested from other users on XDA and MIUI forums including every battery calibration thing) I came across since I bought my RN2p and the maximum battery life I got is nearly 4:30 hours on screen!! After I flashed the boot.img I noticed a slightly more speed booting up the device, the performance is the same (which is good because am all satisfied about the performance except for the battery life).
I have flashed smiui today and it's slightly better consuming energy than the previous ones...
Maybe I have done something wrong doing the 01tweaks thing, if you can upload me yours so I can try paste it in /system/etc/int.d folder, if that will work, then I will be so thankful to you. And if you have any suggestions that I could do to improve and enhance the crazy energy draining then I will be more thankful.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 44
    What is Skinny Pro?

    This is not for NOOBS - it breaks functionality in Xiaomi apps that try to communicate back to head office. This is an intentional feature and is for people who are not interested in being part of the Xiaomi ecosphere. LEAVE NOW if you have, or intend to log on to Xiaomi and use their services!!!!
    Skinny does not magically fix poor choice of ROMs, Apps or lack of knowledge.

    It is not a custom Kernel - it is a custom boot.img containing modified initialization scripts for the stock kernel.

    There are 2 distinct versions:
    Based on 7.1.4.0 - Use for 7.1.xx to 7.3.20 (MIUI7) Support discontinued since V7 (O.P no longer applies to this version)
    Based on MIUI8 - use for MIUI7.5.x and MIUI8

    Design Brief:
    No Placebos
    To overcome the limitations of Stock MIUI being:
    Poor battery life
    Poor performance
    Chronic invasion of privacy

    Boot.img mods:
    Disable starting of non-present devices and services
    Disable stock recovery overwriting TWRP
    Disable OTA services (no use on a modified ROM)
    Disable starting of invasive (spying) services
    Disable fingerprint sensor infrastructure (not for our device)
    Disable find device infrastructure
    Disable second space infrastructure
    Build in init.d support
    Enable zram swap creation (disable conflicting "mcd" service infrastructure)
    Mass Storage Device mode added for external SDCard
    Improved TCP Buffer values
    Reconfigured internal SDCard suppport to remove uneccessary symlinks
    Reduce cpu scheduler, foreground and background tasks deadtime (throttling)
    Add some Android 6.0 TCP tweaks
    Expose LMK and HPS settings for user configuration

    What you will see:
    Faster boot
    Less background activity at idle
    Less RAM usage
    Less spying/reporting activity
    Better battery life
    Better Performance
    More reliable and faster data speeds

    Install your chosen ROM and get it past the first setup screens before flashing a Skinny Boot image.
    If you really must install Xposed, install this after the Skinny boot image.
    Do not install "kernel" tweaking apps - they will conflict with the inherent settings in Skinny!
    No wipes are necessary after installing the boot.img

    What else do I need to do?
    First, an explanation as to why we need to set everything the way it is:
    The cpu is controlled by 4 separate mechanisms:
    1. Thermal throttling - will limit frequencies and shut down cores to stay within safe operating temperatures - will override all other mechanisms. Settings available: High Performance (less strict) or Balanced (default)
    2. Performance Server - will temporarily boost freqs and cores depending on detected conditions such as screen touch, screen update or rotate, app open. Limited settings available via /etc/perfservscntbl.txt
    3. Hotplugging Service - will add or remove cpu cores as load requires. Some settings are accessible through /proc/hps/
    4. Interactive Governor - will throttle freqs up and down based on load and add or remove cores also. Some settings are accessible through /sys/devices/system/cpu/cpufreq/interactive/

    You will notice there are competing and often contradicting mechanisms. The factory defaults essentially disable the Interactive governor as being the primary source of initial boosting cpu freqs. The "boost" setting normally found in the governor is non-functional - instead, the Perf Server will boost to 2 cores @ 1183MHz when a potential demand for processing power is detected apart from a simple screen touch. The interactive governor will take over scaling the freq and number of cores after the perf server boost period expires or load demands more cpu power than the boost caters for.

    Since the Performance Server tends to over-react, setting 2 cores @ 1183MHz for the smallest of events, we disable it completely by manually editing the existing line in /system/build.prop from:
    ro.mtk_perfservice_support=1 to ro.mtk_perfservice_support=0
    You must do this yourself - this is vital since all further Governor and Hotplug settings rely upon it being disabled.
    Editing /etc/perfservscntbl.txt is not required since this file will no longer be processed.

    The settings for the Interactive Governor and Hotplug are modified from factory default to correct a couple of serious problems:
    1. The cpu will not reliably throttle back to idle at 403MHz. This has a huge impact on battery.
    This is caused by the timer_rate setting being too short allowing transient background activities to trigger scaling the freq up. Increasing the time effectively averages out the transient load spikes so the cpu will not break idle unnecessarily.
    2. The cpu does not respond to increasing or decreasing load fast enough creating micro-lags and consuming battery. Reducing the min_sample_time will shorten the time taken for the cpu to lower in freq when load drops off. Reducing the above_hispeed_delay will reduce the response time to increase the cpu freq in response to a load. Both of these settings also compensate for the longer than standard timer_rate that introduces some sluggishness by necessity.
    All other values are set to encourage the frequency and number of cores to rapidly and reliably return to idle to save battery while still providing sufficient responsiveness to sudden load demands.

    Create an init.d script exactly as follows: (premade file 01_init also available to download)

    Code:
    #!/system/bin/sh
    
    ### CPU freqs standard RN2: 403000, 806000, 1183000, 1326000, 1469000, 1625000, 1781000, 1950000
    ### CPU freqs PRIME RN2:    403000, 806000, 1183000, 1326000, 1482000, 1664000, 1885000, 2158000
    ### GPU freqs standard RN2: 253500, 299000, 390000, 442000, 546000
    ### GPU freqs PRIME RN2:    253500, 338000, 390000, 546000, 676000
    
    # Stop running boot-time services (enable the lines for services you want to stop)
    #stop sn                # USB serial number allocation
    #stop wifi2agps         # WiFi assisted GPS (for fine location)
    #stop agpsd             # Mobile Network assisted GPS (for fine locastion)
    #stop emsvr_user        # Engineering Mode server
    #stop PPLAgent          # Privacy Protection Lock
    #stop mtkbt             # MTK Bluetooth
    #stop batterywarning    # Battery warning service
    #stop debuggerd64       # debug logging
    #stop debuggerd         # debug logging
    #stop logd              # logging
    #stop autokd            # autotune for WiFi
    
    #Set to permissive (enable this line if SE permissive mode is required)
    # setenforce 0
    
    # Tweak Interactive Governor (now set in boot.img - enable here to override values)
    #echo 403000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq        # factory default 1183000
    #echo 99 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load         # factory default 99
    #echo 99 > /sys/devices/system/cpu/cpufreq/interactive/target_loads            # factory default 90
    #echo 25000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate           # factory default 20000
    #echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time      # factory default 20000
    #echo 5000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay   # factory default 20000
    #echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack          # factory default 80000
    
    # Limit CPU max freqs (To limit the maximum cpu freq, enable both of these lines. Select a valid freq for your device from table at start)
    #echo 1781000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    #echo 1781000 > /proc/cpufreq/cpufreq_limited_max_freq_by_user
    
    # Limit foreground CPU cores (set in boot.img - enable here to override values) 0-1 min, 0-7 max Example shows 5 cores (also needs to be set in Hotplug)
    #echo 0-4 > /dev/cpuset/foreground/cpus
    
    # Hotplug settings (set in boot.img - enable here to override values) Note: num_limit values are 1-8
    #echo 5 > /proc/hps/num_limit_low_battery          # factory default 8
    #echo 5 > /proc/hps/num_limit_power_serv           # factory default 8
    #echo 5 > /proc/hps/num_limit_thermal              # factory default 8
    #echo 5 > /proc/hps/num_limit_ultra_power_saving   # factory default 8
    #echo 99 > /proc/hps/up_threshold                  # factory default 95
    #echo 87 > /proc/hps/down_threshold                # factory default 85
    #echo 0 > /proc/hps/rush_boost_enabled             # factory default 1
    #echo 0 > /proc/hps/input_boost_enabled            # factory default 1
    
    # Tweak GPU Settings (Look in /proc/gpufreq/gpufreq_power_dump for power usage at different freqs)
        # To disable GPU touch boost:
    #echo 0 > /proc/gpufreq/gpufreq_input_boost        # factory default 1 (enabled)
        # To limit max GPU freq: (Select a valid freq for your device from table at start)
    #echo 442000 > /proc/gpufreq/gpufreq_opp_max_freq  # factory default 0 (disabled) 
    
    # Tweak VM (set in boot.img - enable here to override values)
    #echo 300 > /proc/sys/vm/dirty_expire_centisecs    # factory default 200
    #echo 500 > /proc/sys/vm/dirty_writeback_centisecs # factory default 300
    
    # Tweak LMK (set in boot.img - enable here to override values) 18 37 56 75 93 112MB   # factory default 72 90 108 126 219 317MB (MB x 256 = value)
    #echo 4608,9472,14336,19200,23808,28672 > /sys/module/lowmemorykiller/parameters/minfree
    
    #Enable zram (no zram set by default, enable  first 4 lines if 1 zram required, all 7 lines if 2 zram required)
    #echo 40 > /proc/sys/vm/swappiness
    #echo 268435456 > /sys/block/zram0/disksize     # for single zram: 536870912 = 512MB (for non-prime version) 1073741824=1GB (for prime version)
    #/system/xbin/busybox mkswap /dev/block/zram0
    #/system/xbin/busybox swapon /dev/block/zram0
    #echo 268435456 > /sys/block/zram1/disksize     # for 2 zrams: 268435456 = 256MB (for non-prime version) 536870912 = 512MB (for prime version)
    #/system/xbin/busybox mkswap /dev/block/zram1
    #/system/xbin/busybox swapon /dev/block/zram1
    
    # Tweak IO Scheduler (set in boot.img - enable here to override values)
    #echo deadline > /sys/block/mmcblk0/queue/scheduler    # factory default cfq (choice: noop deadline cfq)
    #echo 128 > /sys/block/mmcblk0/queue/read_ahead_kb     # factory default 128 Choose between 128, 256, 512, 1024, 2048
    #echo 0 > /sys/block/mmcblk0/queue/add_random          # factory default 1
    #echo 0 > /sys/block/mmcblk0/queue/iostats             # factory default 1
    #echo deadline > /sys/block/mmcblk1/queue/scheduler    # for ext sdcard (sdcard1)
    #echo 2048 > /sys/block/mmcblk1/queue/read_ahead_kb     # for ext sdcard (sdcard1)
    #echo 0 > /sys/block/mmcblk1/queue/add_random          # for ext sdcard (sdcard1)
    #echo 0 > /sys/block/mmcblk1/queue/iostats             # for ext sdcard (sdcard1)
    
    #Tweak Entropy (set in boot.img - enable here to override values)
    #echo 384 > /proc/sys/kernel/random/read_wakeup_threshold    # factory default 64
    #echo 448 > /proc/sys/kernel/random/write_wakeup_threshold   # factory default 128
    
    #Tweak for wifi router connection issues
    #echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
    
    # Disable debugging on some modules (set in boot.img - enable here to override values)
    #echo 0 > /sys/module/alarm_dev/parameters/debug_mask;
    #echo 0 > /sys/module/alarmtimer/parameters/debug_mask;
    #echo 0 > /sys/module/binder/parameters/debug_mask;
    #echo 0 > /sys/module/earlysuspend/parameters/debug_mask;
    #echo 0 > /sys/module/sbsuspend/parameters/sbsuspend_debug_mask;
    #echo 0 > /sys/module/snd/parameters/debug;
    #echo 0 > /sys/module/pvrsrvkm/parameters/gPVRDebugLevel;
    #echo 0 > /sys/module/musb_hdrc/parameters/debug_level;
    #echo 0 > /sys/module/lowmemorykiller/parameters/debug_level;
    
    #FSTRIM
    busybox fstrim /data
    busybox fstrim /system
    busybox fstrim /cache
    Update BusyBox to version 1.25.1-1 (available to download)

    Reduce the number of apps and services needlessly starting automatically at boot. Uninstall or freeze bloat apps. Replace "noisy" apps with better written ones.
    Use BetterBatteryStats, WakelockDetector Root or similar to understand what invisible activities are consuming battery.
    Use SDMaid, DisableServices, MyAndroidTools or similar to disable autostarts (receivers)and app related services. Use with caution.

    To see what boot services are running, type getprop in Terminal. You will see a bunch of entries like [init.svc.66xx_launcher]: [running]
    These service must remain running do not stop!:
    Code:
    [init.svc.66xx_launcher]: [running]
    [init.svc.MtkCodecService]: [running]
    [init.svc.NvRAMAgent]: [running]
    [init.svc.aal]: [running]
    [init.svc.ccci_fsd]: [running]
    [init.svc.ccci_mdinit]: [running]
    [init.svc.drm]: [running]
    [init.svc.fuelgauged]: [running]
    [init.svc.gsm0710muxd]: [running]
    [init.svc.guiext-server]: [running]
    [init.svc.healthd]: [running]
    [init.svc.installd]: [running]
    [init.svc.keystore]: [running]
    [init.svc.lmkd]: [running]
    [init.svc.media]: [running]
    [init.svc.mnld]: [running]
    [init.svc.netd]: [running]
    [init.svc.ril-daemon-mtk]: [running]
    [init.svc.sdcard]: [running]
    [init.svc.servicemanager]: [running]
    [init.svc.shelld]: [running]
    [init.svc.surfaceflinger]: [running]
    [init.svc.thermal]: [running]
    [init.svc.thermald]: [running]
    [init.svc.ueventd]: [running]
    [init.svc.vold]: [running]
    [init.svc.zygote]: [running]
    [init.svc.zygote_secondary]: [running]
    [init.svc.bmi160d]: [running]

    If you only have 1 SIM, it is highly recommended to go into single SIM mode to turn off the second modem service. Edit build.prop existing line from:
    persist.radio.multisim.config=dsds to persist.radio.multisim.config=ss

    Turn off Developer Options/Memory Optimization and MIUI Optimization. This is a legacy of the mcd service zram configuration that is disabled.

    Removal of Apps that are created by symlinks: (Updated information for any ROM version can be found in ROM \META-INF\com\google\android\updater-script)
    Uninstall the app where possible and then delete the leftover libs if they exist.
    Code:
    [B]MAB[/B]
        /system/lib/libDToken.so
        /system/lib/libNative.so
        /system/lib/libShopSigned.so
        /system/lib/libentryexpro.so
        /system/lib/libsecuritysdk-3.1.27.so
    
    [B]Jeejen[/B]
        /system/lib/libJeejenAisound.so
        /system/lib/libbspatch.so
        /system/lib/libfamily_jni.so
        /system/lib/libgetuiext.so
        /system/lib/libjeejenmsc.so
    
    [B]MIUI Video[/B]
        /system/lib/libDecRes_sdk.so
        /system/lib/libminivenus.so
        /system/lib/libmresearch.so
        /system/lib/libsecurities_sdk.so
    
    [B]Cleanmaster[/B]
        /system/lib/libTmsdk-2.0.9-mfr.so
        /system/lib64/libTmsdk-2.0.9-mfr.so
        /system/lib/libdce-1.1.14-mfr.so
        /system/lib64/libdce-1.1.14-mfr.so
        /system/lib/libkcmutil.so
        /system/lib/libkcmutilex.so
        /system/lib/libsic_helper.so
    
    [B]SecondSpace[/B]
        /system/lib/libspaces_jni.so
    
    [B]Sogou Input[/B]
        /system/lib/libwebp.so
        /system/lib/libweibosdkcore_sogou.so
    
    [B]AMAP Network Location[/B]
        /system/lib64/libapssdk.so
    
    [B]YellowPage[/B]
        /system/lib64/libdidi_secure.so
    
    [B]XMPass[/B]
        /system/lib64/libxmpass_sdk_patcher.so
        /system/lib64/xmpass_libweibosdkcore.so
    
    [B]PicoTTS[/B]
        /system/lib64/libttscompat.so
        /system/lib64/libttspico.so
    
    [B]Miui Gallery[/B]
        /system/lib64/libwrapnexpcmcalbody.so
        /system/lib64/libnexralbody_audio.so
        /system/lib64/libnexcralbody_mc_jb.so
        /system/lib64/libnexeditorsdk.so
        /system/lib64/libPinguoImageSDK.so
        /system/lib64/libMiuiGalleryNSGIF.so
        /system/lib/libMiuiGalleryNSGIF.so
        /system/lib64/libDexHelper.so
    
    [B]MIUI Scanner[/B]
        /system/lib64/libQuadrangleRecognizer.so
        /system/lib64/libhw_instanttrans.so
        /system/lib64/libhwocr_cntools_shared.so
        /system/lib64/libsgmain.so
        /system/lib64/libsgmainso-5.1.2011.so
        /system/lib64/libtbdecode.so
    Remove inbuilt virus scanner(s)
    Remove GuardProvider.apk and SecurityAdd.apk plus:
    Code:
        /system/lib64/libams-1.1.7-m-mfr.so
        /system/lib64/libams-1.1.7-mfr.so
        /system/lib64/libavast-utils.so
        /system/lib64/libavast-vps-interface.so
        /system/lib64/libavlasys.so
        /system/lib64/libavlm.so
        /system/lib64/libavlurl.so
    Extra libs that can be removed: (if associated apps are removed)
    Code:
    [B]Lib:[/B]
    libfdpp.so                             Find Device
    libfdpp_jni.so                         Find Device
    libffmpeg-miplayer.so                  Music / MIUIVideo
    libhotknot.so
    libhotknot_vendor.so
    libnfc_ndef.so
    libpatcher_game_jni.so
    libpatcher_jni.so
    libvoicerecognition.so                 Voice Extensions
    libvoicerecognition_jni.so             Voice Extensions
    libwhetstone_jni.so
    libwhetstone_sdk.so
    libxiaomimediaplayer.so                Music / MIUIVideo
    libxiaomiplayerwrapper.so              Music / MIUIVideo
    
    
    [B]Lib64:[/B]
    libBaiduMapSDK_base_v4_0_0.so
    libBaiduMapSDK_search_v4_0_0.so
    libBaiduMapSDK_util_v4_0_0.so
    libBankCardRecognizer.so
    libduokantext.so
    libfdpp.so                             Find Device
    libfdpp_jni.so                         Find Device
    libhotknot.so
    libhotknot_vendor.so
    libidcardquality_v1.0.3.so
    libjni_latinimegoogle.so               Google Keyboard
    libjni_pacprocessor.so
    libjni_unbundled_latinimegoogle.so     Stock Keyboard
    libnfc_ndef.so
    libpatcher_game_jni.so
    libpatcher_jni.so
    libprintspooler_jni.so                 Print Spooler
    libtbtv3312.so
    libTrafficRadar.so
    libttscompat.so                        Pico TTS
    libttspico.so                          Pico TTS
    libunipaychsec.so
    libweibosdkcore.so
    libwhetstone_jni.so
    libwhetstone_sdk.so
    
    [B]/vendor/lib64:[/B]
    libcom_fingerprints_productiontestmanager.so
    libcom_fingerprints_sensor.so

    Skinny Pro All versions:
    https://drive.google.com/folderview?id=0BwdRTuyj12_yRk9Kcm1pZkxuZzg&usp=sharing
    Enjoy:)
    8
    @acestars Just for you I have uploaded Skinny_Pro_MIUI8_61013_boot-v10.img. There is nothing special in the 61013 boot.img that will improve battery life so you will need to believe that it makes a difference and maybe it will:D
    Is there anything else you would like me to do?

    This can be used on 7.5.xx, 8.0.xx as well as 6.xx.xx.
    From now on, there will be only 1 version to cover the 3 variations of ROMs that share a MIUI 8 kernel. I will drop MIUI 7 support now since we are getting good results from MIUI 8 based ROMs.

    I have again updated my BusyBox installer to use BusyBox 1.25.1 binaries compiled by @osm0sis as these are more compact than the version I was using. The difference in installers is that mine can only install arm64 binaries and does not, by default, create symlinks to internal Busybox commands.
    8
    Hmmm.... 2 weeks of RN2 being neglected with the lame excuse of "stability testing". So why does RN3 still get weekly updates when it is the same hardware platform:confused:
    Looks like someone might have to port the RN3 releases back to RN2 for continued updates
    We move forward even without Xiaomi support....

    2 new skinny images:
    Skinny_Pro_7530_Tweaked-v23.img suitable for all MIUI 7.5.xx
    Skinny_Pro_7112_Tweaked-v23.img suitable for all MIUI 8

    Changes from V22:
    Rebased on 7530 for MIUI 7.5.xx and 7112 for MIUI 8.x.x
    LMK values reduced to light - seems to work better overall
    New tweak: ipv4 TTL value reduced to 63 to fix some problematic connections. No impact on regular connections.
    Interactive Gov settings increased again to be more battery friendly rather than outright performance.
    V23 settings are now:
    Code:
    # Tweak Interactive Governor (now set in boot.img - enable here to override values)
    #echo 403000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq        # factory default 1183000
    #echo 99 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load         # factory default 99
    #echo 99 > /sys/devices/system/cpu/cpufreq/interactive/target_loads            # factory default 90
    #echo 25000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate           # factory default 20000
    #echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time      # factory default 20000
    #echo 5000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay   # factory default 20000
    #echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack          # factory default 80000

    I have gone old school again but this time I am on EU 7530 Skinny so I can provide mods for the more common release rather than being the only person sitting on the more obscure MR 7550.
    After reviewing what has changed since MIUI7, I find the only beneficial development (for me) was the change to better cpu handling introduced since 7.5.10. Time to hop off the mouse wheel for a while;)
    8
    While the skinny boot images strip away unneeded services, logging, debugging etc. from the lower O.S level, I have been playing with stripping out debugging and logging from the higher level O.S files with some good reduction in the background level of cpu load which is rather high in all MTK based devices. The problem seems to be that MTK provides engineering sample of code to the OEMs who are meant to refine it for their device then remove or turn off the unbelievable amount of logging and debugging. The bottom-dwelling OEMs just add their extra layers and bloat on top without lifting a finger to tidy up the MTK code - no fault of MTK - it is the fault of OEMs that have no software engineering capability or interest in supporting their product (or at least the devices with their brand stamped on them).
    Now the tricky bit..... I can decompile files, change settings to turn off logging and debugging, then recompile. It is a big effort which is O.K to amuse myself on my own phone but I don't feel like offering it to everyone and for every ROM that pops up.
    What I will do, is make public the information required to do this for yourself - Warning: effort on your part required.
    As always, I am not into helping you setup for decompiling / recompiling etc. If you can't do it for yourself, this is not for you - go bother a CM/LOS/Flyme thread instead;)

    To lessen the amount of debugging and logging activity caused by high level O.S files:
    Decompile framework jar files. Target from largest to smallest to maximize the results for effort. Do these before moving onto apk files.
    Decompile MIUI system apps like Settings.apk that are likely to also contain large amounts of debugging / logging code. Check that you can recompile without edits first to avoid wasted effort.

    Search only in smali or smali_classes2 folders for files that have the following terms: (case does not matter)
    logd:z
    logv:z
    dbg:z (includes instances of vdbg:z)
    debug:z

    We are only interested in lines which are static fields - do not edit any other instances!!!
    We change any lines that have = true to = false and any line without a parameter to = false also.
    Example:
    # static fields
    .field protected static final DBG:Z = true becomes .field protected static final DBG:Z = false
    .field private static final VDBG:Z becomes .field private static final VDBG:Z = false

    Do not alter lines under
    # instance fields
    or under any other label.

    Recompile the files and copy to /system/framework
    The phone will soft reboot when it detects a change in size of any framework file - ignore this and do a proper hard reboot. The boot will always be very slow because Dalvik Cache gets rebuilt.
    If you are doing a lot of files, it is easier to copy them all across using TWRP recovery to avoid the painful reboots.

    That's it!!! You can now compare the screenshot you took before doing any of this with the screenshot of cpu activity afterwards:laugh: Or maybe just compare it to mine....
    Let's see how long this one takes to be plagiarized across the globe.....
    7
    @andrea210701 I see they are up to Nougat ROMs for Jiayu s3 which is 6752 / 6753 SoC. Not sure if the development is based on Kernel source code or just picking a kernel from another device (tons to choose from in 6753). They are having the same issues trying to adapt drivers to their particular hardware so the fanfare is short-lived.

    v6 images uploaded.
    All: mcd services completely removed (expectation is that you create your own zram or run without)
    MIUI8 only: second space functionality removed

    Boot services removed in V6:
    checkpath
    checksdkpath
    mcd_service
    mcd_init
    mobicore
    ssService ***applies to MIUI8 only
    namespaceCreate ***applies to MIUI8 only

    Boot services that are running by default but can be stopped if not needed:
    sn - USB serial number service
    wifi2agps - wifi network assisted GPS location (fine location)
    agpsd - mobile network assisted GPS location (fine location)
    emsvr_user - Engineering Mode Server (will still start when needed)
    PPLAgent - Privacy Protection Lock
    mtkbt - MTK Bluetooth
    batterywarning - not needed to be running (still functions)
    debuggerd64 - logging
    debuggerd - logging
    emdlogger1 - logging
    fdpp - find device protected procedure *** MIUI7.5 and 8 only
    logd - logging
    matv - unused in our phone
    mobile_log_d - logging
    netdiag - logging
    autokd - needed for wifi speed negotiation (tuning)

    All other boot services must be left as they are.