Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
BlackBerry Development Advisor (Retired)
epelegrillopart
Posts: 99
Registered: ‎10-03-2009
My Device: Not Specified

Blackberry-connect, ssh-ing via devuser, and other NDK CLI tools

New post at OpenBBNews on how to use blackberry-connect, blackberry-nativepackager and blackberry-deploy to reach into your PlayBook for developer work.

 

Check out:

 http://openbbnews.wordpress.com/2011/12/21/devuser-and-1000/

Please use plain text.
New Contributor
absmall
Posts: 3
Registered: ‎01-03-2012
My Device: 9800
My Carrier: Rogers

Re: Blackberry-connect, ssh-ing via devuser, and other NDK CLI tools

Does this command still work with ndk2? I'm using ndk2.0.0-beta1 and the command described fails with this error:



$ blackberry-deploy -getFile logs/log /tmp/mylog -device 169.254.0.1 -password MYPASSWORD gp.bar

Info: Sending request: Get File
Info: Action: Get File
Info: Package org.demo.gp.gYABgPCtPVezCT5PIc4y5NeJ-f4
Info: Asset Path logs/log
Error: Cannot open file logs/log: No such file or directory

 

So maybe the file logs/log doesn't actually exist (although I'm pretty sure it does), so I tried putting a file instead (the file log.txt is just a small test file) and it fails with a similar error:



$ blackberry-deploy -putFile log.txt log.txt -device 169.254.0.1 -password MYPASSWORD gp.bar
Info: Sending request: Put File
Info: Action: Put File
Info: File size: 6
Info: Package org.demo.gp.gYABgPCtPVezCT5PIc4y5NeJ-f4
Info: Asset Path log.txt
Error: Cannot write to file log.txt: No such file or directory

 

Thanks,

Aaron

Please use plain text.
BlackBerry Development Advisor (Retired)
epelegrillopart
Posts: 99
Registered: ‎10-03-2009
My Device: Not Specified

Re: Blackberry-connect, ssh-ing via devuser, and other NDK CLI tools

I just tested it with the one of the NDK 2 beta2 samples (AudioControl) and got the log as expected.

 

Did you try peeking into the PlayBook using blackberry-connect + ssh to check the log is there?

Please use plain text.
New Contributor
absmall
Posts: 3
Registered: ‎01-03-2012
My Device: 9800
My Carrier: Rogers

Re: Blackberry-connect, ssh-ing via devuser, and other NDK CLI tools

I peeked from within the application GUI (the application reads directory listings) and can see that the log file is there.

 

I could not see with ssh, though - after running blackberry-connect, I can ssh as devuser, and go into /accounts/1000/appdata, but I can't get any further than that - I get 'permission denied' when going into the application's directory, so can't see the log in that manner.

 

Thanks

Please use plain text.
BlackBerry Development Advisor (Retired)
epelegrillopart
Posts: 99
Registered: ‎10-03-2009
My Device: Not Specified

Re: Blackberry-connect, ssh-ing via devuser, and other NDK CLI tools

Humm... I'm running a newer 2.0 than the public beta but I doubt that is the problem.

 

Quick Q - did you package in -devMode (& -debugToken etc).  See http://openbbnews.wordpress.com/2011/12/16/ndk-beta2/

Please use plain text.
BlackBerry Development Advisor
elena_laskavaia
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Blackberry-connect, ssh-ing via devuser, and other NDK CLI tools

Is deployed application in devMode? If not you cannot do it. Also when you write a file you have to write to logs dir, not to root, you cannot write to sandbox root.

Please use plain text.
New Contributor
absmall
Posts: 3
Registered: ‎01-03-2012
My Device: 9800
My Carrier: Rogers

Re: Blackberry-connect, ssh-ing via devuser, and other NDK CLI tools

Thanks, I was not using a debug token, that is the problem.

 

I'm curious, I've gone over the documentation again, and still can't find anywhere saying that a debug token is required to collect logs. Is this written anywhere? I would have expected to see it here: https://bdsc.webapps.blackberry.com/native/documentation/com.qnx.doc.native_sdk.quickstart/topic/con...

Please use plain text.
BlackBerry Development Advisor
elena_laskavaia
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Blackberry-connect, ssh-ing via devuser, and other NDK CLI tools

I will send them a bug about it (to docs team). It is not directly related to debug token but to dev mode of the application. App dev mode have less security involved which allows to debug app and collect logs and modify app sandbox from outside.

Please use plain text.