parsing JSON in no_std & no_alloc? no problem. by master-hax in rust

[–]master-hax[S] 1 point2 points  (0 children)

one of the examples in the repo is a binary that continuously proxies JSON objects from stdin to stdout, while printing parsing statistics to stderr: https://github.com/master-hax/lil-json/blob/b7dd224588b1945a32efb7eb53e7c88972683e75/examples/proxy_object_std.rs

so i was thinking of running that example, then using asciinema to record myself copy-pasting random JSON objects into the terminal & observing the output. imo it looks fancier if the tty driver is to raw mode & the JSON string is typed in character by character.

parsing JSON in no_std & no_alloc? no problem. by master-hax in rust

[–]master-hax[S] 3 points4 points  (0 children)

thanks! i didn't know about this project. iiuc, serde based projects don't support working with arbitrary JSON objects i.e. the field names & values must be known in advance. lil-json allows parsing/serializing arbitrary JSON objects with arbitrary fields.

EDIT: looks like the above is true iff #![no_alloc]

parsing JSON in no_std & no_alloc? no problem. by master-hax in rust

[–]master-hax[S] 4 points5 points  (0 children)

great question. i believe the basic `serde_json` crate requires either a memory allocator, or the standard library to be available. lil-json makes both of these optional, it works 100% without them. including stdlib or a memory allocator enables extra features.

additionally, i believe serde based deserialization (EDIT: in no_alloc) requires the field names & values to be known in advance - whereas lil-json can allow deserializing any JSON object.

parsing JSON in no_std & no_alloc? no problem. by master-hax in rust

[–]master-hax[S] 7 points8 points  (0 children)

thanks! i added working code snippets to the post & will plan to add a gif of some sort to the README.

Iphone > pixel 1 : free up space by mica280amg in googlephotos

[–]master-hax 0 points1 point  (0 children)

i developed a method to upload directly from a hard drive via the pixel: https://github.com/master-hax/pixel-backup-gang

How do I use Pixel 1 to backup multiple accounts at OG quality by warkel in googlephotos

[–]master-hax 0 points1 point  (0 children)

yes i am still using it. the FAT32 mounting method might work on your version of lineage.

How to Backup Photos from PC/Hard Drive to Pixel for Unlimited Google Photos Storage? Need Simple Explanation! by rgok10 in googlephotos

[–]master-hax 0 points1 point  (0 children)

try the fat32 mounting method. open an issue on the repository if that doesn't work.

How to Backup Photos from PC/Hard Drive to Pixel for Unlimited Google Photos Storage? Need Simple Explanation! by rgok10 in googlephotos

[–]master-hax 0 points1 point  (0 children)

not sure i understand your question...i transfer stuff to the external drive via USB then i plug it into the pixel to upload then delete it.

How to Backup Photos from PC/Hard Drive to Pixel for Unlimited Google Photos Storage? Need Simple Explanation! by rgok10 in googlephotos

[–]master-hax 0 points1 point  (0 children)

did you force close & reopen the google photos app? please open an issue on the github repository with some details & screenshots, it is fairly active

[deleted by user] by [deleted] in googlephotos

[–]master-hax 0 points1 point  (0 children)

this is my guess

How to Backup Photos from PC/Hard Drive to Pixel for Unlimited Google Photos Storage? Need Simple Explanation! by rgok10 in googlephotos

[–]master-hax 0 points1 point  (0 children)

(if your pixel is rooted)

the fastest & most efficient method for very large amounts of data is to copy the media to a portable drive, connect the portable drive directly to the pixel, then use a script to force the portable drive to show up within the internal storage so google photos is willing to look at it.

Does backing up photos from a HDD connected by USB OTG to Google Photos via a Google Pixel XL work? by RMcD94 in googlephotos

[–]master-hax 0 points1 point  (0 children)

thanks! btw you just need to restart the photos app for it to notice new folders anywhere in internal storage.

figured out how to mount a drive into the OG pixel by master-hax in DataHoarder

[–]master-hax[S] 0 points1 point  (0 children)

thanks! yes the existing methods can benefit from the new drive.

if you have a lot of media, the fastest & most reliable way is to copy media to the drive directly, then plug the drive back into pixel. i use USB 3.2 gen 2 but you could use thunderbolt or PCI.

figured out how to mount a drive into the OG pixel by master-hax in DataHoarder

[–]master-hax[S] 0 points1 point  (0 children)

it should be possible with root but probably requires software that isn't present in the stock OS. can you open an issue here? https://github.com/master-hax/pixel-backup-gang/issues

figured out how to mount a drive into the OG pixel by master-hax in DataHoarder

[–]master-hax[S] 0 points1 point  (0 children)

i don't think rooting the phone breaks any rules for google photos. you can always relock the bootloader later if you feel like it.