View Single Post
Old 04-24-2016, 08:35 AM   #11
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
I figured it out as I was falling asleep last night. It fails when scripts are at /mnt/us (userstore) or even if I copy them to /tmp and set the +x flag, but it succeeds when scripts are at /mnt/mmc (SD card).

I began using an SD card for my installs when I was dumping partition images, to minimize write wear on the embedded flash device. Then I noticed that scripts could run (from SD card).

I was getting annoyed at how long it takes for windows to mount the drive letter for /dev/mmc, and also how long it took to eject the device so I could safely unplug USB (the K1 does not leave usbms mode until cable unplugged, not just ejected). I quit using the SD card, then noticed sourced or shelled scripts were failing again. Perhaps the kindle really IS using (one-bit) SPI mode to talk to the SD card, as I guessed because it does not support my microSD cards (in SD adapters).

Anyway, when I want to run scripts, they need to be on SD card until I figure this out.

I will try /bin/sh. I see that plenty of built-in scripts do exactly that, even after adding things to the PATH var. Comments in some scripts suggest that lab126 staff were also fighting this battle back in the day...

For now, I will insert an SD card when I want an install script to run something from it, and leave the card out when I want to switch quickly in and out of usbms mode.

What is also strange is that I have seen amazon install scripts that DO copy scripts to /tmp and set +x on them, but doing exactly that failed for me. They must do this as a workaround for the problem I am experiencing. Installing from SD card is convenient, but leaving an SD card plugged in all the time is annoying when I want to repeatedly use usbms mode. I need to find my wifi SD card, so I can access the card from wifi instead of slow-to-change usbms mode (with the added benefit that the kindle framework will be running even while I access the SD card contents). With a wifi SD card, I will not need to even bother using usbms mode...

EDIT: I found my Eye-Fi wifi SD card, but it is not known to be hackable (though there are replacement server hacks). It will do for now (though I prefer root shell on all my devices)...

Last edited by geekmaster; 07-21-2016 at 07:55 PM.
geekmaster is offline   Reply With Quote