Permission Denied

Discussion about using Moai SDK - post questions, issues, and ideas here.

Moderators: naturally, seebs

Permission Denied

Postby lolopolosko » Thu Mar 01, 2012 12:25 pm

When i run "run-host.bat" i see this error


Code: Select all
  1. sed: can't read build/res/values/strings.xml: Permission denied

  2. Buildfile: C:\Android\moai-sdk\hosts\ant\build\build.xml

  3.  

  4. uninstall:

  5.      [echo] Uninstalling com.getmoai.samples from the default emulator or device

  6. ...

  7.  



if i can read or rewrite string.xml I See message "Permission Denied"

what is it?
lolopolosko
 
Posts: 22
Joined: Sat Feb 18, 2012 12:30 pm

Re: Permission Denied

Postby lolopolosko » Thu Mar 01, 2012 2:35 pm

I solved this problem by using administrator rights.

But the project still does not want to set up ...
We can say that it hangs and then does not build the project ...

Buildfile: C:\Android\moai-sdk\hosts\ant\build\build.xml
uninstall:
[echo] Uninstalling com.getmoai.samples from the default emulator or device
...


How do I fix this problem ... help ... I have long been trying to install the SDK on its own!
lolopolosko
 
Posts: 22
Joined: Sat Feb 18, 2012 12:30 pm

Re: Permission Denied

Postby adam » Thu Mar 01, 2012 3:34 pm

If you have an android device you can connect it and it should continue. Otherwise you'll have to modify the build-scripts.
User avatar
adam
 
Posts: 265
Joined: Wed Sep 14, 2011 11:50 am

Re: Permission Denied

Postby sean » Thu Mar 01, 2012 7:56 pm

Thanks @adam. Yes, the scripts assume that you have an emulator or device attached; it will wait indefinitely. That said, in 1.0, I plan to separate the act of building and running such that building is possible w/o waiting for a device...
User avatar
sean
 
Posts: 120
Joined: Wed Nov 09, 2011 5:57 pm

Re: Permission Denied

Postby lolopolosko » Fri Mar 02, 2012 2:18 am

Thanks!
How do I change the build script?
lolopolosko
 
Posts: 22
Joined: Sat Feb 18, 2012 12:30 pm

Re: Permission Denied

Postby lolopolosko » Fri Mar 02, 2012 10:20 am

ok... I run emulator and start script run-host with administrator right.
and i see new error (Permission Denied and etc..)

This error:
Code: Select all
  1. C:\Android\moai-sdk\hosts\ant>run-host.bat

  2. Buildfile: C:\Android\moai-sdk\hosts\ant\build\build.xml

  3.  

  4. uninstall:

  5.      [echo] Uninstalling com.getmoai.samples from the default emulator or device

  6. ...

  7.      [exec] Failure

  8.  

  9. BUILD SUCCESSFUL

  10. Total time: 2 seconds

  11. Buildfile: C:\Android\moai-sdk\hosts\ant\build\build.xml

  12.  

  13. -pre-clean:

  14.  

  15. clean:

  16.  

  17. BUILD SUCCESSFUL

  18. Total time: 0 seconds

  19. Buildfile: C:\Android\moai-sdk\hosts\ant\build\build.xml

  20.  

  21. -set-mode-check:

  22.  

  23. -set-debug-files:

  24.  

  25. -set-debug-mode:

  26.  

  27. -debug-obfuscation-check:

  28.  

  29. -setup:

  30.      [echo] Gathering info for MoaiSample...

  31.     [setup] Android SDK Tools Revision 16

  32.     [setup] Project Target: Android 2.3.3

  33.     [setup] API level: 10

  34.     [setup]

  35.     [setup] ------------------

  36.     [setup] Resolving library dependencies:

  37.     [setup] No library dependencies.

  38.     [setup]

  39.     [setup] ------------------

  40.     [setup]

  41.     [setup] WARNING: Attribute minSdkVersion in AndroidManifest.xml (8) is lower

  42.  than the project target API level (10)

  43.  

  44. -build-setup:

  45.      [echo] Creating output directories if needed...

  46.     [mkdir] Created dir: C:\Android\moai-sdk\hosts\ant\build\bin

  47.     [mkdir] Created dir: C:\Android\moai-sdk\hosts\ant\build\bin\res

  48.     [mkdir] Created dir: C:\Android\moai-sdk\hosts\ant\build\gen

  49.     [mkdir] Created dir: C:\Android\moai-sdk\hosts\ant\build\bin\classes

  50.  

  51. -pre-build:

  52.  

  53. -code-gen:

  54.      [echo] ----------

  55.      [echo] Handling aidl files...

  56.      [aidl] No AIDL files to compile.

  57.      [echo] ----------

  58.      [echo] Handling RenderScript files...

  59. [renderscript] No RenderScript files to compile.

  60.      [echo] ----------

  61.      [echo] Handling Resources...

  62.      [aapt] Generating resource IDs...

  63.      [aapt] C:\Android\moai-sdk\hosts\ant\build\res\values\strings.xml: error: U

  64. nable to open file for read: Permission denied

  65.  

  66. BUILD FAILED

  67. C:\Android\SDK\tools\ant\build.xml:560: The following error occurred while execu

  68. ting this line:

  69. C:\Android\SDK\tools\ant\build.xml:589: null returned: 1

  70.  

  71. Total time: 1 second

  72. Starting: Intent { act=android.intent.action.MAIN cmp=com.getmoai.samples/.MoaiA

  73. ctivity }

  74. Error type 3

  75. Error: Activity class {com.getmoai.samples/com.getmoai.samples.MoaiActivity} doe

  76. s not exist.

  77.  

lolopolosko
 
Posts: 22
Joined: Sat Feb 18, 2012 12:30 pm

Re: Permission Denied

Postby lolopolosko » Fri Mar 02, 2012 10:30 am

And what this?

Starting: Intent { act=android.intent.action.MAIN cmp=com.getmoai.samples/.MoaiActivity }


run-host run this this project on android?

and how i can run this project on Emulator?
lolopolosko
 
Posts: 22
Joined: Sat Feb 18, 2012 12:30 pm

Re: Permission Denied

Postby NoobsArePeople2 » Fri Mar 02, 2012 10:43 am

lolopolosko wrote:and how i can run this project on Emulator?


The current host does not support OpenGL so you can't (item #5).
NoobsArePeople2
 
Posts: 51
Joined: Mon Feb 06, 2012 6:59 pm

Re: Permission Denied

Postby lolopolosko » Fri Mar 02, 2012 11:01 am

Yes, support was completed in gingerbread. See http://developer.android.com/sdk/android-2.3.html
lolopolosko
 
Posts: 22
Joined: Sat Feb 18, 2012 12:30 pm

Re: Permission Denied

Postby NoobsArePeople2 » Fri Mar 02, 2012 11:21 am

I'm not sure that's true. The link you provided only mentions that certain OpenGL methods were implemented, not that they are supported in the emulator.

The OpenGL ES2.0 page in the Android docs explicitly states that OpenGL is not supported in the emulator (it mentions 2.2, not 2.3 though. Maybe this changed?)

Of course, the way to put this to the test is to update the Android host to use Gingerbread rather than Froyo. I would note that the Android emulator is notoriously slooooooow so it's probably not up to testing out a game.

Changing line 53 in "AndroidManifest.xml" in your Android host should do the trick. SDK version 8 is Froyo, changing it to 9 should update the host to use Gingerbread.
NoobsArePeople2
 
Posts: 51
Joined: Mon Feb 06, 2012 6:59 pm

Re: Permission Denied

Postby lolopolosko » Fri Mar 02, 2012 11:52 am

how do I create an executable file (apk) on my computer (I will upload it to my device)?
I do not have adb support...
lolopolosko
 
Posts: 22
Joined: Sat Feb 18, 2012 12:30 pm

Re: Permission Denied

Postby NoobsArePeople2 » Fri Mar 02, 2012 5:15 pm

Why don't you have adb?

The run-host script builds the apk for you. It should be in "<path to your project>/build/bin/".
NoobsArePeople2
 
Posts: 51
Joined: Mon Feb 06, 2012 6:59 pm

Re: Permission Denied

Postby adam » Fri Mar 02, 2012 6:32 pm

You should be able to run it with an open emulator, make sure the emulator is open while running the build scripts. You will need adb though. This should allow you to generate an .apk without a device.
User avatar
adam
 
Posts: 265
Joined: Wed Sep 14, 2011 11:50 am

Re: Permission Denied

Postby lolopolosko » Sat Mar 03, 2012 3:17 am

Thanks, adam. I've already started emulator and ADB. But didn`t work.
I threw the above error


Code: Select all
  1. C:\Android\moai-sdk\hosts\ant>run-host.bat

  2.  

  3. Buildfile: C:\Android\moai-sdk\hosts\ant\build\build.xml

  4.  

  5.  

  6.  

  7. uninstall:

  8.  

  9.      [echo] Uninstalling com.getmoai.samples from the default emulator or device

  10.  

  11. ...

  12.  

  13.      [exec] Failure

  14.  

  15.  

  16.  

  17. BUILD SUCCESSFUL

  18.  

  19. Total time: 2 seconds

  20.  

  21. Buildfile: C:\Android\moai-sdk\hosts\ant\build\build.xml

  22.  

  23.  

  24.  

  25. -pre-clean:

  26.  

  27.  

  28.  

  29. clean:

  30.  

  31.  

  32.  

  33. BUILD SUCCESSFUL

  34.  

  35. Total time: 0 seconds

  36.  

  37. Buildfile: C:\Android\moai-sdk\hosts\ant\build\build.xml

  38.  

  39.  

  40.  

  41. -set-mode-check:

  42.  

  43.  

  44.  

  45. -set-debug-files:

  46.  

  47.  

  48.  

  49. -set-debug-mode:

  50.  

  51.  

  52.  

  53. -debug-obfuscation-check:

  54.  

  55.  

  56.  

  57. -setup:

  58.  

  59.      [echo] Gathering info for MoaiSample...

  60.  

  61.     [setup] Android SDK Tools Revision 16

  62.  

  63.     [setup] Project Target: Android 2.3.3

  64.  

  65.     [setup] API level: 10

  66.  

  67.     [setup]

  68.  

  69.     [setup] ------------------

  70.  

  71.     [setup] Resolving library dependencies:

  72.  

  73.     [setup] No library dependencies.

  74.  

  75.     [setup]

  76.  

  77.     [setup] ------------------

  78.  

  79.     [setup]

  80.  

  81.     [setup] WARNING: Attribute minSdkVersion in AndroidManifest.xml (8) is lower

  82.  

  83.  than the project target API level (10)

  84.  

  85.  

  86.  

  87. -build-setup:

  88.  

  89.      [echo] Creating output directories if needed...

  90.  

  91.     [mkdir] Created dir: C:\Android\moai-sdk\hosts\ant\build\bin

  92.  

  93.     [mkdir] Created dir: C:\Android\moai-sdk\hosts\ant\build\bin\res

  94.  

  95.     [mkdir] Created dir: C:\Android\moai-sdk\hosts\ant\build\gen

  96.  

  97.     [mkdir] Created dir: C:\Android\moai-sdk\hosts\ant\build\bin\classes

  98.  

  99.  

  100.  

  101. -pre-build:

  102.  

  103.  

  104.  

  105. -code-gen:

  106.  

  107.      [echo] ----------

  108.  

  109.      [echo] Handling aidl files...

  110.  

  111.      [aidl] No AIDL files to compile.

  112.  

  113.      [echo] ----------

  114.  

  115.      [echo] Handling RenderScript files...

  116.  

  117. [renderscript] No RenderScript files to compile.

  118.  

  119.      [echo] ----------

  120.  

  121.      [echo] Handling Resources...

  122.  

  123.      [aapt] Generating resource IDs...

  124.  

  125.      [aapt] C:\Android\moai-sdk\hosts\ant\build\res\values\strings.xml: error: U

  126.  

  127. nable to open file for read: Permission denied

  128.  

  129.  

  130.  

  131. BUILD FAILED

  132.  

  133. C:\Android\SDK\tools\ant\build.xml:560: The following error occurred while execu

  134.  

  135. ting this line:

  136.  

  137. C:\Android\SDK\tools\ant\build.xml:589: null returned: 1

  138.  

  139.  

  140.  

  141. Total time: 1 second

  142.  

  143. Starting: Intent { act=android.intent.action.MAIN cmp=com.getmoai.samples/.MoaiA

  144.  

  145. ctivity }

  146.  

  147. Error type 3

  148.  

  149. Error: Activity class {com.getmoai.samples/com.getmoai.samples.MoaiActivity} doe

  150.  

  151. s not exist.

  152.  

  153.  

  154.  

lolopolosko
 
Posts: 22
Joined: Sat Feb 18, 2012 12:30 pm

Re: Permission Denied

Postby adam » Mon Mar 05, 2012 4:07 pm

The problem is its not building due to the permission denied error. The new error is a result of the first one. Are you on Windows or Unix-based OS?
User avatar
adam
 
Posts: 265
Joined: Wed Sep 14, 2011 11:50 am

Re: Permission Denied

Postby thebullno1 » Mon Mar 05, 2012 4:17 pm

adam wrote:The problem is its not building due to the permission denied error. The new error is a result of the first one. Are you on Windows or Unix-based OS?

His path has C:\, it should be Windows.
This is really strange.
Did you extract the SDK and build using the same account?
User avatar
thebullno1
 
Posts: 319
Joined: Sat Jul 02, 2011 8:53 am

Re: Permission Denied

Postby recastrodiaz » Tue Mar 06, 2012 4:23 am

I had a similar "permission denied" problem when running the make-host.sh command from within Cygwin 1.7 (Windows 7). The script stopped at some point when rsync failed which was in turn caused by Cygwin messing up the files' permissions. Hopefully, the solution is pretty straight forward. Simply add a noacl flag to your Cygwin mounts:

http://stackoverflow.com/questions/5798 ... ermissions

Then delete your host and try building it again. Hope it helps.
recastrodiaz
 
Posts: 4
Joined: Sat Mar 03, 2012 3:00 am

Re: Permission Denied

Postby lolopolosko » Sat Mar 31, 2012 5:31 am

ok... now i new error when start run-host.bat (in new version 1.0)
when run run-host.bat i see this
Code: Select all
  1. not found file .?*

  2. not found file .?*

  3. not found file .?*

  4. not found file .?*

  5. not found file .?*

  6. not found file .?*

  7.  



OS Window 7 32bit

please! Create tutorial how i can install moai-sdk for windows (for noobs :D)
video lessons or write me.

And i this tutorial sent for my friend and other.

I badly speak and I understand English
but i don't understand how i can install moai-sdk on win 7. and run my first project on emulator
lolopolosko
 
Posts: 22
Joined: Sat Feb 18, 2012 12:30 pm

Re: Permission Denied

Postby lolopolosko » Sun Apr 01, 2012 6:56 am

I've found on the Internet that command FIND in cygwin does not work. Perhaps this is a problem.
The console informs me that
Code: Select all
  1.  

  2. not found file: .?*

  3. ...

  4. not found file: .?*

  5. FIND: invalid key //I'm translate this message (invalid token/key or command)  :oops:

  6. FIND: invalid key

  7. not found file: .?*

lolopolosko
 
Posts: 22
Joined: Sat Feb 18, 2012 12:30 pm

Re: Permission Denied

Postby sean » Tue Apr 03, 2012 1:47 pm

I need to tweek the scripts to run better out-of-the-box on Windows. Several different people have seen several different issues. But, that's not going to happen until an SDK update later this month. For now, IFF you have rsync in your cygwin install, I have a workaround. If you open the script in a text editor, you'll see several rsync commands that are commented out using the # character). If you go to each one, remove the # to uncomment the command and then add a # in front of the subsequent find command to comment it out, you might get past the errors you're seeing. Basically, we used to use rsync to do some magic file copying, but then switched to find to remove the dependency on rsync. However, I left the old rsync commands in the script in case people had issues.
User avatar
sean
 
Posts: 120
Joined: Wed Nov 09, 2011 5:57 pm

Next

Return to Moai SDK

Who is online

Users browsing this forum: Exabot [Bot] and 0 guests

cron

x