The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-10-2008, 08:33 AM
iPhone? More like MyPhone
 
Join Date: Oct 2007
Posts: 111
Thanks: 2
Thanked 17 Times in 14 Posts
Firmware 2.1 some doors closed

I've installed firmware 2.1 on my iTouch and tried an app I've written to find out how much space each app installed via iTunes was using.

My app used to work on 2.0.x firmware.
With 2.1 I can only access my own directory.

When I try to access any directory under "/private/var/mobile/Applications/" I get access denied error except for my own UUID.

With 2.0.x you could access any "/private/var/mobile/Applications/UUID" and one app could erase all other installed apps.

I don't know what Apple has done but my own directory has the same attributes as before:
Owner: 501 (mobile)
GroupOwner: 501 (mobile)
Directory permissions: 755
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2  
Old 09-10-2008, 12:21 PM
bhz1's Avatar
Moderator
 
Join Date: Sep 2007
Device + Firmware: iPhone 3G, 3G[S]- 3.1.2 JB
Operating System: Windows XP,Vista, OS X 10.5.8
Location: Pennsylvania
Posts: 2,404
Thanks: 82
Thanked 322 Times in 249 Posts

Maybe its because you would need to re-jailbreak since its a new firmware? You will need to wait until an appropriate jailbreak method is released for 2.1.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3  
Old 09-10-2008, 03:02 PM
iPhone? More like MyPhone
 
Join Date: Oct 2007
Posts: 111
Thanks: 2
Thanked 17 Times in 14 Posts

Quote:
Originally Posted by bhz1 View Post
Maybe its because you would need to re-jailbreak since its a new firmware? You will need to wait until an appropriate jailbreak method is released for 2.1.
No, it has nothing to do with jailbreaking.

With firmware 2.0.x, (jailbroken or not) any application installed in "/private/var/mobile/Applications/UUID" with owner "mobile" had full access to "/private/var/mobile/Applications".

In fact, a malicious app could erase all apps installed via iTunes.

With firmware 2.1, an app has access only to it's own directory.
Since my iPod is not jailbroken I am limited to "what I can see".

The app I wrote worked OK with fw 2.0.x and "virgin" devices.
It reported how much file system space was being used by each installed app.

When installed on a device with fw 2.1 it can only show it's own directory.

I've tried:
opendir() / readdir() Unix API
fts_open() / fts_read() Unix API
[[NSFileManager defaultManager] contentsOfDirectoryAtPath: error:] Cocoa API

The same result with all of them, access denied.

I can list the first level content of "/private/var/mobile/Applications" and find out how many apps are installed.

I can not go inside of each app directory to find the app name and compute space used.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4  
Old 09-13-2008, 03:39 AM
Green Apple
 
Join Date: Sep 2007
Posts: 44
Thanks: 0
Thanked 10 Times in 7 Posts

Apparently, it was always meant that sandbox apps shouldn't be able to see into other sandbox, just it wasn't enforced in 2.0.x, but is now.

What I'm more interested in, if you install your app in /Applications, outside the sandbox, can it then see into the other apps?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #5  
Old 09-13-2008, 04:44 PM
iPhone? More like MyPhone
 
Join Date: Sep 2008
Device + Firmware: 4gb iPhone
Posts: 112
Thanks: 0
Thanked 3 Times in 3 Posts

Wouldnt just plugging it up to the computer and going to my computer show you ?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #6  
Old 09-14-2008, 06:29 PM
NetMage's Avatar
Developer
 
Join Date: Aug 2007
Device + Firmware: iPhone 2.2.0
Operating System: Windows XP / OS X
Location: Virginia
Posts: 1,231
Thanks: 45
Thanked 202 Times in 162 Posts

Can you see the updated rules in /usr/share/sandbox?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #7  
Old 09-15-2008, 08:03 AM
iPhone? More like MyPhone
 
Join Date: Oct 2007
Posts: 111
Thanks: 2
Thanked 17 Times in 14 Posts

Quote:
Originally Posted by cazlar View Post
What I'm more interested in, if you install your app in /Applications, outside the sandbox, can it then see into the other apps?
Yes, if you install it in /Applications you have full access.

My problem is that I was planning to release the app via AppStore
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #8  
Old 09-18-2008, 05:57 PM
What's Jailbreak?
 
Join Date: Sep 2008
Device + Firmware: iPhone 2.2
Operating System: Mac OS X 10.5.6
Posts: 8
Thanks: 0
Thanked 4 Times in 2 Posts

Taken from SandboxTemplate.sb:

Quote:
; NOTE: Later rules override earlier rules.

; Private areas
(deny file-write*
(regex "^/private/var/mobile/Applications/.*$"))
(deny file-read*
(regex "^/private/var/mobile/Applications/.*$"))
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #9  
Old 09-19-2008, 01:50 AM
My iPhone is a Part of Me
 
Join Date: Nov 2007
Device + Firmware: Black 3Gs 16gb 3.1.2
Operating System: Black Macbook 2.0 Core 2 Duo Snow Leopard
Location: Los Angeles
Posts: 813
Thanks: 412
Thanked 108 Times in 80 Posts

Quote:
Originally Posted by jdas View Post
Taken from SandboxTemplate.sb:

so what if we just remove the part about the deny?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #10  
Old 09-22-2008, 02:52 PM
What's Jailbreak?
 
Join Date: Sep 2008
Device + Firmware: iPhone 2.2
Operating System: Mac OS X 10.5.6
Posts: 8
Thanks: 0
Thanked 4 Times in 2 Posts

Quote:
Originally Posted by tattoojack View Post
so what if we just remove the part about the deny?
To do that, you would need SSH-level access to the device, and be able to tell the user to do that. Not possible for an App Store app to do by itself.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 09:55 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top