Aliendalvik: root access?

I am desperately trying to get root access on aliendalvik (I want to integrate xposed framework to get control over what information applications are gathering and fake them using xprivacylua).

Is someone aware of some simple method how to do it? I have unpacked squoshfs, added su to the image and created new image but the apks started dont run (lxc-info says the aliendalvik container is started). On the other side, without the su binary the image is working fine. Selinux?

Can the image be built from sources?

I believe Aliendalvik is closed-source ā€¦

Ok, I think i have figured it out, I have probably messed up some permissions while mounting.

For help to the others.

Backup /opt/aliendalvik/system.img if something goes wrong.

unsquashfs /opt/alien/system.img to some directory, lets say ~/aliendalvik

Change whatever you feel appropriate.

Run:

sudo mksquashfs ~/aliendalvik system.img -comp lz4 -Xhc -b 131072 -no-exports -no-fragments -no-duplicates -all-root

You should get squashfs image matching the original one (except the changes).

Copy it back to /opt/alien (stop the android subsytem first), take care that ownership and permissions are the same as original system.img.

I wonder if jolla would have something against doing some community image (normally, still for paying users) with integrated microg, xposed and root? I would rather integrate magisk, but the problem is that magisk is using boot or recovery to start, while they are not needed here. But it would be great if someone knows how to adapt magisk to start from system image.

4 Likes

We should pressure Jolla into integrating and supporting all those privacy features into theirs aliendalvik system.img.
It should have integrated switches to limit access to data and internet access per android app.
Wasnā€™t Jolla about privacy?

1 Like

Quite frankly, I think they should do it sooner or later, no pressure needed.

As I have stated here:

Privacy market is becoming a huge opportunity and at the end of the day, people are becoming sick of google and fb. Projects like librem5, /e/,ā€¦ are grabbing the attention, and I think that sailfish has the best story of them all. There are some rough edges to be polished but I am very satisfied with 4.0.1 on xperia 10 plus (and I have moved to it from my own rom that had all that I need or want. Now they have to scale up and support as many devices as possible. If they will fail to do it, someone else will lead the market.

Or, maybe some other old root that works through /system, like SuperSU or somethingā€¦ If your method to mod system img works, you might be able to hack it. (unless you tried already)

Iā€™ve been using SFOS since 2017 and I can clearly see that they have lost focus on privacy aspect lately. Sadly.

Well this would really be stupid as I think that right now is the time for privacy selling point.

Isnā€™t AD rooted by default? At least I have a couple of apps that do not run since they detect a rooted system?

Indeed. But lately end-users and their wishes are not a priority.

I certainly appreciate the insights, I was able to unsquash and rework based on your post.

Which SU binary were you using and which manager? I havent had much luck with the ones I have tried in /system/bin. I would love to be able to install xprivacylua to mask the unlocked bootloader. Sadly SFOSā€™s browser is too old to access a website, and the app detects the unlocked bootloader and closes.

Been messing around with this a bit, and got SuperSU as far as screenshots, but itā€™s ultimately an issue if system r/w access. Even su app canā€™t get that of itself. Somehow tje access is restricted - not sure where. Iā€™m guessing itā€™s either at the kernel level, or itā€™s in closed-source Aliendalvik codeā€¦ Iā€™ve asked about it, but no response, Any Way to Get r/w Access in Android?. Iā€™ve tried various things with mount, system props, etc., on Android and on SF side. May not be possible, (however, Iā€™m certainly no expert).

No, you wont be able to obtain rw access on squashfs, by definition it is a read-only file system. You will need to use some rooting method that doesnā€™t require updating (this ā€œneeds to be updatedā€ is a nonsense imposed by developers). Go to xda-developers and ask there.

Right, but the issue isnā€™t just that the root app would behave properly - the issue is the rw access itself. Without that, thereā€™s no use in ā€˜rootingā€™, since you still wonā€™t be able to do anything that you would want root forā€¦

There is a theoretical possibility to mount squashfs pseudo read-write with overlayfs. Dunno if this can be done transparently with AD.

2 Likes

Any news about root support of App Support on Sailfish OS 4.5.0.21 (and Android 11)? Backup/restore processes would be much easier with root access (like with the good AlienDalvik su, control, etc. made by @coderus). Unfortunately, Shizuku is not enough to obtain the right privileges to do so.