Giter Club home page Giter Club logo

and-customized-service's Introduction

this is just a sample for learning service manager on Android platform,
you can copy/distribute/use it at anywhere, BUT at your own RISK!

source code is based on Android Jelly Bean 4.1

1. how to run it?
put "customized_service" folder with all the things in it under your AOSP source tree
eg. just here /path/to/asop/frameworks/base/

add following snippet to /path/to/asop/system/core/rootdir/init.rc 
service customized /system/bin/customizedserver
    class main
    user media
    group audio camera

add privilege for your service
{ AID_MEDIA, "test.customized" },
just add this item to allowed list in
/path/to/asop/frameworks/base/cmds/servicemanager/service_manager.c


then the user 'media' has previlege to start a service 'test.customized' when system started.
also you can use 'root' or 'system' user for your service, that fine, and in that way you do
not need to add privilege for your service.

for what is AID_MEDIA, you can check this file(private/android_filesystem_config.h) for detail.


build your ROM and flash it into your device or just launch with emulator.

use 'ps' and 'service list' to check the process and service is okay or not.
if it is okay, go on.

build apk from 'and-customized-service-client', and install it.

just try it, enjoy your customized service.

and-customized-service's People

Contributors

guohai avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

jokerni

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.