forked from erfanoabdi/imgpatchtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlockImageUpdate.cpp
More file actions
executable file
·29 lines (24 loc) · 869 Bytes
/
BlockImageUpdate.cpp
File metadata and controls
executable file
·29 lines (24 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// BlockImageUpdate.cpp
// imgpatchtools
//
// Created by Erfan Abdi on 7/19/17.
// Copyright © 2017 Erfan Abdi. All rights reserved.
//
#include <iostream>
#include "blockimg/blockimg.h"
#include "edify/expr.h"
int main(int argc, char * argv[]) {
if (argc < 5){
printf("usage: %s <system.img> <system.transfer.list> <system.new.dat> <system.patch.dat>\nargs:\n\t- block device (or file) to modify in-place\n\t- transfer list (blob)\n\t- new data stream (filename within package.zip)\n\t- patch stream (filename within package.zip, must be uncompressed)\n",argv[0]);
return 0;
}
State* state;
int ret = BlockImageUpdateFn("BlockImageUpdateFn", state, argc, argv);
if (!ret) {
std::cout << "Done" << std::endl;
} else {
std::cout << "Done with error code: " << ret << std::endl;
}
return 0;
}