Lekensteyn / lglaf

LG Download Mode utility and documentation
https://lekensteyn.nl/lglaf/
MIT License
137 stars 74 forks source link

offset partition download #26

Closed vibo69 closed 6 years ago

vibo69 commented 6 years ago

Hello, i'd like to download one partition in separate parts because phone gets hot after some time and reboots. so i figured out i could do it in parts (eg. 512MB). so is it possible to set offset/size of downloaded data? and how? could you give me some example usage please

vibo69 commented 6 years ago

after a half day of plugging/unpluging/freezing phone i managed to download whole image using bash to modify partitions.py and set offset/size manuall with increments (i'm not into python so that was the fastest way for me). but i think adding this feature would be nice ;) for cases like mine

vibo69 commented 6 years ago

i forgot to mention i needed to correct get_partitions procedure. for my d855 it needs to be like this: name_cmd = 'ls -l /dev/block/platform/msm_sdcc.1/by-name' not: name_cmd = 'ls -l /dev/block/bootdevice/by-name'

anyway... great tool! thanks ;)

Lekensteyn commented 6 years ago

I have added an --offset option to dump-file.py, is that sufficient to close this issue?

vibo69 commented 6 years ago

i dont have time to check by myself but if it can accept argument like 'from:to' or so then sure it does what i needed :)

Lekensteyn commented 6 years ago

If you need to read bytes 100 to 120 (length 20), you would use:

python dump-file.py --offset 100 --size 20

That should be good right? :-) (Can this issue be closed then?)

vibo69 commented 6 years ago

yup that seems good enough :)

Lekensteyn commented 6 years ago

Great, thanks for your feedback!