Run an App as root on iOS

after-stage:: 这一步执行完之后 make package 之后出现 No rule to make target @(chmod)', needed by after-stage’. Stop. 为什么啊

你的makefile是怎么写的?贴上来看看

include theos/makefiles/common.mk

APPLICATION_NAME = RootApp
RootApp_FILES = main.m RootAppApplication.mm RootViewController.mm
RootApp_FRAMEWORKS = UIKit CoreGraphics


THEOS = /opt/theos
SDKVERSION = 8.0
THEOS_DEVICE_IP = 192.168.1.129

include $(THEOS_MAKE_PATH)/application.mk

after-stage::											$(ECHO_NOTHING)chmod +s $(THEOS_STAGING_DIR)/Applications/RootApp.app/RootApp$(ECHO_END)

文件名和你的一样

是不是路径不对啊

after-stage::后面必须另起一行而且缩进2次;
你模仿我的makefile,把里面的内容改吧改吧,但不要动结构,试试

行了 谢谢

CFBundleExecutable 键值对好像找不到啊

info.plist 截取的图片

就是这个

改完之后还是闪退啊 bash文件是不是放在和info.plist 同一个文件下

info.plist 中Executable file 设置为 bash 需不需要设置bash的路径啊

放在同一个目录下,不需要设置路径。你把我在github上的代码下载下来,对照你的看看,有什么地方搞错了

给我个链接吧 谢谢

我没有传到GitHub上去……你闪退之后的报错信息是什么?看看syslog

Oct 16 12:01:51 FR9Q wifid[75] <Notice>: WiFi:[435124911.968150]: Client identityservices set type to background application
Oct 16 12:01:51 FR9Q wifid[75] <Notice>: WiFi:[435124911.968436]: BG Application: Not Present, BG Daemon: Present. Daemons: apsd sharingd lockdownd identityservices 
Oct 16 12:01:51 FR9Q wifid[75] <Notice>: WiFi:[435124911.968740]: Already connected to LinkSys2013.
Oct 16 12:01:52 FR9Q wifid[75] <Notice>: WiFi:[435124912.465465]: MIS state is Disabled
Oct 16 12:01:52 FR9Q wifid[75] <Notice>: WiFi:[435124912.465971]: MIS state queried by "identityservices" is Disable
Oct 16 12:01:52 FR9Q wifid[75] <Notice>: WiFi:[435124912.470621]: Client identityservices set type to normal application
Oct 16 12:01:52 FR9Q wifid[75] <Notice>: WiFi:[435124912.471298]: BG Application: Not Present, BG Daemon: Present. Daemons: apsd sharingd lockdownd 
Oct 16 12:01:53 FR9Q wifid[75] <Notice>: WiFi:[435124913.425937]: IMRemoteURLConne requesting removal of BGScan networks
Oct 16 12:01:53 FR9Q wifid[75] <Notice>: WiFi:[435124913.426960]: No change in Background Scan candidates. Skip re-programming Background Scan

info.plist 中设置的Executable file 为bash 好像没调用bash

Oct 16 12:04:44 FR9Q SpringBoard[28] <Warning>: LICreateIconForImage passed NULL CGImageRef image
Oct 16 12:04:44 FR9Q RootApp[445] <Warning>: Returning NULL path from CPSharedResourcesDirectory for uid 502
Oct 16 12:04:44 FR9Q RootApp[445] <Warning>: Returning NULL path from CPSharedResourcesDirectory for uid 502
Oct 16 12:04:44 FR9Q RootApp[445] <Warning>: Returning NULL path from CPSharedResourcesDirectory for uid 502
Oct 16 12:04:44 FR9Q RootApp[445] <Warning>: Returning NULL path from CPSharedResourcesDirectory for uid 502
Oct 16 12:04:44 FR9Q RootApp[445] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSFileManager fileSystemRepresentationWithPath:]: nil or empty path argument'
	*** First throw call stack:
	(0x2feb8e83 0x3a2196c7 0x2feb8dc5 0x307eb7a9 0x336e31b3 0x326c763d 0x326c7557 0x326c74cf 0x32687179 0x326c726f 0x326c714d 0x326c6e5d 0x3269531f 0x32695065 0x3263745d 0x3263730b 0x3263714b 0x32636e5f 0x326c6b81 0x3264ecf5 0x326c4add 0x326aac79 0x326a9bb5 0x326a8491 0x326a79ef 0x32642a07 0x32641cfd 0x326a7321 0x34b2176d 0x34b21357 0x2fe83777 0x2fe83713 0x2fe81edf 0x2fdec471 0x2fdec253 0x326a65c3 0x326a1845 0x105af5 0x3a712ab7)
Oct 16 12:04:45 FR9Q ReportCrash[447] <Notice>: MS:Notice: Injecting: (null) [ReportCrash] (847.21)
Oct 16 12:04:45 FR9Q ReportCrash[447] <Notice>: ReportCrash acting against PID 445
Oct 16 12:04:45 FR9Q ReportCrash[447] <Notice>: Formulating crash report for process RootApp[445]
Oct 16 12:04:45 FR9Q com.apple.launchd[1] (UIKitApplication:com.mobisentry.rootapp[0x5cb5][445]) <Warning>: (UIKitApplication:com.mobisentry.rootapp[0x5cb5]) Job appears to have crashed: Abort trap: 6
Oct 16 12:04:45 FR9Q backboardd[34] <Warning>: Application 'UIKitApplication:com.mobisentry.rootapp[0x5cb5]' exited abnormally with signal 6: Abort trap: 6
Oct 16 12:04:45 FR9Q ReportCrash[447] <Notice>: Saved crashreport to /Library/Logs/CrashReporter/RootApp_2014-10-16-120445_FR9Q.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0

这一条语句导致了闪退

我知道crash 在这 但是代码中的确没有这一行啊 bash的权限需要改吗

改成-rwxrwxrwx试试?

求教楼主:应用以root权限运行后,怎么杀死呢?在多任务窗口移除应用后,它其实还是在后台运行着的,下一次再点击进入应用后,就死机了!