Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
device
/
generic
/
goldfish
/
87c2c5e26e121d26056d4d9c6eef45c684457b0e
/
.
/
tools
/
extract_ext4_image.sh
blob: 0e591c991635d7428b8292bfd4d992923d70eaaf [
file
] [
log
] [
blame
]
#!/bin/bash
set
-
e
if
[
"$#"
-
ne
2
];
then
echo
"$0 src.img target.img"
>&
2
exit
1
fi
srcimg
=
$1
target
=
$2
disksize
=
$
(
stat
-
c
%
s $srcimg
)
mycount
=
`expr $disksize \/ 1024 - 2048`
dd
if
=
$srcimg of
=
$target ibs
=
1k
skip
=
1024
count
=
$
{
mycount
}