yashsingh1/xdaforums huggingface dataset:
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
I've looked at this fix with the intention of including, but from what I could see it just disables LTE. Why not just go into settings and change it to "Prefer 3G"? I guess I could make it an option in the new aroma installer to force 3G default...

EDIT: Found out that this is a problem with old SIM cards that don't support 4G at all. OK, "Force Disable 4G" will be an optional fix in next aroma version (default disabled for obvious reasons).

Latest TWRP from cofface can be flashed to recovery 100% fine without wipe, it supports encryption now.

You need to root basically to modify system at all, because modern android devices have a thing called Secure Boot (dm-verity) that will cause boot loop if even one file on the system is changed. My patch disables it, so does SuperSU and phh superuser. There is a way to disable it manually if you unpack/repack/reflash boot.img, you can google for that - its just editing fstab file in ramdisk and is basically the same for all devices.

Once you do that, you can safely delete the APK from system with TWRP file manager.

Why not install this pack or just root? Are there still apps which only check for root and don't check for Secure Boot or something?

I am still working on the next version which has Aroma-based installer, so you can do minimal changes with it. But if you can share with me your concerns about flashing the pack I would appreciate it, I might be able to work something into Aroma.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] gsmyth:
Thanks! By the way I am using your tweaks on the latest China dev rom and it's working great.

I'm also going to look at getting a new sim from my network provider. Up until a couple of weeks ago they were 2g/3g only. So new sims now need to be 4g enabled, although I don't have a 4g data plan so would still use 2/3g only, but in theory the sim should mean the battery drain should stop. Thanks again for your work!
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] asusm930:
mainly because I'm running the latest xiaomi.eu rom. I edited your flashablze by deleting all the google apps and right now it works fine with whetstone removed, but MIUI still likes to kill apps which is really stupid. I have a feeling my edited flashable didn't totally remove whetstone. If you could list the things I can safely rmeove from your flashable to have it remove whetstone only it would be great

edit- Nvm just disabling whetstone should fix multitasking but MIUI just likes to kill apps anyway :(

---------- Post added at 03:00 AM ---------- Previous post was at 02:58 AM ----------

i think this fixes it en.miui.com/forum.php?mod=post&action=newthread&fid=64
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
Make sure you've read the tips in first post. Apart from this, I don't know what could be causing it. Just check if something called Whetstone exists in /system/app/ or /system/priv-app/.

The next Aroma-enabled version will be personally tested on latest Xiaomi.eu ROM.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] prismk:
A little off topic, but did you saw that? http://en.miui.com/thread-430746-1-1.html

Take a look!
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] gsmyth:
Looks awesome, will keep an eye for a post over here in XDA too. Only a bluetooth bug as well!
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] x3m.zone:
I tryed it and BT works well...dont know why cofface said that had BT bugs, but for me is all ok
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] Wilderone:
Hi CosmicDan, no pressure mate, but I'm keen to have a look at your Tweak Pack, any ETA on the new version with Aroma?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] benda95280:
Same Here ! Looking everyday
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] xda616:
Can i use this tweak to rom aosp cofface ??
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] x3m.zone:
Since is containing MIUI specific tweaks, it think the answer is NO
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] xda616:
ohh ok thankss
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] benda95280:
Any News ? :)
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] evl01:
can i use it with xiaomi.eu weekly rom???
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] spr33:
Has anyone tried the tweaks with Official MIUI 8 dev/beta?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] gsmyth:
I dont think the Global dev/beta ROM had been released when the dev put this together, so the only way to find out (if no-one responds) is to backup and flash it. I am running it on the China dev/beta rom and it works without a problem.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] spr33:
I'll try it out tonight. Really getting fed up of apps just being killed for no reason (hopefully just due to whetstone).
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] spr33:
I installed it just fine on the latest beta build. However, Instagram no longer loads, it just crashes on launch. I've even tried the beta build of Instagram and it still doesn't load.

I'm guessing to remove the tweaks, I just dirty flash the ROM?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] ulev:
I just applied the mod to the latest global beta. Altogether the device works ok and seems a little smoother than before.

I have one problem: OTG is randomly not working.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] rykus:
hello.... i tried it on eu. stable 8.1.6.0 rom and got error........ "could not find meta-inf/com/goggle/android/update-binary" in zip file..... anyone have an idea whats going on here???
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
Damn it... real life gets in the way, and now I forget what the heck I'm doing!

The Note 4 still gets laggy over a few days and needs a reboot, even with my tweaks. Wish I knew what the problem was.

I'm going to flash 8.1.9.0 MBFCNDI and try out my Aroma update version to see where I was up to. It was nearly finished, will see how I go.

What is beta/dev version? Different to weekly? Or is it just in-between?

