Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
androidlover5842 committed Mar 25, 2018
1 parent 4a72326 commit ca0823f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,17 @@ Our magic script to generate omni twrp device tree just using a backup which con
Get latest jar file from here https://github.com/TwrpBuilder/twrpbuilder_tree_generator/releases/latest
### Usage :-

`java -jar TwrpBuilder.jar backup_filename.tar.gz`
```
-- USAGE --
usage: TwrpBuilder [-f <arg>] [-h] [-otg] [-r <arg>] [-t <arg>]
-- HELP --
usage: java -jar TwrpBuilder.jar -f backupfile.tar.gz [-f <arg>] [-h] [-otg] [-r
<arg>] [-t <arg>]
HELP
-f,--file <arg> build using backup file (made from app).
-h,--help print this help
-otg,--otg-support add otg support to fstab
-r,--recovery <arg> build using recovery image file
-t,--type <arg> supported option :-
mt , samsung,mrvl
```
10 changes: 5 additions & 5 deletions src/mkTree/MakeTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private void extractKernel(boolean mtk) {
}
else
{
ShellExecuter.mkdir("out");
ShellExecuter.mkdir(out);
ShellExecuter.command("./umkbootimg -i recovery.img -o "+out);
}
}
Expand Down Expand Up @@ -130,21 +130,21 @@ private void Fstab(String path)
}

public void extractFstab() {
compressionType=ShellExecuter.commandnoapp("cd out && file --mime-type recovery.img-ramdisk.* | cut -d / -f 2 | cut -d '-' -f 2");
compressionType=ShellExecuter.commandnoapp("cd "+out+" && file --mime-type recovery.img-ramdisk.* | cut -d / -f 2 | cut -d '-' -f 2");
if(compressionType.equals("lzma"))
{
System.out.println("Found lzma comression in ramdisk");
ShellExecuter.command("mv "+out+"recovery.img-ramdisk.gz "+out+"recovery.img-ramdisk.lzma && lzma -d "+out+"recovery.img-ramdisk.lzma && cd out && cpio -i <recovery.img-ramdisk");
ShellExecuter.command("mv "+out+"recovery.img-ramdisk.gz "+out+"recovery.img-ramdisk.lzma && lzma -d "+out+"recovery.img-ramdisk.lzma && cd "+out+" && cpio -i <recovery.img-ramdisk");
lzma=true;
}else if(compressionType.equals("gzip"))
{
System.out.println("Found gzip comression in ramdisk");
ShellExecuter.command("gzip -d "+out+"recovery.img-ramdisk.gz && cd out && cpio -i <recovery.img-ramdisk");
ShellExecuter.command("gzip -d "+out+"recovery.img-ramdisk.gz && cd "+out+" && cpio -i <recovery.img-ramdisk");
}
else if(compressionType.equals("lz4"))
{
System.out.println("Found lz4 comression in ramdisk");
ShellExecuter.commandnoapp("cd out && lz4 -d recovery.img-ramdisk.* recovery.img-ramdisk && cpio -i <recovery.img-ramdisk ");
ShellExecuter.commandnoapp("cd "+out+" && lz4 -d recovery.img-ramdisk.* recovery.img-ramdisk && cpio -i <recovery.img-ramdisk ");
lz4=true;
}
else
Expand Down

0 comments on commit ca0823f

Please sign in to comment.