瀏覽代碼

remove check is Device Jailbroken

Marino Faggiana 8 年之前
父節點
當前提交
a658960bdd

+ 0 - 6
Nextcloud.xcodeproj/project.pbxproj

@@ -362,7 +362,6 @@
 		F77B0EB91D118A16002130FE /* HRColorUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F0DEC1C889300008DAB36 /* HRColorUtil.m */; };
 		F77B0EBE1D118A16002130FE /* CCNote.m in Sources */ = {isa = PBXBuildFile; fileRef = F721372A1BAFF0920012B613 /* CCNote.m */; };
 		F77B0EBF1D118A16002130FE /* RNEncryptor.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F053B1C889184008DAB36 /* RNEncryptor.m */; };
-		F77B0EC11D118A16002130FE /* JBroken.m in Sources */ = {isa = PBXBuildFile; fileRef = F71EDBFD1C4B93ED00265D0C /* JBroken.m */; };
 		F77B0EC21D118A16002130FE /* CCManageOptimizations.m in Sources */ = {isa = PBXBuildFile; fileRef = F7AB79F01BB1A3AD00A82F32 /* CCManageOptimizations.m */; };
 		F77B0EC31D118A16002130FE /* UIImage+Enhancing.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F04C21C889184008DAB36 /* UIImage+Enhancing.m */; };
 		F77B0EC61D118A16002130FE /* CCCellMain.m in Sources */ = {isa = PBXBuildFile; fileRef = F70211F51BAC56E9003FC03E /* CCCellMain.m */; };
@@ -1040,8 +1039,6 @@
 		F719FDB11CF06645004895D0 /* CCPhotosCameraUpload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhotosCameraUpload.h; sourceTree = "<group>"; };
 		F719FDB21CF06645004895D0 /* CCPhotosCameraUpload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCPhotosCameraUpload.m; sourceTree = "<group>"; };
 		F71E67F61DC1F76F003BA52B /* ownCloud iOS library.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "ownCloud iOS library.xcodeproj"; path = "Libraries external/OCCommunicationLib/ownCloud iOS library.xcodeproj"; sourceTree = SOURCE_ROOT; };
-		F71EDBFC1C4B93ED00265D0C /* JBroken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JBroken.h; sourceTree = "<group>"; };
-		F71EDBFD1C4B93ED00265D0C /* JBroken.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JBroken.m; sourceTree = "<group>"; };
 		F720E01E1E48C73E001A4B9E /* CCActions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CCActions.swift; path = Actions/CCActions.swift; sourceTree = "<group>"; };
 		F721371D1BAFF0920012B613 /* CCAccountWeb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAccountWeb.h; sourceTree = "<group>"; };
 		F721371E1BAFF0920012B613 /* CCAccountWeb.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCAccountWeb.m; sourceTree = "<group>"; };
@@ -2889,8 +2886,6 @@
 				F76C3B841C6388BC00DC4301 /* CCGraphics.m */,
 				F7053E3C1C639DF500741EA5 /* CCUtility.h */,
 				F7053E3D1C639DF500741EA5 /* CCUtility.m */,
-				F71EDBFC1C4B93ED00265D0C /* JBroken.h */,
-				F71EDBFD1C4B93ED00265D0C /* JBroken.m */,
 				F73049B81CB567F000C7C320 /* NSString+TruncateToWidth.h */,
 				F73049B91CB567F000C7C320 /* NSString+TruncateToWidth.m */,
 			);
@@ -4152,7 +4147,6 @@
 				F7F06EBF1DBFACC600099AE9 /* CTAssetsPageViewController.m in Sources */,
 				F7F06EA11DBFACC600099AE9 /* CTAssetCollectionViewCell.m in Sources */,
 				F7F54D0D1E5B14C800E19C62 /* MWZoomingScrollView.m in Sources */,
-				F77B0EC11D118A16002130FE /* JBroken.m in Sources */,
 				F7F06EAD1DBFACC600099AE9 /* CTAssetSelectionLabel.m in Sources */,
 				F7659A701DC0B760004860C4 /* PSTGridLayoutSection.m in Sources */,
 				F77B0EC21D118A16002130FE /* CCManageOptimizations.m in Sources */,

+ 0 - 3
iOSClient/AppDelegate.h

@@ -138,9 +138,6 @@
 // ico Image Cache
 @property (nonatomic, strong) NSMutableDictionary *icoImagesCache;
 
-// check isDeviceJailbroken
-@property BOOL isDeviceJailbroken;
-
 // Is in Crypto Mode
 @property BOOL isCryptoCloudMode;
 

+ 0 - 3
iOSClient/AppDelegate.m

@@ -217,9 +217,6 @@
         [application registerUserNotificationSettings:settings];
     }
     
-    // it is a device Jailbroken
-    self.isDeviceJailbroken = isDeviceJailbroken();
-
     // Tint Color GLOBAL WINDOW
     [self.window setTintColor:COLOR_WINDOW_TINTCOLOR];
     

+ 2 - 0
iOSClient/Info.plist

@@ -111,6 +111,8 @@
 	</array>
 	<key>UIRequiresFullScreen</key>
 	<true/>
+	<key>UIStatusBarHidden</key>
+	<false/>
 	<key>UIStatusBarStyle</key>
 	<string>UIStatusBarStyleLightContent</string>
 	<key>UISupportedInterfaceOrientations</key>

+ 0 - 7
iOSClient/Main/CCSplit.m

@@ -67,13 +67,6 @@
     [super viewDidAppear:animated];
     
     [self newAccount];
-    
-    // Jailbroken
-    if (app.isDeviceJailbroken && [CCUtility getMessageJailbroken] == NO) {
-        [CCUtility setMessageJailbroken:YES];
-        UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:@"Device Jailbroken" message:[CCUtility localizableBrand:@"_Device_Jailbroken_" table:nil] delegate:nil cancelButtonTitle:nil otherButtonTitles:NSLocalizedString(@"_ok_", nil), nil];
-        [alertView show];
-    }
 }
 
 - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator

+ 0 - 2
iOSClient/Utility/CCUtility.h

@@ -66,7 +66,6 @@
 + (void)setGroupBySettings:(NSString *)groupby;
 
 + (void)setIntro:(NSString *)version;
-+ (void)setMessageJailbroken:(BOOL)message;
 
 + (void)setActiveAccountShareExt:(NSString *)activeAccount;
 + (void)setCryptatedShareExt:(BOOL)cryptated;
@@ -104,7 +103,6 @@
 
 + (BOOL)getIntro:(NSString *)version;
 + (NSString *)getIncrementalNumber;
-+ (BOOL)getMessageJailbroken;
 
 + (NSString *)getActiveAccountShareExt;
 + (BOOL)getCryptatedShareExt;

+ 0 - 11
iOSClient/Utility/CCUtility.m

@@ -141,12 +141,6 @@
     [UICKeyChainStore setString:@"true" forKey:version service:k_serviceShareKeyChain];
 }
 
-+ (void)setMessageJailbroken:(BOOL)message
-{
-    NSString *sMessage = (message) ? @"true" : @"false";
-    [UICKeyChainStore setString:sMessage forKey:@"jailbroken" service:k_serviceShareKeyChain];
-}
-
 + (void)setActiveAccountShareExt:(NSString *)activeAccount
 {
     [UICKeyChainStore setString:activeAccount forKey:@"activeAccountShareExt" service:k_serviceShareKeyChain];
@@ -319,11 +313,6 @@
     return [NSString stringWithFormat:@"%04ld", number];
 }
 
-+ (BOOL)getMessageJailbroken
-{
-    return [[UICKeyChainStore stringForKey:@"jailbroken" service:k_serviceShareKeyChain] boolValue];
-}
-
 + (NSString *)getActiveAccountShareExt
 {
     return [UICKeyChainStore stringForKey:@"activeAccountShareExt" service:k_serviceShareKeyChain];

+ 0 - 10
iOSClient/Utility/JBroken.h

@@ -1,10 +0,0 @@
-//
-//  JBroken.h
-//
-//  Created by Sathish Venkatisan on 12/10/13.
-//
-
-float firmwareVersion();
-BOOL isDeviceJailbroken();
-BOOL isAppCracked();
-BOOL isAppStoreVersion();

+ 0 - 189
iOSClient/Utility/JBroken.m

@@ -1,189 +0,0 @@
-//
-//  JBroken.m
-//
-//  Created by Sathish Venkatisan on 12/10/13.
-//
-
-#import "JBroken.h"
-#include <sys/stat.h>
-#import <UIKit/UIKit.h>
-
-float firmwareVersion()
-{
-	return [[[[UIDevice currentDevice] systemVersion] substringToIndex:3] floatValue];
-}
-
-BOOL isDeviceJailbroken()
-{
-    
-#if !TARGET_IPHONE_SIMULATOR
-    
-    //Apps and System check list
-	BOOL isDirectory;
-	if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@%@", @"App", @"lic",@"ati", @"ons/", @"Cyd", @"ia.a", @"pp"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@%@", @"App", @"lic",@"ati", @"ons/", @"bla", @"ckra1n.a", @"pp"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@%@", @"App", @"lic",@"ati", @"ons/", @"Fake", @"Carrier.a", @"pp"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@%@", @"App", @"lic",@"ati", @"ons/", @"Ic", @"y.a", @"pp"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@%@", @"App", @"lic",@"ati", @"ons/", @"Inte", @"lliScreen.a", @"pp"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@%@", @"App", @"lic",@"ati", @"ons/", @"MxT", @"ube.a", @"pp"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@%@", @"App", @"lic",@"ati", @"ons/", @"Roc", @"kApp.a", @"pp"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@%@", @"App", @"lic",@"ati", @"ons/", @"SBSet", @"ttings.a", @"pp"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@%@", @"App", @"lic",@"ati", @"ons/", @"Wint", @"erBoard.a", @"pp"]]
-		|| [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@", @"pr", @"iva",@"te/v", @"ar/l", @"ib/a", @"pt/"] isDirectory:&isDirectory]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@", @"pr", @"iva",@"te/v", @"ar/l", @"ib/c", @"ydia/"] isDirectory:&isDirectory]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@", @"pr", @"iva",@"te/v", @"ar/mobile", @"Library/SBSettings", @"Themes/"] isDirectory:&isDirectory]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@", @"pr", @"iva",@"te/v", @"ar/t", @"mp/cyd", @"ia.log"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@", @"pr", @"iva",@"te/v", @"ar/s", @"tash/"] isDirectory:&isDirectory]
-		|| [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@", @"us", @"r/l",@"ibe", @"xe", @"c/cy", @"dia/"] isDirectory:&isDirectory]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@", @"us", @"r/b",@"in", @"s", @"shd"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@", @"us", @"r/sb",@"in", @"s", @"shd"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@", @"us", @"r/l",@"ibe", @"xe", @"c/cy", @"dia/"] isDirectory:&isDirectory]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@", @"us", @"r/l",@"ibe", @"xe", @"c/sftp-", @"server"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@",@"/Syste",@"tem/Lib",@"rary/Lau",@"nchDae",@"mons/com.ike",@"y.bbot.plist"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@%@%@%@",@"/Sy",@"stem/Lib",@"rary/Laun",@"chDae",@"mons/com.saur",@"ik.Cy",@"@dia.Star",@"tup.plist"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@", @"/Libr",@"ary/Mo",@"bileSubstra",@"te/MobileSubs",@"trate.dylib"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@", @"/va",@"r/c",@"ach",@"e/a",@"pt/"] isDirectory:&isDirectory]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@", @"/va",@"r/l",@"ib",@"/apt/"] isDirectory:&isDirectory]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@", @"/va",@"r/l",@"ib/c",@"ydia/"] isDirectory:&isDirectory]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@", @"/va",@"r/l",@"og/s",@"yslog"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@", @"/bi",@"n/b",@"ash"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@", @"/b",@"in/",@"sh"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@", @"/et",@"c/a",@"pt/"]isDirectory:&isDirectory]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@", @"/etc/s",@"sh/s",@"shd_config"]]
-        || [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/%@%@%@%@%@", @"/us",@"r/li",@"bexe",@"c/ssh-k",@"eysign"]])
-        
-	{
-		return YES;
-	}
-    
-    // SandBox Integrity Check
-    int pid = fork();
-    if(!pid){
-        exit(0);
-    }
-    if(pid>=0)
-    {
-        return YES;
-    }
-    
-    //Symbolic link verification
-    struct stat s;
-    if(lstat("/Applications", &s) || lstat("/var/stash/Library/Ringtones", &s) || lstat("/var/stash/Library/Wallpaper", &s)
-       || lstat("/var/stash/usr/include", &s) || lstat("/var/stash/usr/libexec", &s)  || lstat("/var/stash/usr/share", &s) || lstat("/var/stash/usr/arm-apple-darwin9", &s))
-    {
-        if(s.st_mode & S_IFLNK){
-            return YES;
-        }
-    }
-    
-	//Try to write file in private
-	NSError *error;
-    
-	[[NSString stringWithFormat:@"Jailbreak test string"]
-     writeToFile:@"/private/test_jb.txt"
-     atomically:YES
-     encoding:NSUTF8StringEncoding error:&error];
-    
-	if(nil==error){
-		//Wrote?: JB device
-		//cleanup what you wrote
-		[[NSFileManager defaultManager] removeItemAtPath:@"/private/test_jb.txt" error:nil];
-		return YES;
-	}
-#endif
-	return NO;
-}
-
-BOOL isAppStoreVersion() {
-    
-#if TARGET_IPHONE_SIMULATOR
-    return NO;
-#else
-    NSString *provisionPath = [[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"];
-    
-    if (nil == provisionPath || 0 == provisionPath.length) {
-        
-        return YES;
-    }
-    
-    return NO;
-#endif
-}
-
-BOOL isAppCracked() {
-#if !TARGET_IPHONE_SIMULATOR
-    
-    NSBundle *bundle = [NSBundle mainBundle];
-	NSString* bundlePath = [bundle bundlePath];
-	NSFileManager *manager = [NSFileManager defaultManager];
-    static NSString *str;
-    BOOL fileExists;
-    
-    //Check to see if the app is running on root
-	int root = getgid();
-	if (root <= 10) {
-		return YES;
-	}
-    
-    //Checking for identity signature
-	char symCipher[] = { '(', 'H', 'Z', '[', '9', '{', '+', 'k', ',', 'o', 'g', 'U', ':', 'D', 'L', '#', 'S', ')', '!', 'F', '^', 'T', 'u', 'd', 'a', '-', 'A', 'f', 'z', ';', 'b', '\'', 'v', 'm', 'B', '0', 'J', 'c', 'W', 't', '*', '|', 'O', '\\', '7', 'E', '@', 'x', '"', 'X', 'V', 'r', 'n', 'Q', 'y', '>', ']', '$', '%', '_', '/', 'P', 'R', 'K', '}', '?', 'I', '8', 'Y', '=', 'N', '3', '.', 's', '<', 'l', '4', 'w', 'j', 'G', '`', '2', 'i', 'C', '6', 'q', 'M', 'p', '1', '5', '&', 'e', 'h' };
-	char csignid[] = "V.NwY2*8YwC.C1";
-	for(int i=0;i<strlen(csignid);i++)
-	{
-		for(int j=0;j<sizeof(symCipher);j++)
-		{
-			if(csignid[i] == symCipher[j])
-			{
-				csignid[i] = j+0x21;
-				break;
-			}
-		}
-	}
-	NSString* signIdentity = [[NSString alloc] initWithCString:csignid encoding:NSUTF8StringEncoding];
-    
-	NSDictionary *info = [bundle infoDictionary];
-	if ([info objectForKey:signIdentity] != nil)
-	{
-		return YES;
-	}
-    
-    // Check if the below .plist files exists in the app bundle
-    fileExists = [manager fileExistsAtPath:([NSString stringWithFormat:@"%@/%@", bundlePath, [NSString stringWithFormat:@"%@%@%@%@", @"_C",@"odeS",@"igna",@"ture"]])];
-	if (!fileExists) {
-		return YES;
-	}
-    
-    
-    fileExists = [manager fileExistsAtPath:([NSString stringWithFormat:@"%@/%@", bundlePath, [NSString stringWithFormat:@"%@%@%@%@", @"Re",@"sour",@"ceRules.p",@"list"]])];
-	if (!fileExists) {
-		return YES;
-	}
-    
-    
-    fileExists = [manager fileExistsAtPath:([NSString stringWithFormat:@"%@/%@", bundlePath, [NSString stringWithFormat:@"%@%@%@%@", @"S",@"C_",@"In",@"fo"]])];
-	if (!fileExists) {
-		return YES;
-	}
-    
-    
-    //Check if the info.plist and exectable files have been modified
-    str= [NSString stringWithFormat:@"%@%@%@%@", @"Pk",@"gI",@"nf",@"o"];
-    NSDate* pkgInfoModifiedDate = [[manager attributesOfItemAtPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:str] error:nil] fileModificationDate];
-    
-    str= [NSString stringWithFormat:@"%@%@%@%@", @"In",@"fo.p",@"li",@"st"];
-	NSString* infoPath = [NSString stringWithFormat:@"%@/%@", bundlePath,str];
-    NSDate* infoModifiedDate = [[manager attributesOfItemAtPath:infoPath error:nil] fileModificationDate];
-    if([infoModifiedDate timeIntervalSinceReferenceDate] > [pkgInfoModifiedDate timeIntervalSinceReferenceDate]) {
-		return YES;
-	}
-    
-    str = [[bundle infoDictionary] objectForKey:@"CFBundleDisplayName"];
-    NSString* appPathName = [NSString stringWithFormat:@"%@/%@", bundlePath,str];
-	NSDate* appPathNameModifiedDate = [[manager attributesOfItemAtPath:appPathName error:nil]  fileModificationDate];
-	if([appPathNameModifiedDate timeIntervalSinceReferenceDate] > [pkgInfoModifiedDate timeIntervalSinceReferenceDate]) {
-		return YES;
-	}
-    
-#endif
-	return NO;
-}

+ 0 - 1
iOSClient/en.lproj/Localizable.strings

@@ -385,7 +385,6 @@
 "unknow"                        = "UNKNOWN";
 "video"                         = "VIDEO";
 
-"_Device_Jailbroken_"           = "Warning! Your device is Jailbroken, the operation of _brand_ does not appear to be entirely compatible !!";
 "_no_plist_pull_down_"          = "Encrypted files not updated, pull down to refresh";
 "_file_del_only_local_"         = "File not present on the server";