this post was submitted on 26 Sep 2026
39 points (100.0% liked)

Android

34884 readers
1 users here now

DROID DOES

Welcome to the Android community on Lemmy. Here you can participate in amazing discussions and events relating to all things Android.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules


1. All posts must be relevant to Android devices/operating system.


2. Posts cannot be illegal or NSFW material.


3. No spam, self promotion, or upvote farming. Sources engaging in these behavior will be added to the Blacklist.


4. Non-whitelisted bots will be banned.


5. Engage respectfully: Harassment, flamebaiting, bad faith engagement, or agenda posting will result in your posts being removed. Excessive violations will result in temporary or permanent ban, depending on severity.


6. Memes are not allowed to be posts, but are allowed in the comments.


7. Posts from clickbait sources are heavily discouraged. Please de-clickbait titles if it needs to be submitted.


8. Submission statements of any length composed of your own thoughts inside the post text field are mandatory for any microblog posts, and are optional but recommended for article/image/video posts.


Community Resources:


founded 3 years ago
MODERATORS
 

I'm about to switch my outdated Samsung tablet and smartphones to LineageOS. But I want to make a backup of my device, including the OS and everything, in case something goes wrong and I need to flash the original OS back into the device.

How do I proceed? I think I need to do a Nandroid backup or something? Is that correct?

you are viewing a single comment's thread
view the rest of the comments
[–] reisub@discuss.tchncs.de 2 points 3 weeks ago

Thanks, I'll take a look.

If you ever want to restore on a newer Android (at least I needed this on lineageos with android 15 or 16), you need to fix SELinux permissions on the data files. This is the script I use after restoring, but before starting the app. Maybe it helps.

#!/bin/bash
# Fix restored file permissions by copying permissions from parent directory
set -euo pipefail

if [ "$#" -ne 1 ]; then
    echo "Usage: $0 /data/user/0/<appname>"
    exit 1
fi

APP_DIR=$1
SEL_CONFIG=$(getfattr -d -n 'security.selinux' $APP_DIR | grep security.selinux | cut -d'=' -f2- | tr -d '"')
find $APP_DIR -exec setfattr -n security.selinux -v "$SEL_CONFIG" {} \;