yashsingh1/xdaforums huggingface dataset:
[Redmi Note 2 General] DarthJabba9:
No difference - still doesn't work - perhaps success via using run-parts is sensitive to the specific busybox binary that you have.
[Redmi Note 2 General] DarthJabba9:
By the way, I got my inspiration for my mod from here: http://xdaforums.com/showthread.php?t=2287540&page=4 (read from that page until the end of the thread; there are things relevant to your point about creating the init.d directory - seems you might have to use a shell script (with relevant mounts/remounts), rather than trying to do it from init.rc).
[Redmi Note 2 General] jajk:
A minor change might be needed for some cases:

referring to this: http://xdaforums.com/showthread.php?t=1777263

You will see that the busybox part of the path is removed in the example script below because the run-parts command exists outside of busybox as a link.

If busybox is left in the path, the init.d scripts might run twice - once for the executable xbin/busybox run-parts and once for xbin/run-parts link. This might have no effect other than increased boot time in most cases but....... depending on what is in your scripts, might cause problems.

So check to see if you have run-parts in /system/xbin folder. Stock MIUI does not but if you have updated busybox, it is likely that you will. If so, redo the boot.img with init.rc Add init.d support section modified as below.

#Add init.d support

#service runparts /system/xbin/busybox run-parts /system/etc/init.d

service runparts /system/xbin/run-parts /system/etc/init.d

user root

disabled

oneshot

on property:sys.boot_completed=1

start runparts

I think that some issues might be due to this or that run-parts will abandon execution (spit you out) if a script has errors or, in a similar manner, su privileges during boot might not be granted for actions in the scripts causing failure. If you have problems with intermittent application of init.d scripts, look at the content of your scripts.

I have created a zip update that will upgrade any busybox installation to the latest stable version 1.24.1 (not limited to reno2 phones, just needs arm cpu) without needing to install an app.

https://drive.google.com/file/d/0BwdRTuyj12_yYVBKRlZDN2J3cFE/view?usp=sharing

This will give you links in /system/xbin to all busybox commands so read the above in that context.

You can also just extract the busybox file from the zip and drop it into /system/xbin (replace existing file) if you do not have or want all the links generated. Remember to set the file permission to 0755.

This means that you must always specify busybox before each command contained therein.
[Redmi Note 2 General] DarthJabba9:
I don't have any stand-alone run-parts.
[Redmi Note 2 General] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] Information was not directed at you but to general readership.

I have updated previous post with extra method to update busybox.
[Redmi Note 2 General] Xabadou:
I have put this script on /system/init.d with correct permissions, but don´t work. I have blank line at end of script.

Flashing test_initd.zip i have init.d support (test.log appears on /system/init.d and says init.d is supported).

What is wrong?

#!/system/bin/sh

# Tweak Interactive CPU Governor

echo 806000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq

echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load

echo 90 403000:80 806000:84 1183000:87 1326000:90 1469000:93 1625000:96 1781000:99> /sys/devices/system/cpu/cpufreq/interactive/target_loads

echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate

echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time

echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/above_highspeed_delay

echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack

# Cpu Limit

echo 1781000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

echo 1781000 > /proc/cpufreq/cpufreq_limited_max_freq_by_user

# Tweak IO Scheduler

echo deadline > /sys/block/mmcblk0/queue/scheduler

echo 256 > /sys/block/mmcblk0/queue/read_ahead_kb

# Tweak VM

echo 300 > /proc/sys/vm/dirty_expire_centisecs

echo 500 > /proc/sys/vm/dirty_writeback_centisecs

echo 536870912 > /sys/block/zram0/disksize ## 536870912 = 512MB, 1073741824 = 1GB

# Tweak Entropy

echo 512 > /proc/sys/kernel/random/read_wakeup_threshold

echo 1024 > /proc/sys/kernel/random/write_wakeup_threshold

##File end
[Redmi Note 2 General] cafezeenuts:
For some reason i'm still getting FC on google apps for play store when i touch "read more" google messenger FC when i touch on a message. And google calendar when i try to edit events. I've try pico and mini gapps. I'm using china stable 7.14 the new boot img (21/02) and completed stage 1,2 & 3.
[Redmi Note 2 General] jajk:
[MENTION=6199310]Xabadou[/MENTION] Script looks perfect for the 2GHz cpu. The filename could cause a problem if you have used reserved characters. You can test it in Terminal by typing run-parts or busybox run-parts (read a few posts back) to get the syntax for using the command and then trying --list, --test etc.

