Skip to content

Evidence of NAND being used as temp before uploading. It still hurts NAND endurance unless we find the temp location. #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vegedb opened this issue Nov 22, 2024 · 9 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@vegedb
Copy link

vegedb commented Nov 22, 2024

Tested a 2GB file and upload through file browser.

image

After 5 minutes of waiting,

image

Info

The sequence,

  1. File browser > share > upload
  2. [Network activity = 0MB/s] 5 Minutes from SSD>Phone eMMC NAND temp folder
  3. [Network activity = 25MB/s] After 5 minutes, upload starts. Phone eMMC NAND temp folder > Cloud

Hope you could find what's on sda or sda35 that's using as a temp folder. G
Got the time to investigate nand usage and its 100% being used as a "middleman".
I have zero knowledge on where it might be, hope you can help us hunt it down so we can mount an ssd on it.

@master-hax
Copy link
Owner

it is most likely in /data/data/com.google.android.apps.photos directory

@vegedb
Copy link
Author

vegedb commented Dec 22, 2024

it is most likely in /data/data/com.google.android.apps.photos directory

Since I'm using 32gb pixel, it has only 20gb free space.
Uploading 20GB file fails, and it shows "could not find media" at the bottom of the screen AFTER 10 minutes of WRITES. I assume it fills up the temp folder and bust error once it reaches a limit.

For the time being 128gb pixel is the best to upload large video files. Or split the videos using https://github.com/mifi/lossless-cut

But the main problem is still there, NAND getting destroyed making the phone useless is inevitable.
Hope we have another way to upload bypassing the built in storage.

@rwahyudi
Copy link

@vegedb Can you see if you can reproduce the same behaviour if you bypass the file browser? ie connect the SSD drive to a PC, copy files directly to the SSD disk, and then mount the SSD back into the pixel.

@master-hax
Copy link
Owner

i did some investigation with inotifywait - i think all the media gets written to /data/data/com.google.android.apps.photos/databases/gphotos0.db in chunks before being uploaded

@master-hax master-hax added enhancement New feature or request help wanted Extra attention is needed labels Feb 8, 2025
@nhan000
Copy link

nhan000 commented Feb 10, 2025

Since I'm using 32gb pixel, it has only 20gb free space.
Uploading 20GB file fails, and it shows "could not find media" at the bottom of the screen AFTER 10 minutes of WRITES. I assume it fills up the temp folder and bust error once it reaches a limit.

Google Photos per the support website has a 10 GB file size limit for videos.

Image

However, here 20 GB file size can be accepted? It's an API library so might be different.

Image

I believe you can get the Pixel to have more than 20 GB free space, provided that you uninstalled/disabled/clear storage and cache of apps quite aggressively.

Image

So @vegedb can try to clear up more space and try re-upload the 20 GB video, or try it with a 15 GB video to see if it's the limit Google Photos impose per the support website.

Also, I'm a noob so I don't know much about the technical details you guys are discussing. Hope I contributed something to the discussion.

i did some investigation with inotifywait - i think all the media gets written to /data/data/com.google.android.apps.photos/databases/gphotos0.db in chunks before being uploaded

I only now noticed that it's pretty much conclusive that the files are written into phone's memory before being uploaded?

@vegedb
Copy link
Author

vegedb commented Feb 11, 2025

So @vegedb can try to clear up more space and try re-upload the 20 GB video, or try it with a 15 GB video to see if it's the limit Google Photos impose per the support website.

Also, I'm a noob so I don't know much about the technical details you guys are discussing. Hope I contributed something to the discussion.

i did some investigation with inotifywait - i think all the media gets written to /data/data/com.google.android.apps.photos/databases/gphotos0.db in chunks before being uploaded

I only now noticed that it's pretty much conclusive that the files are written into phone's memory before being uploaded?

My biggest file is a 17gb 1080p video if it helps. I also have a bunch of videos above 10GB .
So the limit is 20GB? idk maybe someone could test above that.

Yup its 100% using nand first. Until there's new developments, the only thing we can do now is just buy another pixel when it breaks, 32gb emmc are known to break at 20TB-30TB.

@nhan000
Copy link

nhan000 commented Feb 18, 2025

I was able to upload a 18.1 GB, 360-degree video.

@stuzor
Copy link

stuzor commented Mar 11, 2025

Was there ever a solution here? Are we able to mount the google photos app directory to the external drive as well? I am looking to do a massive upload, around 4TB and would like that to not be written to internal storage.

@milchalpenl
Copy link

milchalpenl commented Mar 26, 2025

I don't think NAND is being used as temp before uploading but perhaps used for storing some kind of SHA256 hash/index etc.

I must admit that I have not done complete analysis like vegedb. But my experience is this

Scenario

  • I have 3 accounts in pixel
  • Connected to USB HDD (500GB) with power etc
  • Once connected etc. it is in preparing status (USB-HDD status blinking i.e reading the disk)
  • Uploads start after 1 hour etc. It can take even 24 hours to finish all uploads.
  • Situation: Lets say it is finished uploading all files from 500GB to account 1
  • Now. I change backup to account 2
  • Uploads start immediately. Delay is only in a few minutes.

WILD GUESS

  • Maybe it downloads hashes from account1 (quick process) to compare it to local files hashes (time consuming)
  • For the second account, since localfilehash has generation is complete, account 2 (download online hashes - quick) - then start upload immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants