Indeed, gnu tar gives an error 2 :I see, Apple uses bsdtar instead of gnu tar because of licensing, but you can install it from homebrew: https://formulae.brew.sh/formula/gnu-tar
Then check again:
It should display error code different from 0.Code:gtar -tf archive.tar echo $?
It's possible that you can use download gtar without installing it, but no idea.
Also even if the file is a lot bigger than the app directory, either the rest is filled with 00 values, or has damaged entries, or they are in a format not recognized. You would have to open archive.tar with a hex editor with support for very large files, and look at the end of last app file then search the next entry if there's something valid.
For example where it says "(app data stuff)" which app is the latest detected as invalid? So we can start searching for offset.
lucasdupuis@MacBook-Air-de-Lucas backup 07:22 % gtar -tf backup.tar
apps/android.overlay.common/_manifest
apps/android.overlay.target/_manifest
apps/android.qvaoverlay.common/_manifest
(...)
apps/com.remarkable.mobile/f/ee98185b-b7a4-4f3d-8159-e51105b7fbda/1957a2ce-2455-4cb3-8bdf-4cfb00277c53.rm
gtar: Skipping to next header
gtar: Exiting with failure status due to previous errors
lucasdupuis@MacBook-Air-de-Lucas backup 07:22 % echo $?
2
A-You can check how many files and folders are there for such app:Indeed, gnu tar gives an error 2 :
com.remarkable.mobile is the latest detected app, but I don't know if it's valid or not ?Code:lucasdupuis@MacBook-Air-de-Lucas backup 07:22 % gtar -tf backup.tar apps/android.overlay.common/_manifest apps/android.overlay.target/_manifest apps/android.qvaoverlay.common/_manifest (...) apps/com.remarkable.mobile/f/ee98185b-b7a4-4f3d-8159-e51105b7fbda/1957a2ce-2455-4cb3-8bdf-4cfb00277c53.rm gtar: Skipping to next header gtar: Exiting with failure status due to previous errors lucasdupuis@MacBook-Air-de-Lucas backup 07:22 % echo $? 2
Is there an hex editor that you recommend so I can open the .tar file ?
gtar -tvf archive.tar apps/com.remarkable.mobile
gtar -tvf archive.tar apps/com.remarkable.mobile/
java -jar tar-bin-split.jar -split-android-shared archive.tar
java -jar abp.jar pack-kk split-android/com.remarkable.mobile.tar com.remarkable.mobile.ab
adb restore com.remarkable.mobile.ab
But I only care about the /sdcard data, I don't need the app data. I don't understand why I'd have to test the com.remarkable.mobile backupA-You can check how many files and folders are there for such app:
orCode:gtar -tvf archive.tar apps/com.remarkable.mobile
And check error with $? after any commandCode:gtar -tvf archive.tar apps/com.remarkable.mobile/
It can be that all the files that are for such app are fine but may be more missing or not. If you want to test, you can covert the app to ab file.
You can create a tar with only that app:
Then, even if has error, check if tar for com.remarkable.mobile exits. Maybe "split-android/com.remarkable.mobile.tar"Code:java -jar tar-bin-split.jar -split-android-shared archive.tar
Then you can convert to ab file and test:
Code:java -jar abp.jar pack-kk split-android/com.remarkable.mobile.tar com.remarkable.mobile.ab
Then restore it to some android device or Android Studio virtual device or virtual machine:
Code:adb restore com.remarkable.mobile.ab
Check that the app is as when you backed it up. If the app has the same notes and data it means that the app is complete inside the original archive.tar. Otherwise maybe that the app does not support adb backup 100% or that some of its files where in the damaged part. You may need to install the app first if the apk is not included which can be seen in the first command A.
It would be to check if the corruption started just after the last app or in the middle of the last one. But anyway if you don't want to test it, I would you recommend using bless hex editor:But I only care about the /sdcard data, I don't need the app data. I don't understand why I'd have to test the com.remarkable.mobile backup
bless archive.tar
I think com.remarkable.mobile is not the last app of the backup. I'll try your method to seeIt would be to check if the corruption started just after the last app or in the middle of the last one. But anyway if you don't want to test it, I would you recommend using bless hex editor:
Code:bless archive.tar
Then search for apps/com.remarkable.mobile as Text, and the next entry if valid should be shared/ insted of apps/
lucasdupuis@MacBook-Air-de-Lucas backup 07:22 % bless --folder /Volumes/Lucas/backup\ 07\:22 --file backup.tar
Authorization required
Yes that looks like the last entry, unless the things below are data which I'm not sure.I found the last apps/com.remarkable.mobile entry. Here's what it looks like after it
There is ! And it's way after the last com.remarkable.mobile entry
I see, so is possible that the data is recoverable, however there must something wrong between the last apps/ entry and the first shared/0 one, because tar fails in the middle and does not allow to continue. Could be possible to see screenshot of such data? You can send me private message if you think there is something not allowed to be viewed publicly but is to know why tar fails.I can also see some shared/0/DCIM entries (which is the data I'm mostly looking for)
I sent you a PMI see, so is possible that the data is recoverable, however there must something wrong between the last apps/ entry and the first shared/0 one, because tar fails in the middle and does not allow to continue. Could be possible to see screenshot of such data? You can send me private message if you think there is something not allowed to be viewed publicly but is to know why tar fails.
java -jar abe.jar unpack nexus7.ab nexus7.tar <password>
tar -xvf nexus7.tar
tar -tf nexus7.tar > nexus7.list
cat nexus7.list | grep com.rockstar.gta3 > gta3.list
cat gta.list | pax -wd > gta3.tar
star -c -v -f gta3.tar -no-dirslash list=gta3.list
java -jar abe.jar pack gta3.tar gta3.ab <password>
dd if=nexus7.ab bs=24 skip=1 | openssl zlib -d > nexus7.tar
dd if=nexus7.ab bs=24 count=1 of=gta3.ab ; openssl zlib -in gta3.tar >> gta3.ab
Read the guide. 7z is not compatible, you have to use star or equivalent and meet the requirements.I have tried similar attempt to restore my save of another game but that doesn't work.
How did you replace the files in the .tar file? I am using 7z to replace the .tar file but nothing happen after i restored.
Thanks.
Maybe I'm missing something.
I've installed Java, ran cygwins setup.exe and I think it installed everything. Also downloaded the Android Backup Extractor. I try running a windows command prompt with:
java -jar abe.jar unpack nexus7.ab nexus7.tar
All I get is "java is not an internal or external command". I'm running the command prompt in the android backup extractor folder. Does everything have to be in the same folder? Where do I dump everything?
which java
$ which java
/cygdrive/c/Windows/system32/java
Because i am using windows, so does it mean that i couldn't modify the .tar file in any way?
thanks.