[MENTION=2771703]cafezeenuts[/MENTION] I have no idea what is causing the FC problem since I do not use those services. Maybe someone that uses those particular Google services can comment whether they experienced that problem and, if so, how they fixed it.
[Redmi Note 2 General] DarthJabba9:
[MENTION=5952980]jajk[/MENTION] - I still have trouble with init.d on your latest boot image. I have installed your updated busybox. Only one script (out of 3) gets executed. This is my version (a mod of your latest version, dispensing with the need to use run-parts):

https://drive.google.com/file/d/0B_tZo6-mdlNuSTlrTkNYU1QyQ2s/view?usp=sharing

The init.d scripts all run with this one.
[Redmi Note 2 General] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] The scripting process looks fine to me and boot.img works for me. I only run 1 script so the problem of dropping other scripts is not tested by me. I did at one stage run 10 dummy scripts that wrote a line each to a file so I could see 1 2 3 4 5 6 7 8 9 10 in the file if all executed and they did.

Let's see if [MENTION=6199310]Xabadou[/MENTION] or anyone else following this with intermittent init.d issues wants to test with your boot.img and report back if problems disappear also.
[Redmi Note 2 General] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] If you want to help further...

I would still like to add the creation of the init.d folder with correct permissions as part of the boot.img

I have tried a few different ways with no success. I don't want to get too complicated with this as it is still relatively easy to say Hey, make the folder here with these permissions.

I also want to enable Permissive mode (setenforce 0) very early on in the boot process (not in init.d script) but it does not work as it did in earlier kernels.

Your input is appreciated.
[Redmi Note 2 General] thetrukos:
I had the similar issue, playstore fc while searching apps, fixed by installing open gapps pico in my case.
[Redmi Note 2 General] cafezeenuts:
[MENTION=5952980]jajk[/MENTION] OK no worries, BTW how do I know the scripts is working for stage 1 & 2?

[MENTION=6403012]thetrukos[/MENTION] I have try open mini and Pico gapps. Same problem described on my previous post. Do you have FC for Google message app and google Calendar app when you try to edit previous event.

Cheers

---------- Post added at 04:30 AM ---------- Previous post was at 04:14 AM ----------

2G, Wifi & screen on 5 minutes CPU spy shows.

1183 MHz 1:16

806 MHz 0:07

403 MHz 3:54

Does this means the script is working?
[Redmi Note 2 General] jajk:
[MENTION=2771703]cafezeenuts[/MENTION] Looks like the script is working. If it was not, you wouldn't have much time at all sitting on 403MHz which was the curse of stock settings that ate battery. If you watch the cpu freq in realtime, it should predominantly sit on 403MHz when idling. It is normal for it to jump around a bit because of periodic background activities.

You will be pleased to know that you have cursed my phone and now I have at least the FC when clicking on Read More in Google Play:silly:
[Redmi Note 2 General] cafezeenuts:
[MENTION=5952980]jajk[/MENTION] haha... I'm glad that this was not an isolated incident. I believed i got play store to work like normal using open gapps mini just before stage 3. After i completed stage 3 i was getting FC on clicking "read more" on play store.
[Redmi Note 2 General] jajk:
[MENTION=2771703]cafezeenuts[/MENTION] Then you will be able to step back through your backups until it works again and then go forwards and see what breaks it:D

I will be running through the process from scratch again to hopefully pick up where the problem is and test out a couple of new things.
[Redmi Note 2 General] DarthJabba9:
My mod will create the init.d directory if it doesn't exist (see sbin/sysinit.sh in the ramdisk directory). As for "setenforce 0", how does one check whether it is working? I think you should be able to do it in the sysinit.sh where the init.d directory is being created.
[Redmi Note 2 General] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] In terminal, type getenforce to see the current state. It used to work by just putting setenforce 0 in init.rc but not in 7.1.4:(

Yes I have just reinstalled using your boot.img and magically there is an init.d folder.

[MENTION=2771703]cafezeenuts[/MENTION] I am 95% of the way through stage 3 and still no Gapps FCs using pico Gapps. I am closing in on the culprit.......
[Redmi Note 2 General] DarthJabba9:
Don't you have to do something like "exec setenforce 0" or "start setenforce 0" ?

In any case, what are the reasons why we would we want to change the setting from Enforcing to Permissive? Keeping it at Enforcing has yet to cause me any problem, and there must be a reason why it is set by default at that value. Am I missing something?

Indeed :)
[Redmi Note 2 General] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] Why would you climb Mount Everest? I personally run enforced but I know some people need to run permissive to entertain their favorite badly written apps which are usually something to do with making the sound appear to be like a full sized high quality stereo system through 10c crappy headphones:silly:
[Redmi Note 2 General] DarthJabba9:
But, surely, if someone has a specific reason to run permissive, then he should do it himself via initd? After all, that is the whole purpose of initd support ...

* And the badly-written apps should be able to make the necessary entries in initd.
[Redmi Note 2 General] DarthJabba9:
[MENTION=5952980]jajk[/MENTION] Something seems to have gone awry with your ramdisk mods - neither the internal nor external sdcards can be mounted in Windows. I tested this extensively.

---------- Post added at 07:04 PM ---------- Previous post was at 07:03 PM ----------

BTW: "setenforce 0" works when executed from my sbin/sysinit.sh
[Redmi Note 2 General] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] Just tried - no problem mounting internal SDCard in Windows here. Don't have a cable handy to test OTG.

Yes, setenforce 0 works outside of init.rc where it used to work inside??? I guess there is a security update changing the behaviour in 7.1.4.

I will be updating the original posts today adopting the alternate method for providing init.d support as provided by [MENTION=5850987]DarthJabba9[/MENTION] plus a new streamlined skinny process.
[MENTION=2771703]cafezeenuts[/MENTION] This fixes Google app FC issues - it is O.K to use pico-Gapps as this was never the problem:)
[Redmi Note 2 General] cafezeenuts:
[MENTION=5952980]jajk[/MENTION] Awesome, can you also please provide a download to your Pico gapps? I want to replicate your success. Cheers
[Redmi Note 2 General] jajk:
[MENTION=2771703]cafezeenuts[/MENTION] I have been using open_gapps-arm64-5.0-pico-20160206 but these are updated almost daily. I don't think it matters too much which version you use but there are the odd builds that don't work too well according to some reports. I am a little constrained in data to upload another 45MB file. Just use what you already have and it will work fine;)

[MENTION=5850987]DarthJabba9[/MENTION] Did you by any chance have adb over usb enabled when you couldn't mount SDCard?

The technique for removing Network Location Baidu App is nice and clean now if you follow what is written unlike previously which could get a bit messy.

I think the process and depth of cuts is pretty mature now and produces as good a result as can be achieved. Almost ready to call it Final unless anyone can chime in with more improvements???

Unfortunately it looks like we are about to loose vova.vafin's AOSP development efforts which was getting close to being a viable contender:(
[Redmi Note 2 General] DarthJabba9:
I have "USB debugging" enabled, and also "Verify apps over USB". But neither of these has ever been a problem with either internal or external SD cards being recognised or mounted automatically by Windows. It only have this problem with your most recent boot image. In fact, I once got an error message that the USB peripheral was not recognised. It's not an issue, because I have simply returned to my own mods, based on the stock 7.1.4 boot image with your penultimate mods applied. I might compare this mod with your most recent one to see what is different, where the problem could be, and whether I can replicate it via my own mod.

Edit: enabling USB debugging is the cause of the problem; I will investigate what setting in the ramdisk was changed to make this become a problem.
[Redmi Note 2 General] DarthJabba9:
These are the culprits (in default.prop)

ro.adb.secure=0
ro.secure=0

Restoring them both to "1" resolves the problem. You might want to do that.
[Redmi Note 2 General] Xabadou:
Please, edit this line on 2nd post:

echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/above_highspeed_delay

Correct line:

echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay

---------- Post added at 06:12 PM ---------- Previous post was at 05:43 PM ----------

This rom is a good candidate for your project:

http://xdaforums.com/showpost.php?p=65455996&postcount=13

Busybox, gapps and supersu are separated from main content.

Xposed installer works fine in this rom.
[Redmi Note 2 General] jajk:
[MENTION=5850987]DarthJabba9[/MENTION] I will fix that immediately. It is legacy from trying to defeat SELinux.

[MENTION=6199310]Xabadou[/MENTION] Thanks for pointing out the typo. Fixed. I leave it to the individual to choose a base ROM. I would be interested in adding apps to the list that should be deleted from other ROM versions though.

Edit: Hmm..... syntax correct on phone but not on PC......Spellchecker now turned off on PC.
[Redmi Note 2 General] exiacruzalta:
i confirmed this, window doesnot detect my phone connected via usb when i used your second new boot.img (custom_714_boot.img i supposed?not at home now) so i roll back to the old one.

