We have moved to a new Sailfish OS Forum. Please start new discussions there.
10

Is there a way to boost the RAM for Android, aliendalvik?

asked 2019-02-07 22:41:53 +0300

1984 gravatar image

Seems the limt of RAM for Aliendalvik is still something around 500 MB.

With JP 1 I didn't complain, but with the XA2 it's very painfull.

Especially the young future SFOS user are hard to convince to change their OS when they have a look in the native App-stores. They start to get really interested when I mention the Android support. But open several or RAM-intense Android apps (Photo-/Videoeditors, games, etc.) makes flickering or slow impressions and the feeling of going backwards 5 years ago. :(

Is there a way to get rid of that limit? Why is it there anyway?

edit retag flag offensive close delete

Comments

Mine doesn't even start due to hitting a 256MB limit, so any info on this would be very welcome.

attah ( 2019-02-07 23:11:37 +0300 )edit

I think this issue is due to the non-optimization of aliendalvik. I think they're going to make it more robust in the future updates

Sakke ( 2019-02-08 11:26:22 +0300 )edit
1

hopefully, this is essentiell

Bavarian ( 2019-02-08 21:10:03 +0300 )edit

@Sakke What you mean with non-optimization of aliendalvik?

"I think they're going to make it more robust in the future updates"

If "they" means the Jolla Sailors and "future" means during the lifetime of XA2, please share your method to get so optimistic! :-D

1984 ( 2019-02-08 21:14:51 +0300 )edit

I don't experience this with Photoshop/Lightroom for instance. Do you have a Google account added on your XA2? (not in dalvik)

Bundyo ( 2019-02-09 11:41:23 +0300 )edit

I do, yes, so i tried with disabling it and there was a difference, but in the end the result was very similar.

attah ( 2019-02-09 11:49:13 +0300 )edit

Disabling doesn't work - you'll have to delete it. My dalvik was unusable - huge memory leak and crashed every 2 minutes. After deleting my Google account from the phone - dalvik flies and no problems in sight.

Bundyo ( 2019-02-09 13:33:29 +0300 )edit

I'm using the android Gmail app now. Also exported my contacts from Google Contacts in desktop browser as vcf and imported them directly.

Bundyo ( 2019-02-09 13:35:40 +0300 )edit

@Bundyo Thanks for your suggestion, but that didn't help. I even tried clearing /home/.android and reinstalling still with the account disabled, but no change. I do still get the (freely translated) "Finalizing Android update" notification with a progress bar that is stuck in the 20% territory. Does your finish?

attah ( 2019-02-09 14:09:12 +0300 )edit

@Bundyo I don't have google account. I refer to [https://together.jolla.com/question/38026/what-is-the-maximum-amount-of-ram-that-an-android-game-can-allocate-in-your-alien-dalvik-configuration/]

When you use Photoshop what does your RAM-usage shows?

1984 ( 2019-02-09 17:48:26 +0300 )edit

@attah: Disabling doesn't help - only deleting the account does.

Bundyo ( 2019-02-09 20:33:02 +0300 )edit
1

@1984: Can't see the exact memory usage in Lighthouse, since my eyes are not that good (Lighthouse is not scaled), but overall memory usage is about 80% with 4 apps open and Photoshop is using something like 6% of all memory and system_server about 10. Dunno how believable is that.

Bundyo ( 2019-02-09 20:40:08 +0300 )edit

@Bundyo I meant to say deleted the second time around, sorry for the confusion. You were clear on that the first time. Still didn't work.

attah ( 2019-02-09 21:45:48 +0300 )edit

Hmm, it did work for me and all other people in the memory leak thread. Must be a different bug then.

Bundyo ( 2019-02-10 11:33:58 +0300 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2019-04-30 07:25:22 +0300

mynameisnotimportant gravatar image

updated 2019-04-30 07:44:55 +0300

I think there might be something we can do, though I am not sure of the long term effects. If you edit the build.prop you can change the following values:

dalvik.vm.heapgrowthlimit=128m
dalvik.vm.heapsize=256m

I set the limit to 512, and the size to 768 myself in an attempt to make Azur Lane run smoother, and it seems to definitely have some effect I think (although it may just be placebo, I doubt it). If I understand correctly, these values should be low-ish for multitasking (more apps that don't do much themselves) and higher for games).

To change them, you'll have to copy the /opt/alien/system.img to a computer, then run unsquashfs system.img as root, edit the squashfs-root/system/build.prop file, then re-create the image with mksquashfs /path/to/squashfs-root system.img.new -comp lz4 -Xhc -noappend -no-exports -no-duplicates -no-fragments. Then just replace the old system.img with the new one you just made (make sure to back up the old one!).

Personally I would just set them as high as possible, but lower then the max available memory (SFOS itself also needs resources as do native apps). Also, the normal limit applies to 'normal' apps while the overall heap size limit applies to 'big apps' if I understand this correctly. Games _should_ use the normal heap size.

I have only just started messing around with these values, so I am not sure what the best values are. I think I will try 1537 for the heapsize next....

EDIT: Values over 1GB prevented aliendalvik.service from starting. In the end I used 256 for the limit and 896 for the size, and that seems to work somewhat well.

edit flag offensive delete publish link more

Comments

Do you know if there's a way to achieve the same thing with the Jolla Tablet?

MeegoUser ( 2019-05-11 05:37:07 +0300 )edit

No idea. I don't have the tablet. Does the tablet even have alien dalvik? If so, it should be the same steps. You may not even have to recreate the system.img in case the files are just in a directory (this was the case for the jolla 1 phone iirc). Either way, the build.prop file is an android thing, so technically, no matter HOW you run android apps it should work. Even on real android OS.

mynameisnotimportant ( 2019-05-11 16:57:20 +0300 )edit

@mynameisnotimportant The tablet for sure uses Alien Dalvik, as in Android 4.4.4. There are actually three build.prop files to be found in the folder structures, I've edited the one in "system_jolla" (= 256 MB limit, 896 MB size, like above), and it got my tablet into a boot loop after a restart, so I had to do a hard reset in the end, because I couldn't access the files through Recovery Mode anymore. Do you have a clue why such a small change ended in a non-starting device?

MeegoUser ( 2019-05-12 03:13:40 +0300 )edit

I've been able to modify the build.prop in opt/alien/system now (256m limit, 512m size), without causing a bootloop, unfortunately Fennec 59.0.2 still crashes a lot despite the change. Anyway, thanks for the instructions above!

MeegoUser ( 2019-05-13 01:06:22 +0300 )edit
1

No problem, glad it works for you. I am not sure about system_jolla, never heard of that before. It's probably unrelated, maybe some folders are related to libhybris? Not sure, at this point I am just wildly guessing. In any case, the /opt/alien/system/build.prop file is the correct one. As for boot loops, if I had to guess it's due to assigning too much RAM? I'd just play around with it. You should be able to just simply restart the service instead of rebooting the device to try the values systemctl restart aliendalvik.service.

As for Fennec, also no idea. However you should try reinstalling it (uninstall then reinstall, not just updating). That's what I had to do after installing microg.

mynameisnotimportant ( 2019-05-13 18:44:50 +0300 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2019-02-07 22:41:53 +0300

Seen: 1,150 times

Last updated: Apr 30 '19