Bug #697

TorServiceUtils.findProcessId(TOR_BIN_PATH) returning process id != -1 even when Orbot is not running

Added by Anonymous almost 5 years ago. Updated over 2 years ago.

Status:ClosedStart date:02/20/2013
Priority:NormalDue date:
Assignee:n8fr8% Done:

0%

Category:-
Target version:1.2
Component:

Description

Causing this code not to be accurate in OrbotHelper

public boolean isOrbotRunning ()
{
int procId = TorServiceUtils.findProcessId(TOR_BIN_PATH);
Log.v("ORBOTHELPER","procId " + procId);
return (procId != -1);
}

History

#1 Updated by vanevery almost 5 years ago

Submitted by vanevery.

#2 Updated by n8fr8 almost 5 years ago

  • Status changed from New to In Progress
  • Assignee set to n8fr8

Are you sure the tor binary is not still running?

check:

adb shell
ps

and look for "tor" running under /data/data/org.torproject.android

FYI - has been working fine for me with a number of implementations of OnionKit, so just confused a bit what is going on :)

#3 Updated by vanevery almost 5 years ago

Sorry, yes, you are correct, there are processes running. I was a bit confused as I thought that I quit Orbot but I hadn't actually done so.

Unfortunately, while this tells me that it is running running it doesn't tell me if I am connected via Tor. Is there an easy way to do that?

Perhaps a "boolean isToConnected()" method?

This is another issue I am sure but on my device, Orbot says it is connected but clearly it isn't (as I don't have network connectivity). This follows a long period of time where it never seemed to establish a connection despite network conditions. That was cleared up by a reinstall.

#4 Updated by n8fr8 almost 4 years ago

  • Target version set to 1.2

#5 Updated by hans over 2 years ago

  • Status changed from In Progress to Closed

I think OrbotHelper.isOrbotRunning() is the best that we can provide right now. That's included.

Also available in: Atom PDF