Coder Social home page Coder Social logo

Comments (42)

krlvm avatar krlvm commented on May 22, 2024 2

It looks like a comedy TBH, but this build finally working on all my devices
PowerTunnel-v1.8.2-bootfix13.zip

The proxy becomes available after ~1 minute after boot.

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024 1

It's already available AFAIK, just don't disable PowerTunnel before shutdown.

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024 1

I think it depends on phone vendor, I've just rebooted my Samsung Android 10 phone with battery saver enabled, and PowerTunnel have started after a minute after boot.
I'm looking for possible solutions, but I don't think I could properly test them since all is OK on my device.

If you're skilled in Android development and found a workaround for your device let me know (write here or open a Pull Request).

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024 1

Okay, makes sense, some vendors screw the devices with unnecessary "Battery Optimisations". I use Blokada and it works out of the box on both the devices so i will check their source code to see what they are doing.

Thanks for the idea, I looked into their source code and changed my implementation, I think this APK should work:
PowerTunnel-v1.8.2-bootfix.zip

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024 1

I found an interesting solution that uses android.permission.SYSTEM_ALERT_WINDOW permission, can you test it?
PowerTunnel-v1.8.2-bootfix2.zip

For some reason the app crashes after you grant the permission, but all is fine after you open it again

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024 1

Is this SO question related? https://stackoverflow.com/questions/51221680/broadcast-receiver-not-working-in-android-oreo

No, BOOT_COMPLETED is still allowed in Oreo and higher

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024 1

Yeah, in proxy mode with Blokada as VPN.

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024 1

That makes sense. There is no feature to start proxy after boot.

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024 1

This APK has support for proxy start on boot
PowerTunnel-v1.8.2-bootfix5.zip

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024 1

Can you share logs? I've made verbose output.

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024 1

Sorry for inconvenience, this starts the service properly
PowerTunnel-v1.8.2-bootfix10.zip

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024 1

Tested on two devices, it's works on Android 7 and lower, but don't on Android 8+

service starts fine on boot, butI was unable to access sites which worked previously. DPI prevention.

Trying your latest build 🤞 ╰(°▽°)╯

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024 1

Cool!

I've already released three updates this week, so I think I can push this feature with a next release in the next month.

I have never been so happy when closing an issue ^_^ .

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024 1

Sure, I am glad I could help with the fix debugging ;)

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

It's already available AFAIK, just don't disable PowerTunnel before shutdown.

Oh okay, I have two android devices and both of them have issue with Autostart. I have to manually enable Proxy whenever I restart my device.
Device 1 is One Plus 3T on Android Pie
Device 2 is Motorola One Vision on Android 10.

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

Let me see if I can get logs for you.

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

Logs!

Attachments

moto-logcat-19-10-2020.txt

OnePlus3T-logcat-19-10-2020.txt

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024

Indeed, I do not see BootReceiver messages in the log. I heard there are some problems with boot broadcast receivers on Android Oreo and higher, especially on OnePlus devices.
I think I should implement this workaround.
Have you tried to put PowerTunnel in battery optimizer whitelist?

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

On OnePlus, I have disabled battery optimizations for all apps that I use regularly, the issue persists on both devices.

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

Okay, makes sense, some vendors screw the devices with unnecessary "Battery Optimisations". I use Blokada and it works out of the box on both the devices so i will check their source code to see what they are doing.

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

Thanks for the idea, I looked into their source code and changed my implementation, I think this APK should work:
PowerTunnel-v1.8.2-bootfix.zip

Testing it now.

Test Devices

  • Moto One Vision

  • OnePlus 3T

Edit: Didnt work. Attaching logs in a minute.

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024

Providing logs is optional, because the receiver is simply not called, and I'm trying to understand why :(

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

PT-Logs.zip

Here you go! Why do manufacturers do this :/
This might be helpful ?
https://dontkillmyapp.com/

I have disabled OnePlus Battery tweaks, still no effect.
I don't see any custom settings on Motorola so it should be stock.

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024

It's appears to be a long-known issue on OnePlus, and unfortunately I haven't found something interested yet, but someone says there's something like Autostart menu in settings, don't you have it?

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

@krlvm can you register a notification service and run it at boot? It will also protect app from getting killed.

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024

@krlvm can you register a notification service and run it at boot? It will also protect app from getting killed.

As far as I know, a service can't start automatically, so it needs a Boot Receiver to start too.

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

It's appears to be a long-known issue on OnePlus, and unfortunately I haven't found something interested yet, but someone says there's something like Autostart menu in settings, don't you have it?

Nope, I don't see it. I am sure it must have been a feature in previous oxygen os release.

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024

Isn't the app installed on external storage?

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

@krlvm can you register a notification service and run it at boot? It will also protect app from getting killed.

As far as I know, a service can't start automatically, so it needs a Boot Receiver to start too.

Ok, I understand, lets leave OnePlus for now. I am having same issue with Moto One Vision and it runs Stock Android 10, and is on latest security patch Sept 1 2020.

Is it also having issue with Boot Receiver?

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

Isn't the app installed on external storage?

OnePlus doesn't have external storage :/ so its on the internal storage.

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

Is this SO question related? https://stackoverflow.com/questions/51221680/broadcast-receiver-not-working-in-android-oreo

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

I found an interesting solution that uses android.permission.SYSTEM_ALERT_WINDOW permission, can you test it?
PowerTunnel-v1.8.2-bootfix2.zip

Off course, brb testing it

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

I found an interesting solution that uses android.permission.SYSTEM_ALERT_WINDOW permission, can you test it?
PowerTunnel-v1.8.2-bootfix2.zip

For some reason the app crashes after you grant the permission, but all is fine after you open it again

Didn't crash for me but no effect.

Tried the newer version and it also didn't work. I also use revolution irc and it works fine on both devices and starts at boot.
https://github.com/MCMrARM/revolution-irc

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024

I've just noticed you are running PowerTunnel in proxy mode, am I right?

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

That makes sense. There is no feature to start proxy after boot.

Oh > . < .. trying the new variant.

@krlvm didn't work. :/ 🤔

Will clear the app data and report back.

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024

Did you start the proxy before reboot? All is working for me.

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

Did you start the proxy before reboot? All is working for me.

yeah, started the proxy, tested it then rebooted.

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

Can you share logs? I've made verbose output.

yes. brb

Attachments

PT-Debug-Logs.zip

@krlvm I tried reseting app data no changes.

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024

It's actually started, but was immediately killed by system because I forgot to start the service ¯\_(ツ)_/¯

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

It's actually started, but was immediately killed by system because I forgot to start the service ¯_(ツ)_/¯

haha! ಥ_ಥ

from powertunnel-android.

krlvm avatar krlvm commented on May 22, 2024

Tested on two devices, it's works on Android 7 and lower, but don't on Android 8+

from powertunnel-android.

meta-n4vn33t avatar meta-n4vn33t commented on May 22, 2024

It looks like a comedy TBH, but this build finally working on all my devices
PowerTunnel-v1.8.2-bootfix13.zip

The proxy becomes available after ~1 minute after boot.

@krlvm Working fine now. Thanks ^_^

from powertunnel-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.