Score:0

How to rename snap application file in Ubuntu 20.04?

de flag

This morning I got Android Studio updated, and now it has a bug. The solution is here, so I just need to rename snap's file, how can I do this, if snap files are read-only?

Maybe there is a way to downgrade to the previous version of Android Studio? Because now when I do snap info android-studio it seems like there are no channels with previous versions.

user535733 avatar
cn flag
Did you report the bug to the Snap author? The Snap ecosystem is designed so that bugfixes can be pushed out rapidly. Up to four times each day
Kalich avatar
de flag
@user535733 the author already knows about the bug and they promised to fix it in the next minor release, but the bug is really annoying and I would like to fix it as soon as I can
Score:1
cn flag

There is no generic mechanism for renaming snaps nor editing yet. Seems you have to rename some .jar within the app. So you have to recreate the snap.

If this is the only solution of the bug, I suggest downloading Android Studio from here and installing manually.

Edit: If you need help regarding to installing Android Studio, feel free to reply.

raj avatar
cn flag
raj
There is a way to remount a snap read/write. There is a snap application called 'overlay' (you can install it from Snap Store) that does exactly this. Then, you need to write a script that is run `@reboot` in crontab that remounts the snap read/write using 'overlay' and renames the needed file(s).
bw3u avatar
cn flag
Great workaround! Thank you for your suggestion, but I am skeptical about editing stuff inside snaps (end user case). I would prefer installing it manually, OP can decide what he wants. Seems installing Android Studio is relatively easy too.
Score:0
zw flag

I would recommend to install Android Studio using Ubuntu Make:

sudo add-apt-repository ppa:lyzardking/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make

umake android android-studio

As the result it will be installed into ~/.local/share/umake/android/android-studio/ and you can edit any files here.

Score:0
vn flag

Maybe there is a way to downgrade to the previous version of Android Studio?

Yes, this is very easy with snaps. Just run:

sudo snap revert android-studio

Explained in more detail here.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.