edit: ahh ok i see the solution. thanks [MENTION=5850987]DarthJabba9[/MENTION] and [MENTION=5952980]jajk[/MENTION]. btw [MENTION=5952980]jajk[/MENTION], thanks for the effort you put in this project. after so much custom roms i tried, i always come back here. you are the hero mate, and everyone in this thread :)
[Redmi Note 2 General] exiacruzalta:
One more question, actually we can delete whetstone? as everytime i done it, after reboot a continuous popup of battery saver or power saver app crashed will occur. and to stop it i need to put whetstone back. it didnt happen to you guys?
[Redmi Note 2 General] cafezeenuts:
[MENTION=5952980]jajk[/MENTION] I've just fresh install everything using your latest settings (25/02) I'm happy to report that i no longer have google FC issues so far. Thanks again for your effort putting this together. Cheers:good:
[Redmi Note 2 General] jajk:
[MENTION=2771703]cafezeenuts[/MENTION] Good to hear of your success. And what do you think of your ReNo2 now?

[MENTION=7287632]exiacruzalta[/MENTION] No such crashes here. What are you using as a base ROM? Unzip the Whetsone .apk file and have a look inside for an idea of what it does and why you might want to delete it:)

Sorry for the stuff up on the 2nd to last boot.img. I hope people have caught up with the error plus the typo in the tweak script where hi_speed was incorrectly written as high_speed. Luckily that one would have had no effect unless you wanted to run a non-default value:silly:

I have just rebased my install on a Redmi Note 3 port by MiYuWi called MiYuWi_NewLevel. It reports as MIUI7.1.8 which means little. It is not without its problems like loading Fingerprint scanning and lock etc. but I notice I can delete Appstore without problem where I could not in MIUI7.1.4.

Can anyone else confirm that Appstore can be deleted in other versions (and still boot)? Maybe it is just China ROM where this is forced on the user?

Edit: The ROM mentioned is from Needrom and is only China and English language.

It looks like it is easy to port from ReNo3 (MediaTek version not Snapdragon version) so this may be a source of updates beyond Xiaomi's ReNo2 offerings. Take a look at:

http://xdaforums.com/redmi-note/general/redmi-note3-sphinx-v1d-miui7-v7-0-22-0-t3287461

This is a much better candidate as it is multi-lang.

Replacing boot.img with custom ReNo2 version + a bit of build prop editing should be almost, if not all that needs to be done if anyone wants to try? Looks like ReNo3 = ReNo2+fingerprint scanner.

Edit: ver 7.1.8 for ReNo3 is the same release as ver 7.1.4 for ReNo2 if you were hoping for an advanced release version......

ro.mediatek.version.release=ALPS.L0.MP6.V3.18_LCSH6795.LWT.L_P197
[Redmi Note 2 General] exiacruzalta:
sure, ill check it out later ;) well, i think global rom the appstore can be deleted as i deleted mine without problem. my rom is the global MIUI 7.1.3, with your custom boot :)
[Redmi Note 2 General] DarthJabba9:
[MENTION=5952980]jajk[/MENTION] There is no Appstore in my ROM (based on SlimMIUI stable 7.1.3, with patched 7.1.4 boot image).
[Redmi Note 2 General] jajk:
I have edited 3rd post to indicate that App Store may be able to be deleted on some versions.

Anyone want to have a closer look at the mcd service? It seems a waste of clock cycles to me. I have disable it with no ill effects so far. I would like some agreement or otherwise on this one before making it a standard deletion.

Have a read of /etc/mcd_default.conf and look at these lines in the boot.img scripts

init.miui.rc

#test #service for mcd main service

#test service mcd_service /system/bin/mcd

#test class main

#test disabled

#test on property:sys.boot_completed=1

#test start mcd_service

init.mt6795.rc

#test # mcDriverDaemon

#test mkdir /data/app/mcRegistry 0770 system system

#test mkdir /data/app/mcRegistry/TbStorage 0770 system system
[Redmi Note 2 General] jajk:
O.K being doing a bit more reduction investigation....

The mcd service along with mcDriverDaemon and Mobicore are setting up a half-baked dynamic zram system that favors apps in a list etc/mcd_default.conf that we have largely deleted. I have removed these and found that the reported RAM usage increases and reports correctly i.e. clear some ram, available goes up, not down. This indicates there is no zram at work which is a good thing. I now enable 512MB zram and have more available mem as expected and available mem goes back to not reporting accurately, also as expected. In other words, Android, not MIUI is back in control of zram:)

Next is Miuioneshots - it checks for presence of MIUI SDK app on boot that's all. Pointless so it goes too.

Found mdb service doesn't exist so it goes too.

tunman service appears to be part of Traffic control "data saving". I had it disabled some time back but re-enabled it when people had some issues but this was never the problem so it can go again.

I will link to the revised boot.img separately this time so the brave, curious or overly trusting can try this out and make sure there are no unintended side-effects. Edit: now tunman re-enabled version due to complaints about GPS not working.

https://drive.google.com/file/d/0BwdRTuyj12_yMHlxUkwwczFEUmc/view?usp=sharing
[Redmi Note 2 General] exiacruzalta:
Wowww, thats a great discovery :good: well ive seen it but i dont really know much about it and i just to afraid to tinker with something i dont really know :D but dont worry ill try the boot image, may the force be with us :D
[Redmi Note 2 General] exiacruzalta:
[MENTION=5952980]jajk[/MENTION] i have tried the boot.img. so far so good, nothing crashed. everything works i guess, mem reporting 1.2 gb (dont know if it is caused by the ZRam :p ) but all in all no problem :good:
[Redmi Note 2 General] jajk:
The last boot.img adds grease to the little cogs for smoother operation. It is one of the more noticeable tweaks so get into it:)

I am playing with xiaomi.eu_multi_hermes_6.2.25_v7-5.0 as a base since the last ROM I tried was buggy crap. This is more like it. It skinnies down better than 7.1.4 and seems pretty stable. The same process applies but based on a newer kernel in the boot.img. The scripts have a couple of very minor changes from the 7.1.4 ones and I suspect it will be superior and compatible back to 7.1.1 if anyone wants to try?

https://drive.google.com/file/d/0BwdRTuyj12_ydG5yM2w3VnJkRUU/view?usp=sharing

A couple of fatal flaws in this ROM also. Looks like de-odexing broke some critical apps. Newer kernel has no advantage so deleted.
[Redmi Note 2 General] slumslayer:
Seems like GPS is not working with this one :(

Thanks for your work!
[Redmi Note 2 General] jajk:
[MENTION=4229343]slumslayer[/MENTION] Just checked - GPS working for me. Maybe your satellites have been taken out by the Russians?

I don't know how to set the GPS to the right rough location in a MIUI ROM - doesn't seem to have a /etc/gps.conf file like normal. It might follow the locale set in build prop or default.prop???

If it is set to the other side of the globe or China, it might be really slow or not work at all.

There are no changes that could impact GPS functionality in the last boot.img.
[Redmi Note 2 General] exiacruzalta:
i gonna try this mate, wish me the best! :p i currently use the miui7.1.3 400dpi from Jo-san, its is slimmed down and only tinkered in build.prop (i think) so maybe you can give it a try :D
[Redmi Note 2 General] DarthJabba9:
I've checked with my phone - GPS is not working (doesn't seem to turn on at all). I have also tried stock 7.1.4 and 7.1.3 boot images and GPS works with them ...
[Redmi Note 2 General] exiacruzalta:
thats weird, ive tried it and my gps work. maybe you can enable the disabled init.miui.rc mod (mcd, tunman etc) and test them one by one ;)
[Redmi Note 2 General] DarthJabba9:
I think I'll pass on that one!
[Redmi Note 2 General] exiacruzalta:
lol ok mate :p i think maybe global rom more sensitive to some kernel slimming than dev one :silly:
[Redmi Note 2 General] slumslayer:
As soon as I reboot with an older slimmed down boot image, the GPS starts working again, so there must be something missing
[Redmi Note 2 General] jajk:
[MENTION=4229343]slumslayer[/MENTION] [MENTION=5850987]DarthJabba9[/MENTION] That's strange guys. I am not having a problem. See attachment.

How do I know what is causing your problem if I do not have it to cure?

When you say GPS don't work, what app are you using that fails to get a fix?
[Redmi Note 2 General] jajk:
O.K revised boot.img uploaded with tunman re-enabled - same post as before. Let me know if this was the source of the problem please.

If you have heavily skinnied your MIUI, it is worth revisiting the timer_rate value in the tweak script. The lower you can get this (not below 20000) while maintaining a good 403MHz idle, the less lag you will have.

On the latest test boot.img, I can reduce from 40000 to 34000 due to there being less background disturbances. It will be different for everyone depending on the crap you load your phone with:)