View Single Post
Old 01-15-2022, 03:36 PM   #1
JJTech
Nerd
JJTech can tie a knot in a cherry stem with his or her tongueJJTech can tie a knot in a cherry stem with his or her tongueJJTech can tie a knot in a cherry stem with his or her tongueJJTech can tie a knot in a cherry stem with his or her tongueJJTech can tie a knot in a cherry stem with his or her tongueJJTech can tie a knot in a cherry stem with his or her tongueJJTech can tie a knot in a cherry stem with his or her tongueJJTech can tie a knot in a cherry stem with his or her tongueJJTech can tie a knot in a cherry stem with his or her tongueJJTech can tie a knot in a cherry stem with his or her tongueJJTech can tie a knot in a cherry stem with his or her tongue
 
JJTech's Avatar
 
Posts: 52
Karma: 22352
Join Date: Dec 2020
Location: USA
Device: Kindle Basic 3 (2019)
Post Re-attaching Kindle after unmount

Hi! Today I found myself in a situation where I wanted to be able to use my Kindle normally, but still have a script be able to push content to the Kindle without user interaction.

The Kindle can be used while plugged into the PC by ejecting it, but I couldn't figure out how to "un-eject" it without unplugging it.

Eventually, I figured it out, and I decided to post it for anyone interested.

Windows:
Spoiler:
  1. Download sg3_utils. There are regular builds for Windows, but I have provided a stripped-down version with only the features you need on GitHub. I have also attached it to this post.
  2. Open an Administrator Command Prompt to the folder you extracted sg3_utils to.
  3. Find the device name of the Kindle:
    Code:
    .\sg_scan.exe
    , noting down the number (e.g. PD2) next to the line that says "Kindle".
  4. To "eject" the Kindle (note that this is NOT the same as ejecting in Explorer, you can't un-eject with that) execute the command:
    Code:
    .\sg_start.exe --eject PD2
  5. To "un-eject" the kindle execute the command:
    Code:
    .\sg_start.exe --load PD2
    Note that you can ignore any "device not ready" errors.

Linux:
Spoiler:

Just use
Code:
eject /dev/sda
to eject, and
Code:
eject -t /dev/sda
to "un-eject", replacing /dev/sda with your Kindle's device.


You're done! I might script this process later, and it could be incorporated into other applications. I also have no idea how this might be accomplished on macOS.
Attached Files
File Type: zip sg3_utils_win.zip (833.6 KB, 113 views)

Last edited by JJTech; 01-15-2022 at 03:41 PM.
JJTech is offline   Reply With Quote