I guess this command is to fix the bug you’re talking about. No ?
Has anyone tried https://gitlab.com/artur_gaspar/aliendalvik-systemimg-patcher with 4.0?
Maybe replace OPENGAPPS_API=8.1
with 9.0?
I’ve done it. Flashed 3.4, and then updated to 4.0 (after being on android for the past year or so). Working like a charm, Playstore downloading and everything…
Hi! Maybe some guide for noob how to do it?
Ok thanks for the info. Did you download Open GApps for 8.1 or 9.0?
9.0
Ok I did it too. Had to manually download the zip and hard code the downloads variable in the script.
Android setup wizard is popping up and I can’t finish it for some reason. Now I tried:
devel-su
lxc-attach aliendalvik – /system/bin/sh
settings put global setup_wizard_has_run 1
settings put secure user_setup_complete 1
settings put global device_provisioned 1
Let’s see if that helps.
Anyone got chromecast and banking aps working with 4.0.1?
I also downloaded the open_gapps-arm-9.0-pico-20210217.zip from The Open GApps Project.
I changed OPENGAPPS_API=8.1
to OPENGAPPS_API=9.0
and place the files together in the Downloads folder.
Then:
[nemo@Sailfish ~]$ devel-su
Password:
[root@Sailfish nemo]# cd Downloads
[root@Sailfish Downloads]# ./install_opengapps.sh
Copying original image /opt/alien/system.img to /home/.aliendalvik_systemimg_patch/system.img.orig.20210217T140352
-bash: can’t open ‘xdg-user-dir’: No such file or directory
Searching for Open GApps zip at /open_gapps-arm-9.0-pico-*.zip
find: : No such file or directory
Opening Open GApps download page
-bash: can’t open ‘xdg-open’: No such file or directory
Waiting for download to start
-bash: can’t open ‘xdg-user-dir’: No such file or directory
find: : No such file or directory
-bash: can’t open ‘xdg-user-dir’: No such file or directory
This loop continues long time. Please help how to fix it
could you provide the working code?
Hi,
easy brutal fix is to replace line 102
downloads="$(runuser -l nemo – xdg-user-dir DOWNLOAD)"
with
downloads=/home/nemo/Downloads/
I managed to install play services BUT I constantly receive notification that device is not certified by Google Play Protect. I cannot reach account settings, or all Android settings. I cannot download or login or use any Google play connected service.
Do you have such trouble or is there a workaround?
I don’t have those kind of issues.
Maybe removing everything Android related could help. From https://together.jolla.com/question/205890/howto-install-google-play-services-on-baseport-8-devices-from-the-phone-itself-tested-working/ :
- Stop Android Support from Settings -> Android Support. Run
devel-su rm -rf /home/.android/*
; this will uninstall all your current Android applications and remove their data. This is useful to avoid weird things happening.
From my experience, removing /home/.android
triggers the Play Protect message (“this device isn’t Play Protect certified”), but reusing an installation that worked with SFOS 3.4 also works after upgrade to SFOS 4. the only issue I have now is that Google Play does not see installed applications, so cannot upgrade them.
I registered the device code and everything is OK except the permissions dialog is not working. I need to go and enable requested permissions for each app in the setting menu.
Google play store is working.
Screen rotation is some kind buggy.
Wrong is to run “some random downloaded script” without having taken a look into it?
You symlinked /home/nemo to the new /home/defaultuser (not only once, it seems, you may remove the obsolete symlink /home/defaultuser/nemo).
But the real problem seems that this script expects the user nemo to exist?
Maybe have a look into it and replace nemo (if found) with defaultuser.
hope this helps someone. I flashed 4.01 today, after a long hiatus from Sailfish. Had to flash down my xperia XA2 ultra to android 9 from lineage 18.1. The old procedure for getting fully functional gplay didn’t work out of the box, so I went with the opengapps script. Little modification and it should work fine once you install unzip manually (pkcon install unzip). you’ll also need to download opengapps 9 pico arm and put it in defaultuser Downloads folder before running the script.
Here’s the modified script:
#!/bin/sh
Install Open GApps to the Alien Dalvik squashfs system.img.
set -e
WORKDIR=/home/.aliendalvik_systemimg_patch
TMPWORKDIR="$WORKDIR/tmp"
SQUASHFS_ROOT="$TMPWORKDIR/squashfs-root"
MOUNT_ROOT="$TMPWORKDIR/systemimg_mount"
SYSTEM_IMG=/opt/alien/system.img
ORIG_IMG_FILE=orig_img_path.txt
FEDORA22_REPO=https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/22/Everything/armhfp/os/Packages
OPENGAPPS_ARCH=arm
OPENGAPPS_API=9.0
OPENGAPPS_VARIANT=pico
GOOGLE_APPS_REMOVE=‘carriersetup extservicesgoogle extsharedgoogle googlebackuptransport googlecontactssync googlefeedback googlepartnersetup’
log() {
printf ‘%s\n’ “$1” > /dev/stderr
}
install_fedora22_rpm() {
pkgname="$1"
pkgversion="$2"
if ! rpm -q "$pkgname" > /dev/null; then
pkgfile="$pkgname-$pkgversion.fc22.armv7hl.rpm"
firstletter="$(printf '%s' "$pkgfile" | cut -c 1)"
mkdir "$TMPWORKDIR/rpms"
curl "$FEDORA22_REPO/$firstletter/$pkgfile" > "$TMPWORKDIR/rpms/$pkgfile"
pkcon -y install-local "$TMPWORKDIR/rpms/$pkgfile"
rm "$TMPWORKDIR/rpms/$pkgfile"
rmdir "$TMPWORKDIR/rpms"
fi
}
install_deps() {
if ! rpm -q squashfs-tools > /dev/null; then
pkcon -y install squashfs-tools
fi
install_fedora22_rpm lzip 1.16-1
}
extract_image() {
mkdir “$MOUNT_ROOT”
mount -o loop,ro “$SYSTEM_IMG” “$MOUNT_ROOT”
if [ -f "$MOUNT_ROOT/$ORIG_IMG_FILE" ]; then
orig_image="$(cat "$MOUNT_ROOT/$ORIG_IMG_FILE")"
log "$SYSTEM_IMG already patched, using original from $orig_image"
else
orig_image="$WORKDIR/system.img.orig.$(date +%Y%m%dT%H%M%S)"
cp "$SYSTEM_IMG" "$orig_image"
log "Copying original image $SYSTEM_IMG to $orig_image"
fi
umount "$MOUNT_ROOT"
if [ ! -f "$orig_image" ]; then
log "$orig_image not found"
return 1
fi
mount -o loop,ro "$orig_image" "$MOUNT_ROOT"
if [ -f "$MOUNT_ROOT/$ORIG_IMG_FILE" ]; then
umount "$MOUNT_ROOT"
rmdir "$MOUNT_ROOT"
log "$orig_image already patched, please restore original image to $SYSTEM_IMG"
return 1
fi
mkdir "$SQUASHFS_ROOT"
# rsync needs to be run twice to copy all xattrs. Probably a bug in rsync.
rsync -aSHAX "$MOUNT_ROOT/" "$SQUASHFS_ROOT/"
rsync -aSHAX "$MOUNT_ROOT/" "$SQUASHFS_ROOT/"
umount "$MOUNT_ROOT"
rmdir "$MOUNT_ROOT"
printf '%s' "$orig_image" > "$SQUASHFS_ROOT/$ORIG_IMG_FILE"
}
build_image() {
cp “$SYSTEM_IMG” “$TMPWORKDIR/system.img.backup”
mksquashfs “$SQUASHFS_ROOT” “$SYSTEM_IMG” -noappend -no-exports -no-duplicates -no-fragments
rm “$TMPWORKDIR/system.img.backup”
rm -r “$SQUASHFS_ROOT”
}
_find_opengapps() {
downloads="$(runuser -l defaultuser – /usr/bin/xdg-user-dir DOWNLOAD)"
name_pattern=“open_gapps-$OPENGAPPS_ARCH-$OPENGAPPS_API-$OPENGAPPS_VARIANT-*.zip”
if [ “$1” != quiet ]; then
log “Searching for Open GApps zip at $downloads/$name_pattern”
fi
find “$downloads” -maxdepth 1 -name “$name_pattern” | sort | tail -n 1
}
get_opengapps_zip() {
opengapps_zip="$(_find_opengapps)"
if [ -z “$opengapps_zip” ]; then
# Show the Open GApps download page to the user instead of automating
# the download of the latest version.
# https://opengapps.org/blog/post/2016/03/18/the-no-mirror-policy/
log “Opening Open GApps download page”
runuser -l defaultuser – xdg-open “https://opengapps.org/?download=true&arch=$OPENGAPPS_ARCH&api=$OPENGAPPS_API&variant=$OPENGAPPS_VARIANT”
log “Waiting for download to start”
while [ -z “opengapps_zip" ]; do
sleep 1
opengapps_zip="(_find_opengapps quiet)”
done
log “Detected new download at $opengapps_zip”
log “Waiting for download to finish”
while [ -f “$opengapps_zip” ] && [ -f “$opengapps_zip.part” ]; do
sleep 1
done
sleep 1
if [ ! -f “$opengapps_zip” ]; then
log “Download failed”
return 1
fi
else
log “Found Open GApps zip $opengapps_zip”
fi
printf ‘%s’ “$opengapps_zip”
}
install_opengapps() {
unzip “$(get_opengapps_zip)” -d “$TMPWORKDIR/opengapps/”
for p in $GOOGLE_APPS_REMOVE; do
rm "$TMPWORKDIR/opengapps/Core/$p-all.tar.lz"
done
if [ -f "$TMPWORKDIR/opengapps/Core/extservicesgoogle-all.tar.lz" ]; then
rm -r "$SQUASHFS_ROOT/system/priv-app/ExtServices"
fi
if [ -f "$TMPWORKDIR/opengapps/Core/extsharedgoogle-all.tar.lz" ]; then
rm -r "$SQUASHFS_ROOT/system/app/ExtShared"
fi
rm "$TMPWORKDIR/opengapps/Core/setupwizardtablet-all.tar.lz"
mkdir "$TMPWORKDIR/opengapps_2"
for f in "$TMPWORKDIR"/opengapps/Core/*.tar.lz; do
lzip -c -d "$f" | tar -x -C "$TMPWORKDIR/opengapps_2"
done
rm -r "$TMPWORKDIR/opengapps/"
cp -r "$TMPWORKDIR"/opengapps_2/*/*/* "$SQUASHFS_ROOT/system/"
rm -r "$TMPWORKDIR/opengapps_2/"
}
set_traps() {
# shellcheck disable=SC2064
trap “$*” EXIT HUP INT QUIT PIPE TERM
}
cleanup() {
if [ ! -f “$SYSTEM_IMG” ] && [ -f “$TMPWORKDIR/system.img.backup” ]; then
mv “$TMPWORKDIR/system.img.backup” “$SYSTEM_IMG” || :
fi
umount “$MOUNT_ROOT” || :
rm -r “$TMPWORKDIR” || :
set_traps -
exit 1
}
set_traps cleanup
systemctl stop aliendalvik
mkdir -p “$WORKDIR”
mkdir -p “$TMPWORKDIR”
install_deps
extract_image
install_opengapps
build_image
rmdir “$TMPWORKDIR”
set_traps -
exit 0
After running the script successfully, you’ll probably need to register your GCM framework device ID to your google account to bypass the annoying uncertified device error, unless this has been done before, or you just get lucky. The instructions are readily available online, and i believe in the error dialog there’s a questionare that you can use to guide you directly to the dialog box. Just pick this is a custom firmware, and you should get to the prompt. Restart the dalvik engine after this is done and the next version of setup will let you log into gapps. You should be able to download right from the play store. I’ve been pulling apps from the store without issue so far, including a couple of paid apps.
good luck, I hope this helps some people!
hey sorry im now using 4.1 will this work? im
currently currently getting errors