I'm trying to run sqlite3 on my rooted Nexus 4. I've gotten as far as pushing the executable to /sdcard but I cannot execute it. I'm running stock Android 4.3, rooted with SuperSU 1.45.
The file looks like this:
-rw-rw-r-- root sdcard_rw 36860 2013-09-30 17:29 sqlite3
So far:
chmod 777 sqlite3
does nothingFile.setExecutable()
returns false (but File.exists()
returns true).Is there a better way to do this?
SD cards are usually formatted as FAT32 and mounted with all files unexecutable. SD card directory on Nexus 4 is a simulated one, but still the system prevents any file in it to be marked as executable. You need to move your file outside of your SD card to mark it as executable.
chmod 777 sqlite3 does nothing...
chmod +x doesn't work... I get "bad mode".
The "Bad Mode" is from a+x
, +x
, etc. Remember, its octal. Try:
chmod 0777 sqlite3
And Yuichi is probably correct - /mnt/sdcard
is likely mounted with noexec
.
I know this is an old question.
But I want to suggest another work around for this problem by creating disk .img
file in sdcard then mount it on /data/
Well, I know it was quite redundant, but at the very least it could be used as workaround if your internal disk was low on space.
Here, some instructions in case needed.
adb shell
to your device, /sdcard
(mouting point may vary on each device)dd if=/dev/zero of=<your-new>.img bs=1M count=0 seek=2048
. This creates a new image file called <your-new>.img
change the seek value to the size you want (e.g 2048 = 2GB). If dd not available, try to install busybox
first, then from dd
change into busybox dd
<yout-new>.img
, in my case I used ext2. eg. mke2fs -F ubuntunew.img
<your-new>.img
to /data
. eg. mount -o loop /sdcard/<your-new>.img /data/<your-mount-point>
. If mount
command not available use busybox
.Ok. That's all
References:
https://forum.xda-developers.com/showthread.php?t=2743108 https://linuxonandroid.uservoice.com/knowledgebase/articles/74683-how-to-i-give-linux-more-space
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With