Questions tagged [init.d]
39 questions
12
votes
1 answer
How to run DNSCrypt as a background service on Android?
I've installed an unofficial lineage OS 14.1 ROM on my phone and i want to have dnscrypt used on boot by default.
There is what i have done:
Download arm binaries from: https://github.com/jedisct1/dnscrypt-proxy/releases
Push dnscrypt-proxy in…
wellsaid
- 121
- 1
- 1
- 4
9
votes
1 answer
How to run an executable on boot and keep it running?
I have an executable build from a ndk-build program. I want to run it on a rooted Android device. How much is the possibility that Android will kill my executable?
Using adb shell, I am able to execute my executable using following commands:
adb…
Vatish Sharma
- 1,091
- 6
- 24
- 37
6
votes
2 answers
How to make SELinux injected rules persistent without unpacking-packing boot.img?
I am working on an application that needs root access and I have a device which is rooted but not with Magisk. This device has only adb shell root available. So, I need an alternative to call the required functionality without the use of Magisk or…
Vatish Sharma
- 1,091
- 6
- 24
- 37
5
votes
1 answer
How to run an Android init service with superuser SELinux context?
I want to run an Android init service. I have a device which has rooted shell (purchased from manufacture as rooted). This device doesn't have Magisk or other su manager but adb shell is rooted and it has userdebug ROM installed on it.
I have…
Vatish Sharma
- 1,091
- 6
- 24
- 37
5
votes
0 answers
ifup/ifdown scripts
I am fiddeling with some network related things and want to try them on Android too. In Ubuntu it was quite easy to run some commands if an interface (eth0 or wlan0) goes up or down by simply adding the script call to /etc/network/interfaces.
How…
masgo
- 159
- 3
4
votes
3 answers
How to create start up scripts using the init.d folder?
In this answer to a question I asked a while ago, he said it's possible to have a script executed every boot.
I created a file (without extension) that contains the following:
#!/system/bin/sh
busybox mount -o bind…
Shimmy Weitzhandler
- 1,196
- 6
- 17
- 36
4
votes
1 answer
How can /proc/sys values be changed at boot (sysctl.conf does this on normal Linuxes)?
How can /proc/sys values be changed at boot?
sysctl.conf doesn't exist on Android and echoing values to the proc files isn't persistent.
Seolh
- 41
- 1
- 2
3
votes
1 answer
init.d doesn't get executed
i am using samsung s2 and a custom rom, external sd card is mounted to /emmc but i want it to mount to /mnt/sdcard/external_sd, how could i mount it using init.d?
i made a file called "99mount" with a the content
mount -o bind /emmc…
Joe
- 209
- 1
- 2
3
votes
1 answer
Init.d script trouble shooting
I'm trying to run an init.d script when my rom boots to disable system services, and they aren't running.
The script is as follows
#!/system/bin/sh
su -c pm disable com.google.android.gms/.update.SystemupdateService
su -c pm disable…
user199849
- 74
- 3
2
votes
1 answer
Does AOSP include an initialisation system (equivalent to SystemD)?
I see stackoverflow.com/revisions/20060853/1 (paraphrased unmdermentioned), which appears to answer a similar question, although the answer that it provides causes me to believe that the services are hardcoded inside a user-inaccessible (even with…
RokeJulianLockhart
- 556
- 3
- 18
2
votes
0 answers
Run init rc script after package manager have loaded
I'm writing an init service which make sure a package is installed and if not, it will install the apk.
The problem is, that currently I'm using a boot trigger with on boot but when I run pm install from there it doesn't seem to work. I've used a…
yotamN
- 121
- 2
2
votes
0 answers
Empty ramdisk in boot.img
I have a copy of the boot.img from my HTC M8 one.
I unpacked it and discovered that it is mostly empty directories and one binary "init" file. I was hoping to find an init.rc in there.
Any ideas?
:/tmp/ramdisk$ cpio -idv < ramdisk.cpio…
P_J
- 31
- 1
2
votes
0 answers
Can't install apk using sh script and init.d app
I'm trying to install apk when the device is booting.
I wrote shell script to install apk:
#!/system/bin/sh
pm install /data/local/tmp/MagiskManager-v7.1.1.apk
Unfortunately, when I enters the shell (using 'adb shell') and runs the script(using 'sh…
Barel Elbaz
- 31
- 2
2
votes
1 answer
Run script using init.rc doesn't work
I'm trying to run a script that exectues when the device has finished booting. This particular device does not support running scripts from an init.d directory, which is why I am using init.rc.
The init.rc file has been modified to include the…
Ringo001
- 41
- 1
- 7
2
votes
1 answer
What sepolicy context will allow any other context to access it?
I am on a bootloader locked Sprint Samsung Galaxy S7, eng boot.img flashed to phone with SELinux permissive, which gives root adb shell from where I can change system partitions, debloat, install Xposed etc. But the kernel is very bad and has RAM…
Seth
- 121
- 1
- 6