SQLite Forum

Timeline
Login

9 events by user Webalchemist

2021-10-29
17:12 Reply: Database on android SD CARD artifact: 97bb72295e user: Webalchemist

Larry, Thank you so much for your in-depth engagement here... Its clear that you have a very in-depth understanding about these things

I hear you saying that I'd have a better chance of figuring all this out if I root my phone.

You are probably right that I don't understand permissions. From what I read it's read write and execute. This makes me think that a user that does not own or belong to the root group would rely on an x in the the "other" group in order to execute the file EG ------rwx

However this is not my wheelhouse and I could be grossly mistaken.

I read somewhere that Andriod is giving a separate username to each application. This means that shell will never be the same user unless shell actually created the file.

Consequently, I was going to try using cat command to copy sqlite3 file to another file by shell and hopefully this would solve my ownership issue.

I also read some users are getting luck on SD cards by appending the file with .exe before they put it on the SD card. This makes the system treat the file as an executable. -- I have not yet tried it.

Thanks for encouraging me to get the best chance of good support

I also appreciate you and the other users for engaging my topic even though it may seem "off topic" explicitly to sqlite, I hope some others find it relevant and perhaps may even be helpful to someone else who is trying to get sqlite going on their phone.

16:59 Reply: Database on android SD CARD artifact: 6d8412961c user: Webalchemist

Thanks for such close tracking on the thread! this is awesome!

16:57 Reply: Database on android SD CARD artifact: a55444f0a0 user: Webalchemist

This is correct... The name of the package escapes me at the moment, but it had a folder with three files

Sqldiff sqlite3 sqlanalizer

So from what I understand the version I got is the CLI version However if there are dependencies that i'm missing, I'd love to know about it.

Some things I found since my last post:

I found somewhere that Android has a separate user for every application.

So that means that if I want to execute the file under the user permission, it needs to be owned by shell app ?

I also read somewhere some people are getting success with changing a linux file to linux_file.exe on SD card so that the SD card recognizes it as executable. Even with the EXE extension, some files are running properly.

I have yet to test it but I was considering using something like:

using cat to read sqlite3 and save it to a new file called sqlite3.exe. Hopefully this would accomplish two things at once: make a file that's owned by shell and make a file that the SD card is recognizing as executable. However if the ownership happens as i'm hoping, I wouldn't need to rename it to exe.

Another thing I don't know is if each instance of shell would create its own user, meaning I need to do all my shell commands in one session?

I suppose I could do two different sessions and see if the file ownership is the same.

I ran into another roadblock on this application so It took me away from this issue, but I appreciate all those who have posted here so responsively, thank you for all your support / engagement on this!

2021-10-28
03:12 Reply: Database on android SD CARD artifact: 1250519d7b user: Webalchemist

well, since sqlite3 is not installed on my device, I tried adding the sqlite3 file to my sdcard and calling it like storage/sdcard/sqlite3 storage/sdcard/my.db but I couldn't get it working.

I also tried the tasker sqlite plugin within macrodroid. I also ran into some roadblocks there.

Any other ideas / suggestions?

2021-10-27
16:45 Reply: Database on android SD CARD artifact: f24dc5e51d user: Webalchemist

Thank you Larry for your fun and insightful reply...

The reason for not wanting to root is that I wanted to develop an application / extension that others could easily use without rooting their phone. If it were just for me, fine, but if I want others to use it who may not be as enthusiastic about rooting, wouldn't it be great if it could work?

When you said its a clue that the comment noexec is relevant, How can you say that when the permission says RWXRWX--- Doesn't that say that the base user should be able to execute? Unless for some reason my app (macrodroid) is somehow belonging to the "other" group.

While you are likely right that my issue is with my environment and not with SQLite, my hope is that other SQLite enthusiasts may have bumped up against this issue and be able to help with how to solve it.

2021-10-26
21:22 Edit reply: Database on android SD CARD artifact: be9094781c user: Webalchemist

It says generic hierarchical.

What if I format the SD card?

I tried navigating to

cd /tmp but I got invalid directory.

I have no idea of any other "nonFAT" places. How can I solve it?

---- update

I tried reformatting but android didn't offer me any alternative formats.

As an aside,

I moved my files to the storage/emulated/0/test directory and there was a difference.

On my SD card the permissions were RWXRWX--- but on my emulated storage its rw rw ---

I selected the 20 FE phone specifically for the SD card so I could do this project without rooting my phone.

I'm on the verge of giving up on SQLite even though I really really want it to work!!

Any last ideas?

21:00 Reply: Database on android SD CARD artifact: 178f0672cb user: Webalchemist

It says generic hierarchical.

What if I format the SD card?

I tried navigating to

cd /tmp but I got invalid directory.

I have no idea of any other "nonFAT" places. How can I solve it?

19:18 Reply: Database on android SD CARD artifact: 7661094626 user: Webalchemist

thank you so much for this excellent reply!

Some specifics of my project: I'm not using andriod studio. I'm working with Macrodroid and shell command.

So, instead of the andriod binaries, I downloaded Precompiled Binaries for Linux and was able to move the sqlite file to my sdcard

I then called it in my shell like:

/storage/2EA5-2D26/Xenno/sqlite /storage/2EA5-2D26/Xenno/zztest.db

the result I got was:

/system/bin/sh: <stdin>[25] /storage/.../sqlite3 can't execute: Permission denied

I then used the LS command and the sqlite3 file is set to rwxrwx---

I tried using chmod o=rwx /storage/2EA5-2D26/Xenno/sqlite but I get no result

I've spent so many hours on this. Any help is much appreciated. If only I could make sqlqueries!? it'd be a whole other world!

2021-10-23
23:19 Post: Database on android SD CARD artifact: fec93c0fbf user: Webalchemist

Hi I hit so Many brick walls trying to make my own database on android without using android studio.

I just want to make calls to the db using shell on my SD card.

Can I install sqlite on my SD card and put the db in the same directory and have it run there?

Please help. Burned up so many hours trying to get this working