View Single Post
Posts: 233 | Thanked: 491 times | Joined on Oct 2011 @ Sydney
#1
So you may have seen this thing called apkenv, which allows a very "small" set of Android apks to be run inside Harmattan.

If you follow me on Twitter, you would have seen I have been doing some experimental packaging, make these apks appear to be fully fledged apps (launcher icon, app mgr info, tap>hold>uninstall, etc).

NOTE:This method still requires you to install apkenv+libraries before you can use the apps you make. It also will work assuming you followed the original tutorial EXACTLY! I also assume you use linux (I use ubuntu VM ).

Obviously, I do not condone publishing apks for those you do not have the right to use, so I will simply post a tutorial using a skeleton archive (attached) to help.

First up, extract the archive to the desktop.

Rename the folder to whatever you wish to call the app. (Will call it foobar from here-in).

Inside foobar there is a debian folder, opt folder and foobar.desktop. First, we will modify the opt folder.

In the opt folder, you should have a sub directory foobar. This is where you store your .apk, icon.png (80x80), and execution script. The execution script isn't too important if you are confident at running command using the foobar.desktop file. However, I still suggest using this method, as it has greater control over tasks in my opinion.

Once you have opt/ all sorted, it is time to move on to the debian directory. Inside this we have postinst , changelog, control, foobar.install, mainfest.aegis, readme and rules. The only files you need to edit are postinst, changelog, control and foobar.install.

Open foobar.install in a text editor, changing the paths used to suit the /opt of your app. Same goes for postinst, simply adjust the paths to suit your package.

Changelog simply change foobar and the author information. In control, change the Description, Maintainer, source, package and x-Maemo-Display-Name fields. Everything Else can stay the same.

Finally, edit the foobar.desktop file. Here, we control what the user sees on the launcher page. The icon and exec fields simply need to have their paths altered. Change Name= to the name you want displayed.

P.S: I simply re-use the same structure for all my packaging (due to my app's being scripts and not QML/GUI based) so you may see out of place names eg. Harmoji, ABSapce etc. If so, I apologise, I have triple checked everything but I could have missed something. I trust if you're skilled enough to be doing this sort of thing, you will have the logic to change them accordingly.

Next, is compiling the deb.

To compile, I suggest you take a look at this guide. It is extensive, and helped me out once.
http://talk.maemo.org/showthread.php?t=80908

Huge thanks to NovaG for being the first to teach me how to package .deb files.
Attached Files
File Type: zip foobar.zip (8.8 KB, 171 views)
__________________
Blogs I post to
MyNokiaBlog
UnleashThePhones

Hit thanks if I have helped in some way, or you agree with me

Twitter
-------------------------------------------------------------------------------
Battery Widget
#OperationUnicorn
Harmoji - Emoji for Harmattan

-------------------------------------------------------------------------------
N9 [Black] - Sailfish OS (1.x.x.xx)
N9 [White] - PR 1.3 [Stock]
N950 - Sailfish OS
Z10 LE - 10.2.1.1055
Dev Alpha C - 10.2.1.1055

Last edited by MFaroTusino; 2012-10-27 at 10:38.
 

The Following 11 Users Say Thank You to MFaroTusino For This Useful Post: