assetprobe

command
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: BSD-3-Clause Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command assetprobe live-verifies that an app reads both kinds of APK asset `bellui package` writes (#1285): a text asset, now deflated, and a media asset, still stored.

gen.sh writes assets/THIRD_PARTY_NOTICES.txt (a real app's notices when given one, else license text from the Go module cache) and assets/media/tone.ogg, and prints each file's size and CRC-32. Two seconds after launch the probe reads both through the asset API twice, from Java (AssetManager.open) and from native code (AAsset_read), tries openFd on each, and prints one line to stdout (logcat tag Bellui):

assetprobe ok notices java=<size>/<crc> native=<size>/<crc> fd=compressed tone java=<size>/<crc> native=<size>/<crc> fd=<length>

The sizes and CRCs must match what gen.sh printed. fd=compressed for the notices shows the entry really is deflated on the device (openFd refuses a compressed entry); a number for the tone shows a stored asset can still be opened as a file descriptor, which media playback needs.

Build and run (from this directory):

./gen.sh [notices.txt]
CGO_LDFLAGS= ANDROID_HOME=~/Library/Android/sdk ANDROID_NDK_HOME=~/Library/Android/sdk/ndk/26.3.11579264 \
  bellui package --target android/arm64 --app-id com.trendvidia.assetprobe
unzip -lv assetprobe.apk | grep assets/
adb install -r assetprobe.apk
adb logcat -c && adb shell am start -n com.trendvidia.assetprobe/org.golang.app.GoNativeActivity
adb logcat -d -s Bellui | grep assetprobe

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL