xdarklight / cm-update-server

This provides the server-side API for letting a user download ROMs through the CMUpdater app. In other words: this is an open source clone of the get.cm API implemented with NodeJS.
MIT License
10 stars 9 forks source link

Attempt extraction of build vars from zips when adding #2

Closed patcon closed 5 years ago

patcon commented 9 years ago

Not sure if this is too messy for you or not properly cross-platform, but would be great to make a best effort to extract possible arg values from the zips when adding

unzip -p cm-11-grouper.snapshot-M12.zip system/build.prop | grep ro.build

Thinking we can get these:

(flags would still override)

But maybe it's not worth it. I'll see if I feel like it when I get using it :)

xdarklight commented 9 years ago

Right now the build-cm script (https://github.com/xdarklight/build-cm-script/blob/master/build-cm.sh#L172) is doing this. But I guess instead of relying on the system to provide "unzip" we should do it from within NodeJS. Seems to be quite easy with https://www.npmjs.com/package/adm-zip

Please note that incrementals cannot be parsed (that easy) on the NodeJS side because they only have a "system/build.prop.p" (not a plaintext file).

patcon commented 9 years ago

Ah gotcha. Actually, I hadn't looked at that repo yet, so thanks

zefie commented 7 years ago

I know this is old, but this is what I do for the time being:

http://pastebin.com/QE7evDjP

Using this script, in the scenario that it was named "addfile.sh" in the cm-update-server directory, and you had your rom at: _data/files/lineageos-13.0-gtelwifiue/lineage-13.0_j60_20170324NIGHTLY-gtelwifiue.zip

You could: ./addfile.sh data/files/lineageos-13.0-gtelwifiue/lineage-13.0_j60_20170324_NIGHTLY-gtelwifiue.zip OR ./addfile.sh lineage-13.0_j60_20170324_NIGHTLY-gtelwifiue.zip OR ./addfile.sh lineage-13.0_j60

to accomplish the same thing.

xdarklight commented 5 years ago

I am not maintaining this project anymore so I'm closing this.