[General Questions and Answers] Syndamia:
So, today I changed the ROM I was using on my phone (which had root), and the way I backed up my data was by doing

adb pull /dev/block/sda32 sda32.img

Where /dev/block/sda32 was the partition, mounted to /data (which I figured out by doing adb shell mount).

Essentially, this means that I have the whole /data folder from my old installation inside the file sda32.img.

The way to access it is to mount it like a normal hard drive or ISO file, so from now on, when I type sda32.img/folder, think of it as the "folder" inside "/data" from my old installation (or in other words, I use sda32.img as the name of the folder, where I've mounted my .img file).

After the installation, for most applications, I just copied over their data folder

adb push sda32.img/data/PACKAGE /data/data/

and that worked fine.

It's important to note that I did those operations while in recovery mode, so I didn't have problems with permissions and that I did those after my new installation and installing those apps (since a new app install would clear out the data).

However, some applications still behave as if the data folder isn't transfered (the Steam app (com.valvesoftware.android.steam.community) doesn't show me logged in).

Since I have the whole /data folder, I'm pretty sure everything that I need is stored somewhere in sda32.img, but I don't know how exactly to transfer everything.

I also tried moving every folder which contains the application name (so, in the case of Steam, every folder which contains "com.valvesoftware.android.steam.community") and copy it to my device.

Since I'm on Linux, I used this script, though in the very beginning I did all these steps manually:

sda32folder=... # place, where I've mounted sda32.img, and I can access it's contents like any folder
application='com.valvesoftware.android.steam.community'

for i in $(sudo find "$sda32folder" -type d -name "*${application}*") # find all folders with the name of my application inside sda32.img
do
[ "${i:7:3}" = 'app' ] && continue # do not copy sda32.img/data/app/... folder, I talk about it in the next paragraph
f="/data/${i:7}" # transform "sda32.img/..." into "/data/..."
sudo adb shell rm -r "$f" # remove the current folder on the device
f="${f:0:${#f}-${#application}}" # transform "/.../folder/com.valvesoftware...." into "/.../folder
sudo adb push "$i" "$f" # move my copy of the folder to the device
echo "$i pushed to $f"
done

Surprisingly enough, that didn't work either, Steam still wanted me to log in.

Then I noticed the .../data/app folder.

On my device, apps are organized as /data/data/app/~~CHARACTERS/com.valvesoftware.android.steam.community-CHARACTERS (where CHARACTERS seem to be randomly generated characters), while in my backup it's just sda32.img/data/com.valvesoftware.android.steam.community-CHARACTERS.

So, I tried copying those stuff too (which seems to be the entire application itself; copy is also done in recovery mode)

adb push sda32.img/data/app/com.valve.../* /data/data/app/~~CHARACTERS/com.valve.../

and that also didn't work.

I'm not very well versed in how Android works, so I couldn't figure out anything else.

I tried looking online, but I couldn't find any information, most pages just talked about using adb backup.

Is there a way for me to copy all data for the problematic applications successfully, or am I screwed?