[Q] Run scripts on startup? (rooted) - Gen8, Gen9, Gen10 Q&A, Help & Troubleshooting

Hi all,
How do I run the scripts in the /etc/init.d/ directory?
I tried putting this code into the init.rc, but it didn't work:
Code:
# Execute files in /etc/init.d before booting
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
disabled
oneshot
Thank you,
Tesla

Try removing 'disabled' from that code you've posted, I think it might work

Moved to general as not android development

Mr. Clown said:
Moved to general as not android development
Click to expand...
Click to collapse
The developers are most likely able to answer this... I'll try removing disabled.

nenadr said:
Try removing 'disabled' from that code you've posted, I think it might work
Click to expand...
Click to collapse
Thanks, but it still doesn't work. Any other ideas?

Related

[Q] Start up script for X10?

Anyone know how to get a script to run at every boot? I've tried putting it in /etc/, /etc/init.d, and modifying the xRecovery init.rc with no luck. Any guidance would be greatly appreciated. Thanks.
have you tried to edit the modded chargemon file? it's a part of Xrec and is a simple script which do the mounting, so appending you things at its end could do the job... I think
Adolf1994 said:
have you tried to edit the modded chargemon file? it's a part of Xrec and is a simple script which do the mounting, so appending you things at its end could do the job... I think
Click to expand...
Click to collapse
Thanks, but no dice. Script still didn't run.
kxhawkins said:
Thanks, but no dice. Script still didn't run.
Click to expand...
Click to collapse
whts the script exactly? u want to execute some other script thru chargemon?
oh btw permission are verified right? (chmod 755 <scriptname>)
Some sysctl settings, like busybox sysctl -w parameter=value
Code:
/system/etc/install-recovery.sh
This file never existed, but it's being called from init.rc during the system boot.
Rename your script accordingly and enjoy.
Cheers,
z
AWESOME, thanks so much. I'll try that in just a second...
Nope doesn't work. Would of been nice if you could of report your results after you tried it. (Changed permissions to 777 as well.)
Tried editing init.rc and a post boot script file also at / both ignored and files reverted back to originals on boot (with 1st Jan 1970 as time-stamp).
There is a init file full of random symbols and a few lines of what looks like it should belong in init.rc (mount /system ect), could this be a signed file that reloads the other files on boot or something similar? (Attached to post, had to be zipped cos this forum has a stupid limit on .txt files.)
Seems SE has gone out of its way to stop commands being executed at boot time! I'm running stock ROM. Anyone got any other ideas?
Figured it (Get in!)
I edited /system/etc/hw_config.sh
Look at that init with HTML viewer and scroll down a lot
Sent from my X10i using XDA Premium App

Request: any way to get init.d on Stock rom without using CF Root

Request: any way to get init.d on Stock rom without using CF Root..Its just that ive tried the CF Root & always get SOD...
Ive rooted my phone using upd_1...but i need init.d to run different tweak scripts
will super1click root give me init.d?
Hope ive posted in the right section
frz said:
Request: any way to get init.d on Stock rom without using CF Root..Its just that ive tried the CF Root & always get SOD...
Ive rooted my phone using upd_1...but i need init.d to run different tweak scripts
will super1click root give me init.d?
Hope ive posted in the right section
Click to expand...
Click to collapse
found it
http://forum.xda-developers.com/showthread.php?t=1017291
frz said:
Request: any way to get init.d on Stock rom without using CF Root..Its just that ive tried the CF Root & always get SOD...
Ive rooted my phone using upd_1...but i need init.d to run different tweak scripts
will super1click root give me init.d?
Hope ive posted in the right section
Click to expand...
Click to collapse
thanks for it
frz said:
found it
http://forum.xda-developers.com/showthread.php?t=1017291
Click to expand...
Click to collapse
This won't work for Galaxy Ace, because the scripts in that thread refer to some Motorola scripts that are not present in Ace (/system/bin/mot_boot_mode).
Does someone know of a script that gets executed at boot in a Galaxy Ace stock rom? If so, maybe it could be used in the same way as mot_boot_mode for Motorola Droid, and get an executable /etc/init.d in our stock Galaxy Aces...
Just have a look at the "!Autostarts - Enable init.d on Stock ROMS.sh" script. It is very straightforward.
Juanma.
I would really be interested in this. Anyone? Care to shed some light on this little issue?
Basically you have to add this into the init.rc file (after creating manually the init.d folder of course):
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
disabled
oneshot
Click to expand...
Click to collapse
=> an example of usage; or just google "busybox run-parts"
It is the same method which CF-Root also uses. So you still have the option to study the CF-Root way and will learn some more tricks on the way. ...
^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Android kitchen has that feature
Herpderp Adreno + Tegra.
I found this post here had a possible workaround: http://forum.xda-developers.com/showpost.php?p=20134361&postcount=3
Bakuron said:
I found this post here had a possible workaround: http://forum.xda-developers.com/showpost.php?p=20134361&postcount=3
Click to expand...
Click to collapse
andy572 said:
3. answer is some wrong:
you doesnt need to cook a custom rom, you only need the adb (android debug bridge) to "speak" with your phone:
...
Click to expand...
Click to collapse
That's what she said. ...
^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tossan said:
Basically you have to add this into the init.rc file (after creating manually the init.d folder of course)
Click to expand...
Click to collapse
So I take it it is not as simple as browsing with Root Explorer, finding the file and adding it. If not, could you tell me how. Can I do it using the terminal emulator app rather than connecting phone to PC and using cygwin? Thanks
tossan said:
That's what she said. ...
Click to expand...
Click to collapse
Sorry, I didn't read your post before I posted. You explained it even simpler so thanks
Gizmotech said:
So I take it it is not as simple as browsing with Root Explorer, finding the file and adding it. If not, could you tell me how. Can I do it using the terminal emulator app rather than connecting phone to PC and using cygwin? Thanks
Click to expand...
Click to collapse
I'm really not sure it's possible. But regarding 'in-phone script writing' Pyronia's just started a thread here on it that you could possibly raise the issue in: http://forum.xda-developers.com/showthread.php?t=1476400
Thanks. I tried to extract using the adb pull command to desktop but kept getting permission denied. So I managed to change permission on init.rc and send it via bluetooth to my desktop. I edited the file and put it back in via bluetooth to sd and then used root explorer to move back the file to root and changed back to the original permission of the file. Before I did this, I manually created the init.d folder. What permissions do I set the init.d folder? Do I set it to rwxr-xr-x like the other folders inside /etc? Also how do I know or test that the script is enabled and that it is functioning properly as it should?
Gizmotech said:
Thanks. I tried to extract using the adb pull command to desktop but kept getting permission denied. So I managed to change permission on init.rc and send it via bluetooth to my desktop. I edited the file and put it back in via bluetooth to sd and then used root explorer to move back the file to root and changed back to the original permission of the file. Before I did this, I manually created the init.d folder. What permissions do I set the init.d folder? Do I set it to rwxr-xr-x like the other folders inside /etc? Also how do I know or test that the script is enabled and that it is functioning properly as it should?
Click to expand...
Click to collapse
Rest of that thread has a suggestion on testing if its working forum.xda-developers.com/showthread.php?p=20134361#post20134361
I think permission of init.d is rwxr-xr-x. Check this thread here forum.xda-developers.com/showthread.php?t=1390093
Gizmotech said:
Thanks. I tried to extract using the adb pull command to desktop but kept getting permission denied. So I managed to change permission on init.rc and send it via bluetooth to my desktop. I edited the file and put it back in via bluetooth to sd and then used root explorer to move back the file to root and changed back to the original permission of the file. Before I did this, I manually created the init.d folder. What permissions do I set the init.d folder? Do I set it to rwxr-xr-x like the other folders inside /etc? Also how do I know or test that the script is enabled and that it is functioning properly as it should?
Click to expand...
Click to collapse
Which script? Post the link here...or u open the script then type the command on terminal to check if the script working..
regards,
•ƒγяύs ργяσ™•
pyronia said:
Which script? Post the link here...or u open the script then type the command on terminal to check if the script working..
Click to expand...
Click to collapse
Basically, I mean how would I know if init.d is activated and any scripts I put in is actually working. After all I created init.d folder manually. What command do I type in adb shell to see if scripts are working?
Can someone help me troubleshoot this please. I have put scripts in the init.d folder but see no difference. I followed the method on this thread to enable init.d. I don't notice any difference after putting any scripts such as lagfree, turboboost or even the keylight one.
Gizmotech said:
Basically, I mean how would I know if init.d is activated and any scripts I put in is actually working. After all I created init.d folder manually. What command do I type in adb shell to see if scripts are working?
Click to expand...
Click to collapse
Sent me the script then i show u how to check
regards,
•ƒγяύs ργяσ™•
Gizmotech said:
Can someone help me troubleshoot this please. I have put scripts in the init.d folder but see no difference. I followed the method on this thread to enable init.d. I don't notice any difference after putting any scripts such as lagfree, turboboost or even the keylight one.
Click to expand...
Click to collapse
Which thread actually?
regards,
•ƒγяύs ργяσ™•
Init.d support ? Not without CF-ROOT
Herpderp Adreno + Tegra.
Well I thought this thread was about init.d on stock rom without CF-Root.

