Skip to content

Android app: hex view of the last dump (#85) - #91

Merged
compot-dev merged 3 commits into
mainfrom
hexview-android
Nov 15, 2026
Merged

compot-dev merged 3 commits into
mainfrom
hexview-android

Conversation

@compot-dev

@compot-dev compot-dev commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #85. This is the hex view on Android, the same view as the web mode has since 1.42.0.

  • A "Hex view" panel under the status registers. It shows the newest dump in the app's dumps directory, which is the same file Save as and Share use. A self-test block counts as a dump too.
  • 512 bytes a page. Each row has the address (amber), 16 bytes (00 and FF dim) and the ASCII (dim), in monospace inside a horizontal scroll.
  • There are Prev and Next buttons, and Go to an address in hex. The address field takes 0–9, A–F and x, up to 12 digits. An address past the end is refused with the last address shown. The keyboard's Go action works too.
  • RandomAccessFile reads only the 512 bytes shown. The panel resets to address 0 for a new dump and hides when there is no dump.
  • Colours come from colors.xml only (amber, ink, dim), and the field and table use the existing display drawable. Nothing new is added to the brass palette.
  • Version 1.43.0, CHANGELOG, README (en, ru, zh-CN).

Tests:

  • Local Docker builds: assembleDebug builds, and lintDebug reports no issues.
  • native, LIBUSB=1 and musl x86_64/arm/mipsel/mips build with 0 warnings, and the tests pass. There is no C change besides the version.
  • On hardware, with the CI debug APK of 8af54fd on an Android 10 TV box (CH341A, Boya BY25Q64AS):
    • a Read of 8 MB opened the panel with the new dump, from 0x0 (zeros there, as od of the file shows);
    • Go 0x3000 showed 4D 58 50 54 01 01 00 FF … with MXPT, ROM and KEY_CUST in the ASCII, the same as od;
    • Next went to 0x3200 and Prev back to 0x3000;
    • Go 0x900000 reported "Past the end of the dump (8 MB): the last address is 0x7FFFFF.";
    • the D-pad reaches the panel.
  • Merged with main after Android: arm64-v8a and armeabi-v7a by default, x86_64 only on request (1.42.1) #90 (1.42.1): this PR stays 1.43.0, and both CHANGELOG entries are kept.

Under the status registers: 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 the page shown is read from the
file; the panel follows the newest dump and goes when there is none.

Part of #85.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add a paged hex view for the latest Android dump

✨ Enhancement 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Show the latest Android dump as addresses, hex bytes, and ASCII beneath the status registers.
• Add 512-byte paging and hex-address navigation without loading the whole dump.
• Document the view in three languages and bump the version to 1.43.0.
Diagram

graph TD
  Controls["Paging and Go"] --> Activity["MainActivity"] --> Selection["Newest dump selection"] --> Dump[("Dump file")] --> Reader["512-byte reader"] --> Panel["Hex view panel"]
Loading
High-Level Assessment

Reusing lastDump keeps the view consistent with Save as and Share, while bounded RandomAccessFile reads avoid loading large dumps into memory. Loading entire dumps or introducing another dump-selection path would add cost without a clear benefit.

Files changed (8) +248 / -1

Enhancement (3) +232 / -0
MainActivity.javaRead and render pages of the latest dump +110/-0

Read and render pages of the latest dump

• Adds Prev, Next, and validated hex-address navigation, with 512-byte RandomAccessFile reads and formatted address, byte, and ASCII rows. Resets to the start of a newly selected dump and hides the panel when no dump exists.

android/app/src/main/java/org/openipc/microsnander/MainActivity.java

activity_main.xmlAdd the Android hex view panel +111/-0

Add the Android hex view panel

• Adds a filename, navigation controls, address field, and horizontally scrollable monospace table beneath the existing panels. Reuses the app's panel and display drawables and existing colors.

android/app/src/main/res/layout/activity_main.xml

strings.xmlAdd hex view labels and feedback +11/-0

Add hex view labels and feedback

• Adds navigation labels, an address hint, explanatory text, and invalid-address, end-of-file, read-error, and empty-dump messages.

android/app/src/main/res/values/strings.xml

Documentation (4) +15 / -0
CHANGELOG.mdRecord the 1.43.0 Android hex view +7/-0

Record the 1.43.0 Android hex view

• Adds release notes describing the Android dump view, paging, address navigation, and bounded file reads.

CHANGELOG.md

README.mdDocument Android hex navigation in English +3/-0

Document Android hex navigation in English

• Describes the latest-dump view, remote-control navigation, and horizontal scrolling on narrow screens.

README.md

README.ru.mdDocument Android hex navigation in Russian +3/-0

Document Android hex navigation in Russian

• Adds the corresponding description of paging, navigation, and narrow-screen behavior.

README.ru.md

README.zh-CN.mdDocument Android hex navigation in Simplified Chinese +2/-0

Document Android hex navigation in Simplified Chinese

• Adds the corresponding description of paging, navigation, and narrow-screen behavior.

README.zh-CN.md

Other (1) +1 / -1
main.cBump the shared version to 1.43.0 +1/-1

Bump the shared version to 1.43.0

• Updates the version constant used by the application and native binaries; no other C behavior changes.

src/main.c

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Phone users cannot reach hex controls ✓ Resolved
Description
The hex control row puts three fixed-width buttons and the weighted address field on one horizontal
line without horizontal scrolling. On narrow portrait screens, the field collapses or later buttons
extend beyond the visible panel; the horizontal scroller below applies only to the dump table.

2. Repeated failed tests retain the old page ✓ Resolved
Description
showHex() resets hexOff only when the selected dump's filename differs from hexName. A second
failed self-test on the same chip rewrites the same dump path, so a previously selected nonzero page
remains selected when the new block dump is displayed.

3. Hex navigation can show a partial dump ✓ Resolved
Description
enable(false) leaves the new hex navigation handlers active, and each handler can call showHex()
while an operation is running. If a self-test overwrites the currently selected failure dump,
navigating during its write can read the truncated or partially rewritten file before completion.

Grey Divider

Tip of the day
💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

…om its start, nothing while busy

The address field has its own row and Prev, Go and Next share the next
one, so a phone in portrait shows them all. A dump is known by its name,
time and length: a self-test block written again under the same name
opens at its start. While an operation runs the hex controls are off, as
Save as and Share, since it may be writing the dump shown.
@compot-dev

Copy link
Copy Markdown
Collaborator Author

All three findings are fixed in 8af54fd:

  1. Phone users cannot reach hex controls. The address field now has a full-width row of its own. Prev, Go and Next share the next row with equal weights, so all of them fit on a portrait phone. The dump table still scrolls sideways.
  2. Repeated failed tests retain the old page. The view now identifies a dump by its name, modification time and length. A self-test block written again under the same name counts as a new dump and opens at address 0.
  3. Hex navigation can show a partial dump. enable(false) now also turns off the address field, Go, Prev and Next. Each handler also returns early while busy. During an operation nothing reads the dump file, which may be the one being written.

assembleDebug builds, and lintDebug reports no issues.

@compot-dev

Copy link
Copy Markdown
Collaborator Author

/review

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 8af54fd

@compot-dev

Copy link
Copy Markdown
Collaborator Author

/review

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 38a6f5d

@compot-dev
compot-dev merged commit 369a569 into main Nov 15, 2026
9 checks passed
@compot-dev
compot-dev deleted the hexview-android branch November 15, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant