krish – 起死回生 [Wake up from death & return to life.]

December 11, 2013

Blackberry WebWorks 2.0 on Linux!

Okay!, so first some history.. was working with Webworks 1.x to get my game Baka – The World’s Hungriest Frog packaged for Blackberry 10.x platform.

Ran into quite some problems … not finding debug tokens to missing author.p12 files were just some of them.
To much dismay, suddenly all the docs links I was referring to on the developer url on blackberry site changed to Webworks 2.0 (Yay! RIM released BB Webworks 2.0 based on Apache cordova)

Wasn’t much “yay!” for me as I spent over a week figuring out why my debug token wasnt generating or why I couldn’t package a simple bar file… all in between making trips to hospital for I was under treatment for typhoid (still under medicine as we speak).

rants on twitter

rants on twitter

more rants

more rants

Anyway, I was super pissed… shot couple of mails and tweets and thankfully Erik (@WaterlooErik) mailed back quick…. and with quite a sensible reply. Very kind of him 🙂

3 lines from his email got me the root of the problem

When testing with the new WebWorks 2.0 SDK, you should actually only have to run the following command when your device is connected:
webworks run

This will automatically generate a debug token for you if need be, upload it to the device, and then deploy your project in debug mode to the device.

Have you registered your BBID code signing keys and generated a new author.p12 file already? (If you are using your old CSJ code signing keys, that may be where the issue is coming from.)

My Problems:
1. What he mentioned as “automatically generate a debug token for you” wasn’t happening.

2. So, I was trying everything manually to create those debug tokens… using csj files with the old webworks debugtokenrequest commands and csk with new debugtokenrequest… wait.. in short I had both stuff installed in a big mess.

3. I was using Webworks setup inside a Windows VM running on a Linux host.. so the device was connected via host to guest.. and somehow that pretty much doesnt work. “No Blackberry device found” 🙂

I definitely didn’t want to dual boot my laptop with windows for this (although I could have used my desktop .. I wanted to have this on the move)

Then I found this https://github.com/badtoyz/BB10-WebWorks-SDK-2.0.0.54-Beta

Decided to do a clean install on my laptop/Ubuntu host … so here I take you through how it was done along with some pitfalls.

 

 

INSTALLING WebWorks 2.0 BETA on Ubuntu Linux:

– PREREQUISITES

\\ Install Git, ia32-libs, Java Runtime Environment
krish@shenron:~$ sudo apt-get install git ia32-libs openjdk-6-jre

\\ Update Repo and install python stuff and build tools
krish@shenron: ~$ sudo apt-get update
krish@shenron: ~$ sudo apt-get install python-software-properties python g++ make

\\ Get Nodejs from Chris’s ppa – there is a nice updated build for lucid lynx, so didn’t have to compile from source
krish@shenron: ~$ sudo add-apt-repository ppa:chris-lea/node.js
\\Accept the freaking ppa adding warning 🙂

\\Install Nodejs
krish@shenron: ~$ sudo apt-get update; sudo apt-get install nodejs

\\Install Cordova via npm
\\ Note: I didn’t have to install npm via my package manager. Infact it apt-cache policy npm shows its not installed. Probably comes packaged with nodejs
krish@shenron: ~$ sudo npm install -g cordova


– WebWorks 2.0 Beta

\\ Get from Mike’s (@badtoyz) repo
krish@shenron:/opt$   git clone https://github.com/badtoyz/BB10-WebWorks-SDK-2.0.0.54-Beta.git
krish@shenron:/opt$   mv BB10-WebWorks-SDK-2.0.0.54-Beta    BadToyz-BB10WebWorks

 

– Start UI and Try to create a Test Project

startui

Open a tab on your browser to http://localhost:3123, this should give you WebWorks 2.0 UI
Try creating a project and Build it.

For me, it didnt 🙂 .. It got stuck at a dialog called “Creating…” or something and hung there.
So did a little debug via command line, found where the problem step was, reported it on an issue
https://github.com/badtoyz/BB10-WebWorks-SDK-2.0.0.54-Beta/issues/2

I thought I might now have to wait another week for this, but Mike was kind enough to fix this fast (as you can see from the replies on that issue)

 

 

– Pull in latest from Repo + Couple of more changes I figured was necessary

\\ Stop the UI by Ctrl+C on that term you were running it on.

\\ Pulled in Mike’s fixes. You may not have to do this because you will get latest fix from HEAD
krish@shenron:/opt/BadToyz-BB10WebWorks$ git pull origin master

\\ Install npmlog, graceful-fs and clean .cordova
krish@shenron: ~$ sudo npm install npmlog
krish@shenron: ~$ sudo npm install graceful-fs
krish@shenron: ~$ rm -rf .cordova

\\ Extend PATH variable .bashrc to add /opt/BadToyz-BB10WebWorks
\\ and /opt/BadToyz-BB10WebWorks/cordova-blackberry/bin/dependencies/bb-tools/bin

Add to your PATH in .bashrc

Add to your PATH in .bashrc – Sorry for the small screenshot. Resized by mistake 😦

\\ Now startui again and try to create test project
krish@shenron: ~$ cd /opt/BadToyz-BB10WebWork
krish@shenron:/opt/BadToyz-BB10WebWorks$ ./start-ui

Go to that localhost:3123 again, and try… it worked this time 🙂
Was able to create the project.

 

– CONNECT Your Blackberry on LINUX

I was using z10 dev alpha B.. you might have a z30.

Well, this doesnt work so seamlessly as it does on Windows, aka.. it doesnt connect via usb as a recognizable device.. this is the reason I couldn’t forward the usbdevice into my VirtualMachine windows.

Anyway here’s the work around

1. Enable Dev Mode
– Go to Settings -> Security and Privacy -> Development Mode
– Give a password, remember it. This is your DEVICEPASSWORD
– Set an IP. Default is 169.254.0.1 (I used 169.254.1.5)

2. Connecting via USB on Linux
– Got to Settings -> Storage and Access
– Set USB Connections to “Connect to Windows” or “Connect to Mac” instead of the default “Auto detect”
Now you’ll see the device will be available as a network connection on your network-manager
Note: I renamed it to BBz10 to remember so.

BlackBerry z10 in dev mode on Linux as a usb network.

BlackBerry z10 in dev mode on Linux as a usb network.

3. Test the connection
– You should be able to ping your z10 via its dev mode IP (169.254.0.1 or whatever you set it to)

 

 

– Try to BUILD test WebWorks Project

Tried to build and install the project via UI
– FAILED 😦

Debug Token, Where are Thou? :(

Debug Token, Where are Thou? 😦

What the!!! Same old error. Now I dont want to use that blackberry-debugtokenrequest script again?
Oh wait, Remember Erik said, “When testing with the new WebWorks 2.0 SDK, you should actually only have to run the following command when your device is connected: webworks run”

Let’s try that


 

– Creating a DEBUG TOKEN 

\\ Go to a project directory
krish@shenron:/opt/BadToyz-BB10WebWorks$ cd ~/WebWorks Projects/test1
\\ Run webworks run.
\\ This will ask you for your DEVICEPASSWORD (which you entered when switching on debug mode)
\\ And your KEYSTOREPASSWORD (which you set while generating bbidtoken.csk)
\\ If you did not generate bbidtoken.csk, please do it via
\\ http://developer.blackberry.com/codesigning
krish@shenron:~/WebWorks Projects/test1$ webworks run
[ERROR] The Specified CSK password is not valid.

Whaaat!!! :/

Pretty sure that I had my csk password correct.
Let’s try verbose mode
\\ Trying Verbose on webworks run
krish@shenron:~/WebWorks Projects/test1$ webworks –verbose run –devicepass DEVICEPASSWORD –keystorepass KEYSTOREPASSWORD
Generating config.xml from defaults for platform “Blackberry10”
[INFO] Target Z10-MYDEVICEPIN selected
[INFO] Generating debug token
[ERROR] The specified CSK password is not valid.
An error has occured.

At this point I could see fumes out of my head. This was back to square one. :X
Atleast, it shows MYDEVICEPIN correctly, so unlike earlier, it is able to connect to my device this time 🙂

Did I mention I was making trips to hospital the whole last week? and then working late nights (probably half drowsy) on this with Webworks 1.x
So I thought, what the hell.. lets just try to ensure we have all files correct


– Files you need under ~/.rim or your /home/user/.rim

You’ll need the bbidtoken.csk and author.p12
I backed up my author.p12 from the windows VM from “%HOMEPATH%\AppData\Local\Research In Motion”
and put in under “~/.rim”

I’m pretty sure I had to generate that author.p12 on Windows. Just can’t remember at the moment.

As for bbidtoken.csk, I generated a new one by going to http://developer.blackberry.com/codesigning and requesting a new token for SDK 10.2 for WebWorks 2.0 Beta
AND remember the KEYSTOREPASSWORD you set here 🙂

 

 

– Try to CREATE Debug Token Again

W00t! ... it also deployed the app to my z10? :)

W00t! … it also deployed the app to my z10? 🙂

Yippie! Finally… webwork run also deploys if the app is connected.
Also it created debug keys and pushed it to the device. I could see that on the “Settings -> Security and Privacy -> Development Mode” screen.

But wait, I want to see this working via UI too.

\\ So fire up the ui again
krish@shenron: ~$ cd /opt/BadToyz-BB10WebWork
krish@shenron:/opt/BadToyz-BB10WebWorks$ ./start-ui

\\Try to Build and Install the project via the UI

Building BAR file success!

Building BAR file success!

Huaaaaaaa!!! 🙂
You’ll see your the app fire up on your phone screen and also an app icon installed 😀

Your test WebWorks 2.0 app

Your test WebWorks 2.0 app

Hope this helps someone 🙂

You can tweet a thanks to @WaterlooErik , @badtoyz and may be me if you want to let me know that this worked for you! 🙂
Or if it didn’t, feel free to either tweet to me @srikrishnadas and/or leave your error in comments 😀
Thanks to ダニエル for his nice write up on prereqs for the old Webworks. It did help 🙂 I wish I knew his twitter id to include in the above thank list 😀

An hour past midnight now.. time for BattleField 😉

Btw, You can LIKE our game page – https://facebook.com/HungryBaka to keep updated on the upcoming fun adventure non-endless jumper .. the story of The World’s Hungriest Frog – “Baka” 🙂

Advertisements

August 10, 2013

Red Headed Beauty

Filed under: Art — krish @ 4:49 pm
Tags: , , , , , , , , , , , ,

On failing to find a shipper for Dagi stylus, I bought another cheapo one… first doodle with it.. testing… precision sucks.

Subject: Red head beauty.

Head hair ... one of the most beautiful parts of a woman.

Head hair … one of the most features of a woman.

January 25, 2013

Short Ride pics from Last Sunday.

Photo Credits: Jaijeet

Photo Credits: Jaijeet

Offroad into a small canyon :)

Offroad into a small canyon 🙂

Amitiel resting :)

Amitiel resting 🙂

Sometimes, staring at dead ends helps you realize how much more power you need to punch a hole through them.  -- The HeartBrokenBiker

Sometimes, staring at dead ends helps you realize how much more power you need to punch a hole through them.
— The HeartBrokenBiker
Photo credits: Jaijeet

Amitiel and The HeartBrokenBiker Photo Credits: Bishal

Amitiel and The HeartBrokenBiker
Photo Credits: Bishal

If life is like a journey/road,  and true love is the one who does not let you down at its curves....  then here's a pic of my true love. :) -- The HeartBrokenBiker

If life is like a journey/road,
and true love is the one who does not let you down at its curves….
then here’s a pic of my true love. 🙂
— The HeartBrokenBiker
Photo credits: Bishal

January 12, 2013

Memories of Delhi from 2011

Ah, memories of Delhi… way back from 2011, when I was attending First Comic Con India.
Stayed for free at Jeba (Graydot) and Ankur‘s place for 2 days! .. I didn’t even know them when I arrived.
Sorta like Couchsurfing before even joining couchsurfing.org 😉

Grateful to them. They shared their food, they cooked delicious fish for me, Jeba and I chased expensive cars :), he also accompanied me to ComicCon, until he encountered Vivek Khurana (nomind) and then ran away for tasty meat food. 🙂

I gotta thank Vivek for not letting me miss that food, by treating me to awesome hot pakodas with earthen-pot tea, organic food, chaat, hot samosas,  and finally Bengali sweet curd.

And special thanks to Atul, for he created the chain of contact with Jeba & requested for my stay… I was too hesitant to ask 😀

Hugs to all of you!

Here’s the album – https://www.facebook.com/media/set/?set=a.10150099819382192.286926.821407191&type=3

Hot Pakodas and Makte Wali Chai @ Organic Foods at Delhi

Hot Pakodas and Makte Wali Chai @ Organic Foods at Delhi

 

I had just bought the camera back then, had no fucking idea what to click and what not to… I clicked mostly crap instead of clicking a nice group pic with you guys.

So what reminded me of Delhi?   The freaking cold tap water that froze my palm this morning. 😛

December 30, 2012

The Heart Broken Biker – Vlog 010 – Save the Bees!

Part of adventure last night.

Trying to rescue some bees and help them back to their colony/hives.

Credits:
Intro Music: “In My Own Place” by Yumisekai

December 29, 2012

2 of my favorite Anime Characters

Alrighty folks, time for my Desk Pic of the Week 🙂 and a Quiz 😀

There are 3 anime characters in this pic (2 being my personal favs) 🙂

Can anyone correctly name all 3?

Two of my fav anime characters are there in the pic.There are total 3 anime characters in the pic.Can you spot and identify them all? :)

Two of my fav anime characters are there in the pic.
There are total 3 anime characters in the pic.
Can you spot and identify them all? 🙂

December 26, 2012

Vroom Vrooooom… to a lake near Wildlife Sanctuary, Medak

A biker pal needed couple of video shoots done at a particular location, and we decided to join him[Dhiraj] and see if we can be helpful in anyway.
So three of us, drove away to this beautiful location and amidst the video shooting we managed to get some supercool still photographs 🙂 .. Thanks to Vinfred who was slaving off behind the camera. 😐

The lake wasn’t overflowing but still was beautiful.
(I’ll try to put a pic of another biker[Ravi] who’s been there in monsoon when lake overflows.. pretty awesome)

Here’s couple of pics for my blog readers and as usual the full album is available on Facebook. <– Click to see

Machines Resting at the verge of valley at the lake.

Machines Resting at the verge of valley at the lake.

Making phun of me huh.. Here take my contactless air 'ki' punch ....  HUAAAAAA  :)

Making phun of me huh..
Here, take my contactless air ‘ki’ punch …. HUAAAAAA 🙂
In pic: Dhiraj and Me

Probably the only pic of Vinfred we got. He's happy :)

Probably the only pic of Vinfred we got.
He’s happy 🙂

Blueeeeeeeeeeeeeee

Blueeeeeeeeeeeeeee

Look Look .. I got myself invisible Guns ;)

Look Look .. I got myself invisible Guns 😉

Swim .. anyone? (See next   pic) :)

Swim .. anyone? (See next pic) 🙂

Ok..  NOW swim anyone? :) Btw, that's "Xenochrophis piscator" or "Checkered KeelBack". Man, if I wasn't living in India ... I'd definitely have snake pets (Will write another post someday about which snakes I'd like to have as pets). Note:  Snake as pet is illegal in India.

Ok.. NOW swim anyone? 🙂
Btw, that’s “Xenochrophis piscator” or “Checkered KeelBack”.
Man, if I wasn’t living in India … I’d definitely have snake pets (Will write another post someday about which snakes I’d like to have as pets).
Note: Snake as pet is illegal in India.

All that touring on a Sports Bike that is meant for track racing..... definitely asking for body stretching.

All that touring on a Sports Bike that is meant for track racing….. definitely asking for body stretching.

Now, for pics from Ravi’s album (when the lake was overflowing):
Note: Following two pictures are copyrighted to Ravi Varma. I am using them with his permission.

Beautiful isn't it? You see people cautiously walking there... well you can drive your bike there, but you need to be extra cautious. A tiny slip and you'd be inside the lake with your bike (minimum depth 25 feet)  :D

Beautiful isn’t it?
You see people cautiously walking there… well you can drive your bike there, but you need to be extra cautious.
A tiny slip and you’d be inside the lake with your bike (minimum depth 25 feet) 😀

Now this is Ravi's classic signature move ...  Everywhere he goes touring, he finds a waterbody to wash his bike :) Play in water anyone?  I'll definitely go again during monsoon :D

Now this is Ravi’s classic signature move … Everywhere he goes touring, he finds a waterbody to wash his bike 🙂
Play in water anyone?
I’ll definitely go again during monsoon 😀

December 24, 2012

Pinning my hikes/travels on Everplaces now…

It was getting rather clumsy to maintain a list of places I’ve been to, list of places I want to be at and other stuff on Google presentation.

Moving them to Everplaces.com slowly (as and when I find time)
The site is slow but I like the interface.
Added 6 places as of now, visited 2 of them already. 🙂

Here’s my profile – https://everplaces.com/heartbrokenbiker/

Updating my places of hiking/travelling/biking

Updating my places of hiking/travelling/biking

Stay tuned.. I’m gonna go places. 😉

December 21, 2012

The Heart Broken Biker – Vlog 009 – DoomsDay, Shit just got Real!

Everyone who has made fun of the DoomsDay will learn to believe after this rare footage.
Shit just got real! 😉

Don’t be a Sinner like me… I have realised…. Believe it you Fools… Dont be a Sinner.. Believe it!

 

P.S: Didn’t want to do a vlog on this, but something hit me in the last moment and I picked up the camera and did a quick one.

Credits:
Sound Tracks:
Original Sin (For not keeping virginity) – from Anime Hellsing
Jerk it Out – by The Caesars
Dread Rock  – by Paul Oakenfold (Matrix fans? – heard it in Matrix Revolutions)

P.P.S: Reality Check.. DoomsDay isn’t here yet.
Destructions have happened in Real World and will keep happening
… 21 Dec 2012 has nothing to do with mark of new destructions.
World might eventually end someday thousands/millions of years later or may not.
Get ya lazy ass back to Work. 🙂

Create a free website or blog at WordPress.com.

The Male Factor

#1 Site For Research on Men and Boys

Rough Draft

by Atteris Amarth and Darrek Ringo

The Kochi Post.

Read by all + Influenced by none

JumboMake

A signature of Kiran

SAAYAM CHEDDAM FOUNDATION

This blog is just for additional and extension share of it's main frames. No activity is planned from here

krish - 起死回生 [Wake up from death & return to life.]

Get a sneak peek into krish's life, work and passion.

WordPress.com

WordPress.com is the best place for your personal blog or business site.

A Tale of Two and a Half

Monika Amita Bakshi

%d bloggers like this: