diff --git a/CHANGELOG.md b/CHANGELOG.md
index d935192..514b38a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,13 @@ The version lives in `_VER` in `src/main.c`. Binaries are published only as the
[`latest`](https://github.com/OpenIPC/microsnander/releases/latest) release, rebuilt
from every push to `main`; this file is the change history.
+## 1.43.0 — 2026-11-16
+
+- Android app: a hex view of the last dump (#85), under the status registers, as in the web
+ mode: address, bytes and ASCII, 16 bytes a row, 512 bytes a page, 00 and FF dim; Prev, Next and
+ Go to an address in hex (up to 12 digits, inside the dump). Only that page is read from the
+ file, so a dump of any size opens at once; the panel follows the newest dump.
+
## 1.42.1 — 2026-11-16
- Android app: the APK carries native code for ARM only, arm64-v8a and armeabi-v7a (phones and
diff --git a/README.md b/README.md
index 99078cc..2a57b7d 100644
--- a/README.md
+++ b/README.md
@@ -482,6 +482,9 @@ with the remote).
- A tap on a register lamp flips that bit: Detect, a question with the old and the new value,
the write on every die, then the registers read again. WEL, BUSY (WIP) and SUS are the state of
the chip, R bits are reserved and LB1–LB3 are one-time locks: those lamps take no tap.
+- **Hex view** of the last dump, as in the web mode: 512 bytes a page, address, bytes and ASCII
+ (00 and FF dim), Prev, Next and Go to an address in hex; the D-pad of a TV box moves through
+ them, and the table scrolls sideways on a narrow screen.
- The app runs the same C code as microsnander (`src/`), built with the NDK, on the device the
Android USB manager opened (its file descriptor, through the usbfs code, no libusb). The signed APK is in the release:
`microsnander-android.apk` in [latest](https://github.com/OpenIPC/microsnander/releases/latest).
diff --git a/README.ru.md b/README.ru.md
index 40b2d2b..3bf6327 100644
--- a/README.ru.md
+++ b/README.ru.md
@@ -488,6 +488,9 @@ Android TV (Android 5.0 и новее, без root; на приставке он
- Нажатие на лампу регистра меняет этот бит: Detect, вопрос со старым и новым значением, запись
на всех кристаллах, затем регистры читаются заново. WEL, BUSY (WIP) и SUS — состояние
микросхемы, биты R зарезервированы, а LB1–LB3 — одноразовая блокировка: на эти лампы нажать нельзя.
+- **Hex view** последнего дампа, как в веб-режиме: по 512 байт, адрес, байты и ASCII (00 и FF
+ приглушены), Prev, Next и Go — переход по адресу в hex; на ТВ-приставке по ним ходят пультом,
+ на узком экране таблица прокручивается вбок.
- Приложение работает на том же коде C, что и microsnander (`src/`), собранном NDK, с устройством,
которое открыл менеджер USB Android (через его файловый дескриптор и код usbfs, без libusb). Подписанный APK — в релизе:
`microsnander-android.apk` в [latest](https://github.com/OpenIPC/microsnander/releases/latest).
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 8d18c9a..4936c1c 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -414,6 +414,8 @@ root;在电视盒子上会出现在主屏幕,可用遥控器操作)。
**Self-test**(在 Detect 和确认之后对第一个块执行 `-t`)。
- 点击寄存器指示灯即可翻转该位:先 Detect,再询问并显示旧值和新值,在每个晶粒上写入,然后重新读取寄存器。
WEL、BUSY(WIP)和 SUS 是芯片的状态,R 位为保留位,LB1–LB3 为一次性锁定位:这些指示灯不能点击。
+- 最近一次转储的 **Hex view**,与 Web 模式相同:每页 512 字节,地址、字节和 ASCII(00 和 FF 显示为暗色),
+ Prev、Next 和 Go(跳转到十六进制地址);电视盒子上可用遥控器方向键操作,窄屏上表格可横向滚动。
- 应用使用与 microsnander 相同的 C 代码(`src/`),由 NDK 编译,访问 Android USB 管理器打开的
设备(通过其文件描述符和 usbfs 代码,不使用 libusb)。签名的 APK 在发布版中:[latest](https://github.com/OpenIPC/microsnander/releases/latest) 里的 `microsnander-android.apk`。
diff --git a/android/app/src/main/java/org/openipc/microsnander/MainActivity.java b/android/app/src/main/java/org/openipc/microsnander/MainActivity.java
index 9e0fe0c..cdf02b3 100644
--- a/android/app/src/main/java/org/openipc/microsnander/MainActivity.java
+++ b/android/app/src/main/java/org/openipc/microsnander/MainActivity.java
@@ -30,7 +30,9 @@
import android.text.style.ForegroundColorSpan;
import android.view.Gravity;
import android.view.View;
+import android.view.inputmethod.EditorInfo;
import android.widget.Button;
+import android.widget.EditText;
import android.widget.GridLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
@@ -41,6 +43,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.io.RandomAccessFile;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
@@ -100,6 +103,14 @@ public class MainActivity extends Activity {
private View regsPanel;
private Button[] buttons;
private Button saveAs, share;
+ // the hex view of the last dump: its file and the address of the page shown
+ private static final int HEX_PAGE = 512;
+ private static String hexName; // the dump shown: name, time and length, a rewritten one counts as new
+ private static long hexOff;
+ private View hexPanel;
+ private TextView hexFile, hexText;
+ private EditText hexAddr;
+ private Button hexPrev, hexNext, hexGoButton;
private Runnable afterPermission;
@Override
@@ -116,6 +127,22 @@ protected void onCreate(Bundle saved) {
regsNote = findViewById(R.id.regs_note);
saveAs = findViewById(R.id.b_save_as);
share = findViewById(R.id.b_share);
+ hexPanel = findViewById(R.id.hex_panel);
+ hexFile = findViewById(R.id.hex_file);
+ hexText = findViewById(R.id.hex);
+ hexAddr = findViewById(R.id.hex_addr);
+ hexPrev = findViewById(R.id.b_hex_prev);
+ hexNext = findViewById(R.id.b_hex_next);
+ hexGoButton = findViewById(R.id.b_hex_go);
+ // not while an operation runs: it may be writing the dump shown
+ hexPrev.setOnClickListener(v -> { if (busy) return; hexOff = Math.max(0, hexOff - HEX_PAGE); showHex(); });
+ hexNext.setOnClickListener(v -> { if (busy) return; hexOff += HEX_PAGE; showHex(); });
+ hexGoButton.setOnClickListener(v -> { if (!busy) hexGo(); });
+ hexAddr.setOnEditorActionListener((v, id, e) -> {
+ if (id != EditorInfo.IME_ACTION_GO && e == null) return false;
+ if (!busy) hexGo();
+ return true;
+ });
((TextView) findViewById(R.id.version)).setText(getString(R.string.version, BuildConfig.VERSION_NAME));
buttons = new Button[] {
findViewById(R.id.b_detect), findViewById(R.id.b_read), findViewById(R.id.b_erase),
@@ -693,6 +720,99 @@ private void enable(boolean on) {
boolean dump = on && lastDump() != null;
saveAs.setEnabled(dump);
share.setEnabled(dump);
+ hexAddr.setEnabled(on);
+ hexGoButton.setEnabled(on);
+ if (on)
+ showHex();
+ else {
+ hexPrev.setEnabled(false);
+ hexNext.setEnabled(false);
+ }
+ }
+
+ // ---- the hex view ----
+
+ /** Go: an address in hex inside the dump, the page from it (on a 16-byte row) */
+ private void hexGo() {
+ File f = lastDump();
+ String v = hexAddr.getText().toString().trim().replaceFirst("^0[xX]", "");
+ if (f == null) return;
+ if (!v.matches("[0-9a-fA-F]{1,12}")) {
+ hexText.setText(R.string.hex_bad_addr);
+ return;
+ }
+ long a = Long.parseLong(v, 16);
+ if (a >= f.length()) {
+ hexText.setText(getString(R.string.hex_past_end, sizeOf(f.length()), Math.max(0, f.length() - 1)));
+ return;
+ }
+ hexOff = a / 16 * 16;
+ showHex();
+ }
+
+ private static String hex(long v, int n) {
+ StringBuilder s = new StringBuilder(Long.toHexString(v).toUpperCase(java.util.Locale.ROOT));
+ while (s.length() < n) s.insert(0, '0');
+ return s.toString();
+ }
+
+ /** the page of the last dump at hexOff: address, 16 bytes, ASCII a row; none: the panel goes */
+ private void showHex() {
+ File f = lastDump();
+ if (f == null) {
+ hexPanel.setVisibility(View.GONE);
+ hexName = null;
+ return;
+ }
+ String id = f.getName() + ':' + f.lastModified() + ':' + f.length();
+ if (!id.equals(hexName)) { // another dump, or the same name written again: from its start
+ hexName = id;
+ hexOff = 0;
+ }
+ long len = f.length();
+ if (hexOff >= len) hexOff = Math.max(0, (len - 1) / HEX_PAGE * HEX_PAGE);
+ hexPanel.setVisibility(View.VISIBLE);
+ hexFile.setText(f.getName());
+ byte[] b = new byte[(int) Math.min(HEX_PAGE, len - hexOff)];
+ try (RandomAccessFile r = new RandomAccessFile(f, "r")) {
+ r.seek(hexOff);
+ r.readFully(b);
+ } catch (IOException e) {
+ hexText.setText(R.string.hex_cannot);
+ return;
+ }
+ int amber = col(R.color.amber), dim = col(R.color.dim);
+ SpannableStringBuilder h = new SpannableStringBuilder();
+ for (int i = 0; i < b.length; i += 16) {
+ int from = h.length();
+ h.append(hex(hexOff + i, 8));
+ h.setSpan(new ForegroundColorSpan(amber), from, h.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+ h.append(" ");
+ StringBuilder c = new StringBuilder();
+ for (int k = 0; k < 16; k++) {
+ if (k == 8) h.append(' ');
+ if (i + k < b.length) {
+ int v = b[i + k] & 0xff;
+ int at = h.length();
+ h.append(hex(v, 2));
+ if (v == 0 || v == 0xff)
+ h.setSpan(new ForegroundColorSpan(dim), at, h.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+ h.append(' ');
+ c.append(v >= 32 && v < 127 ? (char) v : '.');
+ } else
+ h.append(" ");
+ }
+ h.append(' ');
+ int at = h.length();
+ h.append(c);
+ h.setSpan(new ForegroundColorSpan(dim), at, h.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+ if (i + 16 < b.length) h.append('\n');
+ }
+ if (b.length == 0) h.append(getString(R.string.hex_empty));
+ hexText.setText(h);
+ hexAddr.setText(getString(R.string.hex_addr, hexOff));
+ hexPrev.setEnabled(hexOff > 0);
+ hexNext.setEnabled(hexOff + HEX_PAGE < len);
}
private void showBusy() {
diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml
index 004bb0c..7738276 100644
--- a/android/app/src/main/res/layout/activity_main.xml
+++ b/android/app/src/main/res/layout/activity_main.xml
@@ -242,5 +242,115 @@
android:paddingRight="24dp"
android:text="@string/unprotect" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index 546fb11..308f23f 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -61,4 +61,15 @@
SRP0, SRP1 and SRWD lock the registers (with the WP# pin low, or until the chip is powered off); SRP0 and SRP1 together would lock them for good and are refused. QE, HOLD and WPS change what the pins of the chip do: a board may not boot from it until they are set back.Another chip is in the programmer: its registers are shown now, tap the bit again.This chip has no such status register to write.
+ HEX VIEW
+ Prev
+ Next
+ Go
+ 0x0
+ 0x%1$X
+ The last dump, 512 bytes at a time. Address in hex; 00 and FF bytes are dim.
+ An address in hex, as 0x1F000.
+ Past the end of the dump (%1$s): the last address is 0x%2$X.
+ The dump cannot be read.
+ Empty.
diff --git a/src/main.c b/src/main.c
index b1d913b..d8d5b13 100644
--- a/src/main.c
+++ b/src/main.c
@@ -42,7 +42,7 @@
struct flash_cmd prog;
extern unsigned int bsize;
-#define _VER "1.42.1"
+#define _VER "1.43.0"
const char *ms_version = _VER;