Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom init.rc script #1

Closed
apowers313 opened this issue Jan 11, 2018 · 4 comments
Closed

Custom init.rc script #1

apowers313 opened this issue Jan 11, 2018 · 4 comments

Comments

@apowers313
Copy link

In init.rc, would it be possible to add a call to /system/bin/boot.sh or import /system/etc/init/init.rc to give users a hook into the boot process? It would make tinkering so much easier than having to modify the ROM to add new scripts to boot-up.

@alex3788
Copy link
Contributor

Hi apowers313,

Please use TinkerOS_Android V13.12.0.43 image and you could use below command to push init.asus.sh that can do hook the boot process.

adb root
adb remount
adb push init.asus.sh /system/etc/init.asus.rc

@apowers313
Copy link
Author

Thanks for the quick reply. I dropped this in to /system/etc/init.asus.rc:

on init
     export SYSTEMRC yes

However, after the system boots SYSTEMRC isn't set (as demonstrated by echo $SYSTEMRC). I've also tried /system/etc/init/init.rc, /vendor/etc/init/init.rc, and other various locations that the Android docs say should work, but so far none have worked. Also, dmesg doesn't show any errors (at least not related to this :) ).

@alex3788
Copy link
Contributor

Dear apowers313,

We will check this internally and let you know the result.

@alex3788
Copy link
Contributor

alex3788 commented Jan 12, 2018

Dear apowers313,

Sorry for my typo, /system/etc/init.asus.rc should be corrected as /system/etc/init.asus.sh

Ex:
adb push init.asus.sh /system/etc/init.asus.rc

About export variables in init.asus.sh shell script issue
Because a shell script runs in a child shell process, and only children of the child shell would inherit the export, so you can't do export variable through shell script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants