Comments (27)
finally, its worked! thanks
from powertunnel-android.
I still have not released the plugin converter, which uses D8 to translate Java bytecode to bytecode compatible with Android Runtime and build classes.dex file.
I created a very dirty prototype two years ago with which I convert my own plugins, you can use it by executing
$ androidify filename.jar filename-Android.jar
I have plans to create a Gradle plugin which will do that in clean & automatic way, but I haven't found time to do it yet.
from powertunnel-android.
I still have not released the plugin converter, which uses D8 to translate Java bytecode to bytecode compatible with Android Runtime and build classes.dex file.
I created a very dirty prototype two years ago with which I convert my own plugins, you can use it by executing
$ androidify filename.jar filename-Android.jar
I have plans to create a Gradle plugin which will do that in clean & automatic way, but I haven't found time to do it yet.
when i run i forgot to add androidify filename.jar filename-Android.jar
command, i didnt get output file, and i got message like this
5 was unexpected at this time.
JAVA_HOME
sorry 😆
but, i got error like this
Compilation failed with an internal error.
java.lang.IllegalArgumentException: Unsupported class file major version 63
at Version.fakeStackEntry(Version_2.1.7-r1.java:0)
at com.android.tools.r8.A.a.a.f.<init>(:10)
at com.android.tools.r8.A.a.a.f.<init>(:2)
at com.android.tools.r8.A.a.a.f.<init>(:1)
at com.android.tools.r8.A.a.a.f.<init>(:107)
at com.android.tools.r8.graph.x0.a(:24)
at com.android.tools.r8.utils.J.a(:9)
at com.android.tools.r8.utils.G.a(:8)
at com.android.tools.r8.utils.G.get(:1)
at com.android.tools.r8.utils.H.a(:28)
at com.android.tools.r8.graph.E0.definitionFor(:19)
at com.android.tools.r8.graph.c.definitionFor(:16)
at com.android.tools.r8.graph.c.a(:3)
at com.android.tools.r8.graph.c.b(:6)
at com.android.tools.r8.graph.c.definitionFor(:19)
at com.android.tools.r8.ir.optimize.s0.d.a(:3)
at com.android.tools.r8.ir.optimize.s0.d.b(:2)
at com.android.tools.r8.ir.optimize.s0.c.<init>(:19)
at com.android.tools.r8.graph.g.<init>(:54)
at com.android.tools.r8.graph.g.a(:5)
at com.android.tools.r8.D8.d(:29)
at com.android.tools.r8.D8.c(:1)
at com.android.tools.r8.utils.W.a(:30)
at com.android.tools.r8.D8.a(:18)
at com.android.tools.r8.D8.a(:15)
at com.android.tools.r8.utils.W.a(:88)
at com.android.tools.r8.D8.main(:5)
from powertunnel-android.
and then, i get error message box like this
(PowerTunnel-Hosts-1.1.jar build using computer)
from powertunnel-android.
is it problem in my JDK or not? my JDK version is = 19 (newest)
from powertunnel-android.
You should target JRE 1.8 in your plugin
Also keep in mind that new features from Java 8+ won't work on Android < 8
from powertunnel-android.
You should target JRE 1.8 in your plugin
Also keep in mind that new features from Java 8+ won't work on Android < 8
how do i set target jre 1.8?
and then, i should use jdk 8 or older?
from powertunnel-android.
This is a trivial thing: https://github.com/krlvm/PowerTunnel/blob/7dff06e74ea65befe618adc845c8a4cfb3d9985a/build.gradle#L31
from powertunnel-android.
This is a trivial thing: https://github.com/krlvm/PowerTunnel/blob/7dff06e74ea65befe618adc845c8a4cfb3d9985a/build.gradle#L31
oh okay okay, and then, should i use jdk (openjdk) 8 or older?
from powertunnel-android.
You just need to add these lines to your build.gradle or decrease SDK level in IntelliJ if you use its build system
from powertunnel-android.
You just need to add these lines to your build.gradle or decrease SDK level in IntelliJ if you use its build system
oh okay thanks, ill try it later
from powertunnel-android.
i want to try build the plugin using android phone, but i get this error
do you know how to fix
sorry if i bothering you
and thanks for the fast respond
from powertunnel-android.
Weird, it can't resolve gitRepositories
method I used to add the upstream PowerTunnel repository as library.
Could be a problem related to the environment you are trying to build on, are you sure the Gradle version >= 6.8?
If it still fails, I'd suggest to build on Windows/Linux, I've downloaded the Hosts plugin sources and built it within a minute without problems.
from powertunnel-android.
oh, my gradle version is 4.4.1
from powertunnel-android.
i just updated to gradle versio 6.4, the gitRepository()
it working, but i got this error again
from powertunnel-android.
and i just update to 6.8.2, and still i got that same error could not populate working directory
from powertunnel-android.
Do you have git installed?
I think it would be easier to build on PC.
from powertunnel-android.
Do you have git installed? I think it would be easier to build on PC.
already
from powertunnel-android.
but i got that error idk why
from powertunnel-android.
from powertunnel-android.
hmmmm... still same, maybe i need to target jre 1.8?
from powertunnel-android.
still doesnt work, even i set target jre 1.8
from powertunnel-android.
i try to check the app log using adb logcat
and i get this
02-14 09:14:06.519 26489 26450 D ProxyManager: Starting server...
02-14 09:14:06.521 26489 26450 W ziparchive: Unable to open '/data/user/0/io.github.krlvm.powertunnel.android/files/plugins/PowerTunnel-Hosts-1.1 (3).dm': No such file or directory
02-14 09:14:06.521 26489 26450 W rtunnel.androi: Entry not found
02-14 09:14:06.521 26489 26450 E ProxyManager: Failed to start server: Can't load plugin main class (PowerTunnel-Hosts-1.1 (3).jar)
02-14 09:14:06.521 26489 26450 E ProxyManager: io.github.krlvm.powertunnel.sdk.exceptions.PluginLoadException: Can't load plugin main class (PowerTunnel-Hosts-1.1 (3).jar) (PowerTunnel-Hosts-1.1 (3).jar)
02-14 09:14:06.521 26489 26450 E ProxyManager: at io.github.krlvm.powertunnel.plugin.PluginLoader.loadPlugin(PluginLoader.java:142)
02-14 09:14:06.521 26489 26450 E ProxyManager: at io.github.krlvm.powertunnel.plugin.PluginLoader.loadPlugins(PluginLoader.java:78)
02-14 09:14:06.521 26489 26450 E ProxyManager: at io.github.krlvm.powertunnel.android.managers.ProxyManager.lambda$start$0$io-github-krlvm-powertunnel-android-managers-ProxyManager(ProxyManager.java:122)
02-14 09:14:06.521 26489 26450 E ProxyManager: at io.github.krlvm.powertunnel.android.managers.ProxyManager$$ExternalSyntheticLambda0.run(Unknown Source:2)
02-14 09:14:06.521 26489 26450 E ProxyManager: at java.lang.Thread.run(Thread.java:1012)
02-14 09:14:06.521 26489 26450 E ProxyManager: Caused by: java.lang.ClassNotFoundException: Didn't find class "io.github.krlvm.powertunnel.plugins.hosts.HostsPlugin" on path: DexPathList[[zip file "/data/user/0/io.github.krlvm.powertunnel.android/files/plugins/PowerTunnel-Hosts-1.1 (3).jar"],nativeLibraryDirectories=[/system/lib64, /system_ext/lib64]]
02-14 09:14:06.521 26489 26450 E ProxyManager: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
02-14 09:14:06.521 26489 26450 E ProxyManager: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
02-14 09:14:06.521 26489 26450 E ProxyManager: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
02-14 09:14:06.521 26489 26450 E ProxyManager: at io.github.krlvm.powertunnel.android.plugin.AndroidPluginLoader.inject(AndroidPluginLoader.java:49)
02-14 09:14:06.521 26489 26450 E ProxyManager: at io.github.krlvm.powertunnel.plugin.PluginLoader.loadPlugin(PluginLoader.java:138)
02-14 09:14:06.521 26489 26450 E ProxyManager: ... 4 more
02-14 09:14:06.521 26489 26450 E ProxyManager: Suppressed: java.io.IOException: Failed to open dex files from /data/user/0/io.github.krlvm.powertunnel.android/files/plugins/PowerTunnel-Hosts-1.1 (3).jar because: Entry not found
02-14 09:14:06.521 26489 26450 E ProxyManager: at dalvik.system.DexFile.openDexFileNative(Native Method)
02-14 09:14:06.521 26489 26450 E ProxyManager: at dalvik.system.DexFile.openDexFile(DexFile.java:371)
02-14 09:14:06.521 26489 26450 E ProxyManager: at dalvik.system.DexFile.<init>(DexFile.java:113)
02-14 09:14:06.521 26489 26450 E ProxyManager: at dalvik.system.DexFile.<init>(DexFile.java:86)
02-14 09:14:06.521 26489 26450 E ProxyManager: at dalvik.system.DexPathList.loadDexFile(DexPathList.java:438)
02-14 09:14:06.521 26489 26450 E ProxyManager: at dalvik.system.DexPathList.makeDexElements(DexPathList.java:397)
02-14 09:14:06.521 26489 26450 E ProxyManager: at dalvik.system.DexPathList.<init>(DexPathList.java:166)
02-14 09:14:06.521 26489 26450 E ProxyManager: at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:160)
02-14 09:14:06.521 26489 26450 E ProxyManager: at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:105)
02-14 09:14:06.521 26489 26450 E ProxyManager: at dalvik.system.DexClassLoader.<init>(DexClassLoader.java:55)
02-14 09:14:06.521 26489 26450 E ProxyManager: at io.github.krlvm.powertunnel.android.plugin.AndroidPluginLoader.inject(AndroidPluginLoader.java:47)
02-14 09:14:06.521 26489 26450 E ProxyManager: ... 5 more
02-14 09:14:06.521 26489 26450 W ProxyService: Proxy Server could not start, stopping...
0
from powertunnel-android.
You forgot to convert it to Android format
from powertunnel-android.
You forgot to convert it to Android format
oohhhh, so, i need convert all class to classes.dex?
from powertunnel-android.
Yes, you just need to call D8 like androidify.cmd
does in the my previous reply -#141 (comment) - the shell script I attached requires Windows, but techicially you can rewrite its commands to execute in your environment.
from powertunnel-android.
script I attached requires Windows, but techicially you can rewrite its commands to execute
Oh okay okay, thanks
from powertunnel-android.
Related Issues (20)
- Additional for plugin functions HOT 9
- Network connction broken when restart VPN from EMM API HOT 1
- unable to build as there is an error in file tun2http.c at line 174
- question - multi proxies possible? HOT 2
- Bug - failed to start and crashed HOT 18
- PowerTunnel v2.6 ~ 2.6.3 Force Close on Redmi 4A HOT 4
- PowerTunnel sometimes not working after Android 12 HOT 10
- How to use SOCKS5 proxy in PowerTunnel v2.6.3 ? HOT 3
- [ REQUESTS ] Allow Load Blacklist and Adblock From Local Storage HOT 1
- LittleProxy-MITM guidance HOT 1
- request a feature HOT 6
- Anyway to forcefully use Mobile (Cellular) data?
- high cpu usage
- [Feature Requests] IP and ARP spoofing
- Vproxid can support multiple upstream proxy servers. It is hoped that powertunnel and vproxid can complement each other.
- DNS Leaking
- add to f-droid HOT 1
- My operator blocks most DNS servers.
- SNI Bug: A large number of websites are inaccessible HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powertunnel-android.