Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8124bd4 authored by Felipe Leme's avatar Felipe Leme
Browse files

Added device name to bugreport file.

New format is now: bugreport-DEVICE-BUILD-TIMESTAMP

Fixes: 33257711

Test: manual verification
Test: dumpstate_test passes
Change-Id: Id5abf30c7beeeb4f5b2fcc7219673ea3e7a20478
parent 2fa72360
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1505,7 +1505,10 @@ int main(int argc, char *argv[]) {

    if (is_redirecting) {
        ds.bugreport_dir_ = dirname(use_outfile);
        ds.base_name_ = basename(use_outfile);
        std::string build_id = android::base::GetProperty("ro.build.id", "UNKNOWN_BUILD");
        std::string device_name = android::base::GetProperty("ro.product.device", "UNKNOWN_DEVICE");
        ds.base_name_ = android::base::StringPrintf("%s-%s-%s", basename(use_outfile),
                                                    device_name.c_str(), build_id.c_str());
        if (do_add_date) {
            char date[80];
            strftime(date, sizeof(date), "%Y-%m-%d-%H-%M-%S", localtime(&ds.now_));