We've built an AOSP build for our platform and the last step is to get our
service stack (which is a C/C++ executable) started during the Android init
process. For purposes of the explanation, I'll use "foo" as the device name.
The The device.mk file copies the service stack executables, libraries and
scripts to /product/mfg under /bin, /lib/ and /scripts.
The init.foo.rc file changes the permissions of the binaries, creates a
/config directory under /product/mfg, and adds a symbolic link under the
/lib directory under the "on boot" action.
When the board is started, the /product/mfg directory with all the expected
modules there under /bin, /lib, and /scripts. But the permissions are not
changed, no symbolic link was created, no /config directory was created,
and the service didn't appear to be started.
If I change the init files to put the service stack in /data/mfg, the
executables are there, permissions have been updated, the symbolic link
created, and the config directory created. However, it doesn't look like
the service was run.
The /data directory is system:system and the /product directory is
root:root, so my guess is I need to do something about execution
permissions, but I can't tell from the service options what needs to happen.
The service definition in my init.foo.rc file looks like this:
service vendor.mysvc /product/mfg/scripts/foo_start.sh
class main
user root
group root
console
critical
1. Can I do something in the init file to log output to the screen as it
runs the init script?
2. Do I have to set permissions somewhere to get it to work under /product
instead of /data?
3. Is there a log somewhere that init generates so I can see if it tries to
run the service at all?
4. I assume our custom service should live under and run within the
/product directory. Is that correct or should it be put somewhere else?
Thanks for any help or pointers - I've read all the material on Android
Init Language, but I'm not finding anything about how to make sure the init
files and service permissions need to be set in order for things to work
correctly under /product.
--
--
You received this message because you are subscribed to the "Android Building"
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-building/dac0add4-aff4-4c1c-b6b7-03b3dad0bd66n%40googlegroups.com.