accessing to /dev/tty.iap denied in iPhone
-
11-12-2019 - |
Question
I just jailbreaked and unlocked my original iPhone(with ios 3.1.3) and trying to open /dev/tty.iap to communicate with a device i made and send characters(for example) via serial port.(pin 12 & 13)
But when i try to open /dev/tty.iap I get error: "Permission denied".
So, I installed OpenSSH on my iPhone via Cdyia and ssh to my iphone and I can open and read tty.iap via command line(as root) but not via my application. So I changed the permission of /dev/tty.iap ( and madly entire /dev/ folder ! ) with chmod 777 tty.iap
even chmod -R 777 /dev/
But still get "Permission denied" error when try to open that file like this( I'm using xcode 4.2.1 for programming):
fileDescriptor = open("/dev/tty.iap", O_RDWR | O_NOCTTY | O_NONBLOCK);
what else I can do to get proper permission ?
Solution
simply chmod my application in Application folder solved my problem.
chmod 777 -R myapplication.app