[Linux/Windows] Script to Add Mods

Hey guys,
Not sure if this would be helpful to anyone but I created a script for Mac/Linux that installs some of the mods. There is no way to undo the changes, and I have only done limited testing so YMMV.
I am not liable for anything that happens to your device.
With terminal just cd to the folder and do ./note2.script
The mods I have added so far are:
1) Google Wallet (I still haven't had any success)
2) All apps in MultiWindow
3) Wifi Icon in statusbar + black statusbar
4) 4.2 Camera/Gallery
V2. I have added a Windows batch as well as the Linux script
V3. Fixed some bugs, and added the 4.2 Camera/Gallery
http://www.filedropper.com/notescripts1
PS. Thanks to all those that created the mods. I did not create any, only put into a simple script.
This is actually useful, good job! Could probably do something like this to make/restore backups.
Sent from my SCH-I605 using xda premium
mazz0310 said:
Hey guys,
Not sure if this would be helpful to anyone but I created a script for Mac/Linux that installs some of the mods. There is no way to undo the changes, and I have only done limited testing so YMMV.
I am not liable for anything that happens to your device.
With terminal just cd to the folder and do ./note2.script
The mods I have added so far are:
1) Google Wallet (I still haven't had any success)
2) All apps in MultiWindow
3) Wifi Icon in statusbar + black statusbar
https://docs.google.com/open?id=0BzXlT5Noap2PWWJVNTRFWUxZZ2M
PS. Thanks to all those that created the mods. I did not create any, only put into a simple script.
Click to expand...
Click to collapse
Does this work in windows?
nuke072786 said:
Does this work in windows?
Click to expand...
Click to collapse
No I haven''t written one for Windows yet. I've been thinking about it but just haven't had the time. Was going to see what the feedback was with the Linux one first.
The Windows one should be very easy to write to mimick this one, you just have to change the directory paths and stuff.
EDIT: I am working on this now.. shouldn't take too long.
You need to include the command to make system rw or else it has to be done manually
Sent from my SCH-I605 using xda premium
JonMS said:
You need to include the command to make system rw or else it has to be done manually
Sent from my SCH-I605 using xda premium
Click to expand...
Click to collapse
Shoot.... I had that originally and deleted it. I have finished Windows. I will add that to both and re-upload.
So my tale of woe is below...shortened for those of us with short attention spans:
-I bought my device on 11/29
-root came out via: http://forum.xda-developers.com/showthread.php?t=2024207 a few days later, rooted with 0 problems
-a thread got started about wallet getting up and running here: http://forum.xda-developers.com/showthread.php?t=2031127 (I tried this to the letter and ultimately soft bricked my device)
-with help, I was able to odin back to a rooted device
-used this script to setup wallet and it did NOT work, HOWEVER, using this and then going back to http://forum.xda-developers.com/showthread.php?t=2031127 to use the fix, I think, did. I have added all my cards and am ready to make a purchase, which I will do tomorrow.
So to sum up, don't give up and be creative, if someone says they got it working and you didn't explore more and try to mesh multiple approaches where it fits. I'm only posting this to A. give thanks to those that got this working, and B. give others hope :good:
mazz0310 said:
Hey guys,
Not sure if this would be helpful to anyone but I created a script for Mac/Linux that installs some of the mods. There is no way to undo the changes, and I have only done limited testing so YMMV.
I am not liable for anything that happens to your device.
With terminal just cd to the folder and do ./note2.script
The mods I have added so far are:
1) Google Wallet (I still haven't had any success)
2) All apps in MultiWindow
3) Wifi Icon in statusbar + black statusbar
V2. I have added a Windows batch as well as the Linux script
https://docs.google.com/open?id=0BzXlT5Noap2PdllGYTVxVlp2MUU
PS. Thanks to all those that created the mods. I did not create any, only put into a simple script.
Click to expand...
Click to collapse
mazz0310 said:
Hey guys,
Not sure if this would be helpful to anyone but I created a script for Mac/Linux that installs some of the mods. There is no way to undo the changes, and I have only done limited testing so YMMV.
I am not liable for anything that happens to your device.
With terminal just cd to the folder and do ./note2.script
The mods I have added so far are:
1) Google Wallet (I still haven't had any success)
2) All apps in MultiWindow
3) Wifi Icon in statusbar + black statusbar
V2. I have added a Windows batch as well as the Linux script
https://docs.google.com/open?id=0BzXlT5Noap2PdllGYTVxVlp2MUU
PS. Thanks to all those that created the mods. I did not create any, only put into a simple script.
Click to expand...
Click to collapse
How do I go about using the one for wallet?
Tap'n
I'm not the expert here, but I'll give this a stab, make sure you have ADB setup, download this script and run it. If you get wallet to run, but then close or just keep spinning, trying to run, go to the other wallet thread in this forum and use the fix on page 1. that's what worked for me.
techgov8 said:
How do I go about using the one for wallet?
Tap'n
Click to expand...
Click to collapse
mazz0310 said:
Hey guys,
Not sure if this would be helpful to anyone but I created a script for Mac/Linux that installs some of the mods. There is no way to undo the changes, and I have only done limited testing so YMMV.
I am not liable for anything that happens to your device.
With terminal just cd to the folder and do ./note2.script
The mods I have added so far are:
1) Google Wallet (I still haven't had any success)
2) All apps in MultiWindow
3) Wifi Icon in statusbar + black statusbar
V2. I have added a Windows batch as well as the Linux script
https://docs.google.com/open?id=0BzXlT5Noap2PdllGYTVxVlp2MUU
PS. Thanks to all those that created the mods. I did not create any, only put into a simple script.
Click to expand...
Click to collapse
Check like 27 in note2.sh
Code:
adb shell "su -c 'mount -o rw,remount /system'"
if [ "$input" = "1" ]; then
walletzip=NoteII-lib_nfc-fix-r87
walletloc=/sdcard/Note2Scripts/Wallet
copytoloc=/system
adb shell "mkdir -p $walletloc"
adb shell "mkdir -p $copytoloc/app"
adb shell "mkdir -p $copytoloc/lib"
adb shell "mkdir -p $copytoloc/lib/hw"
> adb shell "mkdir -p $copytoloc//etc"
adb push $walletzip $walletloc
You have an extra forward slash.
JonMS said:
Check like 27 in note2.sh
Code:
adb shell "su -c 'mount -o rw,remount /system'"
if [ "$input" = "1" ]; then
walletzip=NoteII-lib_nfc-fix-r87
walletloc=/sdcard/Note2Scripts/Wallet
copytoloc=/system
adb shell "mkdir -p $walletloc"
adb shell "mkdir -p $copytoloc/app"
adb shell "mkdir -p $copytoloc/lib"
adb shell "mkdir -p $copytoloc/lib/hw"
> adb shell "mkdir -p $copytoloc//etc"
adb push $walletzip $walletloc
You have an extra forward slash.
Click to expand...
Click to collapse
Thank you for that. I will fix that, also I have added the 4.2 gallery so I will upload that shortly. Also I am going to remove Nfc.apk and NfcTest.apk from the wallet script as I have heard they are not needed.
I uploaded a newer version.
Fixed the //etc bug, and added the 4.2 Camera/Gallery
Links dead in op
Sent from my SCH-I605 using xda app-developers app
xxxxmarkxxx said:
Links dead in op
Sent from my SCH-I605 using xda app-developers app
Click to expand...
Click to collapse
I fixed the link to a different file hoster. If anyone has some where better let me know.
The windows batch file didn't work, doesn't look like it did anything. I copied systemui manually and set permissions but when I rebooted I lost my UI!
SirVilhelm said:
The windows batch file didn't work, doesn't look like it did anything. I copied systemui manually and set permissions but when I rebooted I lost my UI!
Click to expand...
Click to collapse
When you ran it did it give you the options of which script to run? Which did you select?
mazz0310 said:
When you ran it did it give you the options of which script to run? Which did you select?
Click to expand...
Click to collapse
Yes. I ran the option for modifying wifi, I saw it start up ADB but then the window just closed. I then copied systemui.apk over using root explorer and set the permissions but when I rebooted I lost the UI lol.
does this 'add' the 4.2 camera or replace the current one
georgepink said:
does this 'add' the 4.2 camera or replace the current one
Click to expand...
Click to collapse
It adds it. You will have both afterwards.
SirVilhelm said:
Yes. I ran the option for modifying wifi, I saw it start up ADB but then the window just closedl.
Click to expand...
Click to collapse
I have the same problem. The window just closes and doesn't do anything. I know we're doing something wrong. But what?

