yashsingh1/xdaforums huggingface dataset:
[Redmi Note 2 Android Development] asusm930:
in your efforts to control how many CPUs are allowed to go online, did you edit any of the init.rc files? I'm trying to find a way to disable my 2 a72 cores on this helio x20 and so far using simple scripts do not work. I based my script on your write up on the 1st page. I saw some lines in the various init.rc files in kernel might that help disable the a72 cores (cores number 8 and 9). I just need to confirm with you or else I'll just stop trying to disable those two cores.

some extra info: perfservice disabled

Again, thanks in advance

edit: I went and unpacked your kernel and indeed you did edit some init.rc files to limit cpu cores.

idk what I'm doing wrong but before this I could repack kernels and phone would boot but this time it couldnt lol

idk if its because of editing the CPU lines or something else

hmmmm
[Redmi Note 2 Android Development] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] Android 6+ resists calling scripts outside of the stock init ones quite rigorously. In your case, init.qcom.post_boot.sh is the perfect substitute for init.d and you will see it already contains a load of lines that look like the tweaks we get up to;)

I have tried to do a boot.img for Moto G 7.1.2 and 6.0 but also end up with bootloops. I think Android security mechanism is seeing the changed files as a breach of integrity and preventing boot - haven't mastered how to defeat this yet.

[MENTION=2078083]asusm930[/MENTION] X10 is a bit more simplistic because it is not big-little. Don't go by what is done for it alone but do look at files in /proc/hps and /dev/cpuset/foreground/boost for some clues as to how to truly disable the biggies. You too can send me the same model phone if you want extra support;)

[MENTION=5850987]DarthJabba9[/MENTION] [MENTION=2078083]asusm930[/MENTION] Have you tried repacking boot image with no changes to see if it still boots? If you figure out how to get a modded boot image to boot on Android 6+, please share the wisdom here;)

Edit: Maybe we have to turn dm-verity off?
[Redmi Note 2 Android Development] asusm930:
turns out I have to unpack and repack a fresh kernel from the rom zip and reflash superSU

Cant edit a non-fresh kernel

edit: kernel boots fine but with the addition of several lines i imported from your kernel and some editing but i still cant disable the last two cores haha. Had fun trying :D
[Redmi Note 2 Android Development] DarthJabba9:
I can't even get the original boot image to boot when I flash it (either as a raw boot image, or in an update zip). I suspect that dm-verity needs to be turned off. I installed lazyflasher-no-verity-opt-encrypt.zip after installing TWRP. This patches

a kernel

to allow proper booting after replacing stock recovery. However, I am not sure which kernel it is patching - TWRP's kernel, or the installed ROM's kernel. I suspect that it is the latter, and that, everytime on installs a custom kernel, you have to install the lazyflasher again. But I have not tested this hypothesis, because if I trash the device, there will be trouble! :crying:
[Redmi Note 2 Android Development] DarthJabba9:
[MENTION=7830576]ala_mo[/MENTION] seems to have done it - see here: https://xdaforums.com/redmi-note-4/...recoveries--other-development/repack-t3598405
[Redmi Note 2 Android Development] vetriolo:
How many cores are active with this last release of boot image?

Inviato dal mio Redmi Note 2 utilizzando Tapatalk
[Redmi Note 2 Android Development] jajk:
[MENTION=7694222]vetriolo[/MENTION] 5 cores unless you override it in init.d script;)
[Redmi Note 2 Android Development] DarthJabba9:
Indeed, it works very well. Injecting a few lines into the file gets /etc/init.d scripts processed in the usual way. However, I find that very few (if any) tweaks are needed to get excellent battery performance. The main worry is ET phoning home. Having skinnified the ROM, I hope I have at least reduced the risk. BTW, the RN4X has been commandeered for my own use :fingers-crossed: and Mrs DJ9 now has my RN2 ...
[Redmi Note 2 Android Development] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] Inevitable;)
[Redmi Note 2 Android Development] DarthJabba9:
Indeed. But it is really maddening when manufacturers put back doors into their software.
[Redmi Note 2 Android Development] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] Imagine a soldier posted to the latest warzone with a Xiaomi or other Chinaphone in his pocket - the game is much more than trivial targeted advertising. The same could be said about a businessman or nuclear plant worker etc. etc.

It's not paranoia, it's reality:eek:
[Redmi Note 2 Android Development] DarthJabba9:
I believe you! This is some of the stuff that you remove in Skinny Pro, right? Am I right in thinking that if you have a Skinny Pro boot image, and a ROM based on AOSP/CM/LineageOS, and block ET's home servers in /etc/hosts, you are relatively safe? (then you only have Google to deal with? :( )
[Redmi Note 2 Android Development] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] To a large degree, yes. I could go a little further and disable vpn which is used as a backdoor but then other user would complain that vpn doesn't work. If everyone said "I don't care about vpn", then I would disable it in Skinny boot.

The less sockets the better I always say:p
[Redmi Note 2 Android Development] DarthJabba9:
Will disabling vpn in Skinny boot stop vpn apps such as Operavpn and Turbovpn from working? If not, then I don't care about vpn!
[Redmi Note 2 Android Development] Adam Hui:
Is it disturbing to ask [MENTION=5952980]jajk[/MENTION] to skinnify OP3T kernel & ofcuz skinny init.d script for it?

I couldnt find a believeable sharp one since i followed this thread from beginning.
[Redmi Note 2 Android Development] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] Unfortunately there is a built in (reverse) vpn connection that is not accessible by the user. I think it is courtesy of Mr Google but others like Xiaomi use it or their own as well. To disable this, all vpn functionality must be disabled.

[MENTION=4666525]Adam Hui[/MENTION] No worries, send me one and I will work with you;)

On a more serious note, all these phones running 6.0+ can be treated the same way:

Step 1: install TWRP recovery

Step 2: Root (preferably SuperSU not Magisk)

Step 3: Look for some executable script or file that resides in /system/bin, /etc or etc/init that is called from an init file at the latest possible time (on boot_complete is best)

Step 4: Hijack the file found above to use as a quasi init.d host.

Step 5: Stop all unwanted boot services, add all your tweaks to this new init.d script;)

Example of hijacking a script file:

In most 6.0 Roms there will be a file in /etc or etc/init named init.qcom.post_boot.sh. This is called from one of the init scripts.

This file can be treated exactly like an init.d script without having to make an init.d folder and separate init.d script.

In 7.x Roms, look for a similar script file to use - one may not be available so you can use the alternative below.

Example of hijacking an executable file (Moto G):

init.qcom.rc has the lines:

on property:sys.boot_completed=1
start mpdecision

This is a perfect candidate as it is the very last thing run in the init sequence.

So to hijack this executable file, we rename /system/bin/mpdecision to /system/bin/mpdecision_real

Now we create another file called /system/bin/mpdecision and this will become our init.d script host.

Load this blank file with the following:

