ampart v1.2: introducing web reporter
A new mode 'webreport' was added, users can now use ampart itself to generate URL that utilizes the brand-new ampart-web-reporter.
ampart /emmc/or/dump --mode webreport
A simple command like this will return a URL like the following if nothing went wrong.
https://7ji.github.io/ampart-web-reporter/?dsnapshot=logo::8388608:1%20recovery::25165824:1%20misc::8388608:1%20dtbo::8388608:1%20cri_data::8388608:2%20param::16777216:2%20boot::16777216:1%20rsv::16777216:1%20metadata::16777216:1%20vbmeta::2097152:1%20tee::33554432:1%20vendor::335544320:1%20odm::134217728:1%20system::1946157056:1%20product::134217728:1%20cache::1174405120:2%20data::18446744073709551615:4&esnapshot=bootloader:0:4194304:0%20reserved:37748736:67108864:0%20cache:113246208:1174405120:2%20env:1296039936:8388608:0%20logo:1312817152:8388608:1%20recovery:1329594368:25165824:1%20misc:1363148800:8388608:1%20dtbo:1379926016:8388608:1%20cri_data:1396703232:8388608:2%20param:1413480448:16777216:2%20boot:1438646272:16777216:1%20rsv:1463812096:16777216:1%20metadata:1488977920:16777216:1%20vbmeta:1514143744:2097152:1%20tee:1524629504:33554432:1%20vendor:1566572544:335544320:1%20odm:1910505472:134217728:1%20system:2053111808:1946157056:1%20product:4007657472:134217728:1%20data:4150263808:120919687168:4
The URL carries all needed data, so the device itself does not need to be online. The user can just copy the URL and open it in their browser.
A script that calls ampart can also just redirect stderr to /dev/null if they just want the URL, like the following:
URL=$(ampart /emmc/or/dump --mode webreport 2>/dev/null)
echo "Hey! Your URL is: ${URL}"
The web reporter can also be used by external sources, as long as the passed arguments are valid