-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Beta android reader update. Bugfixes
- Loading branch information
1 parent
6078819
commit 8e4432c
Showing
9 changed files
with
193 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace NyaFs.ImageFormat.Composite | ||
{ | ||
class AndroidImageWriter | ||
{ | ||
private readonly string Path; | ||
|
||
public AndroidImageWriter(string Path) | ||
{ | ||
this.Path = Path; | ||
} | ||
|
||
public bool Write(BaseImageBlob Blob) | ||
{ | ||
|
||
return false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using Extension.Array; | ||
using Extension.Packet; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace NyaFs.ImageFormat.Types.Android | ||
{ | ||
class AndroidImagev1 : LegacyAndroidImage | ||
{ | ||
public AndroidImagev1(byte[] Raw) : base(Raw) | ||
{ | ||
|
||
} | ||
|
||
/// <summary> | ||
/// Recovery dtb size in bytes | ||
/// </summary> | ||
public uint RecoveryDtboSize | ||
{ | ||
get { return ReadUInt32(0x660); } | ||
set { WriteUInt32(0x660, value); } | ||
} | ||
|
||
/// <summary> | ||
/// Recovery dtb address | ||
/// </summary> | ||
public ulong RecoveryDtboAddress | ||
{ | ||
get { return ReadUInt64(0x664); } | ||
set { WriteUInt64(0x664, value); } | ||
} | ||
|
||
public override long HeaderSize => ReadUInt32(0x66C); | ||
|
||
protected long RecoveryDtboOffset => (SecondOffset + SecondSize).GetAligned(PageSize); | ||
|
||
public byte[] RecoveryDtbo => ReadArray(RecoveryDtboOffset, RecoveryDtboSize); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Extension.Array; | ||
using Extension.Packet; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace NyaFs.ImageFormat.Types.Android | ||
{ | ||
class AndroidImagev2 : AndroidImagev1 | ||
{ | ||
public AndroidImagev2(byte[] Raw) : base(Raw) | ||
{ | ||
|
||
} | ||
|
||
/// <summary> | ||
/// dtb size in bytes | ||
/// </summary> | ||
public uint DtboSize | ||
{ | ||
get { return ReadUInt32(0x670); } | ||
set { WriteUInt32(0x670, value); } | ||
} | ||
|
||
/// <summary> | ||
/// dtb address | ||
/// </summary> | ||
public ulong DtboAddress | ||
{ | ||
get { return ReadUInt64(0x674); } | ||
set { WriteUInt64(0x674, value); } | ||
} | ||
|
||
protected long DtboOffset => (RecoveryDtboOffset + RecoveryDtboSize).GetAligned(PageSize); | ||
|
||
public byte[] Dtbo => ReadArray(DtboOffset, DtboSize); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters