Homebrew WIP JTegraNX - Another RCM payload injector

DylanWedman

Well-Known Member
OP
Newcomer
Joined
Jun 16, 2019
Messages
68
Trophies
0
Age
22
XP
307
Country
United States
banner.png

JTegraNX - Another RCM payload injector

To run this program, you need Java 8 or higher installed on your computer. You can download Java here.

JTegraNX is supported on Windows, Linux, and Mac OS X.

Preview

Download: https://github.com/dylwedma11748/JTegraNX/releases

Features

  • RCM payload injection
  • Auto-injection
  • RCM status indicator with transparent images
  • Config system (similar to favorites in TegraRcmGUI)
  • Bundled payloads
  • Tray icon with functionality
  • SD card preparation
  • APX driver detection/installation
  • Portable mode
  • Command-line mode
Usage
Normal mode:
  • Launch JTegraNX.jar normally to use the UI mode. Then select a payload and inject or use the other features if needed.
Command-line mode:
  • Launch JTegraNX.jar from the command line like this:
    • java -jar JTegraNX.jar -cml
Linux support
Linux support has been added in v1.6.6, to use JTegraNX on Linux some preparation may be required.
  • JTegraNX on Linux must either be run as root or with udev rules configured. To configure your udev rules, follow this guide.
  • Payload injection on Linux requires the RCM device to connect to a port handled by xhci_hcd or a port with a patched EHCI driver.
    • My way of getting past this was creating an Ubuntu 21.04 VM in VMware with USB 3.1 enabled.
Mac OS X support
Mac OS X support has been added in v1.6.7, some things to take note of though.
  • While JTegraNX's core functionality worked in my testing on a VM, I ran into some issues. You may or may not encounter these.
    • If you try to use the browse payload function or prepare SD card function and it fails, open JTegraNX using the terminal and check for errors. If you receive this error or something similar to it:
      • java[2748:110752] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted
      • This error occurs when trying to open the FileChooser or DirectoryChooser respectively, I don't know what's causing it, but I know that it's an issue with Mac OS X, not JTegraNX. I've seen on a thread that someone encountered the same kind of issue while using OBS Studio on Mac OS X. For me, it could be that I was running Catalina in a VM but I'm not sure because I don't own a Mac.
    • When a notification gets sent to the tray, it doesn't show JTegraNX's icon. While a minor issue, I'd prefer it did.
  • JTegraNX on Mac OS X doesn't require any prior setup and should work out of the box. No drivers, no patches, nothing. Just download and go.
Command-line mode
Command-line mode is a new feature added in v1.6.7. This mode has most of JTegraNX's functionality stuffed into the command line.
  • To access command-line mode, run JTegraNX.jar like this:
    • java -jar JTegraNX.jar -cml
