utopicnarwhal / utopic_tor_onion_proxy

Flutter Plugin for Android, based on Android binary that start Tor Onion Proxy on random local socket.
https://pub.dev/packages/utopic_tor_onion_proxy
Apache License 2.0
12 stars 4 forks source link

Control port file not created. #2

Closed Celpear closed 3 years ago

Celpear commented 3 years ago

Hello, your plugin works in debug mode on my android device. But in the release build comes the error message: "Control port file not created: /data/user/0/com.example.hiddenbrowser/cache/torfiles/lib/tor/control.txt, len = 0" This also happens with your example.

I'm trying to find the error but do you know what it could be? Thanks a lot!

utopicnarwhal commented 3 years ago

Hm... What version of Android do you use?

Celpear commented 3 years ago

I am using Android Version 11 on a Google Pixel 3a.

Maybe Tor does not have the permission to install itself in the background. It shows "E/TorNativeLoader( 4072): /data/app/~~7q3rfaZr5OkRIiLTE5SReQ==/com.example.hiddenconnect-0UXMbeD8Ys1ufYK_M7aBxg==/lib/arm64/libtor.so: open failed: EACCES (Permission denied)" on first start in release mode.

I tried to debug in the "AndroidTorInstaller.java". But the control.txt exists but doesn't seem to be written.

However, I have entered all possible permissions in my Android manifest.

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
Celpear commented 3 years ago

It works thanks!!!

you have to change the following under "android" -> "build.gradle":

buildTypes { debug { signingConfig signingConfigs.debug } release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so flutter run --release works. signingConfig signingConfigs.debug shrinkResources false zipAlignEnabled false minifyEnabled false } }

But please try it again yourself.

Thanks so much for your work, regards Celpear

utopicnarwhal commented 3 years ago

Yes, I've mentioned something about it in the readme file (--no-shrink flag). Also don't forget to add android.bundle.enableUncompressedNativeLibs=false into your android -> gradle.properties file, if you are going to use Android App Bundle

utopicnarwhal commented 3 years ago

I've updated the readme