페이지

2011년 11월 30일 수요일

Cydia Repository Update Script

Cydia 저장소에 패키지 파일을 올리고 업데이트 하기가 너무 귀찮은 나머지 스크립트를 만들었다.
(ARM용으로는 reprepro나 dak 같은게 안나오나...)

#!/bin/sh

rm -f Packages.bz2 Release Release.gpg
dpkg-scanpackages . Packages > Packages
bzip2 -k Packages
cp Release.org Release

md5=$(md5sum Packages)
size=$(stat -c%s Packages)
md5=$(echo $md5 | sed "s/Packages/$size Packages/" - | sed "s/^/ /" -)
echo "$md5" >> Release

md5=$(md5sum Packages.bz2)
size=$(stat -c%s Packages.bz2)
md5=$(echo $md5 | sed "s/Packages/$size Packages/" - | sed "s/^/ /" -)
echo "$md5" >> Release

gpg2 -abs -o Release.gpg Release
chown -R oldpiano:hdusers *

2011년 11월 28일 월요일

Cydia Repository 만들기

* 하루죙일 삽질하고 겨우 했음 ㅜㅜ

자세한 설명은 http://www.saurik.com/id/7

준비물
dpkg-scanpackages
gpg (port gpgme)
bzip2
md5sum

2011년 11월 24일 목요일

2011년 11월 22일 화요일

MSHook / MSHookFunction


Theos의 기본 substrate.h 로는 MSHook 가 제대로 되지 않는다.
saurik 의 리퍼지터리에서 최신버전을 받아와 Theos 의 파일에 덮어쓰고 시작한다.

MSHook(int, access, const char *path, int amode) {
    //printf("IBT:Debug: access(\"%s\", %u)\n", path, amode);
    NSString *p = [NSString stringWithCString:path encoding:NSUTF8StringEncoding];
    if ([p hasPrefix:@"/var/stash"] || [p hasPrefix:@"/var/log/apt"]) {
        //printf("Detected jailbreak check!!!\n");
        return -1;
    }

    return _access(path, amode);
}

...

%ctor {
    MSHookFunction(&access, &$access, &_access);
}

* 위 샘플은 탈옥감지무력화(?) 하기

Theos 설치 사용하기


  1. Xcode 설치
    앱스토어 또는 developer.apple.com

  2. Theos 설치
    http://iphonedevwiki.net/index.php/Theos/Getting_Started

  3. MobileSubstrate 의 substrate.h 업데이트
    http://svn.saurik.com/repos/menes/trunk/mobilesubstrate/substrate.h
    ---> /opt/theos/include/substrate.h 에 덮어쓰기

  4. 다른 헤더파일들 다운받기
    https://github.com/rpetrich/iphoneheaders/archives/master
    ---> /opt/theos/include/ 에 모두 덮어쓰기