Example #1
0
        public static void Filter()
        {
            _colorify.Clear();

            try
            {
                Section.Header("LOGCAT", "FILTER");

                Section.SelectedFile();
                Section.SelectedPackageName();

                _colorify.BlankLines();
                _colorify.WriteLine($" Write filter.", txtPrimary);

                _colorify.BlankLines();
                _colorify.WriteLine($"{"[EMPTY] Remove",82}", txtWarning);

                Section.HorizontalRule();

                _colorify.Write($"{" Write your choice: ",-25}", txtInfo);
                string opt = Console.ReadLine().Trim();
                _config.personal.logcat.filter = $"{opt}";

                Menu.Status();
                SelectLogcat();
            }
            catch (Exception Ex)
            {
                Exceptions.General(Ex);
            }
        }
Example #2
0
        public static void Values()
        {
            _colorify.Clear();

            try
            {
                Section.Header("FILE", "INFORMATION");
                Section.SelectedFile();

                string dirPath = _path.Combine(_config.path.development, _config.path.workspace, _config.path.project, _config.personal.selected.project, _config.project.androidPath, _config.project.androidBuildPath, _config.personal.selected.path, _config.personal.selected.file);

                _colorify.BlankLines();
                _colorify.WriteLine($" --> Dump Badging...", txtInfo);
                CmdInformation(dirPath);

                _colorify.BlankLines();
                _colorify.WriteLine($" --> Signer Verify...", txtInfo);
                CmdSignerVerify(dirPath);

                if ((OS.IsWin() && Variables.Valid("signcheck")) || OS.IsMac())
                {
                    Response result = CmdSha(dirPath);
                    if (result.code == 0)
                    {
                        _colorify.BlankLines();
                        _colorify.WriteLine($" --> File Hash...", txtInfo);

                        _colorify.BlankLines();
                        _colorify.Write($" SHA256: ", txtMuted);
                        _colorify.WriteLine($"{result.stdout}");
                    }
                }

                Section.HorizontalRule();
                Section.Pause();

                Menu.Start();
            }
            catch (Exception Ex)
            {
                Exceptions.General(Ex);
            }
        }
Example #3
0
        public static void SelectLogcat()
        {
            _colorify.Clear();

            try
            {
                Section.Header("LOGCAT");

                Section.SelectedFile();
                Section.SelectedPackageName();

                _colorify.BlankLines();
                string logcatPriority = Selector.Name(Selector.Priority, _config.personal.logcat.priority);
                _colorify.Write($"{" [P] Priority:",-25}", txtPrimary); _colorify.WriteLine($"{logcatPriority}");
                _colorify.Write($"{" [F] Filter:",-25}", txtPrimary); _colorify.WriteLine($"{_config.personal.logcat.filter}");

                _colorify.BlankLines();
                _colorify.Write($"{" [S] Show All",-17}", txtPrimary);
                _colorify.Write($"{" [A] Application",-51}", txtPrimary);
                _colorify.WriteLine($"{"[EMPTY] Cancel",-17}", txtDanger);

                Section.HorizontalRule();

                _colorify.Write($"{" Make your choice:",-25}", txtInfo);
                string opt = Console.ReadLine()?.ToLower();

                if (String.IsNullOrEmpty(opt))
                {
                    Menu.Start();
                }
                else
                {
                    Menu.Route($"al>{opt}", "al");
                }
                Message.Error();
            }
            catch (Exception Ex)
            {
                Exceptions.General(Ex);
            }
        }
Example #4
0
        public static void Install()
        {
            _colorify.Clear();

            try
            {
                Section.Header("INSTALL FILE");
                Section.SelectedFile();

                string dirPath = _path.Combine(_config.path.development, _config.path.workspace, _config.path.project, _config.personal.selected.project, _config.project.androidPath, _config.project.androidBuildPath, _config.personal.selected.path, _config.personal.selected.file);

                _colorify.BlankLines();
                _colorify.WriteLine($" --> Checking devices...", txtInfo);
                if (CmdDevices())
                {
                    _colorify.BlankLines();
                    _colorify.WriteLine($" --> Installing...", txtInfo);
                    Response result = CmdInstall(dirPath, _config.personal.adb.deviceName);
                    if (result.code == 0)
                    {
                        _colorify.BlankLines();
                        _colorify.WriteLine($" --> Launching...", txtInfo);
                        CmdLaunch(dirPath, _config.personal.adb.deviceName);
                    }

                    Section.HorizontalRule();
                    Section.Pause();
                }
                else
                {
                    Message.Alert(" No device/emulators found");
                }

                Menu.Start();
            }
            catch (Exception Ex)
            {
                Exceptions.General(Ex);
            }
        }
Example #5
0
        public static void Duplicate()
        {
            _colorify.Clear();

            try
            {
                Section.Header("PROJECT", "DUPLICATE FILE");
                Section.SelectedFile();

                string dirPath = _path.Combine(
                    _config.path.development,
                    _config.path.workspace,
                    _config.path.project,
                    _config.personal.selected.project,
                    _config.project.androidPath,
                    _config.project.androidBuildPath
                    );

                _colorify.BlankLines();
                _colorify.WriteLine($" Write a new name, without include his extension.", txtPrimary);

                _colorify.BlankLines();
                _colorify.WriteLine($"{"[EMPTY] Cancel",82}", txtDanger);

                Section.HorizontalRule();

                _colorify.Write($"{" Make your choice: ",-25}", txtInfo);
                string opt = Console.ReadLine().Trim();

                if (!String.IsNullOrEmpty(opt))
                {
                    string sourceFileName = _path.Combine(
                        dirPath,
                        _config.personal.selected.path,
                        _config.personal.selected.file
                        );
                    string destFileName = _path.Combine(
                        dirPath,
                        $"{opt}{_config.project.androidBuildExtension}"
                        );
                    System.IO.File.Copy(sourceFileName, destFileName);
                    if (_config.personal.selected.mappingStatus)
                    {
                        sourceFileName = _path.Combine(
                            dirPath,
                            _config.personal.selected.path,
                            _config.personal.selected.mapping
                            );
                        destFileName = _path.Combine(
                            dirPath,
                            $"{opt}{_config.project.androidMappingSuffix}"
                            );
                        System.IO.File.Copy(sourceFileName, destFileName);
                    }
                    _config.personal.selected.path    = "";
                    _config.personal.selected.file    = $"{opt}{_config.project.androidBuildExtension}";
                    _config.personal.selected.mapping = $"{opt}{_config.project.androidMappingSuffix}";
                }

                Menu.Start();
            }
            catch (Exception Ex)
            {
                Exceptions.General(Ex);
            }
        }