×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    25

    Running console apps on n950: Operation not permitted

    Hello,

    I wrote a "hello world" app but can't run it on the phone.

    Code:
    #include <stdio.h>
    
    int main(int argc, char **argv)
    {
    	printf("hello world!\n");
    	return 0;
    }
    Code:
    sbox-HARMATTAN_ARMEL:~/helloworld$ make
    gcc main.c -o hello
    sbox-HARMATTAN_ARMEL:~/helloworld$ ./hello 
    hello world!
    sbox-HARMATTAN_ARMEL:~/helloworld$ file hello 
    hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.16, dynamically linked (uses shared libs), not stripped
    sbox-HARMATTAN_ARMEL:~/helloworld$ scp hello root@n950:/root
    sbox-HARMATTAN_ARMEL:~/helloworld$ ssh root@n950
    RM680-22-6_PR_RM680:~# chmod +x hello
    RM680-22-6_PR_RM680:~# ./hello 
    -sh: ./hello: Operation not permitted
    RM680-22-6_PR_RM680:~# ls -l
    total 8
    -rwxr-xr-x    1 root     root          5540 Jul 11 12:13 hello
    However no problem running it in QEMU. Please help!

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Running console apps on n950: Operation not permitted

    Security framework prevents unregistered binaries execution. Place your binary in a Debian package and install it, then it will be properly registered and you will be able to execute it.

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    25

    Re: Running console apps on n950: Operation not permitted

    Well, that's really troublesome to package every single binary/test-app. Is there a way to disable this Security framework? After all I'm playing with a developer device.

  4. #4
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Running console apps on n950: Operation not permitted

    Qt Creator produces template package for the project you build. Even if you are not using Qt Creator for development you can open it once to have a Debian packaging.
    Last edited by divanov; 2011-07-11 at 13:59.

  5. #5
    Registered User
    Join Date
    Nov 2007
    Location
    Finland
    Posts
    26

    Re: Running console apps on n950: Operation not permitted

    Regarding the Security FW; I have not been able to find any documentation about it. Is there any that would be relevant for developers?

    But I have to agree, that this is an unnecessary inconvenience for the developers not to be able to run on their own device their own test scripts with the Security FW disabled. After all, the developer devices are in developer mode already, while N9 consumer devices are not, it would make sense to have this disabled. Of course if the application is to be distributed through OVI store (err, Nokia Store) then the packaging must be done.

  6. #6
    Registered User
    Join Date
    Jun 2011
    Posts
    25

    Re: Running console apps on n950: Operation not permitted

    Agree, it should be allowed to disable the Security FW when the device is in developer mode, we are talking about N950 and not N9. Qt Creator templates won't work in every situation, also re-installing the package after every build is a serious hassle for me.

  7. #7
    Registered User
    Join Date
    Jun 2011
    Posts
    25

    Re: Running console apps on n950: Operation not permitted

    Found something relevant there http://talk.maemo.org/showthread.php?t=73231. It seems that the security framework is using DigSig http://disec.sourceforge.net/ Now the question is how to disable it?
    Last edited by svlasov; 2011-07-11 at 15:04.

  8. #8
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327

    Re: Running console apps on n950: Operation not permitted

    Quote Originally Posted by kypeli View Post
    Regarding the Security FW; I have not been able to find any documentation about it. Is there any that would be relevant for developers?
    http://library.developer.nokia.com/t...rity_6cbe.html

  9. #9
    Registered User
    Join Date
    Nov 2007
    Location
    Finland
    Posts
    26

    Re: Running console apps on n950: Operation not permitted

    Thanks! Still no documentation on how to disable the Security FW :-/

  10. #10
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Running console apps on n950: Operation not permitted

    Quote Originally Posted by svlasov View Post
    Qt Creator templates won't work in every situation, also re-installing the package after every build is a serious hassle for me.
    Could you please provide an example, where template won't work?

  11. #11
    Registered User
    Join Date
    Jun 2011
    Posts
    25

    Re: Running console apps on n950: Operation not permitted

    for projects that don't follow the unix-way and use messy file structure, while when packaging one supposed to install files into proper locations: executable to bin/, binaries to lib/, resources to share/ etc.

    but well, let me prove myself wrong that packaging is fun and easy. I want to use scratchbox and not Qt Creator templates, so I followed the packaging guide http://www.developer.nokia.com/Commu...n_Platform_SDK

    Code:
    sbox-HARMATTAN_X86:~/coolproject$ dh_make -e hello@there.com -f ../coolproject-0.1.tar.gz -c GPL
    bash: dh_make: command not found
    sbox-HARMATTAN_X86:~/coolproject$ dpkg -L debhelper | grep dh_make
    /usr/share/man/man1/dh_makeshlibs.1.gz
    /usr/share/man/fr/man1/dh_makeshlibs.1.gz
    /usr/bin/dh_makeshlibs
    Where is dh_make?

  12. #12
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Running console apps on n950: Operation not permitted

    Quote Originally Posted by svlasov View Post
    for projects that don't follow the unix-way and use messy file structure, while when packaging one supposed to install files into proper locations: executable to bin/, binaries to lib/, resources to share/ etc.
    You are supposed to install standalone executables into /usr/bin/... Any how installation is something Debian package rules takes care off, if you have working qmake configuration, it will do the rest.

    Quote Originally Posted by svlasov View Post
    Where is dh_make?
    dh_make is in dh-make package.

  13. #13
    Registered User
    Join Date
    Jun 2011
    Posts
    25

    Re: Running console apps on n950: Operation not permitted

    Quote Originally Posted by divanov View Post
    You are supposed to install standalone executables into /usr/bin/...
    Not always it's just a single standalone executable

    Quote Originally Posted by divanov View Post
    Any how installation is something Debian package rules takes care off
    That's what I mean, I have to take care of 'rules' file + I need to modify the project to find its files after they were installed into different locations. With Security FW disabled I would just copy over the whole build to /home/user/ and execute it from there, that's how I do it on N900.

    Quote Originally Posted by divanov View Post
    if you have working qmake configuration, it will do the rest.
    Projects are not always Qt-based

    Quote Originally Posted by divanov View Post
    dh_make is in dh-make package.
    There is no 'dh-make' package in scratchbox repositories, should I enable some extra repo?

  14. #14
    Registered User
    Join Date
    Jul 2009
    Posts
    8

    Re: Running console apps on n950: Operation not permitted

    I've at the moment exactly the same problem.

    I created a small *.sh script using vi, chmod to executable. And now I got "Operation not permitted"

    Could I "checkin" my small script into the security framework?

  15. #15
    Registered User
    Join Date
    Nov 2007
    Location
    Finland
    Posts
    26

    Re: Running console apps on n950: Operation not permitted

    Quote Originally Posted by helex View Post
    I've at the moment exactly the same problem.
    I created a small *.sh script using vi, chmod to executable. And now I got "Operation not permitted"
    You can run shell scripts with "sh < myscript.sh" - which in its own demonstrates how un-useful the Security FW is since it cannot block random shell scripts from being executed. Just an annoyance for us, developers.

Page 1 of 2 12 LastLast

Similar Threads

  1. Apps not running correctly on phones from another country
    By bitset in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 2
    Last Post: 2011-04-16, 09:22
  2. Console application not running on Nokia 6210 Navigator and Nokia E61
    By rohanwaugh in forum Symbian User Interface
    Replies: 22
    Last Post: 2008-09-13, 10:31
  3. Running Console apps in S60 3rd edition
    By yuenfatt in forum Symbian C++
    Replies: 4
    Last Post: 2008-08-20, 12:18
  4. console application not running in S602nd FP2
    By avibatbha in forum Symbian C++
    Replies: 6
    Last Post: 2008-01-31, 15:22
  5. more complicated apps not running on the phone
    By jpkel in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2004-02-09, 09:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •