Init.d support? - Shield Android TV Q&A, Help & Troubleshooting

I'm running rooted 2.1 stock. Is there any way of getting this to work with init.d? I'm trying to get AFWall+ to autostart and apply on boot, and selecting for it to prevent leaks on startup appears to be the only way of doing it, but this works with an init.d script.

Related

[HACK] Run scripts at boot-time on stock rooted 3.2 without reflashing (nfs modules)

Hi,
When you want to perform some scripts at boot-time, there is two possibilities :
- modify init.rc, but it requires to reflashing the rootfs image (modification in / does not hold after a reboot),
- using an android app like script manager, which will load your scripts at java/dalvik platform boot-time.
I've managed to find a way based on activating tf-daemon, which is a script called by the asus/ventana initrc, but disabled at boot-time. Basically, we're re-enabling this daemon by setting the property tf.enable to yes, and then creating a script called tf-daemon and put it in /system/bin. Since this script is called by init.ventana.rc as root, you can put whatever you want inside this script.
I don't know what is the original purpose of this daemon, but probably it's used by the asus team for internal and debugging purpose.
Be aware that in the next firmware update, this possibility could disappear.Let's hope the asus team does not read this post. Or at least they could allow power users to call custom scripts at boot-time.
As a case study, you will find as attachment a script for loading nfs modules at boot-time.
PS: damn, can't upload. Here is a temporary link : http://dl.free.fr/hwTZ0YBq2
Untar the archive, then su, and sh install.sh
At reboot, you should have nfs modules loaded.
Good find:
I gave this a try just to load a couple of my own modules that work with the kernel I'm using. Works fine -- Thanks, -
Another method is to make a script and just call it in the init.rc. After a firmware update you only have to add the "exec myscript.sh" line to init.rc. I personally prefer this method because it allows me to control when the script is executed, whereas the tf-daemon method is always executed at the same point(AFAIK). Good research though, always nice to know all the boot calls.
Modifying the init.rc was my first shot, but the problem is that init.rc lies in ramdisk. So when trying to modify, the modification does not hold
after reboot. So a real modification involves to reflash rootfs with nvflash, too much hassle for me. The method I'm providing is for lazy ones. ;-)
nice find, but the link is dead, could you please provide a new link for the script?
also, how do I load nfs module for there is none under /lib/modules, compile the kernel myself?

Overclocking Daemon with or without RAM optimizations

This is a tweak of this thread to work with the nexus. I claim no credit what so ever. All the work was done by Smokin1337, Rmk40, Juwe11, Sybregunne, and -viperboy-, I just tweaked it a bit to work with the nexus.
I am using this at the moment with the latest MIUI.us rom (1.8.26) and it is working for me. I am unsure about other roms but I imagine that it will work with CM because it supports init.d.
Install this from recovery and make sure to make a backup before because I guarantee nothing. Make sure to remove any overclocking apps otherwise the daemon wont work. A lowmemorykiller app such as autokiller will change the values set by the RAM script therefore you might want to remove that too.
More info on the overclock daemon here. http://forum.xda-developers.com/showpost.php?p=14529333&postcount=5
More info on the RAM optimization. http://forum.xda-developers.com/showpost.php?p=14446249&postcount=1
A nice graphical tool that allows users to change Virtuous_OC frequencies and governors. http://forum.xda-developers.com/showpost.php?p=16726715&postcount=2
edit:
updated zips because i messed up the update-script on the original ones.
flashed zip and installed apk but cant get the gui to work the apply button doesnt allow it to apply, 1.8.26 miui
which gui version are you using? I used 2.11 and it works for me.
2.11 hangs on the loading screen for me...i get further with 1.21 but not by much
probably hanging because the install didnt work. Using adb shell, terminal emulator, or root explorer verify that the virtuous_oc folder got installed to /system/etc and has the 6 adjustable files inside of it. I will do a clean wipe on my phone and give it a try again with the files from the OP.
OK so I messed up on the update-script, I am still new to this. The OP will have the updated zips.
to tell if its working go to adb shell or a terminal emulator and type
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
it should change when you wake and sleep the phone
edit:
lol just thought about this. Will be kinda hard to check to see if it is working from a terminal emulator.
Working now thanks
Sent from my Nexus One using XDA App

init.d problems

hi,
i flashed paranoid android 1.992 and
[KERNEL][GPL][Linaro][OC 1.6GHz][UV][GPU+][ZRAM][SIO+V(R)] 2012-08-10 motley 1.1.1
and i wanted to run init.d scripts like the butter script that disables fsync and i used system tuner to set sd card cache to 1024... but that doesnt work .
the script from system tuner is there... in etc/init.d but when i look into settings in system tuner cache is set back to 2048
when i run the script from init.d folder with script manager and then look into system tuner again 1024 is finally set...
so init.d support is not there
does anyone know what the problem could be ?
thx
Dude, if you use the pre-made scripts and put into the proper place. I don't think you need system tuner to do anything. I don't even have it installed on mine. From what I read from the thread, system tuner was originally used to generate some of the scripts but since someone already did it, you don't need to use system tuner. I might be oblivious to whats going on since I'm still a noob but after using the scripts my quadrant score skyrocketed and my N7 just feels way way way snappier.

[Q] Losing init.d support

Xt907 rooted. Ss installed. I created a rom slot, backed up, and installed to stock slot.
Everything works fine but after a few reboots I lose init.d. I'm using rage-m, I update busybox and supersu after every install, and i use xposed (xblast, gravity box, and xui).
Any ideas? I lose the custom governors and schedulers as well.
Because I was losing the governors I thought somehow the kernel itself was being replaced somehow. Upon further inspection, I found that the governors and schedulers were actually an init.d script with library modules (which makes sense considering they were lost with init.d). After some trial and error I discovered that upon updating the included busybox (1.21.0) with busybox pro to the xbin or bin folder I will lose init.d support. Really curious as to why that is. Anything to do with symlinks?
infinite.galaxi said:
Xt907 rooted. Ss installed. I created a rom slot, backed up, and installed to stock slot.
Everything works fine but after a few reboots I lose init.d. I'm using rage-m, I update busybox and supersu after every install, and i use xposed (xblast, gravity box, and xui).
Any ideas? I lose the custom governors and schedulers as well.
Click to expand...
Click to collapse
You can try to install Pimp my ROM and turn init.d on
It seems that Busybox 1.22.1 is the culprit. Reverting to 1.21.1 leaves init.d intact. Thanks ^ tho pimp my rom looks cool. I want dat Bravia doe. v4a ftw!

Viper4android

is there someone who succes in the installation of this app?
when i open it,it ask if i want to install the drivers and stuck and after few seconds it crash
someone can help me with this ?
Many guys use this and there already was enough discussions, there are even seperate threads created with tutorials, use search for once[emoji14]
I managed to get Viper4Android working this way:
First off, I use stock with systemless root and xposed so the many security features included in stock made it a bit tricky. If you use a custom rom with a custom kernel, it's likely a bit easier.
I flashed my stock image from the google website
I flashed a custom kernel and then Supersu and then the lolliviper zip from this thread: http://forum.xda-developers.com/google-nexus-5/themes-apps/discussion-viper4android-t2543796
I installed busybox from the play store, opened the busybox app and let it install.
I disabled selinux enforcing using the app from this thread:
http://forum.xda-developers.com/showthread.php?t=2524485
Then I ran viper4audio and installed the driver from the app
Then I rebooted into twrp and used the terminal to delete /system/etc/audioeffects.conf and rebooted.
Voila, working Viper4android.
exad said:
I managed to get Viper4Android working this way:
First off, I use stock with systemless root and xposed so the many security features included in stock made it a bit tricky. If you use a custom rom with a custom kernel, it's likely a bit easier.
I flashed my stock image from the google website
I flashed a custom kernel and then Supersu and then the lolliviper zip from this thread: http://forum.xda-developers.com/google-nexus-5/themes-apps/discussion-viper4android-t2543796
I installed busybox from the play store, opened the busybox app and let it install.
I disabled selinux enforcing using the app from this thread:
http://forum.xda-developers.com/showthread.php?t=2524485
Then I ran viper4audio and installed the driver from the app
Then I rebooted into twrp and used the terminal to delete /system/etc/audioeffects.conf and rebooted.
Voila, working Viper4android.
Click to expand...
Click to collapse
By the way, you can run a supolicy script for media server instead of disabling selinux because that would increase security risks and don't you mean audio_effects.conf in vendor? IMO better to add v4a entries than delete it, it's there for a reason I would think
hinxnz said:
By the way, you can run a supolicy script for media server instead of disabling selinux because that would increase security risks and don't you mean audio_effects.conf in vendor? IMO better to add v4a entries than delete it, it's there for a reason I would think
Click to expand...
Click to collapse
Yes! Thanks for the corrections! I haven't done it in a while! ?

Categories

Resources