These features are not usable in command line mode:
  • Device listeners (JTegraNX's inject function already checks for the device anyway).
    • Because of this, Auto-inject won't work either.
  • Changing configuration mode from standard to portable or vice versa.
  • Browsing for payloads using a dialog (it is a command-line).
  • Restarting JTegraNX after an update.
    • This is due to how the restart function works.
      • It gets the running JAR file's path and executes it using Runtime.getRuntime().exec(). In theory, I could launch command line mode in Runtime but I would then need to simultaneously have the Input, Output, and maybe even Error streams being monitored and used, but doing that while running a JVM inside a JVM would be very tedious. So I opted out of it.
  • Config system (Other than setting updates or bundled payloads).
  • Tray icon (again, it's a command-line).
Using configs
The config system allows you to save what you entered in the "Payload Path" field and load it again in another session.

Loading a saved config:
Simply click on "Load Config" to reveal the config list, then select the config you wish to use.

Saving a config:
Simple click on "Save Config", input a name for the config, and hit enter.

Custom Settings
You can now customize JTegraNX's settings to your liking.
  • You can now toggle auto-checking for JTegraNX updates.
  • You can now toggle auto-checking for payload updates.
  • You can now choose which payloads you want to include with JTegraNX.
  • You can now toggle the tray icon being enabled or disabled.
SD Card preparation
This new feature with JTegraNX will download all the basic requirements for getting your Switch ready for CFW and copy them to the specified output path.

GPT restoration
This new feature added in v1.6.9 will inject gptrestore, which is now bundled with JTegraNX as a standard tool instead of a bundled payload.

APX driver detection/installation
JTegraNX can detect if the APX driver is missing or incorrect, and if this is the case, you have the option to install it from there.

Portable mode
JTegraNX's old behavior for handling data files has been re-implemented as a secondary option. Portable mode makes it to where the "Payloads" directory and the main config file are created in the working directory of where the JAR is executed. You can switch between standard and portable mode using the Settings menu.

Bundled Payloads
For any bundled payloads, JTegraNX will download them automatically, place them in the "Payloads" directory, and optionally check for updates on them each time the program is launched. If updates are enabled and an update for a payload is found, it will be taken care of.

Currently bundled payloads:
Credits
 
Last edited by DylanWedman,

DylanWedman

Well-Known Member
OP
Newcomer
Joined
Jun 16, 2019
Messages
68
Trophies
0
Age
22
XP
307
Country
United States
can you mount the emunand on the sd or just sysnand?
Right now there is only mounting SD cards, I'm not sure what I'm going to do with this portion as it is pretty buggy and sometimes doesn't work at all. To my knowledge, you can't mount emuMMC with memloader, but I may be wrong because I've never looked into it.
 

pcwizard7

Well-Known Member
Member
Joined
Aug 2, 2013
Messages
1,409
Trophies
0
XP
1,688
Country
Australia
Right now there is only mounting SD cards, I'm not sure what I'm going to do with this portion as it is pretty buggy and sometimes doesn't work at all. To my knowledge, you can't mount emuMMC with memloader, but I may be wrong because I've never looked into it.

with the new hekate can access it from usb
 

DylanWedman

Well-Known Member
OP
Newcomer
Joined
Jun 16, 2019
Messages
68
Trophies
0
Age
22
XP
307
Country
United States
JTegraNX v1.6 has been released, with a full re-write, many bug fixes, and more features added. I also need to change this thread's title because my tool no longer relies on TegraRCMSmash. Does anyone know how to do that?
 
Last edited by DylanWedman,
  • Like
Reactions: klear

DylanWedman

Well-Known Member
OP
Newcomer
Joined
Jun 16, 2019
Messages
68
Trophies
0
Age
22
XP
307
Country
United States
You should support macOS as well. I have a Windows but macOS as well.
I would work to implement support for macOS if I had a computer running macOS that I could develop on. But that's just not in my budget at the moment. Before I finish developing my tool, I plan to add support for macOS and Linux.
 

spotanjo3

Well-Known Member
Member
Joined
Nov 6, 2002
Messages
11,145
Trophies
3
XP
6,185
Country
United States
I would work to implement support for macOS if I had a computer running macOS that I could develop on. But that's just not in my budget at the moment. Before I finish developing my tool, I plan to add support for macOS and Linux.

Is there a way I can help you with ? I am a macOS user. Surely, as I said before.. I have a Windows but I want to help people with macOS version.
 
Last edited by spotanjo3,

DylanWedman

Well-Known Member
OP
Newcomer
Joined
Jun 16, 2019
Messages
68
Trophies
0
Age
22
XP
307
Country
United States
Is there a way I can help you with ? I am a macOS user. Surely, as I said before.. I have a Windows but I want to help people with macOS version.
I'll take all the help I can get, but implementing macOS support for my tool in its current state would be easier said than done, for starters, on launch, JTegraNX loads "JTegraNX.dll" embedded into the executable, which is responsible for the device listener and the stack smashing, the device listener uses libusbK and <setupapi.h> and the stack smasher uses <setupapi.h>, both of these are for Windows to my knowledge at least. According to this report, Fusée Gelée works with macOS out of the box, so in theory, I would just need to come up with a replacement for the device listener and add a separate function for smashing the stack when the detected OS is macOS.
 

spotanjo3

Well-Known Member
Member
Joined
Nov 6, 2002
Messages
11,145
Trophies
3
XP
6,185
Country
United States
I'll take all the help I can get, but implementing macOS support for my tool in its current state would be easier said than done, for starters, on launch, JTegraNX loads "JTegraNX.dll" embedded into the executable, which is responsible for the device listener and the stack smashing, the device listener uses libusbK and <setupapi.h> and the stack smasher uses <setupapi.h>, both of these are for Windows to my knowledge at least. According to this report, Fusée Gelée works with macOS out of the box, so in theory, I would just need to come up with a replacement for the device listener and add a separate function for smashing the stack when the detected OS is macOS.

There is no compile building instruction on your GitHub.

Yeah, I am aware of Fusée Gelée works with macOS and that's what I am using it as well as NS-USBloader for macOS. This is one I also used for my Windows 10 until your newest one. And since it is in .jar. Is there a way to change .jar icon to Switch icon ? Jar icon looks ugly, you know, lol.
 

DylanWedman

Well-Known Member
OP
Newcomer
Joined
Jun 16, 2019
Messages
68
Trophies
0
Age
22
XP
307
Country
United States
I've started on the build instructions on my GitHub for JTegraNX, but haven't finished it yet, tomorrow I will finish it. I need to get some sleep.
 

RealYoti

Well-Known Member
Member
Joined
Aug 2, 2012
Messages
228
Trophies
1
XP
1,848
Country
Russia
@DylanWedman
It will be great to have portable mode. For example if I move JTegraNX.ini from Documents to the jar folder.

@burhansalih
1) Clean your current Java installation: https://javadl-esd-secure.oracle.com/update/jut/JavaUninstallTool.exe
2) Install Java 8 x86: https://javadl.oracle.com/webapps/download/AutoDL?BundleId=244582_d7fc238d0cbf4b0dac67be84580cfb4b
3) If you using 64-bit Windows install Java 8 x86_64 too: https://javadl.oracle.com/webapps/download/AutoDL?BundleId=244584_d7fc238d0cbf4b0dac67be84580cfb4b
 
Last edited by RealYoti,
  • Like
Reactions: burhansalih

DylanWedman

Well-Known Member
OP
Newcomer
Joined
Jun 16, 2019
Messages
68
Trophies
0
Age
22
XP
307
Country
United States
@DylanWedman
It will be great to have portable mode. For example if I move JTegraNX.ini from Documents to the jar folder.

This was the original behavior of the older versions of JTegraNX, all of the data files would be created in the working directory of where the executable was launched. It wouldn't be hard to re-implement it as a secondary option, I'll see about getting it done.

--------------------- MERGED ---------------------------

cant get it to launch on W10....any ideas....java etc installed....double click latest and nothing happens.
I forgot to mention the JTegraNX uses Java 8 and that the native bundled with it is a x64 DLL file, you can't load a x64 DLL with an x86 JRE. I'm gonna work on adding better compatibility.
 
Last edited by DylanWedman,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: Good night