Closed ghost closed 7 years ago
Don't return 0, return the success constant.
#include <stdlib.h>
#include <stdio.h>
#include <psp2/kernel/modulemgr.h>
#include <taihen.h>
// handle to our hook
static tai_hook_ref_t app_start_ref;
// our hook for app entry
int hook_app_start(SceSize argc, const void *args) {
printf("hello world!\n");
return TAI_CONTINUE(int, app_start_ref, argc, args);
}
// our own plugin entry
int module_start(SceSize argc, const void *args) {
taiHookFunctionExport(&app_start_ref, // Output a reference
"Crunchyroll", // Name of module being hooked
TAI_ANY_LIBRARY, // If there's multiple libs exporting this
0x935CD196, // Special NID specifying module_start
hook_app_start); // Name of the hook function
return SCE_KERNEL_START_SUCCESS;
}
Same problem :/, I have update taiHen (library and header) (but use taihen.json beta3 because beta4 doesn't have teihen.json)
are you using the latest toolchin?
old toolchain is not compatible with taihen anymore. part of the change is removal of json in elf create
i have compiled the new toolchain, after compiling the plugin and retrying, the app crash (C2-12828-1) and my psvita doesn't respond (Forced to make a hard reboot)
(I removed taihen.json from Makefile)
Can I see the entirety of your code?
#include <stdlib.h>
#include <stdio.h>
#include <psp2/kernel/modulemgr.h>
#include <taihen.h>
// our own plugin entry
int module_start(SceSize argc, const void *args) {
printf("hello world!\n");
return SCE_KERNEL_START_SUCCESS;
}
TARGET = testplugin
OBJS = main.o
LIBS = -ltaihen_stub -lSceLibc_stub
PREFIX = arm-vita-eabi
CC = $(PREFIX)-gcc
CFLAGS = -g -Wl,-q -Wall -O3 -nostartfiles
ASFLAGS = $(CFLAGS)
TYPE = suprx
PSVITAIP = 192.168.1.14
all: $(TARGET).$(TYPE)
%.$(TYPE): %.velf
vita-make-fself $< $@
%.velf: %.elf
vita-elf-create $< $@
$(TARGET).elf: $(OBJS)
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
clean:
@rm -rf $(TARGET).$(TYPE) $(TARGET).velf $(TARGET).elf $(OBJS)
send: $(TARGET).$(TYPE)
curl -T $(TARGET).$(TYPE) ftp://$(PSVITAIP):1337/ux0:/data/$(TARGET).$(TYPE)
@echo "Plugin sended."
but the code below have the same problem (not a problem of code) (use the same Makefile)
#include <stdlib.h>
#include <stdio.h>
#include <psp2/kernel/modulemgr.h>
#include <taihen.h>
// handle to our hook
static tai_hook_ref_t app_start_ref;
// our hook for app entry
int hook_app_start(SceSize argc, const void *args) {
printf("hello world!\n");
return TAI_CONTINUE(int, app_start_ref, argc, args);
}
// our own plugin entry
int module_start(SceSize argc, const void *args) {
taiHookFunctionExport(&app_start_ref, // Output a reference
"Crunchyroll", // Name of module being hooked
TAI_ANY_LIBRARY, // If there's multiple libs exporting this
0x935CD196, // Special NID specifying module_start
hook_app_start); // Name of the hook function
return SCE_KERNEL_START_SUCCESS;
}
I use Crunchyroll application if its can help you, I will try another application
EDIT: On message application (NPXS10014) the application stuck on boot, all of my toolchain (vita-toolchain + teihen is up-to-date)
Now work 👍
Example of "yourcustomexports.yml"
testplugin:
attributes: 0
version:
major: 1
minor: 1
main:
start: module_start
If your app won't boot, try other app :-)
Hi, while my application boot, my plugin cause a stuck on boot image
pretty simple plugin, but doesn't work, I looked for a long time without solution. Thanks for your help :-)