GithubHelp home page GithubHelp logo

openorbis / mira-project-archive Goto Github PK

View Code? Open in Web Editor NEW
221.0 84.0 50.0 5.62 MB

The Homebrew Platform

License: GNU General Public License v3.0

Makefile 0.67% C++ 72.39% Assembly 0.88% Python 0.19% C 25.87%

mira-project-archive's Introduction

Mira Project - PlayStation 4 Homebrew Tools

This build is highly experimental, user accessibility and stability will come in the next few weeks

The Mira Project is a set of tools that grants you more power and control over your jailbroken Playstation 4. It is the result of all the hard work by the OpenOrbis team.

It works differently to the custom firmware experience on Playstation 3, where CFW would be installed on the system via modified PUP files (e.g. Rebug), however once the framework is installed and ran it gives users the same functionality they were previously used to.

Build Status

Firmware Version Passing
4.05 Build Status
4.55 Build Status
4.74 Build Status
5.01 Build Status
5.05 Build Status

New Features!

  • Homebrew Enabler (HEN)
  • Emulated Registry (EmuReg)
  • Emulated NVS (EmuNVS)
  • Kernel Debugger
  • Remote GDB
  • System-level FUSE implementation (Experimental, WIP)
  • Load sprx modules + IAT + Function Hooking (Thanks theorywrong)

You can also:

  • Mount and decrypt local gamesaves (Thanks ChendoChap) (WIP)
  • Transfer files to and from the harddrive
  • Implement your own kernel plugins (RPC using protobuf)
  • Implement your own userland trainers (hooks included!)
  • Dump your HDD encryption keys
  • A bunch of other stuff

Contributors

This project would not be possible without these people (no paticluar order):

  • kiwidog - Lead developer
  • flatz - Developer (Code, writeups, non-stop help we <3 u flatz)
  • CrazyVoid - Developer (Loader/self/SDK help, overall general help, OO moderator)
  • theorywrong - Developer (OverlayFS, general)
  • SiSTR0 - Developer (HEN support, general)
  • SocraticBliss - Developer (HEN support, general)
  • valentinbreiz - Developer (Mira Companion App v1)
  • Seremo - Developer (Mira Companion App v2, Log plugin)
  • Al-Azif - Developer (5.05 lead maintainer, general)
  • z80 - Developer (5.05 maintainer)
  • balika011 - Developer (Fixing userland elf loader entry point, general developer)
  • Zer0xFF - Developer (OverlayFS, general)
  • CelesteBlue - Developer (Bugfixes, plugins)
  • Joonie - Developer (Offsets porting 5.01/5.05)
  • AlexAltea - Low level and kernel help (go check out Orbital Emulator)
  • qwertyoruiop - Security (4.55-5.05 kernel exploits)
  • CTurt - Security (Initial payload PS4 SDK and 1.76 kernel exploit)
  • m0rph3us1987 - Developer (Code examples, kernel SDK, overall general help)
  • eeply - Developer (UART)
  • zecoxao - RE (4.74 Port)
  • aerosoul - Developer (Everything elf related, loaders, etc)
  • maxton - Developer (Everything pkg related, etc)
  • ChendoChap - RE (Bug hunting, general kernel help)
  • sugarleaf - Initial 4.55 private exploit, inital help with Mira dev (retired/left)
  • kozarovv - RE (4.05 offsets)
  • LM - RE (Research on System-Library-Loading), assembler and linker script help
  • TheFlow - RE
  • samsepi0l - Offset Porting
  • xvortex - Original VTX-Hen
  • 4much4u - Ptrace patches
  • golden - Ptrace patches, rpc ideas

Special Thanks

  • bigboss - liborbis with examples and orbisdev (and complaining a lot)
  • rogero - Original 5.01 testing
  • AbkarinoMHM - Original 5.01 testing
  • wildcard - General questions, and hardware help
  • frangarcj - orbisdev sdk, musl, C++ support
  • masterzorag - orbisdev sdk, musl, C++ support
  • fjtrujy - orbisdev sdk, musl, C++ support
  • [Anon #1] - Developer (Code, Non-stop help, <3 thx bruv)
  • [Anon #2] - Developer (Code, Non-stop help, gl with job!)
  • [Anon #3] - Security (Future proofing design)
  • [Anon #4] - Developer (Ideas from Vita)
  • [Anon #5] - Security (Software and hardware)

Installation

Checking out repository

In order to start development on the mira-project, you will need a few components installed.

  • clang
  • clang-tidy
  • cppcheck
  • objcopy
  • llvm-ar
  • ld (or lld.ld)
  • git
  • python3 (3.6.9 at time of writing, but any newer version should work)

These can be installed (on Ubuntu, other platforms may vary) by using the command(s): sudo apt install git build-essential clang lldb clang-tidy clang-tools cppcheck

Cloning the repository

Cloning the repository is easily done by: git clone https://github.com/kiwidoggie/miracpp.git

Protobuf files

The RPC messaging system leverages protobuf in order to easily expand and add cross-language RPC support. This involves 2 major components for the default build. Due to previous dependencies, we are not using the C++ version of protobuf due to not having a full STL runtime in the kernel (it was too much work/effort) so instead we are leveraging the protobuf-c project.

Installing protobuf-c

Installing protobuf-c should only need to be done once, there is support for proto3 files at this time and should not be an issue (compared to previous which only supported proto2).

You can follow the protobuf build instructions located here

Building the protobuf file definitions + fixing them

Currently there is a script that will handle most of the work required for building new protobuf files. From the ROOT of the cloned directory (miracpp/) you can use the provided python script for generating new protobuf files.

python3 ./scripts/build_proto.py --inputDir=./external

By default the script will only run in the local directory it was called from. This behavior can be changed with command line argument overrides:

--inputDir=<input directory> --outputDir=<output directory> (otherwise use the input directory as default)

The vscode tasks.json can be configured to do this automatically in the project repository

{
            "label": "Build protobuf files",
            "type": "shell",
            "command": "python3 ./scripts/build_proto.py --inputDir=./external",
            "group": "build",
            "problemMatcher": [
                "$gcc"
            ]
        }

The script takes care of generating the .c/.h files, as well as the C# (.cs) counterparts for use with the MiraLib/API.

Moving and fixing the .c includes

This part has not been scripted yet, because if someone were to add a new proto file, they would have to manually update the script.

Moving the protobuf files

At the time of writing, the default protobuf files that are generated inside of the <miracpp root>/external will need to be moved

File Intended Location
external/debugger_structs.pb-c.(c/h) src/Plugins/Debugger
external/debugger.pb-c.(c/h) src/Plugins/Debugger
external/filemanager.pb-c.(c/h) src/Plugins/FileManager
external/debugger_structs.pb-c.(c/h) src/Plugins/Debugger
external/rpc.pb-c.(c/h) src/Messaging/Rpc
Fixing the moved protobuf files include paths

In order to prevent linking issues due to the new moved file locations, you will manually have to update the include paths (until the python script supports fixing them on it's own, psst feel free to submit a PR for it)

File Unpatched Include Location Patched Include Location
src/Messaging/Rpc/rpc.pb-c.c #include "external/rpc.pb-c.h" #include "rpc.pb-c.h"
src/Plugins/FileManager/filemanager.pb-c.c #include "external/filemanager.pb-c.h" #include "filemanager.pb-c.h"
src/Plugins/Debugger/debugger.pb-c.c #include "external/debugger.pb-c.h" #include "debugger.pb-c.h"
src/Plugins/Debugger/debugger_structs.pb-c.c #include "external/debugger_structs.pb-c.h" #include "debugger_structs.pb-c.h"

So you get the idea, change the include path to the "local" path of the header file. The actual .h file should be fine as-is.

(Optional) Manually fix the C# protobuf files

If you did not use the python script, the C# files will not be automatically fixed for you. There is an issue with modern versions of C# and the output that protobuf generates for .cs files.

By default protobuf generates the C# files looking like so (which cause a build error on .net core)

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  public void MergeFrom(pb::CodedInputStream input) {
    uint tag;
    while ((tag = input.ReadTag()) != 0) {
      switch(tag) {
        default:
          if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) {
            return;
          }
          break;
        case 10: {
          Message = input.ReadString();
          break;
        }
      }
    }
  }

This needs a very simple fix in order to build in modern .net core, a line change from:

if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input)) {
            return;
          }

to

_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
          break;

And you can include this anywhere in your C# project and begin to use extension methods to add them to MiraConnection for usage in your own application.

Source code layout

The current miracpp repository is self-contained, meaning everything the project depends on should be within the repo itself. Here is a layout of the source repository (all from root of miracpp directory)

Directory Purpose
build Working/output build files, as well as final executables and payloads
docs Documentation about PlayStation 4/Mira twiddly bits
external External resources, contains freebsd-headers (MODIFIED FOR KERNEL/PS4 USAGE), hde64 for disassembly, protobuf-c for protobuf handling, *.proto protobuf files to be generated into source
loader This is the MiraLoader which is required to properly relocate the main ELF in kernel memory and execute in a new kernel thread
(Optional/Missing) protobuf-test Test project for protobuf serialization on Linux
scripts Build/Helper scripts
src Main source code
src/Boot Contains everything needed for booting Mira/patching consoles (firmware specific implementations)
src/Driver The device driver code (used for user process ioctl, thanks TW for implementing)
src/External Source files for those headers in external
src/Messaging Message manager (protobuf handling and RPC)
src/OrbisOS PlayStation 4 specific code and utilities
src/Plugins All kernel mode plugins + RPC handlers
(Deprecated) src/Trainers Trainer launcher source
src/Utils General Mira based utilities for working in kernel (kernel function resolving, syscall wrappers, etc)

Plugins

Mira provies a plugin framework that can run in kernel mode (userland is soon, thanks to TW!), it provies a stable framework for startup, shutdown, suspend, resume in order to ensure clean operation of Mira.

Plugin Directory
Debugger src/plugins/Debugger
(WIP) Emulated Registry src/plugins/EmuRegistry
Fake PKG src/plugins/FakePKG
Fake Self src/plugins/FakeSELF
File Manager src/plugins/FileManager
(WIP) Fuse src/plugins/FuseFS
Log Server src/plugins/LogServer
OverlayFS (OrbisAFR) src/plugins/OverlayFS

Development

Want to contribute? Great! There is no set limit on contributors and people wanting to help out in any way!

Join the OpenOrbis discord and have knowledge of C/C++ and FreeBSD or unix-like operating systems, web design and programming, rust-lang, content creator (youtube, twitch), or artist, or just want to find something to help out with like documentation, hosting, etc, kernel experience is a plus but not required by any means.

Building from source

After following the instructions on cloning the repository and generating and fixing the protobuf files, you should be ready to build Mira from source. It was designed to be as easy as possible to build with the provided makefiles.

Each makefile (for MiraLoader, and Mira itself) follow a specific format due to compilers ignoring most changes in header (.h) files causing issues down the line.

In order to create the proper build directory output (so you don't get "directory not found errors") is done with make create this will generate the proper folder structure that's required to build Mira.

After this is done, then you will need to make clean which will clean up old object files (.o), payloads (.bin), and elf files. Without doing this, any changes you make in the headers will not be cleaned up and you will be wondering why you are getting a kernel panic on correct code (due to offset change or what not, that you can verify yourself in the binary)

Finally build Mira, this will automatically build everything into the specified build directory using the default MIRA_PLATFORM target. You are able to override these options in both MiraLoader and Mira using MIRA_PLATFORM=<specified platform> make for your specific platform. (this works with make clean, make create as well)

Available Overrides Description
MIRA_PLATFORM Changes firmware version that MiraLoader/Mira targets, they must match for your firmware you are building for
BSD_INC freebsd-headers include path, defaults to external/freebsd-headers/include
OUT_DIR Output directory, defaults to build

There is a list of available platforms that Mira can be configured with located in src/Boot/Config.hpp for the most up-to-date, but as of writing here is the available list.

Support Status Description
Unsupported May build, may not, previously was updated but no active updating
Supported Active updating and testing, as well as producing builds on CI
No Support No real support added, needs developer work to become functional + stable
Available Platforms Firmware
MIRA_PLATFORM_ORBIS_BSD_176 (Unsupported) 1.76
MIRA_PLATFORM_ORBIS_BSD_355 (Unsupported) 3.55
MIRA_PLATFORM_ORBIS_BSD_400 (Unsupported) 4.00
MIRA_PLATFORM_ORBIS_BSD_405 (Supported) 4.05
MIRA_PLATFORM_ORBIS_BSD_407 (Unsupported) 4.07
MIRA_PLATFORM_ORBIS_BSD_455 (Supported) 4.55
MIRA_PLATFORM_ORBIS_BSD_474 (Unsupported) 4.74
MIRA_PLATFORM_ORBIS_BSD_500 (Unsupported) 5.00
MIRA_PLATFORM_ORBIS_BSD_501 (Unsupported) 5.01
MIRA_PLATFORM_ORBIS_BSD_503 (Unsupported) 5.03
MIRA_PLATFORM_ORBIS_BSD_505 (Supported) 5.05
MIRA_PLATFORM_ORBIS_BSD_550 (No Support) 5.50
MIRA_PLATFORM_ORBIS_BSD_553 (No Support) 5.53
MIRA_PLATFORM_ORBIS_BSD_555 (No Support) 5.55
MIRA_PLATFORM_ORBIS_BSD_600 (No Support) 6.00
MIRA_PLATFORM_ORBIS_BSD_620 (Unsupported) 6.20
MIRA_PLATFORM_ORBIS_BSD_650 (Unsupported) 6.50

Provided are some VSCode tasks.json formats:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build Mira",
            "type": "shell",
            "command": "make clean;make create;make",
            "group": "build",
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "Build MiraLoader",
            "type": "shell",
            "command": "cd loader;make clean;make create;make",
            "group": "build",
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "Build protobuf-tests",
            "type": "shell",
            "command": "clang protobuf-c.c rpc.pb-c.c filemanager.pb-c.c main.c -o test.elf",
            "group": "build",
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "Build protobuf files",
            "type": "shell",
            "command": "python3 ./scripts/build_proto.py --inputDir=./external",
            "group": "build",
            "problemMatcher": [
                "$gcc"
            ]
        }
    ]
}

And here is an example VSCode c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Mira",
            "includePath": [
                "${workspaceFolder}/**",
                "${workspaceFolder}/src",
                "${workspaceFolder}/external/freebsd-headers/include"
            ],
            "defines": [
                "_KERNEL",
                "MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_501",
                "__LP64__=1",
                "_M_X64",
                "__amd64__",
                "_DEBUG",
                "__BSD_VISIBLE",
                "MIRA_UNSUPPORTED_PLATFORMS"
            ],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c11",
            "cppStandard": "c++11",
            "intelliSenseMode": "clang-x64"
        },
        {
            "name": "MiraLoader",
            "includePath": [
                "${workspaceFolder}/**",
                "${workspaceFolder}/loader",
                "${workspaceFolder}/external/freebsd-headers/include"
            ],
            "defines": [
                "_KERNEL",
                "MIRA_PLATFORM=MIRA_PLATFORM_ORBIS_BSD_501",
                "__LP64__=1",
                "_M_X64",
                "__amd64__",
                "_DEBUG",
                "__BSD_VISIBLE",
                "MIRA_UNSUPPORTED_PLATFORMS"
            ],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c11",
            "cppStandard": "c++11",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}

Firmware porting guide

Lets say you are an eager developer, even a newbie that wants to try and contribute in some way or form to porting to a firmware that is not under active support. Here's the steps you would need to accomplish new builds from scratch. We will start by adding a non-existent firmware and work our way from that.

NOTE: This assumes you already have a kernel dump for your firmware, and things already labeled. If you need help with this step, you can ask in #help on the discord but you are pretty much on your own.*

WARNING: DO NOT SEND YOUR DUMPED KERNEL IN THE CHANNEL/DISCORD SERVER AS IT IS COPYRIGHTED MATERIALS AND YOU WILL BE WARNED/BANNED!!

Lets assume our firmware is 8.88 found in the PlayStation 4 System Software menu.

  1. Add your new firmware to src/Boot/Config.hpp you will see a bunch of defines already there, add your firmware in the correct version order a. #define MIRA_PLATFORM_ORBIS_BSD_888 888
  2. Fix any structure changes for the kernel in freebsd-headers. You should compare against what's already there and add fields that have been added via a. #if MIRA_PLATFORM==MIRA_PLATFORM_ORBIS_BSD_888 b. HINT: These are usually done in struct proc, struct thread, struct ucred if applicable, located in exernal/freebsd-headers/include.
  3. Add a new static function in src/Boot/Patches.hpp with your pre-boot patches, this will be called after MiraLoader finishes and before Mira runs a. static void install_prerunPatches_888();
  4. Add your firmwares version to the case within install_prePatches in src/Boot/Patches.cpp a. case MIRA_PLATFORM_ORBIS_BSD_888: install_prerunPatches_888(); break;
  5. Next create a new file named Patches888.cpp inside of src/Boot/Patches directory (or copy an existing one and rename it)
  6. You must follow the same format as all of the other patch files, this involves including the Patches.hpp and defining the install_prerunPatches_888() function with all needed patches a. As new features are added, this will need to be updated for any kernel patches required, so far a baseline is Enable UART, Verbose Kernel Panics, Enable RWX mappings, Enable MAP_SELF, Patching copy(in/out)(str) checks, patching memcpy checks, patching ptrace checks, patching setlogin (for autolaunch check), patch mprotect to allow RWX, patching pfs signature checking, patching to enable debug rifs, patch to enable all logs to console, (newer fws: disable sceverifier, delayed panics) b. All patches are required for full functionality, but to get up and running only the rwx patches, copy(in/out)(str), memcpy, mprotect patches are needed (I think, someone correct documentation + send PR if wrong).
  7. Add support to the MiraLoader by copying the newly finished src/Boot/Patches.cpp to loader/src/Boot/Patches.cpp and the new src/Boot/Patches/Patches888.cpp to loader/src/Boot/Patches/Patches888.cpp
  8. Next would be to create a new kernel symbol file in src/Utils/Kdlsym/Orbis888.hpp or copy one from a supported platform (more offsets than what's probably needed)
  9. Add support by modifying src/Utils/Kdlsym.hpp and adding either within #if defined(MIRA_UNSUPPORTED_PLATFORMS) before the #endif a line for your firmware file (make sure these are in numeric order) #elif MIRA_PLATFORM==MIRA_PLATFORM_ORBIS_BSD_888 #include "Kdlsym/Orbis888.hpp"
  10. The next step would be finding all of the functions that Mira/MiraLoader use in the kernel... This is the most time consuming portion of this and will need to be verified before upstreamed. The easiest way to handle this is to try building (using the build instructions provided) you will get a massive ton of errors around kdlsym and it not being able to find errors. One of such errors are shown as such:
src/External/protobuf-c.c: In function ‘protobuf_c_message_unpack’:
src/Utils/Kdlsym.hpp:49:52: error: ‘kdlsym_addr_printf’ undeclared (first use in this function)
 #define kdlsym(x) ((void*)((uint8_t *)&gKernelBase[kdlsym_addr_ ## x]))
  1. (continued) This means if you break it down, that printf was undeclared, look in your kernel dump with a dissassembler of choice (Ghidra/IDA Preferred, untested with others such as Binary Ninja, Relyze) and get the offset from the start of the loading address for the function printf (Calculated by Function Address - Base Address of Kernel where it was dumped from) and add it to your src/Utils/Kdlsym/Orbis888.hpp with the line #define kdlsym_addr_printf 0x<offset address> and repeat for all other build errors.
  2. Once complete you should have a full port to a new firmware completed (unless I missed a step/something unclear, create issue or fix + PR please)

TODOs

  • Clean kernel rebooting support
  • Web browser activation
  • Fake Online (spoof for LAN usage)
  • Game dumping and decryption
  • FakeDEX support
  • Linux loader
  • Embedded builds into loader
  • Remote registry

License

GPLv3

Free Software, Hell Yeah!

mira-project-archive's People

Contributors

abkarinomhm avatar ambrias avatar balika011 avatar cryptogenic avatar eeply avatar jbdabes avatar joonie86 avatar kiwidoggie avatar mathieulh avatar rogero- avatar senaxx avatar sugarleaf avatar valentinbreiz avatar wovelon avatar zer0xff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mira-project-archive's Issues

Mira Plugin Example don't compile

well, atm, i try a lot of things, but the problem still the freebsd headers, he can't find types.h, and i updated all dirs and etc... and still giving it.

Compiling src/example_plugin.c ...
Using built-in specs.
COLLECT_GCC=gcc
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 7.3.0-19' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Debian 7.3.0-19)
COLLECT_GCC_OPTIONS='-I' 'src' '-I' '../../Dependencies/oni-framework/include' '-I' '../../Dependencies/freebsd-headers/include' '-D' '_KERNEL' '-D' '_DEBUG=1' '-std=c11' '-v' '-O2' '-fno-builtin' '-nostartfiles' '-nodefaultlibs' '-nostdlib' '-nostdinc' '-fcheck-new' '-ffreestanding' '-fno-strict-aliasing' '-fno-exceptions' '-fno-asynchronous-unwind-tables' '-Wall' '-m64' '-fPIC' '-Werror=implicit-function-declaration' '-Wno-unknown-pragmas' '-c' '-o' 'build/src/example_plugin.o' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-linux-gnu/7/cc1 -quiet -nostdinc -v -I src -I ../../Dependencies/oni-framework/include -I ../../Dependencies/freebsd-headers/include -imultiarch x86_64-linux-gnu -D _KERNEL -D _DEBUG=1 src/example_plugin.c -quiet -dumpbase example_plugin.c -m64 -mtune=generic -march=x86-64 -auxbase-strip build/src/example_plugin.o -O2 -Wall -Werror=implicit-function-declaration -Wno-unknown-pragmas -std=c11 -version -fno-builtin -fcheck-new -ffreestanding -fno-strict-aliasing -fno-exceptions -fno-asynchronous-unwind-tables -fPIC -o /tmp/ccqXmRLi.s
GNU C11 (Debian 7.3.0-19) version 7.3.0 (x86_64-linux-gnu)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
#include "..." search starts here:
#include <...> search starts here:
src
../../Dependencies/oni-framework/include
../../Dependencies/freebsd-headers/include
End of search list.
GNU C11 (Debian 7.3.0-19) version 7.3.0 (x86_64-linux-gnu)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 12baff07501e62a0e90bffe2cbcaf8cf
In file included from ../../Dependencies/oni-framework/include/oni/plugins/plugin.h:2:0,
from src/example_plugin.h:2,
from src/example_plugin.c:1:
../../Dependencies/oni-framework/include/oni/utils/types.h:2:10: fatal error: types.h: No such file or directory
#include <types.h>

Request for dedicated testers

mira-project currently needs testers with various PS4 models to run testing builds of Mira and also test new features and also be able to report bugs, and ensure that there is consistency across all of the versions.

We need

  • 3.55
  • 4.05
  • 4.55
  • 5.05

Implement Settings

Once 1.2 is rolled out, and being work is being started on 1.3, we need to look at all Mira's features and be able to have an easy way to get global feature sets.

Unable to build MiraFileTransferPlugin

i'm getting the following error while trying to build MiraFileTransferPlugin project

2> C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Application Type\Linux\1.0\Linux.Makefile.Targets(143,5): error : cd ~/mira/Firmware/Plugins/MiraFileTransferPlugin;make create;make exited with code 2

DLL API

An API via DLL to interface with Mira and manage memory.

App Persistent Storage

Mira would be a nice middle-man for homebrew apps to use for persistent storage. Each homebrew app could have a unique identifier which Mira would read and provide an API to the app to read/write from/to it's unique persistence directory.

This allows homebrews to use persistent storage without making an absolute mess of the filesystem by keeping it neat and organized via Mira.

Trainer SDK

Currently there is a prototype Trainer SDK that will need to be more fleshed out at a later date

A Sudden PowerOff

After I use the patch,I go inside the debug menu.I wanna try out all of the function.
But when I enters to the package installer,the screen goes black.and I realize my console has power off.
I didn't plug in a extrnal drive ofcourse,because i was trying the functions.Is thats where the problem happens?If so I suggest to add a drive detection so this won't happen again.

OverlayFS : Union patch0 cause kernel panic

Hi !
I have worked on OverlayFS, that work with app0 (1.00) only (i use 1.00 even if a update exist for now).

The PoC work without problem, but when you try to implement patch0 in the app0 folder the kernel panic.

Stange things append:
union of app0 => patch0 (Work)
union of app0 => mod0 (Work)
union of app0 => mod0 => patch0 (Work)
union of app0 => patch0 => mod0 (Panic)

(last folder is the "main" folder, all file in this have the highest priority)

patches for 4.7x

Firstly thanks for all your work!
Then, I can't update to 5.xx, so I will need a version for 4.7x. How can I find the values for the patches? Do I need an exploit to dump kernel and look at it?
Thanks a lot again

Kernel Debugger

Mira works, Protobuf Works, Go Time. If you are like me, you absolutely hate the 4 minutes it takes for the console to do it thang. I've invested in a a SSD to make the process slighly less painful, but it's still very painful. No more bloodshed. This is just a mental dump of stuff that I find annoying each time I go to work on something.

Command - Description

  • version - Gets Mira's version, the target OS version (kernel string for Orbis, build info on FreeBSD, lsb_release on deb)

  • time - Get's targets run time

  • attach - Attaches to a (user/kernel) process, or kernel thread

  • detach - Detaches from process

  • kill - Kills attached process (sends signal if argument provided)

  • restart - Restarts process (if launched from dev mode), or console (if debugging kernel)

  • reboot - Reboots the console

  • echo - Prints to console

  • sym - Search for a symbol (exact)

  • lssym - List symbols near provided address

  • reload - Reloads entire debugee state (ghetto hack to re-initalize everything)

  • ldreload - Reloads entire debugee/symbols state from provided ELF (dangerous)

  • lsmodules - Lists all modules

Features:

  • Source line debugger

  • Structure building

  • COM/UART/NET remote connections (external programs using a wrapper to Read/WriteProcessMemory ie, reclass.net)

  • Code rewinding and replaying

  • Hardware breakpoint support

  • Proper XMM support

  • Edit and Continue

  • Crash recovery

  • Radare2 Support

  • IDA Support

  • Binary Ninja Support

Delete star

Hi, I don't really know if this is the place to mention this, but a while ago I jailbroke a ps4 and found I kept losing game save data. I finally found the reason was that when I select a game to delete, and press the delete "star" buttton, not only the selected game and accompanying data is deleted, but game save data for every game is deleted, without any warning.

To me this is a bug. I restarted a lot of games (such as Shadow of Colussus and No Man's Sky) and replayed the same parts over and over to try to get to the point I had reached before I lost the data until eventually it just became a chore and the games were ruined.

Localization

We also need dedicated people to help with the localization process of Mira + Toolkit

Compilation error - undefined reference to `__stack_chk_fail'

I get the following when trying to compile Mira on an up-to-date Archlinux system. Any ideas?

pepetheprawn% ./init_development_environment.sh 
Please choose a firmware:
\t[0] 5.01 Firmware
\t[1] 5.05 Firmware
Option? 1
-----------------------------------------------
Installing Mira with firmware '5.05' selected...
-----------------------------------------------
Creating directories...
Cleaning project...
Compiling src/oni/utils/utils.s ...
Compiling src/oni/utils/memory/syscall.s ...
Compiling src/oni/messaging/messagecategory.c ...
Compiling src/oni/messaging/message.c ...
Compiling src/oni/messaging/messagemanager.c ...
Compiling src/oni/rpc/rpcconnection.c ...
Compiling src/oni/rpc/rpcserver.c ...
Compiling src/oni/utils/dynlib.c ...
Compiling src/oni/utils/kdlsym.c ...
Compiling src/oni/utils/log/logger.c ...
Compiling src/oni/utils/sys_wrappers.c ...
Compiling src/oni/utils/lock.c ...
Compiling src/oni/utils/memory/install.c ...
Compiling src/oni/utils/memory/allocator.c ...
Compiling src/oni/plugins/pluginmanager.c ...
Compiling OniFramework...
Creating directories...
Cleaning project...
Compiling src/crt0.s ...
Compiling src/entrypoint.c ...
Compiling src/mira/boot/patches/patches505.c ...
Compiling src/mira/boot/patches/patches501.c ...
Compiling src/mira/boot/patches.c ...
Compiling src/mira/utils/hook.c ...
Compiling src/mira/utils/hde/hde64.c ...
Compiling src/mira/plugins/filetransfer/filetransfer_plugin.c ...
Compiling src/mira/plugins/logserver/logserver_plugin.c ...
Compiling src/mira/plugins/pluginloader.c ...
Compiling src/mira/plugins/debugger/debugger_plugin.c ...
Compiling MiraFW...
/usr/bin/ld: build/src/entrypoint.o: in function `mira_entry':
entrypoint.c:(.text+0xd8): undefined reference to `__stack_chk_fail'
/usr/bin/ld: build/src/mira/utils/hook.o: in function `hook_create':
hook.c:(.text+0x102): undefined reference to `__stack_chk_fail'
/usr/bin/ld: build/src/mira/utils/hook.o: in function `hook_enable':
hook.c:(.text+0x1b8): undefined reference to `__stack_chk_fail'
/usr/bin/ld: build/src/mira/plugins/filetransfer/filetransfer_plugin.o: in function `filetransfer_stat_callback':
filetransfer_plugin.c:(.text+0x2d9): undefined reference to `__stack_chk_fail'
/usr/bin/ld: build/src/mira/plugins/filetransfer/filetransfer_plugin.o: in function `filetransfer_read_callback':
filetransfer_plugin.c:(.text+0x6d3): undefined reference to `__stack_chk_fail'
/usr/bin/ld: build/src/mira/plugins/filetransfer/filetransfer_plugin.o:filetransfer_plugin.c:(.text+0x9c2): more undefined references to `__stack_chk_fail' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:82: MiraFW_Orbis.elf] Error 1
-----------------------------------------------
Done!

1.2.64 Baseline Testing

In order to ensure that everything is ready to get mainlined, consult https://ci.appveyor.com/project/kiwidoggie/mira-project/build/1.2.61

for your respective versions and write below

BUILD : 1.2.61
FW: 5.05/5.01/4.55/4.05
DESCRIPTION :
(Mira)
Suspend/resume : Working/Freeze/Panic
Shutdown : Working/Freeze/Panic
(Mira+HEN)
Suspend/resume : Working/Freeze/Panic
Shutdown : Working/Freeze/Panic

@OpenOrbis/testers-405 : https://ci.appveyor.com/project/kiwidoggie/mira-project/build/1.2.61/job/ergnnny9g6x3vgi8/artifacts

@OpenOrbis/testers-455 https://ci.appveyor.com/project/kiwidoggie/mira-project/build/job/lyxm4q6ejbaxyplo/artifacts

@OpenOrbis/testers-505 https://ci.appveyor.com/project/kiwidoggie/mira-project/build/job/spo1o7jkx0bg3x9x/artifacts

Lifting screenshot restrictions

I would like to request a feature to lift screenshot restrictions in applications. Many games forbid you from taking screenshots during movies and cutscenes, Persona 5 specifically doesn't let you screenshot anywhere at all. I love taking screenshots and its sad that I'm unable to without capture card.

Awaiting payload...

When running mira it say's "awaiting payload..." have tried enabling Hen via payload sender also tried to inject the mira bin but no success.

Hope

Can this be ported to 5.53?

Compilation error

When execute /init_development_environment.sh return?:

cc1: error: command line option ‘-fcheck-new’ is valid for C++/ObjC++ but not for C [-Werror]
cc1: all warnings being treated as errors
Makefile:72: recipe for target 'build/src/oni/utils/sys_wrappers.o' failed
make: *** [build/src/oni/utils/sys_wrappers.o] Error 1
Creating directories...
Cleaning project...
Compiling src/crt0.s ...
Compiling src/mira/utils/hook.c ...
cc1: error: command line option ‘-fcheck-new’ is valid for C++/ObjC++ but not for C [-Werror]
cc1: all warnings being treated as errors
Makefile:87: recipe for target 'build/src/mira/utils/hook.o' failed
make: *** [build/src/mira/utils/hook.o] Error 1

SAVES DELETING

Every-time i turn off the console and leave it for a bit then come back it deletes my saves. I was thinking it's the REST mode bug, but it's happening outright when turning off console then coming back.

anything i can do to give more info, just let me know

Error compiling

I'm using the git clone --recurse-submodules https://github.com/OpenOrbis/mira-project.git, I did the make create as the Developer Guide but when I run make I get the following error.

/opt/mira-project/Firmware/Dependencies/oni-framework# make
Compiling src/oni/utils/memory/syscall.s ...
Compiling src/oni/utils/utils.s ...
Compiling src/oni/rpc/rpcserver.c ...
In file included from src/oni/rpc/rpcserver.c:1:0:
include/oni/rpc/rpcserver.h:6:23: fatal error: sys/types.h: No such file or directory
#include <sys/types.h>
^
compilation terminated.
Makefile:72: recipe for target 'build/src/oni/rpc/rpcserver.o' failed
make: *** [build/src/oni/rpc/rpcserver.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.