[resolved] need Init.d script to execute a file on system/bin

Resolution on post #10, in post #11 a second resolution and on post #12 the confirmation.
I need a init.d script to run or execute a service that is on system/bin
Is this possible?
Which commands to use?
I researched a lot, and I do not find anything about it.
The file name is jellyservice.
Jellyservice is a normal service that need to be running before run a app, without that, the app does not run.
I know that:
1. The jellyservice is presented on stock rom and the stock rom use init.rc to call the jellyservice at boot, and i can change the init.rc by change the boot.img (unpack, change, repack), but i wanna to be able to run it on any device wit any kernel, and don't wanna to change it kernel for it rom.
2. I can use SManager to run the file on boot. but i don't wanna to need a app just init.d, init.d is already implemented and working on almost every custom rom, so I put the init.d file on a zip that flash the apk, libs etc, and no more app or config is need.
Thanks.
baybutcher27 said:
I need a init.d script to run a service that is on system/bin
Is this possible?
Which commands to use?
I researched a lot, and I do not find anything about it.
The file name is jellyservice.
Jellyservice is a normal service that need to be running before run a app, without that, the app does not run.
I know that:
1. The jellyservice is presented on stock rom and the stock rom use init.rc to call the jellyservice at boot, and i can change the init.rc by change the boot.img (unpack, change, repack), but i wanna to be able to run it on any device wit any kernel, and don't wanna to change it kernel for it rom.
2. I can use SManager to run the file on boot. but i don't wanna to need a app just init.d, init.d i already have implemented on rom, so I put the init.d file on a zip that flash the apk, libs etc, and no more app or config is need.
Thanks.
Click to expand...
Click to collapse
Is this what you are looking for, or I am missing something?
http://forum.xda-developers.com/showthread.php?t=1933849
And this, which is more up to date:
http://www.xda-developers.com/init-d-support-for-any-rooted-phone/
Ciuffy said:
Is this what you are looking for, or I am missing something?
http://forum.xda-developers.com/showthread.php?t=1933849
And this, which is more up to date:
http://www.xda-developers.com/init-d-support-for-any-rooted-phone/
Click to expand...
Click to collapse
No you did not read what I wrote.
As I said, i wanna a script of init.d that runs or execute a file, i already have init.d working...
baybutcher27 said:
No you did not read what I wrote.
As I said, i wanna a script of init.d that runs or execute a file, i already have init.d working...
Click to expand...
Click to collapse
Sorry, I was assuming you could find help there. By the way, you should be able to do this just by using a script like:
#!/system/bin/sh
-Give permission
/path/jelliservice
Then place it in init.d or write a specific script for init.d to run the above one.
http://android.stackexchange.com/questions/6558/how-can-i-run-a-script-on-boot
Sorry if there's a bigger obstacle I'm not aware of.
Ciuffy said:
Sorry, I was assuming you could find help there. By the way, you should be able to do this just by using a script like:
#!/system/bin/sh
-Give permission
/path/jelliservice
Then place it in init.d or write a specific script for init.d to run the above one.
http://android.stackexchange.com/questions/6558/how-can-i-run-a-script-on-boot
Sorry if there's a bigger obstacle I'm not aware of.
Click to expand...
Click to collapse
No is all good.
but??? that willl run the service, or just give a permission.
I don't really know much about init.d script and the web does not help in that thing i wanna.
i'm implemented it now to see what that script does. :good:
baybutcher27 said:
No is all good.
but??? that willl run the service, or just give a permission.
I don't really know much about init.d script and the web does not help in that thing i wanna.
i'm implemented it now to see what that script does. :good:
Click to expand...
Click to collapse
Oh, so you are just asking for help with the actual script, fine. See if you can figure it out yourself from that post, I'm trying to build an easy example right now. I seem to not have this jelliservice you are talking about, maybe you can give me a few more insights about this.
Ciuffy said:
Oh, so you are just asking for help with the actual script, fine. See if you can figure it out yourself from that post, I'm trying to build an easy example right now. I seem to not have this jelliservice you are talking about, maybe you can give me a few more insights about this.
Click to expand...
Click to collapse
ok.
i tested that you post doesn't do what i need.
i have this on init.d to now if it works.
#!/system/bin/sh
touch /data/local/tmp/init.d_log_test.txt
echo "done" >> /data/local/tmp/init.d_log_test.txt
so i change the "done" of the last line to wherever and it time i reboot it change to wherever i wrote.
so init.d is working fine.
The jellyservice is a service that only exist on motorola stock rom on devices that have dedicated hardware of DTV.
it is started by i .rc file:
init.mmi.dtv.rc
and the content of that .rc is:
Code:
on boot
# DTV feature
service dtv-jelly /system/bin/jellyservice
class main
user system
group system audio camera graphics inet net_bt net_bt_admin net_raw sdcard_rw
iknow that is possible to implemented that .rc on any device by add it to the kernel or boot.img but it will be need to do on any rom and that is allot of work and will be impossible.
so i have created a tread to give support for that DTV to any custom rom, and i wanna to make a more completed .zip to the app.
see the thread here
baybutcher27 said:
ok.
i tested that you post doesn't do what i need.
i have this on init.d to now if it works.
#!/system/bin/sh
touch /data/local/tmp/init.d_log_test.txt
echo "done" >> /data/local/tmp/init.d_log_test.txt
so i change the "done" of the last line to wherever and it time i reboot it change to wherever i wrote.
so init.d is working fine.
The jellyservice is a service that only exist on motorola stock rom on devices that have dedicated hardware of DTV.
it is started by i .rc file:
init.mmi.dtv.rc
and the content of that .rc is:
Code:
on boot
# DTV feature
service dtv-jelly /system/bin/jellyservice
class main
user system
group system audio camera graphics inet net_bt net_bt_admin net_raw sdcard_rw
iknow that is possible to implemented that .rc on any device by add it to the kernel or boot.img but it will be need to do on any rom and that is allot of work and will be impossible.
so i have created a tread to give support for that DTV to any custom rom, and i wanna to make a more completed .zip to the app.
see the thread here
Click to expand...
Click to collapse
You are right, it's not easy to test this out because of default .rc hardcoded into kernel... in order to do this you would have to edit .rc to run that service that runs userinit.sh... Have you already done this? And, are you able to start the service manually?
Ciuffy said:
You are right, it's not easy to test this out because of default .rc hardcoded into kernel... in order to do this you would have to edit .rc to run that service that runs userinit.sh... Have you already done this? And, are you able to start the service manually?
Click to expand...
Click to collapse
i didn't try implemented that .rc on boot.img, that is too much work, and need to be done on it kernel or rom update, but yes can be done.
The file is just like any other executable, just like a .sh or any file you can execute using a app that can execute files like, root browser or SManager.
all the process to run the file is on the thread i just post.
The thing is i already know how to run it via app, but i don't wanna to stop there i wanna to run it via init.d because is a very simple way, but very difficult to find the commands.
Exists any command on init.d that can run a file commands like, run, execute, open or start ?
any of those work? and how to use they?
have any website that have all the command available on init.d?
Hey, you can run a binary from sh by just invoking its path, for example:
Code:
#!/bin/sh
/system/bin/jellyservice
The proccess will spawn with UID 0 (root)
You can change that if you have a good root binary by doing this:
Code:
#!/bin/sh
su system -c '/system/bin/jellyservice'
If you're using supersu I think you have to enable root at boot (Look at the application settings)
baybutcher27 said:
i didn't try implemented that .rc on boot.img, that is too much work, and need to be done on it kernel or rom update, but yes can be done.
The file is just like any other executable, just like a .sh or any file you can execute using a app that can execute files like, root browser or SManager.
all the process to run the file is on the thread i just post.
The thing is i already know how to run it via app, but i don't wanna to stop there i wanna to run it via init.d because is a very simple way, but very difficult to find the commands.
Exists any command on init.d that can run a file commands like, run, execute, open or start ?
any of those work? and how to use they?
have any website that have all the command available on init.d?
Click to expand...
Click to collapse
so i resolve this :silly: :laugh: :victory:
after writing I read, and is so lame.
if the file is just like any other executable way not put it in the init.d folder?
and i put, rename to 99jellyservice
and the init.d run it and the apk that need that file to be running before you open it work.
@Ciuffy
Thanks you help me to find a way...
nagalun said:
Hey, you can run a binary from sh by just invoking its path, for example:
Code:
#!/bin/sh
/system/bin/jellyservice
The proccess will spawn with UID 0 (root)
You can change that if you have a good root binary by doing this:
Code:
#!/bin/sh
su system -c '/system/bin/jellyservice'
If you're using supersu I think you have to enable root at boot (Look at the application settings)
Click to expand...
Click to collapse
the 1° option work perfectly!, but i use like this
Code:
#!/system/bin/sh
/system/bin/jellyservice
i think doesn't make a difference.
Thanks man I will use your way, is better that my. :good:
baybutcher27 said:
the 1° option work perfectly!, but i use like this
Code:
#!/system/bin/sh
/system/bin/jellyservice
i think doesn't make a difference.
Thanks man I will use your way, is better that my. :good:
Click to expand...
Click to collapse
Yeah basically the only difference is that Android has no /bin/sh but /system/bin/sh. I though about just putting that there honestly but I couldn't get any of this working on my cyanogenmod so I was trying to figure out why >.>, but I'm probably missing something.
Anyway, glad I could help!

Mount system r/w | Want to update build.prop

Hello, there.
Objective - Need to have always "adb tcpip 5555" even after reboot.
Got a solution saying that, we have to set "service.adb.tcp.port=5555" in build.prop. I tried all the possible way to mount r/w but couldn't succeed.
Got to know that Android 10 system is always Read only. Checking if we can/have a module in Magisk to r/w the system & edit the build.prop.
Need you valuable help. Thanks in advance.
MagiskHide Props Config By Didgeridoohan. You can find it in Magisk's downloads tab.
Go to adb/data/post-fs-data.d folder, create a new file called "whatever".sh (note the .sh extension).
Then write whatever build prop changes you want in there.
If I remember correctly, this is the easiest way to change build prop and it will run when device starts.
Edit: https://forum.xda-developers.com/7t-pro/help/mount-r-want-to-update-build-prop-t4096033/post82521979
Kevorex1 said:
MagiskHide Props Config By Didgeridoohan. You can find it in Magisk's downloads tab.
Click to expand...
Click to collapse
@vinu4u4ever Here's the link to above mentioned: [MODULE] MagiskHide Props Config - SafetyNet, prop edits, and more - v5.2.4 by @Didgeridoohan
Lossyx said:
Go to adb/data/post-fs-data.d folder, create a new file called "whatever".sh (note the .sh extension).
Then write whatever build prop changes you want in there.
If I remember correctly, this is the easiest way to change build prop and it will run when device starts.
Click to expand...
Click to collapse
Almost...
You are correct that what you're suggesting is the simplest way to change props. But the .sh extension isn't necessary, only that the file has the correct permissions to be executable.
And for the contents, you need to use the resetprop tool, so for each prop you want to change you'll have to add this to the file:
Code:
resetprop <prop> <value>
Didgeridoohan said:
Almost...
You are correct that what you're suggesting is the simplest way to change props. But the .sh extension isn't necessary, only that the file has the correct permissions to be executable.
And for the contents, you need to use the resetprop tool, so for each prop you want to change you'll have to add this to the file:
Click to expand...
Click to collapse
Ah, knew I did something wrong when It did not work.
Just tried with the way you described and now it works perfectly, thanks!
FK kernel manager also includes a build.prop editor.
Kevorex1 said:
MagiskHide Props Config By Didgeridoohan. You can find it in Magisk's downloads tab.
Click to expand...
Click to collapse
Thanks for the info.
I'm new to this. Can u share me the steps/info to execute the service thru this props..?
Thank you!
Lossyx said:
Go to adb/data/post-fs-data.d folder, create a new file called "whatever".sh (note the .sh extension).
Then write whatever build prop changes you want in there.
If I remember correctly, this is the easiest way to change build prop and it will run when device starts.
Edit: https://forum.xda-developers.com/7t-pro/help/mount-r-want-to-update-build-prop-t4096033/post82521979
Click to expand...
Click to collapse
Thanks for the information.
Here is the things which I did:
Created an "testing.sh" file under path "data/adb/post-fs-data.d/" & added "service.adb.tcp.port=5555" thru Text Editor.
I don't no how to execute it. In root explorer when I clicked testing.sh it should an option to execute, I click on it but nothing happens...
Code:
D:\Android\Scrcpy>adb connect 192.168.10.111:5555
cannot connect to 192.168.10.111:5555: No connection could be made because the target machine actively refused it. (10061)
I'm new to this. Kindly guide me to execute it.
Oswald Boelcke said:
@vinu4u4ever Here's the link to above mentioned: [MODULE] MagiskHide Props Config - SafetyNet, prop edits, and more - v5.2.4 by @Didgeridoohan
Click to expand...
Click to collapse
Thanks for the info.
I'm new to this.
When I accessed this thru terminal, it prompts to update something related to fingerprint. I'm very much new to this. Kindly provide me the steps to execute "service.adb.tcp.port=5555"
Thank you!
vinu4u4ever said:
Thanks for the information.
Here is the things which I did:
Created an "testing.sh" file under path "data/adb/post-fs-data.d/" & added "service.adb.tcp.port=5555" thru Text Editor.
I don't no how to execute it. In root explorer when I clicked testing.sh it should an option to execute, I click on it but nothing happens...
I'm new to this. Kindly guide me to execute it.
Click to expand...
Click to collapse
Check my edit / Didgeridoohan post, he explains what you should do.
And you don't execute it yourself, magisk does when your device boots.
Didgeridoohan said:
Almost...
You are correct that what you're suggesting is the simplest way to change props. But the .sh extension isn't necessary, only that the file has the correct permissions to be executable.
And for the contents, you need to use the resetprop tool, so for each prop you want to change you'll have to add this to the file:
Code:
resetprop <prop> <value>
Click to expand...
Click to collapse
Thanks for the information.
Here is what I did, Kindly review & guide me as I'm new to this:
In terminal,
I executed - "resetprop service.adb.tcp.port 1" also I tried "resetprop service.adb.tcp.port 5555" but still I'm not access it through adb from PC.
By default this service was set to [-1]. Kindly help.
Sorry if I have asked some silly queries.
EDIT: After reboot, the service is set to default [-1]
vinu4u4ever said:
Almost...
You are correct that what you're suggesting is the simplest way to change props. But the .sh extension isn't necessary, only that the file has the correct permissions to be executable.
And for the contents, you need to use the resetprop tool, so for each prop you want to change you'll have to add this to the file:
Thanks for the information.
Here is what I did, Kindly review & guide me as I'm new to this:
In terminal,
I executed - "resetprop service.adb.tcp.port 1" also I tried "resetprop service.adb.tcp.port 5555" but still I'm not access it through adb from PC.
By default this service was set to [-1]. Kindly help.
Sorry if I have asked some silly queries.
EDIT: After reboot, the service is set to default [-1]
Click to expand...
Click to collapse
Think it works be easier to use this app to be honest, that's what I do.
https://play.google.com/store/apps/details?id=moe.haruue.wadb
Lossyx said:
Check my edit / Didgeridoohan post, he explains what you should do.
And you don't execute it yourself, magisk does when your device boots.
Click to expand...
Click to collapse
Thanks.
It worked... We have to restart the adbd service to use the port value.
Thanks Much appreciated.
Lossyx said:
Think it works be easier to use this app to be honest, that's what I do.
https://play.google.com/store/apps/details?id=moe.haruue.wadb
Click to expand...
Click to collapse
Wow... That's simple... Great...
Thanks for app suggestion. wonderful app.
vinu4u4ever said:
Thanks for the information.
Here is what I did, Kindly review & guide me as I'm new to this:
In terminal,
I executed - "resetprop service.adb.tcp.port 1" also I tried "resetprop service.adb.tcp.port 5555" but still I'm not access it through adb from PC.
By default this service was set to [-1]. Kindly help.
Sorry if I have asked some silly queries.
EDIT: After reboot, the service is set to default [-1]
Click to expand...
Click to collapse
EDIT 2: Its working. I had to restart the adbd service in phone to start the tcp port value of 5555.
Thanks for your help.
Here is the solution to your problem my friends. Enjoy!
Works like a charm in Android 10 and later. Now my system, vendor and product partitions are read-write!
Use at your own risk!
https://forum.xda-developers.com/t/script-mount-system-as-read-write-android-10.4240703/

Categories

Resources