日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

iOS Hacker 使用Theos开发tweak

發布時間:2024/4/18 编程问答 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 iOS Hacker 使用Theos开发tweak 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

iOS Hacker 使用Theos開發tweak

mkdir /opt
export THEOS=/opt/theos
sudo git clone git://github.com/DHowett/theos.git $THEOS
http://joedj.net/ldid ? ?//訪問下載ldid
cp ~/Downloads/ldid /opt/theos/bin/ldid ? //復制到bin目錄
curl -o /opt/theos/bin/dpkg-deb https://raw.githubusercontent.com/DHowett/dm.pl/master/dm.pl ?下載dpkg-deb
sudo chmod 777 /opt/theos/bin/dpkg-deb ? //設備權限
cd ~/Desktop
/opt/theos/bin/nic.pl ?//創建工程
NIC 2.0 - New Instance Creator
------------------------------
? [1.] iphone/activator_event
? [2.] iphone/application_modern
? [3.] iphone/cydget
? [4.] iphone/flipswitch_switch
? [5.] iphone/framework
? [6.] iphone/ios7_notification_center_widget
? [7.] iphone/library
? [8.] iphone/notification_center_widget
? [9.] iphone/preference_bundle_modern
? [10.] iphone/tool
? [11.] iphone/tweak
? [12.] iphone/xpc_service
Choose a Template (required): 11
Project Name (required): IOSREProject
Package Name [com.yourcompany.iosreproject]: com.iosreproject
Author/Maintainer Name [System Administrator]: exchen
[iphone/tweak] MobileSubstrate Bundle filter [com.apple.springboard]: com.apple.springboard
[iphone/tweak] List of applications to terminate upon installation (space-separated, '-' for none) [SpringBoard]: SpringBoard
Instantiating iphone/tweak in iosreproject/...
Done.
------------------------------
vi ~/Desktop/iosreproject/Makefile ? ?//修改Makefile文件


include $(THEOS)/makefiles/common.mk
THEOS_DEVICE_IP = 192.168.4.143
ARCHS = armv7 arm64
TARGET = iphone:latest:8.0
TWEAK_NAME = iOSREGreetings
iOSREGreetings_FILES = Tweak.xm
iOSREGreetings_FRAMEWORKS = UIKit

include $(THEOS_MAKE_PATH)/tweak.mk

after-install::
? ? ? ? install.exec "killall -9 SpringBoard"
--------------------------------------------
vi ~/Desktop/iosreproject/tweak.mk ? ? //編寫代碼hook SpringBoard,讓開機之后彈出對話框

%hook SpringBoard
- (void)applicationDidFinishLaunching:(id)application
{
? ? ? ? %orig;
? ? ? ? UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hook" message:nil delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
? ? ? ? [alert show];
? ? ? ? [alert release];
}
%end
--------------------------------------------
export THEOS_DEVICE_IP=192.168.4.143 ? ? ? ? ? //手機的IP地址環境變量
--------------------------------------------
make package Install ? ? ? ? ? ? ? ? ? ? ? ? ? //開始安裝
> Making all for tweak iOSREProject…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (armv7)…
==> Linking tweak iOSREProject (armv7)…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (arm64)…
==> Linking tweak iOSREProject (arm64)…
==> Merging tweak iOSREProject…
==> Signing iOSREProject…
> Making stage for tweak iOSREProject…
dm.pl: building package `com.iosre.iosreproject:iphoneos-arm' in `./packages/com.iosre.iosreproject_0.0.1-3+debug_iphoneos-arm.deb'
==> Installing…
root@192.168.4.143's password:?

需要輸入兩次密碼,安裝成功之后,手機會自動重啟后會彈出對話框


總結

以上是生活随笔為你收集整理的iOS Hacker 使用Theos开发tweak的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。