Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
master-hax authored May 28, 2024
1 parent 4707472 commit 73e97af
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ mount ext4 drives into the google pixel's internal storage

**WARNING: this code is experimental and there is no guarantee that it works. rooting your phone or running any commands as root can be very dangerous. you have been warned.**

anyway here is a demo image of a portable SSD enclosure mounted into the internal storage on my Pixel XL. the data is readable & writable in the Google Photos app.
![image](assets/demo.jpg)


## why?

the main goal is to allow for easy backup of external media via Google Photos on original Google Pixel phones, which which have an unlimited storage benefit. the "usual" method is to copy every file to the device's internal storage, which can incur terabytes of unnecessary writes to the limited lifetime of the internal flash memory.
Expand All @@ -27,11 +31,6 @@ this method is basically a hack around the selinux policies + app permissions us
## the ugly
* there's no GUI, you need to execute shell scripts


anyway here is a demo image of a portable SSD enclosure mounted into the internal storage on my Pixel XL. the data is readable & writable in the Google Photos app.

![image](assets/demo.jpg)

## prerequisites
* a Google Pixel (sailfish) or Google Pixel XL (marlin) on Android 10, rooted with [Magisk](https://github.com/topjohnwu/Magisk). may work on other phones.
* a USB storage drive formatted with an ext4 filesystem. other filesystems not currently supported.
Expand All @@ -41,8 +40,7 @@ anyway here is a demo image of a portable SSD enclosure mounted into the interna
### via adb (with a PC)
1. install Android Debug Bridge (adb) & connect the pixel
1. clone this repository
1. run `make mobile-install`
* installs the scripts to `/data/local/tmp` by default
1. run `make mobile-install`. this installs the scripts to `/data/local/tmp` by default.
* if your pixel has Termux installed, you can install the scripts to the Termux home directory with `make mobile-install DEVICE_INSTALL_DIRECTORY=/data/data/com.termux/files/home`
* if you are running these steps on WSL, you should use the adb executable from windows (which has USB support) with `make mobile-install HOST_ADB_COMMAND=/mnt/c/Users/someone/AppData/Local/Android/Sdk/platform-tools/adb.exe`

Expand All @@ -63,12 +61,9 @@ TODO
* you may not need this step if you use Magisk to force the global mount namespace

### mounting
1. connect the ext4 formatted external drive to the pixel
* you should get an os notification that says the drive is not supported
* if you click on this, it directs you to format the drive in FAT32. you probably don't want to do this
* you can safely ignore or clear this notification
1. find the block device that you want to mount
* it is usually at `/dev/block/sdg1` but changes when devices are connected/disconnected
1. connect the ext4 formatted external drive to the pixel. you should get an os notification that says the drive is not supported. clear or ignore this notification.
* this notification directs you to format the drive in FAT32 - don't do that
1. find the block device that you want to mount. it is usually found at `/dev/block/sdg1` but changes when devices are connected and disconnected.
* if you don't know the filesystem UUID, use `./show_devices.sh`
* if you know the filesystem UUID, use `./find_device.sh`
1. run `./mount_ext4.sh <BLOCK_DEVICE>`
Expand Down

0 comments on commit 73e97af

Please sign in to comment.