#!/system/bin/sh
# Init.d support
SU="$(ls /su/bin/su 2>/dev/null || ls /system/xbin/su) -c"
mount -o rw,remount /system && SU="" || eval "$SU mount -o rw,remount /system"
eval "$SU chmod 777 /system/etc/init.d"
eval "$SU chmod 777 /system/etc/init.d/*"
eval "$SU mount -o ro,remount /system"
ls /system/etc/init.d/* 2>/dev/null | while read xfile ; do eval "$SU /system/bin/sh $xfile" ; done
/system/bin/mpdecision_real $@

Now you have init.d support.
[Redmi Note 2 Android Development] DarthJabba9:
[MENTION=5952980]jajk[/MENTION] My init.qcom.rc contains this:

service qti-testscripts /system/bin/sh /system/etc/init.qcom.testscripts.sh
class late_start
user root
disabled
oneshot
seclabel u:r:qti-testscripts:s0

The service is called on sys.boot_completed. However, there is no /system/etc/init.qcom.testscripts.sh script. Is this another back door?
[Redmi Note 2 Android Development] Adam Hui:
[MENTION=5952980]jajk[/MENTION] is it ok with this custom kernel (zip)? I think it will be a way like a shortcut to work instead a pure stock boot.img since i dont have one (havent d/l full OOS yet to extract the stock boot.img). cmiiw. tia.
[Redmi Note 2 Android Development] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] That is just a factory QC remnant.

[MENTION=4666525]Adam Hui[/MENTION] I would treat it as a useful source of potential tweaks to perform on the stock boot image - cherry-pick the best ideas out of it. It has some merit in its entirety, but not overly well developed.
[Redmi Note 2 Android Development] cukierkas:
[MENTION=5952980]jajk[/MENTION],why you prefer supersu instead of magisk?

In my case magisk is better with hide function, which is very useful with banking app and working environment, byod.

Supersu can't :(

Išsiųsta naudojantis Redmi Note 3 Tapatalk 4 Lt
[Redmi Note 2 Android Development] jajk:
[MENTION=2606021]cukierkas[/MENTION] I have found that Magisk sometimes introduces instabilities. Maybe it will vary between phone models and exact versions of apps - just as there are flakey versions of SuperSU.

If someone installs my skinny boot image and magisk (or xposed) and then complains about something not working right, I cannot help them and they go away thinking my work is rubbish.

At the end of the day, it all comes down to personal preference and I trust and like chainfires work:)
[Redmi Note 2 Android Development] dsjiffry:
[MENTION=5952980]jajk[/MENTION]

Do you know what es_up_threshold and es_down_threshold in proc/hps are????

Should I put the same value as up_threshold and down_threshold?????
[Redmi Note 2 Android Development] jajk:
[MENTION=5997739]dsjiffry[/MENTION] es = early suspend. I have not played with the values to see if there is any benefit but I doubt there will be. Take a look at the source code for an understanding of how it works;)

https://github.com/omlet05/MediaTek...atek/mach/mt6795/mt_hotplug_strategy_procfs.c
[Redmi Note 2 Android Development] dogMaLV:
[MENTION=5952980]jajk[/MENTION] Installed given boot.img file using Flashify (using MIUI8), but now I'm running out of memory constantly. Free memory about 100MB and less. Phone is very laggy. Did I miss something or what could gone wrong?

Thanks!
[Redmi Note 2 Android Development] jajk:
[MENTION=7047608]dogMaLV[/MENTION] Which ROM? Which boot image? Do you have any init.d scripts? What is in them?

It is not a problem that others have so it is something unique to what you have on your phone.

Use MyAndroidTools or similar to have a look at what processes are running and eating up all your memory.
[Redmi Note 2 Android Development] acestars:
[MENTION=5952980]jajk[/MENTION] do you still use RN2? which ROM? miui 7.5?
[Redmi Note 2 Android Development] jajk:
[MENTION=3885679]acestars[/MENTION] Yes but not as a phone - it is the perfect thickness to put under the leg of the kitchen table to stop it rocking.

Stayed with a heavily modified MR 7.5.50 as it is all downhill from there;)

If Xiaomi ever release a truly new ROM with actual worthwhile changes to the kernel / ramdisk that are relevant to the RN2, I will update the Skinny boot image. That hasn't really happened since MIUI8 was originally released.
[Redmi Note 2 Android Development] Iliyena:
You are using that old bump of a battery with the phone for that purpose I hope, makes it "springy" and allows the table to feel a bit more alive. ;) I cannot use my RN2 for calls unless I am in area with very very good reception. Dunno why but some component might be damaged from a fall that thrashed one of my screens. (If someone with an RN2 wants to get rid of it dirty cheap I am all ears. If the screen is thrashed or such the motherboard and the rest of the internals is interesting as well. This phone is good enough for all my private use unless heavy gaming (if it had reception), but I got a SGS6 for work in those cases.)
[Redmi Note 2 Android Development] jajk:
[MENTION=3885679]acestars[/MENTION] [MENTION=7442305]Iliyena[/MENTION] I was joking about the kitchen table but I can't use the phone as my daily since I ended up with a fake battery that makes it too unreliable / dangerous. It still gets used as a tablet and for experimenting;)

I might re-animate it with a 4000mAH Frankenstein battery at some later date but I don't have the original protection board out of the old battery as that got broken in the dismantling process ( full of black epoxy).
[Redmi Note 2 Android Development] schmanto:
[MENTION=5952980]jajk[/MENTION]:

flashed Skinny_Pro_RN3_test4_boot.img - looking good again, no sim error with this one! ;)
[Redmi Note 2 Android Development] jajk:
[MENTION=3885679]acestars[/MENTION] I didn't word that very well did I:confused:

So keep the phone in "Balanced" mode which would normally use thermal.conf but now the settings in thermal.conf are actually those of thermal.off.conf. The phone still thinks it is in Balanced mode so no notifications but it will run like it is in balanced mode. I hope that makes more sense:fingers-crossed:

[MENTION=4460588]MOVZX[/MENTION] If you are keen, try this version of ramdisk files. Logging / debuggering disabled plus the both instances of running init.hermes.power.rc (yes, it was run twice) are disabled. Init.trace.rc is also disabled and the storage (internal, external and OTG) is rationalized with less obsolete symlinking. It is pretty close to 714-13 in functionality now.

This will give you the opportunity to set up governors etc. how you want in init.d scripts rather than battle with the embodied settings.
[Redmi Note 2 Android Development] jajk:
[MENTION=6720440]schmanto[/MENTION] That is both good and bad news. Good that it is working again, bad that we have to keep mcd in some form.

If you look at /system/etc/mcd_default.conf it will give you an idea how mcd works and why it is a very elaborate waste of time. We can edit this file to render it disabled.

I will do up a test 5 image which should bring it up to be parallel to 714-13
[Redmi Note 2 Android Development] MOVZX:
Flashed, will report back later in 1-2 days.
[Redmi Note 2 Android Development] acestars:
Hmm, ok so in summary

-Balance mode use thermal.conf

-Performance mode use thermal.off.conf

By copied thermal.off.conf to thermal.conf the balance mode will act like performance mode but with thermal protection still on?

So the configuration about thermal protection is not inside the thermal.conf/thermal.off.conf?

I'm not english native speaker too.
[Redmi Note 2 Android Development] MOVZX:
I wish I could enjoy Stock MIUI CPU Performance (MTK CPU Advantages) in CM based ROM, if it even possible.
[Redmi Note 2 Android Development] jajk:
Skinny_Pro_RN3_MIUI_7250-5_boot.img is up. This brings all the changes in line with 714-13 with the exception of mcd services and fingerprint still activated. All tweaks for RN2 will work except do not enable zram for now until mcd is disabled by other means. Test and report back please.

[MENTION=3885679]acestars[/MENTION] Yes you have understood it correctly. The only reason to do this is if you want to be in performance mode all the time without the annoying persistent notification to turn it off. Battery use should be no different because we are not affecting the idle freq or number of cores.
[Redmi Note 2 Android Development] acestars:
I still use miui 7.0.12, what will happen if i just flash the kernel without removing miui apps? What will happen to data usage, firewall, and permission manager under security app, still gonna work? I use them a lot.
[Redmi Note 2 Android Development] schmanto:
[MENTION=5952980]jajk[/MENTION]: testing Skinny_Pro_RN3_MIUI_7250-5_boot.img - sim still working with this one.

thank you once again ;)
[Redmi Note 2 Android Development] MOVZX:
Bug Report:

CM version of Skinny Pro is bugged while doing a phone Call. The Proximity Sensor not working, the screen won't turn off while doing a call.
[Redmi Note 2 Android Development] jajk:
[MENTION=3885679]acestars[/MENTION] Perm manager, Firewall and Data usage still work with Skinny boot image. Other apps that depend on connecting to Xiaomi may or may not work as mentioned in the first post - sometimes you will be unaware that the connection is made since Xiaomi uses tunneling (vpn), udp and/or ftp to sell your soul to the communist party;)

[MENTION=6720440]schmanto[/MENTION] That version can be treated as final unless you discover any bugs.

[MENTION=4460588]MOVZX[/MENTION] Try changing this one file in ramdisk.
[Redmi Note 2 Android Development] MOVZX:
OK, thanks I will repack it now and report back later.

Regarding Xiaomi Privacy Violations, most Asian user doesn't care about it, even they don't know about Privacy at all LOL.
[Redmi Note 2 Android Development] jajk:
[MENTION=4460588]MOVZX[/MENTION] Does "Asian" include South Korea, Japan and Philippines? Google and Microsoft aren't building missile bases in the South China sea so there is a difference in underlying motivation.....

Sorry, forgot Vietnam in the mix.
[Redmi Note 2 Android Development] phunghai110:
On redmi note 3. I can do everything in the first post ? Thank pro
[Redmi Note 2 Android Development] jajk:
[MENTION=7373417]phunghai110[/MENTION] Almost... Don't delete files needed for fingerprint scanner and don't enable zram swap. Everything else will work.

714-14 is up for MIUI RN2

Changelog:

netdiag service disabled

*tune2fs disabled

*this doesn't seem to run from existing init script during boot therefore pointless. Possibly due to later introduced restrictions on running executables directly from init for security reasons.
[Redmi Note 2 Android Development] phunghai110:
I can flash boot for cm rom? Redmi note 3
[Redmi Note 2 Android Development] jajk:
[MENTION=7373417]phunghai110[/MENTION] No. The CM files are not a whole boot.img. The zip posted earlier was for MOVZX to repack into a boot.img himself. There are too many versions of CM to create a single boot.img for and I do not run CM so I won't be making a complete boot.img. Perhaps [MENTION=4460588]MOVZX[/MENTION] could publish his boot.img when it is bug free?
[Redmi Note 2 Android Development] MOVZX:
I have tested the Skinny Edits CM12.1 on both [MENTION=5650330]danielpinto8zz6[/MENTION] build and [MENTION=6738603]lokjianming[/MENTION] build for 2.2GHz Prime Edition (my phone) and 2.0GHz Standard Edition (my friend's phone). Everything is smooth, no random reboots, no freezing, no overheating, no deadlocks, and most importantly no more useless logging :D

Here (attached) are the Ramdisk for both version using the last ramdisk you gave me some days ago (I edited it a little bit to adjust the CPU Clocks (Prime & Standard), and I did tidy up some codes).

Thanks for your help [MENTION=5952980]jajk[/MENTION]
[Redmi Note 2 Android Development] jajk:
[MENTION=4460588]MOVZX[/MENTION] Thanks for sharing this. You have a RN2 phone I assume? Anyone can add these altered files to their CM12.1 boot.img to make a Skinny boot.img. I will review the provided files and add them to OP so they don't get buried.

Edit: Did the last version fix the proximity sensor?

RN3 users will have to provide a complete CM12.1 boot.img for editing at this point. [MENTION=7373417]phunghai110[/MENTION] can you post the boot.img out of the ROM you are using?
[Redmi Note 2 Android Development] jajk:
Skinny CM12.1 for RN2 ramdisk files uploaded (suits both standard and prime versions). This is the equivalent of latest 714-14 MIUI version.

Unpack your boot.img, substitute these files and then repack to make your own Skinny_Pro boot.img for RN2 CM12.1.

Thanks to [MENTION=4460588]MOVZX[/MENTION] for input and testing.

[MENTION=4460588]MOVZX[/MENTION] Only one version is needed since init.hermes.power is not imported any more which is the only place where cpu specific values where mentioned. Also updated to disable netdiag and tune2fs as in 714-14.
[Redmi Note 2 Android Development] acestars:
[MENTION=5952980]jajk[/MENTION] LOL, in telegram group people said nohon battery is good but i haven't tested it yet.

I'm on miui 8.0.2.0 so what should i do to go back to mr 7.5.50? Just flash it using twrp or i need to do something before it? maybe flash miui 7 fastboot version first?
[Redmi Note 2 Android Development] jajk:
[MENTION=3885679]acestars[/MENTION] 8.0.20 is not that different to 7.5.xx. Both being early implementations of MIUI8 before the services bloat really set in;)

I will be looking at the latest stable 8.5.20 shortly to see if there is anything of merit in there.
[Redmi Note 2 Android Development] acestars:
Yeah i already tried miui 8.2. when i tried stop the services using myandroidtools the services cant be stopped so i back to miui 8.0.2.0.
[Redmi Note 2 Android Development] acestars:
[MENTION=5952980]jajk[/MENTION] if you want Multirom 8.5.2.0 boot image

https://drive.google.com/open?id=0B4qnJu8d4j1wTUtyem5NdS11OWM
[Redmi Note 2 Android Development] jajk:
8.5.20 skinny boot image is in progress but will be a few days away.

While the 8.5.20 ROM is pleasing enough to use and look at, it has the unfortunate trappings of all recent MIUI ROMs since Nov 2016 in that unwanted Xiaomi "spyware" services are heavily embedded and cannot be easily removed or stopped so it gets the thumbs down from me.
[Redmi Note 2 Android Development] jajk:
Skinny_Pro_8520_Tweaked-v33.img uploaded

This is suitable for all MIUI7.5 and MIUI8 ROMs

Changes:

Rebased on MIUI8.5.20

No longer limits max cpu core number - do this manually in init.d script if you want.

Note for MIUI7.5.xx and early MIUI8 version users: You may need to overwrite /system/framework/am.jar with the one from 8.5.20 to get the later functionality of Activity Manager that supposedly handles cpu allocation better. Hard to quantify if this is a thing or not on our phone but no harm done to try;)

File attached is the stock am.jar from 8.5.20
[Redmi Note 2 Android Development] BlayDee:
After following your instructions, and flashing your boot I cannot install any app from Googe play store, it stops at 100% download. How do I fix it?
[Redmi Note 2 Android Development] Iliyena:
The Google play services and play store has a tendency of messing with me several times a year. Try the fix for a bunch of other errors: delete data from play services AND play store, reboot..

...it can also be that a new version of Google Whatever is downloading SLOOOW in the background. Mentioned in OP of thread "Best SOT by far!"
[Redmi Note 2 Android Development] BlayDee:
It was working fine before I flashed this boot. ALSO cleaning data does not help. I need to restart play store twice to install every app, very annoying
[Redmi Note 2 Android Development] acestars:
try to flash old boot image is it fix the problem?
[Redmi Note 2 Android Development] jajk:
[MENTION=6280308]BlayDee[/MENTION] It is common to have playstore problems if you flash a Russian ROM with Gapps pre-installed. I always remove the Gapps before installing the ROM and re-install a fresh copy afterwards to avoid problems.

You didn't mention which version of 8520 ROM you installed???

Anyone else have a playstore problem?
[Redmi Note 2 Android Development] acestars:
[MENTION=5952980]jajk[/MENTION], i already flashed boot image 8.5.2.0 and replaced am.jar and no problem with google play. So what should i expect for "handles cpu allocation better"?
[Redmi Note 2 Android Development] Iliyena:
Try some Geekbench 3 with 5-6 and 8 cores, no rush_boost, if possible, the scores will tell me if they have been able to squeeze extra multicore-power out of our "true octa-core" ;)
[Redmi Note 2 Android Development] acestars:
I already tried Geekbench 4, there's no Geekbench 3 in Google Play.

The score for single/multi core are 800/2277 for 8 cores.