Giter VIP home page Giter VIP logo

Comments (7)

eighthave avatar eighthave commented on May 21, 2024

Android's Binder model means that all the things that need Tor bind to it with BIND_IMPORTANT. That tells Android to keep it alive. Then for letting TorService quit when idle, there is a built-in mechanism to shutdown a Service when nothing is bound to it. The Android docs explicitly recommend bindService for IPC: https://developer.android.com/guide/components/processes-and-threads

More on bound services: https://developer.android.com/guide/components/bound-services

from tor-android.

n8fr8 avatar n8fr8 commented on May 21, 2024

Orbot does this today. OrbotService is the application specific foreground service that then binds to TorService:
https://github.com/guardianproject/orbot/blob/master/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java#L759

from tor-android.

eighthave avatar eighthave commented on May 21, 2024

The Chromium docs outline some nice security properties of bound services:
https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/docs/security/android-ipc.md#binder

from tor-android.

eighthave avatar eighthave commented on May 21, 2024

It seems to me that we should be recommending WorkManager here also. Google is putting a lot of work into it to make it the complete background task runner. This is based on this discussion #61 (comment)

WorkManager started out for short lived background tasks, but has been extended to handle foreground and long-lived tasks:

from tor-android.

holywend avatar holywend commented on May 21, 2024

heya I was wondering is there any documentation on implementing torservice on android? I tried the sampleapp, which doesn't work for me as well.

from tor-android.

eighthave avatar eighthave commented on May 21, 2024

from tor-android.

holywend avatar holywend commented on May 21, 2024

@eighthave atm I couldn't even start the sampleapp. even tho I just clone it from the repo.

from tor-android.

Related Issues (20)

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.