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
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());
}
}
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.
LikeLike