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

Android™ Runtime Development

Reply
Contributor
namanhams
Posts: 18
Registered: ‎05-01-2013
My Device: BlackBerry Z10
My Carrier: NA

Application signing confusing : online converter works, but command line doesn't

I believe the reason behinds this must be very simple, but somehow it still happens despite of all my efforts.

 

1/ With online converter, everything works perfectly fine. 

 

I've successfully converted my apk to bar, deploy it to device, and submit to store.

BUT, that's when i use the online converter only. So, i use the online converter to convert my apk to bar, then i sign it with my certificate .p12 (using command line), then i can deploy or submit without any issue. 

 

Here's how i signed it

./blackberry-signer -verbose -cskpass nofragme  -keystore author.p12 -storepass nofragme com.hoiio.android_v2.6.8.65.bar author

 

2/ Using command line to convert, it doesn't work. I can convert, sign, but cannot deploy

Then the online converter goes down. I have to use command line to convert the apk to bar. Then i follow same steps to sign then deploy / submit. 

 

Here's the command line to convert: ./apk2bar myapp.apk  path/to/Android/SDK

 

So the only difference is : previsouly i used the online converter, now i use command line to convert.

 

RESULT

- After i sign the bar file then deploy to device, i receive : "result::failure 881 required signatures missing (RDK)"

- When i submit the bar file to store, i receive : "Bar is not RDK signed" 

 

But i can still deploy to simulator 

 

 

I believe the online converter tool also goes through the command line process, but seem that it does something more. My guess is, after converting to bar file, they also sign the bar file with RDK option (instead of 'author' option). Then when i download the bar file, i sign it with 'author' option, then it works

If that's true, then that also means, the online converter must RDK sign the bar file with their own certificate, then i also 'author' sign it with my own certificate. How come does it work ? 

 

 

Thank you for reading my post, and if you know something, please help ! 

 

Please use plain text.
BlackBerry Development Advisor
jjasmann
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: Bell

Re: Application signing confusing : online converter works, but command line doesn't

[ Edited ]

Assuming you've got your keys already setup with your computer, the process to convert/sign from the command-line tools is as follows:

 

Note*: I've got ANDROID_HOME set as an environment variable, so I've excluded that from the arguments

 

1. apk2bar MyApk.apk

2. batchbar-signer MyApk.bar "C:\users\username\AppData\Local\Research In Motion\author.p12" myCskPass

3. blackberry-deploy -installApp -device 169.254.0.1 -password myDevicePass MyApk.bar

 

---

 

It looks like your problem is coming from blackberry-signer not signing the BAR. 

 

With the command you described as:

 

./blackberry-signer -verbose -cskpass nofragme  -keystore author.p12 -storepass nofragme com.hoiio.android_v2.6.8.65.bar author

 

just make sure that author.p12 and the BAR have their full file paths, unless they are both within your current directory.

   

    Justin

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com
Please use plain text.
Contributor
namanhams
Posts: 18
Registered: ‎05-01-2013
My Device: BlackBerry Z10
My Carrier: NA

Re: Application signing confusing : online converter works, but command line doesn't

Hi Justin,

 

As i mentioned in the first post, the only difference is in the conversion process. If i convert using the online tool, it works. If i convert using command line, it doesn't work. The signing process and deloyment process are the same. 

Please use plain text.
BlackBerry Development Advisor
jjasmann
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: Bell

Re: Application signing confusing : online converter works, but command line doesn't

I'm not sure I fully understand your process. 

 

In any case, if you're going to use the online tool to repackage your application, you should complete the process there, allowing it to repackage and sign before you deploy it. Similarly, if you're going to repackage with the command-line tools, stick with those for the entire process.

 

That should eliminate some of the variability you're seeing. 

 

You can follow my previous post for instructions on how to run through the entire process with the command-line tools as well.

 

    Justin

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com
Please use plain text.
Contributor
namanhams
Posts: 18
Registered: ‎05-01-2013
My Device: BlackBerry Z10
My Carrier: NA

Re: Application signing confusing : online converter works, but command line doesn't

Thanks ! 

 

I have decided to do both signs (RPK and author) using my own certificate and submit as a new app. Will abandon online tool from now on. 

 

Please use plain text.
BlackBerry Development Advisor
jjasmann
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: Bell

Re: Application signing confusing : online converter works, but command line doesn't

Awesome job :smileyhappy:

 

    Justin

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com
Please use plain text.