Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with error? #2

Open
toastmod opened this issue Apr 9, 2021 · 8 comments
Open

Help with error? #2

toastmod opened this issue Apr 9, 2021 · 8 comments

Comments

@toastmod
Copy link

toastmod commented Apr 9, 2021

Hey I know this project is pretty dead, but I'm getting an error here I don't know how to figure it out. Probably has to do with the fact that I upgraded the Android SDK target from 16 straight up to 28. Anyway this is what I'm getting at runtime. I should also say I @SuppressLint("LongLogTag") to line 100 in ClientListActivity.java

2021-04-08 22:47:50.273 20010-20010/? I/libc: SetHeapTaggingLevel: tag level set to 0
2021-04-08 22:47:50.277 20010-20010/? I/strand.wheatle: Late-enabling -Xcheck:jni
2021-04-08 22:47:50.295 20010-20010/? I/strand.wheatle: Unquickening 12 vdex files!
2021-04-08 22:47:50.338 20010-20010/net.jlekstrand.wheatley D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
2021-04-08 22:47:50.356 20010-20010/net.jlekstrand.wheatley D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-04-08 22:47:50.357 20010-20010/net.jlekstrand.wheatley D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-04-08 22:47:50.385 20010-20010/net.jlekstrand.wheatley D/wheatley:ClientListActivity: onCreate
2021-04-08 22:47:50.454 20010-20010/net.jlekstrand.wheatley E/SQLiteLog: (1) no such column: root in "SELECT _id, title, icon, command, root FROM clients"
2021-04-08 22:47:50.455 20010-20010/net.jlekstrand.wheatley D/AndroidRuntime: Shutting down VM
2021-04-08 22:47:50.458 20010-20010/net.jlekstrand.wheatley E/AndroidRuntime: FATAL EXCEPTION: main
    Process: net.jlekstrand.wheatley, PID: 20010
    android.database.sqlite.SQLiteException: no such column: root (code 1 SQLITE_ERROR): , while compiling: SELECT _id, title, icon, command, root FROM clients
        at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
        at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1045)
        at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:652)
        at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:590)
        at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:61)
        at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
        at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
        at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1545)
        at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1392)
        at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1263)
        at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1469)
        at net.jlekstrand.wheatley.gui.ClientListActivity.onStart(ClientListActivity.java:127)
        at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1435)
        at android.app.Activity.performStart(Activity.java:8024)
        at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3457)
        at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
        at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7660)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
2021-04-08 22:47:50.469 20010-20010/net.jlekstrand.wheatley I/Process: Sending signal. PID: 20010 SIG: 9
@gfxstrand
Copy link
Owner

It looks like I messed up my database handling somewhere. Likely, the older version of SQLite was more friendly towards whatever mistake I made. That said, I've not had a build or test environment for this for years so I'm not in a position to fix bugs. I'm happy to merge PRs, though.

@toastmod
Copy link
Author

toastmod commented Apr 9, 2021

Thanks for the reply. I have so little experience with both Android and SQL but it sounds like it'll be a simple fix once I read into it a bit. If I do anything I'll be sure to PR.

@toastmod
Copy link
Author

toastmod commented Jun 27, 2021

Hey I am coming back to try working, I basically commented out the SQL cursor thing to get wheatley compiling and running. But how do you actually use it? Can I open a socket to it and launch something? Or do you have to use the launcher in wheatley?

@gfxstrand
Copy link
Owner

To do basic tests for whether or not it's working, I think I built the simple-shm demo statically linked or something like that. But if you've got a chroot already, the trick is to get the WAYLAND_DISPLAY environment variable and socket plumbed through to the chroot so you can actually use it. IIRC, this is easier to do if it originates from the wheatley app. I had a script eons ago that would invoke su with all the appropreate bits to get into the chroot and patch stuff through. I could try to dig that script up for you but I can't do it this week because it's on a different machine. IIRC, I ran into some issues with more recent Android su implementations where they torch your environment for security purposes. Patching through WAYLAND_DISPLAY can still be done but it requires turning it into a command line parameter to whatever you're invoking inside the chroot which could be another shell script. I hope this gives you the rough idea. I'm sorry I don't have any better directions posted. I never quite got things to a "production" state, I'm afraid.

@toastmod
Copy link
Author

All good! I'm just messing around with this repo for experimentation. But yeah, maybe if I have time one day I'll try using dark magic to combine wheatley with termux (kind of like UserLAnd seemed to) or something, that would make plumbing easier and not require any root at all. Is simple-shm supposed to run when the app starts?

@gfxstrand
Copy link
Owner

I typed most of what I remember above, I"m afraid. Best of luck, though!

@toastmod
Copy link
Author

toastmod commented Jun 29, 2022

Excuse the edit, I found simple-shm.c, but does this need to be compiled with NDK? Or will it work from an arm gcc toolchain?

@gfxstrand
Copy link
Owner

I don't remember how I built it. Given my development practices at the time, I'm going to guess that I built it with a standard GCC toolchain from inside an ARM chroot. However, it's been so long that anything I remember is probably unreliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants