Recently I had to install self-signed certificate for Android apps, and the guides I’ve found were either not working or involved rebuilding aliendalvik image.
But after some trial and error I’ve found another way by adding mount entry to LXC config.
For some reason adding single file fails, so you have to replace whole directory.
First, copy your existing certificates to dir with write access, let’s say /home/defaultuser/cacerts
Reboot Android support, and your certificate should be among root certificates.
You will have to repeat step 1 if certificates in Android image were updated to get latest versions.
Thank you for theses instructions, really helpful.
I think they are a bit outdated however, I had to tweak them a bit.
lxc-attach needs a ‘–’ now before the command.
/home/defaultuser/ is not mounted by default in dalvik.
So you can copy your certificate in /home/defaultuser/Documents/, then :
On Sailfish 4.4 this worked for me straight forward as well. But with 4.5 executing
Results in
lxc-attach: aliendalvik: attach.c: get_attach_context: 403 Failed to get init pid
lxc-attach: aliendalvik: attach.c: lxc_attach: 1430 Failed to get attach context