Home > Uncategorized > Convert BlackBerry 10 BAR file to Android APK #BlackBerryDev

Convert BlackBerry 10 BAR file to Android APK #BlackBerryDev

I just developed this proxy to convert BlackBerry 10 BAR files based on the android runtime to APKs that can be installed on and Android phone.

There’s no user interface yet to this, you just post a url to a BAR file, and the APK will be returned back to you, like this

http://bar2apk.webtropy.com/?url=http://107.150.58.162/Apk2Bar/bar/com.topaccolades.volcanofree_v1.41.6.bar

The whole process is done in-memory, with no temporary files, I’ve used sharpziplib :

var strUrl = Request.QueryString[“url”];
var wc = new WebClient();
var zipped = wc.DownloadData(strUrl);
var stream = new MemoryStream();
stream.Write(zipped, 0, zipped.Length);
stream.Position = 0;
var zf = new ZipFile(stream);
foreach(ZipEntry ze in zf)
{
if (!ze.Name.EndsWith(“.apk”)) continue;
var zs = zf.GetInputStream(ze);
using (var ms = new MemoryStream())
{
zs.CopyTo(ms);
Response.ContentType = “application/vnd.android.package-archive”;
Response.AddHeader(“Content-Disposition”, “attachment; filename=” + ze.Name + “;”);
Response.BinaryWrite(ms.ToArray());
}
}

Categories: Uncategorized
  1. February 18, 2017 at 12:40 am

    Do you have a user interface yet? i am not to tech savy to send the file with a website link so i don´t know how to send you the files i want converted.

    Like

  1. No trackbacks yet.

Leave a reply to Supplychain-Latam Cancel reply