Tweak pack should work with weekly, just no guarantees.

Yep. Should of made a backup ;)

A logcat of the Instagram crash might help.

I don't know how anything in here could break OTG. Please confirm that OTG is 100% working without this tweak pack.

Download corrupt. Try again.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] spr33:
Awesome news!

Thanks for the reply. I figured out why it was crashing in the end but now can't remember what it was.

I've applied several of the tweaks manually as I didn't need everything but I couldn't find out how to enable doze. Hopefully you'll have the aroma set up in no time :)
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] ulev:
You are right. It's a hardware issue with my adapter. Sorry.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] asusm930:
Doze is enabled on the latest roms actually. I have used Better Battery Stats to confirm. it just takes 30 minutes of the phone being stationary/not moving for it to work but remember 30 minutes. When I tested I did turn off MIUI optimizations in developer settings though.

I have also tried forcedoze app to force it to doze super early and it works. I installed force doze and converted it into system app so that it is kept in memory and not killed :)
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] spr33:
Thanks for the headsup. Tested and working :)
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] Crowbar Asdfghjkl:
I tested removing Whetstone in Xiaomi.eu. Root is not required. If you have TWRP you can remove Whetstone without rooting by using it's built-in file manager. First you go to /system (if you are using TWRP remember to mount /system first), then go to the "app" folder. You see the folder called "Whetstone". Delete that folder (make a TWRP backup first) and then go back to /system and go to the "etc" folder. You will see a folder called "WhetstonePermission". Delete that folder too. Reboot then you are done.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] spr33:
What does removing whetstone actually do? I understand that it possibly controls app killing in some way but is there a definitive description on what it does?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] Crowbar Asdfghjkl:
By the way, after doing that, Battery Saver crashes once in a while while charging.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] spr33:
I deleted Battery Saver after following some of the 'skinny mod' post. More unnecessary junk!
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] bintang456:
will try on 8.1.10 china stable
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
If you want "definitive", you can decompile the APK and examine the smali yourself. All I can say is that it does stuff to memory management, it overrides LMK values for example and also kills background apps that you don't "Lock" via the task manager.

Guys, I'm not sure I can be bothered continuing this. Even with good LMK values and Whetstone removed, MIUI still causes redraws and app suspension with 500MB free.

Wtf is wrong with MIUI?

I wonder if Cofface would know. I'm considering trying his ASOP hack, if it's got better memory management then I might say goodbye to MIUI. The novelty has worn off, and I just want a phone that doesn't have to reload every app all the time....
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] Crowbar Asdfghjkl:
Cofface's AOSP is nice. Just remember to flash the patches on the comment section of the AOSP thread to improve performance.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
OK I found this thread, https://xdaforums.com/showthread.php?t=3527345 - research by another Redmi user, hopefully it solves this multitasking - looks promising! If so I will get back onto the Aroma installer update and include these tweaks as options too :)
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] Wilderone:
See, I don't have a problem having a dozen apps open for days on end & all I do is set them to auto-start, battery saver off, default MIUI settings & nothing more.

Maybe it's the way I use the device or the apps I'm running? I don't know.

I've run Xiaomi.eu/Global Stable/Global Developer/Epic ROM, they all seem to be the same to me & really good in that regard.

My device is 3/64

Ohh & Welcome back CosmicDan [emoji106]
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] asusm930:
Can you switch between those apps within one hour span? Don't the apps like reload? for instance, without my tweaks, when I go on insta and scroll A LOT, when press home and switch to another app, the app reloads, losing scrolling position. Same happens to twitter, chrome, another browser. Don't get me wrong, the phone performs well, but it reloads apps too much. It's speedy, has a nice camera but multitasking is a nightmare unless if I set memory optimizations to high in dev settings and apply my tweaks. This multitasking behaviour is amplified when open a stock MIUI app like compass, remote, calender, phone, sms and etc. Do you not experience this? for the record I have around 100+ apps installed on my phone.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
I only have a 2GB device :( I feel like an idiot, I should of paid the extra $30 for the 3GB!

That will make a difference. But as asusm930 in the linked thread said, even on the 3GB ROM the multitasking is a bit broken. It's not just me, many people on Xiaomi.eu and en.miui.com regularly complain about MIUI's broken multitasking on other devices. Maybe the choice of apps does exacerbate the issue, I have Facebook + Messenger running in background, and if I switch from FB to Chrome and back it will trigger reloads.

I'm packing up and testing the Aroma update now, I will release it if all is well - and look at these extra multitasking tweaks after.

On a side note, Xiaomi.eu stable 8.1.10.0 was only released yesterday - I'll be testing the Aroma package and tweaks on that. I'm probably going to take the same "f*** official" approach as asusm930 has, now that Xiaomi are making stable ROM's for our device.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
Ok guys, I've pushed the latest version to GitHub - but won't release a ZIP yet. If any testers with a little know-how want to try it out, please do - just visit the github repo link and use the "Clone and Download" function.

I'm still testing on the latest 8.1.10.0 myself, and I need to update the OP before sharing a zip and formally announcing it. But others are free to try it out!
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] smokinjoe2122:
Hey [MENTION=3328179]comsi[/MENTION]cDan...I hear what you're saying about MIUI....I took the plunge as an american because I've always loved the older ROM ports (MIUI 5 and up), but I am fairly disappointed with the builds MIUI puts out...

I've recently gone over to the AOSP ROM...Are your tweaks functional across both MIUI and AOSP, or just MIUI at this time? I think AOSP is pretty close to being perfect, but could still use some performance tweaks, especially when scrolling through images.

Thanks,

Joe
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] spr33:
Attempted to install the zip from github but got an error message when flashing in TWRP. See attached.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] deathkid13:
I got the same error.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] deathkid13:
Help?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] HaoZeke:
Try replacing that file with one from a working zip
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] deathkid13:
Didnt work. were you able to flash the zip?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] NOS_bzone:
Good, work on my Nikel 7.3.16 Global Dev, battery life better now...
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] deathkid13:
How were you able to flash? I have been getting errors
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] NOS_bzone:
No, I'm manually installation with text editor on root explorer (rootex). Not flashing zip with TWRP.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] Achygarden:
My note 4 has the MI account blocked .... I am currently using it with AOSP 6.0 can I use this rom or will it ask me for MICLOUD account as well?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] gsmyth:
This isn't a rom, it's a set of tweaks/mods for miui Roms.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] Achygarden:
Oh yes okay thanks
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] smokerman:
Nice to see CosmicDan here..im gonna try this on epic ROM based on Xiaomi.eu...?

Enviado do meu Redmi Note 4 através de Tapatalk
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] DarkTruTH:
Thanks for the tips I was having problem in restoring apps through titanium backup
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] dhavietz:
May I ask your permission to port your tweak to redmi pro x20 bro? Thanks before.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
Go for it :)

Just FYI guys, I have switched over to one of the AOSP ROM's lately (the one from hoangnguyen), even with all these tweaks my 2GB device just struggles with multitasking. Hopefully I will get a new Xiaomi device this year, probably a flagship this time instead of a cheaper one. Or maybe I'll go back to Sony, I don't really know... we will see. I just want something fast and functional from here on.

So consider this project "finished", there is really nothing else I can do. Anybody is free to fork it and make a new thread if they want.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
Just want to share some info with your guys. I've moved back to MIUI (AOSP has horrible battery life), using latest Xiaomi.eu ROM, and it's worked out really well so far - best I've ever seen MIUI on our devices.

First I flashed global dev 7.4.27 fastboot package from official site, then - using latest Xiaomu.eu weekly - followed this advice:

Maybe the latest MIUI bases are much better, or maybe the script asusm shared is really good; but I get really good performance with this setup. Multitasking is fast, and I have ~800MB free after installing all my usual apps which is a big difference to ~400MB (now I know "free RAM is wasted RAM but I think this is a measure of actual free RAM excluding cache).

I did install CosmicTweaks, but did *not* remove Whetstone. It seems to be sorted out pretty well in latest versions.

CosmicTweaks also gives us init.d, and I use phh's Superuser (no su.d) but the script works fine with that - it's essentially the same thing.

Now it's early days still, in my experience MIUI starts well then gets slower as the weeks go on. But let's see how this goes!
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] spr33:
Will you be updating/releasing the tweaks you used?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
Sure, I will release some update when I confirm these tweaks are good.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] gsmyth:
Great news, I'm on Xiaomi EU weekly 7.3.23 and it's been the best for me yet especially in terms of battery life. Not using root or any other tweaks either.

Look forward to seeing your updated tweaks. [emoji3]
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
Update released!

I went through the original thread and redid the whole thing to be current. But it's not too important - just make sure to read the text in Aroma if you're new.

Enjoy!
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] spr33:
Great stuff, thanks!
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] Robyrogers:
A stupid question here but do I just flash the zip?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] spr33:
Flash the zip in TWRP then go through the Aroma install (which happens in TWRP after the flash). Very simple and straightforward :)

If you've not come across Aroma Installer before, it basically allows you to just use the tweaks/options you want rather than installing EVERYTHING.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] gsmyth:
[MENTION=1844875]CosmicDan[/MENTION] do we need to install this with a fresh/clean install or could it be flashed after installing a new weekly EU ROM?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
Dirty flash should be 100% OK, as long as you don't select Google Apps in the Aroma choice (it's only default checked if you install on official firmware). Feel free to report any bugs even if you dirty flash.

Updated original post with this info.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] gsmyth:
Cheers mate, thanks for your work.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] androiduser44:
Any chance to use it on mi5s?

Gesendet von meinem MI 5s mit Tapatalk
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] asusm930:
Some tweaks are MTK cpu specific. Best thing to do is go to his github and see wether it can be used on non MTK phones.

---------- Post added 8th May 2017 at 12:06 AM ---------- Previous post was 7th May 2017 at 11:09 PM ----------

For best multitasking I think Ive found the best solution.

First things first, from my own testing (on 7.4.27 Xiaomi.eu ROM)

1. Removing whetstone totally destroys multitasking. Without whetstone apps get kicked out of memory so often.

2. We can still set up zram manually even with whetstone still.

3. Without whetstone we create zram but it without it apps will not go into zram = poor multitasking

4. Setting memory optimization (whetstone) to 'low' disables zram but forces app to atay longer in memory (better multitasking)

5. The best thing to do is to set memory optimization to 'low' and manually set up zram. In order to do that, a file called mcd_default in system/etc needs to be edited and a new zram script needs to be installed (via either su.d or init.d).

I'll provide the files requires

For the mcd_default file its here

https://drive.google.com/file/d/0B_Q4QjvbODxoRXRTU094cEo4M00/view?usp=drivesdk

For the manual zram file its here

https://drive.google.com/file/d/0B_Q4QjvbODxoOVBoMHJYanF1QUE/view?usp=drivesdk

6. Its also best to disable battery saver app as it also likes to background apps when screen is off. You can use either link2sd or sdmaid for that.

7. Letting whetstone/miui set up zram causes the phone to still kick out apps when screen is off. From my testing, this manual zram method keeps app in memory even when screen is off. That combined with disabling battery saver app has helped multitasking a lot (for me at least).

As per usual, back up necessary files and bla bla before trying

---------- Post added at 12:07 AM ---------- Previous post was at 12:06 AM ----------

Check out my updated reply. If you have multitasking problems, it might help
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] adrxano:
I'm using latest xiaomi.eu rom 7.5.4 with the latest comsic tweaks and I'm getting the best battery life I've ever had since I bought this device. Yesterday I had 1h40min screen on time with 70% left after some heavy gaming and also whatsapp, Facebook and Twitter. And I was also playing music the entire time. I've also installed amplify, powernap and greenify and have aggressive doze enabled.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
Sounds good, thanks for the share!

Yeah man I've had good results too, I think asusm930's tweaks helped a lot. As of right now I am at 77% remaining; that's 17h since charge and consists of 1h 2m SoT today. Most of that time was spent on the bus for 40 mins listening to music and browsing the web (sunlight making brightness ramp up) so I'm pretty happy overall.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
Not as is, no.

But I am interested in making this a more universal pack.

What features in particular are of interest to you? I guess it's only the init.d tweaks that are specific to the Note 4, everything else could be adapted...
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] adrxano:
Deep Sleep and Doze seem to be working very well on my device. Will be testing more but for now seems good. Before I'd lose 1 or 2 % every hour, now I haven't lost any battery for the past for 4 hours. I naptime app to implement aggressive doze and it seems to be working because aggressive doze through greenify didn't seem to be working for me. The only thing I hate is that I have manually optimize every app unlike doze in aosp where everything is already optimized for you automatically. Takes a lot of time.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] adrxano:
Is it not possible for you to port these tweaks for use on aosp roms for our device? Because the battery life there is very poor
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] CosmicDan:
I don't know what the problem with AOSP port is, I don't think these tweaks are relevant at all.

Regarding Doze, why aren't you using ForceDoze?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] adrxano:
I tried forcedoze app and it just didn't work for me. My device wasn't not going into doze mode at all jus like aggressive doze on greenify. It seems only naptime works for me. Or maybe I've been making a mistake somewhere. Which app would you recommend in this instance?
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] asusm930:
My trick to force forcedoze to work

1. Install and go to security > permissions > autostart and enable for force doze

2. Convert it to system app using link2sd and reboot

3. Launch once and lock it at the recent apps screen (drag app down and press lock icon)

4. Configure force doze and remember to 'enable disable motion sensor'

5. Reboot and you can swipe away the app in recent apps (BUT DONT REMOVE THE LOCK)

6. it will work now, trust me.

Also please use gsam battery monitor to see if device is dozing.
[Xiaomi Redmi Note 4 [Mediatek] ROMs, Kernels, Reco] geyenk:
thanks for the tweak, installed on MultiROM.. :good: