Repository navigation
Releases
v0.23.3
Trust the car app only with Topway's certificates; quieter battery log; no update check offline
From the van's telemetry on v0.23.2 (30 Nov: three engine starts, each switched and confirmed, no failures).
Car app trust
- On a Topway unit, a
com.tw.carthat is not a system app now names the CAN box only when its first signing certificate's full SHA-256 is one of Topway's two certificates. - Both were read from all 444 vendor builds on disk:
5304915c…(builds 2018–2023) andaa6f9fb3…(2019–now, the van's). - Any other copy is ignored: the unit counts as unidentified, and the car setup asks before anything is sent.
- The certificate and version are read from one package snapshot.
- Log:
car app not found or not trusted; the(car app: …, cert <prefix>)note stays.
Battery log
- While the engine runs (13.0 V or more), a new line needs a 1.5 V change, so the 14–15 V alternator swing no longer logs (21 of 196 lines on the van).
- Crossing 13.0 V going up, or 12.7 V going down, always logs.
- The 0.3 V band stops a reading that hovers at 13.0 V from filling the log.
Update check offline
- Tapping the update card while Android reports no network shows No internet without trying.
- The background job no longer logs
no internet(often DNS not ready right after the network comes up); its backoff retry is unchanged. - Other failures log a short reason instead of the full exception.
Checks
- Tests pass, with new cases for the pin, the battery rule and the hysteresis. The build succeeds.
- Emulator: the fake car app (another key) logs
car app not found or not trusted (car app: not a system app, cert d5837d0343349d77), and Settings says the head unit does not name a car. The offline tap shows No internet, with noupdate failedline. - Separate security review: no way found for another key to be trusted, and no regression for real Topway units. Its two low findings (snapshot, hysteresis) are fixed here.
- README updated. No screen or translated text changed.
🤖 Generated with Claude Code
v0.23.2
Share the log as a file
On the van, Share offered Waze, Chrome, Bluetooth, Quick Share, Google Save and Termux, with only the first line of the log as a preview. A head unit has no mail or chat app to take text, and Bluetooth and Quick Share only send files. So the share was useless.
Change
- Share writes the whole log into one
nostartstop-<yyyyMMdd-HHmm>.txt, the rotated.log.1first, as Save to Download does. It sends that file withEXTRA_STREAM. - The new
LogShareProviderserves it:- it is not exported;
- it serves only
cache/share/nostartstop-<date>-<time>.txt, read-only; - it answers the name and size that Bluetooth and Quick Share ask for;
- the read grant goes with the
ClipDatato the app the user picks only; - the previous copy is deleted at the next share.
- The car-data warning before sharing is unchanged.
- Help (all 7 languages) and the README now say to use Bluetooth or Quick Share to get the file to a phone. The new error text "Could not share the log" is translated.
Log screen in split screen
- Below 900 dp the buttons get their own row under the title, sharing the width equally. The screen rebuilds when the window crosses that width, and reads the log again. Before, it kept the wide labels after a live resize.
docs/diagnostics.pnganddocs/waiting.pngare retaken.
Checked on the emulator
- The share sheet says "Sharing 1 file: nostartstop-20261129-2243.txt".
- Messages attached it (3.11 KB).
adb shell content queryon the uri is refused:Permission Denial … not exported.sh test.shpasses (28 suites) andbuild.shpasses.
Merging releases a patch (fix/). It is independent of #69.
🤖 Generated with Claude Code
v0.23.1
Read the car app's profile on Topway units again
Found in the van's telemetry (29 Nov, v0.21.0-beta.2, then v0.23.0).
Regression from #64
- #64 reads
com.tw.caronly from a system app. On the van's head unit it is a normal app in/data/app, so v0.23.0 loggedcar app not foundandthe head unit changed from profile 961 to no profile since it was confirmed, nothing will be sent. Nothing was sent until the user confirmed again. - Every Topway unit that ships the car app like this is hit.
Fix
com.tw.carcounts when it is a system app, or when the app runs on a Topway unit.android.tw.john.TWUtilis in the firmware's framework there, and no installed app can add it. A sideloaded copy on any other device still counts for nothing.app openednow ends with(car app: system | not a system app, cert <sha256 prefix> | absent). Once the van reports the vendor's certificate, a later release can require it on Topway units, so a sideloaded copy can't name the profile. Until then such a copy only changes the suggested card and the MATCHES tag. What is sent is still only the box the user confirmed.CarSetup.decide: a box confirmed while the head unit named no profile stays confirmed once the head unit names a profile it fits. So users who re-confirmed on v0.23.0 are not asked again. It needs a positive match (CarSetup.matches): a known profile that fits the box. An unknown or untested profile asks again, and so does any other change. Covered by newCarSetupTestcases.
Log noise
watch: batterylines are now logged on a 0.5 V change, up from 0.2 V. The alternator's 14.77 ↔ 15.08 V ripple was about 60 of 339 lines on one drive. Ignition off (about 12.3 V) and charging still log. Logging only; the engine detection doesn't use it.
Checked
sh test.shpasses (28 suites) andbuild.shpasses.- On the emulator, a non-system
com.tw.car(961_0000_260130) with the stand-in TWUtil now shows "The head unit is set up for profile 961" and MATCHES THIS HEAD UNIT. - The README is updated. No new screen text, so no translations or screenshots are needed.
Merging releases v0.23.1 (fix/).
🤖 Generated with Claude Code
v0.23.0
Dashboard look, first start, problem panel, hold to switch, seven languages
Look
- A car-dashboard style:
- a dark gradient background, cards with depth, round icon buttons;
- the app's stop-start symbol on a soft glow: struck through in green for OFF, plain white for ON, a dashed amber ring with "?" for UNKNOWN;
- the state word sits in the ring, with the tag and the time of the last switch under it.
- Shared colours and drawables (
Ui), with animations that honour Android's animation scale (Motion).
Glance while driving
- The symbol shows the state at a glance. It animates once when a switch goes out (sweep, glow pulse), when the car confirms it (an expanding ring), and on failure (red flash and shake).
- Switch stop-start keeps its "Turns it ON/OFF" line, and shows Sending… with an amber bar while a command is out.
Problem panel
- One panel, one fix, in plain language:
- Confirm your car first;
- This car is not supported;
- Cannot reach the car (with Try Beta: reach the car without adb when that applies);
- Automatic switch failed;
- Switch not sent;
- Automatic switching is off;
- Cannot see the ignition.
- The fix opens the exact screen or row (Settings scrolls to it and outlines it). The order follows the existing
Feedback.of. The logic is the pureProblemclass, with tests.
First start
- A short guide: what the app does, then your CAN box (the existing cards), then Switch off at engine start (on) with optional Background start, then the diagnostics question (the same consent text).
- Installs that already confirmed a CAN box never see it.
- The logic is the pure
FirstRunclass, with tests. Background start runs through a sharedBackgroundStarthelper.
Fewer taps
- Hold the symbol for 0.7 s to switch (cancelled if an overlay covers the screen): the same checks as the button, and a short tap does nothing, so a bump can't switch it.
- Settings grouped with the most used first: AUTOMATIC, YOUR CAR, DIAGNOSTICS, UPDATES, BETA.
Languages (from #66)
- English, Català, Español, Français, Deutsch, Italiano, Português. Follows the system language, or the pick in Settings → LANGUAGE. Log and telemetry stay English. See #66.
Checked
sh test.shpasses (27 suites, with the newProblemTestandFirstRunTest).- On the 1920x720 emulator with a simulated PSA car:
- the first start;
- a drive with the automatic switch, a tap (Sending… then ON), UNKNOWN;
- NOT CONNECTED and CAR NOT SUPPORTED panels;
- split screen, Settings, Log and Help;
- the beta card list with the mismatch warning.
- A visual-verdict pass flagged the UNKNOWN hint missing, an unbalanced wide layout and panels overflowing 720 px. All three are fixed. The gauge ring was then replaced by the app's stop-start symbol (user feedback); visual-verdict on the symbol: 87, then 91 after capping the word width.
- All README screenshots are retaken, plus a new one of the first start.
Merging releases v0.23.0 (feat/).
🤖 Generated with Claude Code
v0.22.1
Security hardening: private log, overlay taps, stricter updater URL, safer release notes
Fixes from a security audit of the app and the release pipeline. Neither audit found an exploitable issue; these close the gaps it listed. These commits landed on the #63 branch after it was merged, so they were not in v0.22.0.
App
- Private log: the log moves from
Android/data, readable by other apps on Android 9–10 (raw car data with Record car data on), to app-private storage. The old file moves over once and is always deleted; at most 512 KB is copied, in whole lines. Get the log out with Share or Save to Download on the Log screen. - Overlay taps: taps are ignored while another app draws over the main, Settings and Log screens and their dialogs.
- Microntek: status lines are capped at 200 a day, so faked broadcasts cannot flood the log, and a broadcast with unreadable extras is dropped instead of crashing the app.
- Vendor car app:
com.tw.car's profile is read only when it is a system app, so a sideloaded fake cannot change the detected car. - Updater: the APK URL must be an https
github.comrelease asset of this repository, checked withURI, with no.., query or user info.
Release pipeline
- Release notes: they come from the pull request only when the repository owner wrote it, matched by account id. Anyone else's pull request gets generated notes, because an author can still edit a merged pull request before the release is approved.
Checked:
sh test.shpasses (25 suites, with new LogMigration, DownloadUrl and car-data tests), and the build passes.- On the emulator: v0.21.0 wrote its log to
Android/data. After installing this build, that file was gone and the private log held its lines plus the new ones. Save to Download wrote the full log.
Merging releases v0.22.1 (fix/).
🤖 Generated with Claude Code
v0.22.0
New main screen, log in Settings, CAN box cards
Main screen
- The log is gone from the main screen.
- Two columns:
- the stop-start state on the left: OFF green (the goal), ON white, UNKNOWN amber;
- the switch on the right, with "Turns it ON/OFF" under it, and quieter when stop-start is already off.
- The time of the last switch sits next to the tag ("14:18 · automatic", "14:18 · tap").
- The link state is a pill: NOT CONNECTED and CAR NOT SUPPORTED are filled; SET UP YOUR CAR is tappable.
- Switch off at engine start is a full-width row at the bottom, with the version and credit in a small footer.
- Split screen keeps the state and the switch above the fold.
Log
- Settings → DATA → Show log opens a Log screen:
- the last 200 lines, the newest at the bottom;
- it follows new lines while you are at the bottom;
- failures and errors are amber;
- the file path is at the foot.
- The diagnostics line (sending, sent, send failed) is at the top of the Log screen and under Show log.
- The main screen shows only a send failure, in the footer, which opens Settings.
CAN box
- The setup is a list of cards, replacing the dropdown and its light dialog. Each card has a title, a sub-line and tags: MATCHES THIS HEAD UNIT, TESTED, UNTESTED.
- A stable release shows two cards. A beta build groups them under BETA · UNTESTED and TESTED, with "not listed" last.
- A box that is not what the head unit reports shows a warning beside the buttons, and Confirm becomes Use anyway. There is no second dialog.
- When it asks again, it says why, for example "the head unit changed from profile 961 to profile 111".
- Settings → CAR shows the confirmed box with its tags and a Change CAN box button that opens the same screen.
Fixed along the way
- After a CAN pick in Settings, every switch showed Off.
- Static hooks were cleared without checking whose they were.
- The Log screen no longer re-reads an unchanged file.
- Touches are filtered when another app draws over the setup buttons, the switch or "Change CAN box".
Reviews
- UI/UX design and analyst before; architect, security and test after. All findings were fixed.
- New tests:
LogLine,CarSetup.matches,chips,confirmLabel,choiceTitle/choiceSub,Feedback.idle.sh test.shpasses. - Checked on the 1920x720 emulator with a simulated PSA car:
- setup, drive, automatic switch, tap;
- narrow layout, Settings, Log, Help;
- the beta card list and the mismatch.
- All screenshots are retaken.
Merging releases v0.22.0 (feat/).
🤖 Generated with Claude Code
v0.21.0
Car setup, CAN box dropdown, Settings page and beta head units
Car setup
- On first start after this update, every install is asked once which CAN box the car has. The app sends nothing to the car until you confirm.
- It asks again when the head unit's CAN box setting changes.
- A stable release offers PSA with a Raise CAN box, the one tested on a car, and My car is not listed.
CAN box dropdown
- In the car setup and in Settings → CAR.
- Preselected with your last pick, or the first time with the box the head unit reports.
- A pick that differs from what the head unit reports asks first, with a warning.
Settings page
- All switches except Switch off at engine start moved from the main screen to Settings, opened from the header.
- Sections: CAR, STARTING, UPDATES, DATA, BETA.
- The main screen keeps the stop-start card, the switch and the log, with clearer states (ASSUMED, FROM THE CAR, SENT) and hints.
Beta builds only (beta program)
- The dropdown also lists untested boxes:
- VW MQB, Honda, GWM Haval and other PSA boxes on Topway head units: profiles 96, 114, 111, 274 and F91;
- PSA with a Raise box on FYT (Teyes, Joying…) and Microntek (Dasaita, Xtrons…) head units.
- Beta: guess the engine start, for head units without an engine speed.
Also
- Beta: reach the car without adb: for head units whose log shows
TWUtil unavailable. It asks Android to stop hiding the Topway class from this app. - Every command to the car goes through one check: the confirmed box, its link, the build. The log says why when nothing is sent.
- Beta report form for testers.
Tested: five drives on the PSA van with v0.21.0-beta.2. Each switched stop-start off 6–9 s after ignition on, and the car confirmed it. The other boxes are tested only on an emulator.
🤖 Generated with Claude Code
v0.21.0-beta.2
v0.21.0-beta.1
v0.20.0
Beta program: opt-in test builds before a release
Lets a head unit try a change before it is released to everyone, without uninstalling or losing settings.
App
- A new Beta program switch, under Check for updates automatically. Off by default.
- With it on, the update check and the button take the newest of the last 20 releases, pre-releases included.
- With it off, they keep using
releases/latest, which leaves pre-releases out. A beta tag is never offered outside the program, even if it is stored. - Leaving the program keeps the installed beta. Android won't let an app install an older version of itself, so the next stable release newer than the beta is offered instead. Switching it either way forgets the stored tag and checks soon.
vX.Y.Z-beta.Nsorts aftervX.Y-1…and before its ownvX.Y.Z. Betas sort by N.
CI
- Actions → ci → Run workflow on a branch publishes
v<next minor>.0-beta.<run>. - It is signed with the release key and published as a GitHub pre-release.
- The version code is the run number, as for every build, so a beta installs over the stable release before it, and the next stable installs over the beta.
- The
releaseenvironment currently allows onlymasterandv*. To sign a beta of another branch, its deployment branch policy needs that branch, or a pattern for it.
Tests: VersionTest and UpdateCheckTest cover beta ordering, channel filtering and leaving the program. sh test.sh and build.sh pass.
🤖 Generated with Claude Code