Page Menu
Home
GitPull.it
Search
Configure Global Search
Log In
Files
F1466046
Libre BusTO Android Crash Analyzer
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
valerio.bozzolan
Feb 15 2021, 21:24
2021-02-15 21:24:12 (UTC+1)
Size
2 KB
Referenced Files
None
Subscribers
None
Libre BusTO Android Crash Analyzer
View Options
<?php
# Android Crash Dump exporter for Phabricator
# Copyright (C) 2021 Valerio Bozzolan
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
/**
* Quick and dirty Android Crash Dump analyzer
*/
// base of your Phabricator
define
(
'BASE_URI'
,
'https://gitpull.it/maniphest/task/edit/form/3/?'
)
;
// received data
$data_raw
=
$_POST
[
'data'
]
??
null
;
$data_clean_text
=
null
;
$task_args
=
null
;
if
(
$data_raw
)
{
$data
=
@
json_decode
(
$data_raw
)
;
if
(
$data
)
{
$data_raw
=
json_encode
(
$data
,
JSON_PRETTY_PRINT
)
;
// some useful informations
$data_clean
=
[
'version code'
=>
$data
->
APP_VERSION_CODE
??
null
,
'version name'
=>
$data
->
APP_VERSION_NAME
??
null
,
'phone'
=>
$data
->
PHONE_MODEL
??
null
,
'brand'
=>
$data
->
BRAND
??
null
,
'stack'
=>
$data
->
STACK_TRACE
??
null
,
]
;
// build an human phrase
$data_clean_parts
=
[
]
;
foreach
(
$data_clean
as
$k
=>
$v
)
{
$data_clean_parts
[
]
=
"$k:\n$v"
;
}
$data_clean_text
=
implode
(
"\n\n"
,
$data_clean_parts
)
;
// build query string
$task_args
=
[
'title'
=>
"Fix crash when..."
,
'description'
=>
"Dear Developers,\nPlease triage this crash.\n\nHere part of the crash dump:\n\n"
.
'```'
.
"\n$data_clean_text\n"
.
'```'
.
"\n\nThank you! :)\n\n> Generated with https://lab.reyboz.it/libre-busto/crash-report/"
,
]
;
}
else
{
$data_raw
=
'invalid'
;
}
}
?>
<
html>
<
head>
<
title>Libre BusTO - crash report dump
<
/title>
<
/head>
<
body>
<
h1>Libre BusTO - crash report dump
<
/h1>
<
form method="post">
<?php
if
(
$data_clean_text
)
:
?>
<
p>Info:
<
/p>
<
textarea readonly>
<?=
htmlentities
(
$data_clean_text
)
?>
<
/textarea>
<?php
if
(
$task_args
)
:
?>
<
br />
<
a href="
<?=
html_special_chars
(
BASE_URI
.
http_build_query
(
$task_args
)
)
?>
" target="_blank">Create Task
<
/a>
<?php
endif
?>
<
/p>
<?php
endif
?>
<
p>Paste here your bug report:
<
/p>
<
p>
<
textarea name="data">
<?=
htmlentities
(
$data_raw
)
?>
<
/textarea>
<
/p>
<
p>
<
button type="submit">OK
<
/button>
<
/p>
<
/form>
<
hr />
<
p>
<
a href="https://gitpull.it/tag/libre_busto/">Workboard
<
/a>
<
/p>
<
/body>
<
/html>
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
50840
Default Alt Text
Libre BusTO Android Crash Analyzer (2 KB)
Attached To
Mode
P15 Libre BusTO Android Crash Analyzer
Attached
Detach File
Event Timeline
Log In to Comment