Pls help extract the ms zune bootloader. - General Questions and Answers

Let me start off with saying I'm sorry if this is the wrong place for this tread. I'm not entirely sure where a question like this would fit. Due to my low post count I can't post on any of the development sub forums.
On to the question:
I'm working on attempting to reverse engineer the ms zune's ( how many people remember what that is ) boot loader. I've having an issue extracting the boot loader files from it's windows ce container.
I've been following the link (due to my low post count it seems I can't post outside links ) which shows how to extract the other containers.
The zune calls it's boot loader zboot.bin and when I follow the instructions I get an error message from cvrtbin.exe stating "missing address option". The thing is I am including the address but because the image starts at 0x0 the program either ignores that line or decides that that address is invalid.
Before I reverse cvrtbin to force it to accept a 0x0 address, I want to ask 1) is there a reason why the program believes that 0x0 is somehow an invalid start address and 2) is there a program that will extract a windows ce container that doesn't check to see for os files? I was able to find another program osnbtool that also error-ed out but also stated it found no os files.
Thank you!
Edit Since I can't post outside links here is the text version of the instructions
Open a command prompt and cd to the directory containing your firmware image files. Do not use PowerShell - doing so will result in unexplained spurious corruption of the dumped files (e.g. incorrect executable headers).
Run \path\to\viewbin <imagename>.bin to display header information from the image.
Run \path\to\cvrtbin -r -a <start> -w 32 -l <length> <imagename>.bin using the start and length values produced by viewbin.exe, as shown in the screenshot below. These values are different for each firmware image, and will differ from the example here.
Create a directory to house the dumped files
Run \path\to\dumprom -d <dir> -v -5 <imagename>.nb0 to dump the contents of the firmware image
The directory you created should now contain all the files from the image you just dumped, suitable for analysis with anything that supports Windows CE ARM binaries (dumpbin, IDA, etc.).

Related

Question re: TFlo Config Tool & HTC Cube [HTC TyTN II (Kaiser)]

Hey hey,
As my thread indicates my question is about the FTouchFlo Configuration Tool and the HTC Cube. Please, bear with me while I explain my process of failure.
A few weeks ago, I installed the HTC Cube and it was working great. I happened upon these forums and found the Config. Tool. So, I installed it. It worked great!
Then, I found SCLPC. I uninstalled the HTC Cube, and installed SCLPC. While it is a nice program, I decided it was not for me at this time. So, I uninstalled it and reinstalled HTC Cube and the FTouchFlo Configuration Tool again.
Unfortunately, now the Down-Up gesture is running the application "/Windows/saplaywm.exe" and under Command line parameters: it says, "/Program Files/SCLPF/Version 1-00.swf" which apparently-please correct me if I'm wrong-attempts to call up the SCLPC program.
The Config program and HTC Cube were working together before I tried out SCLPC. Somehow whatever command line in the Config program which called up the HTC Cube is no longer there. So, if I enable the FTouchFlo Configuration Tool, the Down-Up gesture no longer calls up HTC Cube, but that means I won't be able to use the Config program and it's Exclusions list, which is exactly why I installed it.
My question [finally ] is this: Does anyone know the correct command lines that I should input in my Config Tool? Maybe you can find it in your phone and display them for me? Also, does anyone know how to display any parameters available to a program in my phone?
Example:
For those of us that use or used DOS, remember how we used to type a command line like "Copy /?" in DOS and it would show you a screen like:
Copies one or more files to another location.
COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/L] [/A | /B ] source [/A | /B]
[+ source [/A | /B] [+ ...]] [destination [/A | /B]]
source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
/D Allow the destination file to be created decrypted
destination Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/N Uses short filename, if available, when copying a file with a
non-8dot3 name.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.
/L If the source is a symbolic link, copy the link to the target
instead of the actual file the source link points to.
Thanks ahead of time guys for your help!

Mount Transformer to Linux Mint - automated.

Hey TF owners,
For anyone looking for a way to mount their Transformer to Linux Mint, I wrote a script to automate the process of configuring your machine to allow you to browse/modify files on the tablet's SSD. This will probably also work on Ubuntu, but I have only so far tested it on Linux Mint.
Download the attached file, and run it.
Edit: Connect your Transformer to your PC before running.
Edit 2: You only need to run this script once - not every time you connect the tablet to your PC.
Hit the thanks button/comment if this worked for you. If not, also comment and I/someone will probably help you out. Also, if anyone tests it on Ubuntu successfully, be sure to comment and let people know.
Note: All configuration files are backed up in the script before changes are made. You can always revert safely.
I'll throw in the ever so popular "use at your own risk" for safe measure.
Cheers.
June 29: Updated script uploaded.
-Cleaner
-Removes an unnecessary comment pushed into fstab in the previous script
-Already executable. Just run it. [Thanks MagnusRagnarok for the idea]
-Packed in 7z from Linux Mint this time as opposed to in zip format from the TF, for [hopefully] universal accessibility.
-md5sum 615f2bfa820ee9ac8ea2c967149a2f03 TransformerMount2.7z
ok so maybe a stupid question, but does my tf need to be rooted to try this? also if you can create an automated script to install a linux distro you think it would be possible for you to create a script to root?? btw any idea on what actually works? can the tegra 2 run with compiz??
0lddirtypaki said:
ok so maybe a stupid question, but does my tf need to be rooted to try this? also if you can create an automated script to install a linux distro you think it would be possible for you to create a script to root?? btw any idea on what actually works? can the tegra 2 run with compiz??
Click to expand...
Click to collapse
I thin you've misunderstood the intention of the OP.
It was to be able to mount your Transformer under Linux and be able to read/write the files stored on the Transformer's internal storage. Not to actually install a full blown Linux Distro on your Transformer.
Wow, talk about reading before posting.
Sent from my Transformer TF101 using XDA Premium App
only on linux mint--
does it work on ubuntu?
Yes, this works perfectly on ubuntu
I have a problem extracting the zip file with Ubuntu 10.10
Do I need an alternate unzip program? If so please specify. I do not run MS products.
Error:
7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=en_CA.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
Processing archive: /tmp/TransformerMount.zip
Extracting TransformerMount.bash Unsupported Method
Sub items Errors: 1
I can extract it with 7zip on Windows on the work computer, and with both Explorer and AndroZip on the TF without issue.
Sent from my Milestone using XDA App
Acer Mod of the script
I'm trying to edit the file for use with an Acer Iconia. So far everything works but the modifying of the android.rules file. You see, it doesn't exist on my laptop (mint 11) in the directory the script looks at nor is there an android.rules file in lib/udev/rules.d. While I could probably write a rules file and make it work, I'd like to know where it comes from and maybe discover why it does not exist on my system. Anyone have any ideas? Also - rootblock - if I can get this to work would you object to my posting it in the Iconia forum? Thanks!
UPDATE:
Creating the file worked fine. Any reason to edit the script to check if the file exists and create it if it doe not or am I the exception to the rule? i.e. Would most users have it there in the first place?
3DSammy said:
I have a problem extracting the zip file with Ubuntu 10.10
Do I need an alternate unzip program? If so please specify. I do not run MS products.
Error:
7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=en_CA.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
Processing archive: /tmp/TransformerMount.zip
Extracting TransformerMount.bash Unsupported Method
Sub items Errors: 1
Click to expand...
Click to collapse
Probably a bad download. And you could also try file-roller to open it (I think its installed by default, it is on Debian/Gentoo)
Tortel1210 said:
Probably a bad download
Click to expand...
Click to collapse
I installed the "p7zip" deb, re-downloaded a few times with Firefox and even tried wget. Each time I get the same error result. I was more interested in examining the bash file as I do not have a TF yet. Oh well not a big deal.
3DSammy said:
I have a problem extracting the zip file with Ubuntu 10.10
Do I need an alternate unzip program? If so please specify. I do not run MS products.
Error:
7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=en_CA.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
Processing archive: /tmp/TransformerMount.zip
Extracting TransformerMount.bash Unsupported Method
Sub items Errors: 1
Click to expand...
Click to collapse
Had the same issue with Archive manager - Xarchiver worked, however.
ubuntu & Asus transformer
If anyone having a problem with mtpfs on ubuntu especially version 10.4 ( segfault problem which prevents from mounting the TF), use newer version of mtpfs in the link below.
http://pkgs.org/download/debian-wheezy/debian-main-i386/mtpfs_0.9-3_i386.deb.html.
1. install the package
ubuntu> sudo dpkg -i mtpfs_0.9-3_i386.deb
2. Then run rootblock script if you did not do it.
just wondering, would this have any effect for the adb connections ? My ubuntu cannot find the transformer from adb but could mount it just find
Try This....
anyone having issues try one of the following extensions.. tar.gz would be my first suggestion for those using ubuntu like myself. i also took the liberty of changing the perms to exe on the script before i compressed all these so now all you need to do is
1.download the extension pack i upped
(find the one that works for you)
2.open file
3.execute
*i also tossed the edited script in the pack for anyone who cannot get it to open.
fyi; ark also worked for me to access the file from the op, while my 7z kept erroring out.
​
ari197 said:
just wondering, would this have any effect for the adb connections ? My ubuntu cannot find the transformer from adb but could mount it just find
Click to expand...
Click to collapse
I can access the TF with adb just fine. Just cd to the android-sdk-linux_x86/platform-tools folder containing adb and run:
Code:
./adb devices
or
Code:
./adb shell
if that folder isn't already configured into your path. Works for me anyway.
I've been looking at this and trying to do it with udev instead, since I want the dynamic creation of the folder in /media. Mounting works great, but removing doesn't. So anyone with knowledge of udev rules is more than welcome to give me some hints. Here's the rules so far:
Code:
See below...
The command run when removing works if I enter it as root in a terminal, so it seems to me that it's either not run when removing or it's failing somehow when run from udev. Edit: I've figured out that it's not run at all. Looking into it...
Also, hint for those who follow the manual instructions you could also get the necessary permissions through Users and Groups instead of editing the groups file. You still have to edit /etc/fuse.conf to allow other though.
These are instructions for automatically mounting and unmounting your pad (not keyboard!). This will create (when plugged in and detected) and remove (when unplugged) the Transformer directory under /media, so that the experience is more in line with other USB devices.
For those of you who already have run the script in the first post, you need to do some cleanup. Edit /etc/fstab and /etc/udev/rules.d/51-android.rules and remove the lines which the script created. Which lines in fstab should be straight forward, and in 51-android.rules look for rows that either have no idVendor set or has it set to 0b05. If unsure, post here FIRST before making changes!
This is the content of /etc/udev/rules.d/51-android.rules:
Code:
ACTION=="add", SUBSYSTEM=="usb", ENV{ID_MODEL}=="MTP", ENV{ID_MODEL_ID}=="4e0f", MODE="0666", RUN+="/bin/bash -c 'mkdir -p /media/Transformer && mtpfs /media/Transformer -o allow_other'"
ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_MODEL}=="MTP", ENV{ID_MODEL_ID}=="4e0f", RUN+="/bin/bash -c 'fusermount -u /media/Transformer && rmdir /media/Transformer'"
If you have other Android devices you may or may not have other lines here too. If so, just add these two lines to the end of the file. My Transformer is bought in Sweden so if things don't work for you, maybe there's another idProduct/ID_MODEL_ID out there? Check with lsusb when your pad is plugged in, the vendor (xxxx) and product (yyyy) ID is [xxxx:yyyy] on the line that says ASUSTek Computer Inc. For my pad, the productID/ID_MODEL_ID is 4e0f.
You need to uncomment allow_other in /etc/fuse.conf and add your user to the fuse group (preferably via Users and Groups) apart from adding the above two lines to your 51-android.rules:
Start Users and Groups, choose your user and press Advanced settings. Under the tab User Privileges you should mark Mount user-space filesystems (FUSE).
Open and edit /etc/fuse.conf (see below on how to use nano). Uncomment user_allow_other in the end (remove the # at the beginning of the line).
After this you should reboot your computer. This will have two effects: The udev rules will be reloaded so the changes apply, and your user will have the necessary privileges granted.
Now you can try to plug in your pad and see if it shows up under /media. Give it some time, it takes a while. (Approx. 30 seconds for me.)
A note on editing files from the terminal window
When editing files from the terminal I always use nano. The command is (if opening a file that requires super user rights):
sudo nano [path-to-file]
The editing is straightforward, works just like any other text editor. When you're finished, press Ctrl+X (Exit) and answer the question with Y (if your system is in english that is) if you want to overwrite the earlier file.
Problems?
If you have ADB activated you could try rmbell's udev rules. This removes the match ID_MODEL == MTP and changes the productID to 4e1f. The productID changes depending on what functions are activated, as discussed in this post by ritterkeks. If you want the pad to be mounted with and without ADB activated, you can add all four rules.
If the udev rules doesn't work, run this command in the terminal and see what happens when you plug the pad in:
udevadm monitor --property --udev
Exit with Ctrl+C. Are the values the same as in the udev rules you're using? If not, change accordingly or deactivate some function which has made the productID change.
"unable to mount location" error
I'm getting an error that reads "Unable to mount location"
Then:
fusermount: failed to open /etc/fuse.conf: Permission denied
fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
I'm a monkey in a spaceship when it comes to some of this stuff Any idea what I should do (in layman's terms)?
All help appreciated!
I'm not sure if your problem is from the script in the first post or my instructions. But as the message says you need to edit fuse.conf. Also, you need to be a member of the FUSE group.
Open and edit fuse.conf with this command in a terminal:
sudo nano /etc/fuse.conf
Uncomment (remove the #) user_allow_other in the end, exit with Ctrl+X and save with Y.
Start Users and Groups, choose your user and press Advanced settings. Under the tab User Privileges you should mark Mount user-space filesystems (FUSE). I believe that you need to reboot after this change, otherwise the necessary privileges hasn't kicked in.
Try it and let me know

adbsync.exe - Win32 command line syncer

Because of the incredible success of my adbsync.exe on the Nook Touch (19 downloads! )
I've decided to advertise it to the general Android public.
There are all sorts of GUI file managers that serve as a front end to ADB.
(Some of them appear to use shelling to ADB instead of using port 5037.)
I wanted a command line program for Win32 that could sync my devices before I go out the door.
It had to work with a Nook Touch (2.1) connected on WiFi and a Kyocera Rise (4.0) connected on USB, often at the same time.
As any program with "option-itis", it runs into an alphabet soup of arguments.
The good part is that you mostly just have to get it right once and stick it in a batch or makefile.
There are options for recursive and whether to create missing subdirs or files.
It can copy in either or both direction and even a 3rd destination for resolving discrepancies.
Code:
usage: adbsync [flags] hostroot androidroot [altroot]
/d device name
/h update host
/a update android
/s search subdirectories
/l list files: d (differences), h (host only), a (android only)
/i ignore files in pattern list
/o only files in pattern list
/v verbose
/q quiet
/1 use 1 second resolution (ext*)
/2 use 2 second resolution (vfat)
Examples:
Code:
[color=red]Update android[/color]
adbsync C:\Books "sdcard/My Files/Books" /a /v
[color=red]Sync both directions[/color]
adbsync C:\Notes sdcard/Notes /a /h /v
[color=red]Sync both directions but don't overwrite the PC, use another dir[/color]
adbsync C:\Notes sdcard/Notes C:\Fixme /a /h /v
[color=red]Sync both directions including subdirectories[/color]
adbsync C:\Stuff sdcard/Stuff /a /h /s /v
[color=red]Sync only existing files on android[/color]
adbsync C:\Reference sdcard/Reference /au /s /v
[color=red]Update host with photos shot on handy (specifying device by id)[/color]
adbsync /d7a12820e /h C:\Handy\Photos sdcard/DCIM/Camera
[color=red]Update android with photos, but not vacation ones[/color]
adbsync C:\Photos sdcard/Photos /o*.jpg;*.jpeg /ivacation* /a /v
Note: For many systems sdcard is just a link (which adbsync.exe will not follow).
Use mnt/sdcard
Download in the signature.
Looks nice, but the problem is that it is hard to determine whether or not it is useful...since it is not clear what it is doing. What do you mean when you say "sync"? Perhaps give an example when you need this and a screen shot or two...
E:V:A said:
Looks nice...
Click to expand...
Click to collapse
Thanks for the bump! :victory:
adbsync.exe compares the timestamps on files on the host and android.
If the flags allow it, it will copy the newer file over the older one.
If the alternate root is specified and it would have overwritten the host's older file it will instead write to that directory.
The post above gives lots of examples.
If files are copied over, they will be listed.
if the /v (verbose) flag is specified, it will list statistics.
There seems to be some problem with DDOS on Dev-Host.
Try the signature below now to download adbsync.exe
This is an indispensable utility for Windows users wanting a complete snapshot of their device + sdcard with their backups. And a great time saver versus standard adb pull. Highly recommended!
Glad to see this over in the main Android Development and Hacking section finally.
I've updated this a bit to correct for a few bugs.
There were a few anomalies if you tried to use the root of Android or the root of a Windows disk.
It will not try to copy links anymore.
If there is a permission problem with reading on the Android it will say so.
I should get around to adding options for ignoring errors, right now it stops.
Finally on your device /sdcard may be only a link.
Use the appropriate real path, probably /mnt/sdcard
Download in signature.
Not copying
I have empty folder in my PC named sdcard and i want to copy all my phone sdcard content to this folder. I used below comment but its not copying anything it just tells "A Android Dir only 33"
can you tell me what i am doing wrong?
adbsync /h /s /v "c:\Name\Name\Soft\Mobile_Soft\Nexus\sdcard\" "/mnt/shell/emulated/0"
mejack03 said:
Can you tell me what i am doing wrong?
Click to expand...
Click to collapse
Code:
adbsync /h[color=red][b]scu[/b][/color] /s /v "c:\Name\Name\Soft\Mobile_Soft\Nexus\sdcard\" "/mnt/shell/emulated/0"
The default action is not to create directories that do not already exist.
Code:
adbsync /?
I am trying to ignore an entire directory. I have tried /i/Dir /iDir* /i/Dir/* and all continue to copy files from the directory. I am using the example above:
adbsync /hscu /s /v /iDir "e:\Nexus\sdcard\" "/mnt/shell/emulated/0"
Yes, currently the include/only options operate on file names, not paths.
I'll look into this...
Thank you. It would be nice if a directory could be disabled. The one I have puts cache items with file names over 100 characters, and neither my win computer nor various cloud storage will take them. Wish I could still run linux, but alas, work software I need is win only.
I'm still seeing issues with the following command putting stuff in the root of the working drive:
Code:
adbsync /hscu /s /ld /v "C:\ADBsync\sdcard\" "/data/media" /i*catalog*
I end up with a bunch of stuff in C:\data\media\ but not everything. So bizarre. I've tried adding/removing trailing slashes from both paths, and all sorts of stuff.
Edit: Seems to be an issue syncing 0 length files (like .nomedia) as well. Not seeing them get created/updated anywhere on the host side, even though adbsync logs report they are.
Yes, the last version would not write zero length files.
That was a by-product of waiting for valid data before creating the file.
The new version (in the signature) addresses that.
For those that wanted ignoration :cyclops: of directories:
I left the current /i /o flags the way they were, that is, operating only on file names.
In the new version if you want a directory ignored, drop a file called .noadbsync in it.
Renate NST said:
Yes, the last version would not write zero length files.
That was a by-product of waiting for valid data before creating the file.
The new version (in the signature) addresses that.
For those that wanted ignoration :cyclops: of directories:
I left the current /i /o flags the way they were, that is, operating only on file names.
In the new version if you want a directory ignored, drop a file called .noadbsync in it.
Click to expand...
Click to collapse
Great idea! This new version is still pulling files to my C:\ though (as reported a few times previously).
Any ideas for that issue?
osm0sis said:
Great idea! This new version is still pulling files to my C:\ though (as reported a few times previously).
Any ideas for that issue?
Click to expand...
Click to collapse
Sorry, I've never seen this.
How many files does it do this to?
Are the filenames weird? Are the paths on the Android weird? Are the paths on the PC weird?
Does it say that it copied them?
Does the correct copy appear also?
I just did a sync like this with a few GB and didn't see anything wrong.
Renate NST said:
Sorry, I've never seen this.
How many files does it do this to?
Are the filenames weird? Are the paths on the Android weird? Are the paths on the PC weird?
Does it say that it copied them?
Does the correct copy appear also?
I just did a sync like this with a few GB and didn't see anything wrong.
Click to expand...
Click to collapse
I wouldn't consider C:\ADBsync\sdcard to be a weird path, nor are /data/media/0/ paths particularly weird, especially when booted into CWM recovery like I am (ie. no weird FUSE FS stuff going on, and no symlinks involved). It copies a lot of files, but not all of them. I'll PM you a dir /s of my sdcard directory before and after the sync, a dir /s of the files that show up at C:\data\media and a log of adbsync's output.
This bug fixed and having an option to delete files that are host-only (to make adbsync clean up after itself) are the only 2 things I feel are missing in adbsync.
Oops.
Yes, there was a problem copying updated Android files that existed on the host to the wrong directory.
That bug popped up in a restructuring of the code.
There is also an improvement for prompter error reporting when attempting to write to Android read-only or protected directories.
Download the new version in the signature.
Renate NST said:
Oops.
Yes, there was a problem copying updated Android files that existed on the host to the wrong directory.
That bug popped up in a restructuring of the code.
There is also an improvement for prompter error reporting when attempting to write to Android read-only or protected directories.
Download the new version in the signature.
Click to expand...
Click to collapse
Confirmed squashed!
Seeing another issue now. adbsync is ignoring some files it shouldn't on the host side. I have a backup in my C:\ADBsync\sdcard\clockworkmod\backup\ directory that isn't in /data/media/clockworkmod/backup/ and adbsync isn't showing it in the log.
The command is still:
Code:
adbsync /hscu /s /ld /v "C:\ADBsync\sdcard\" "/data/media" /i*catalog*
So that should include everything. It pulls new backups from the Android side directory just fine, but it seems to ignore the old ones in the host directory.
You're not syncing from the host to the android.
In this case when adbsync comes across directories on the host that are not on the android it does not even bother enumerating them.
We don't want to waste time traversing everything if we are not going to do anything with it anyway.
If you do want to cover everything in both directions, add /ascu
Hmm. I see your point. However, I don't want to sync in both directions, just have it log what's missing. If there was a proper list only option then that'd be doable with my workaround to delete removed files from the host side (ie. a true host-side sync).
Edit: I know that /ld without /a or /h will list only, but it still doesn't list every host-only difference, like those directories. Could you please make list more thorough and traverse everything, or at least add an option for this?
/ldt maybe?

[Q] unpack userdata***.backup from cwm on windows

Hi/Hello/good evening!
I have a broken MTK phone waiting for spareparts and one backup file from its SDCard made with CWM
name userdata_20130615_140224.backup where I need to extract contact data from.
How to do it?
I have been searching a whole while now but could not find one single post about opening this archive.
Pls help!
Thank you,
Erwin
If u have any spare phone with Titanium Backup installed then u can transfer ur backup to tat mobile's sd card and use TB to extract data from Nanoid Backup..
Sent from my WT19i using xda premium
expanding file
hi,
unyaffs doesnt work on that .backup file and I dont have a spare phone lying around. I got the file on windows
and please after reading 20.000 tuts on "backups" can there be one that explains how to extract the file
with windows?
thank you,
Erwin
NOW!!!
ewoewo said:
hi,
unyaffs doesnt work on that .backup file and i dont have a spare phone lying around. I got the file on windows
and please after reading 20.000 tuts on "backups" can there be one that explains how to extract the file
with windows?
Thank you,
erwin
Click to expand...
Click to collapse
tell me the tec solution internet!
ewoewo said:
Hi/Hello/good evening!
I have a userdata#######.backup and I cant enter into recovery mode. once i try toenter recovery mode in boots and shuts down without entering into recovery mode. I want to restore this backup file. Help me out
Thank you!!
Click to expand...
Click to collapse
It's a 512 byte header in front of a "tar.gz"
hexdump -C userdata_xxxxxxxx_yyyyyy.backup | less​showed the magical zip header "1f8b0800 00000000" at offset 0x200
So, skipping 512 bytes, the rest can be gunzip | tar
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv​
Code:
dd if=/home/user/_backups/E380-android-phone/userdata_20160126_223433.backup bs=512 skip=1 > /home/user/_backups/E380-android-phone/userdata_20160126_223433.backup.dd-out.tar.gz
Worked for me. Then just used KDE's archive opener (Ark) to view the files, looks to have everything in there except keys and whatnot.
if you prefer a linux solution use this script it converts android backup to nandroid backup
http://forum.xda-developers.com/showthread.php?p=65374561
Hello! Super-Developers, mega-programmers and smart hackers!
Nobody does not know how to open *. backup file?
No one can't help in this problem suffering millions of android/windows users?
You suggest them to install Unix/Linux system, - everybody to become hackers and programmers?!
maybe in the World exists GUI- programme to open *. backup file?
Someone can solve this problem of the century?
Philoandr said:
Hello! Super-Developers, mega-programmers and smart hackers!
Nobody does not know how to open *. backup file?
No one can't help in this problem suffering millions of android/windows users?
You suggest them to install Unix/Linux system, - everybody to become hackers and programmers?!
maybe in the World exists GUI- programme to open *. backup file?
Someone can solve this problem of the century?
Click to expand...
Click to collapse
What do you expect. You are trying to edit a Linux based file. Not to mention a closed sourced compressed file.
There are free programs like OSFMount or DiskInternals Linux Reader for mounting (android) linux file system images on Windows. Also 7-Zip for Windows can extract files from linux file system images.
However, there is metadata like user identifier and group ownership, file permissions, SELinux context (user role type range) stored for each file, which gets lost once you have saved linux files to windows disk. Without this metadata you can not restore files to phone.
Regardless you can extract files in windows if you just care about pictures, music files etc. Maybe one day there is a developer who may write such a program no matter its useless for restoring complete user data to phone.
Regarding the userdata*.backup files (no cwm) this is a chinese feature not provided by google android open source project. Without source code its nearly impossible to analyze the checksum algorithm. You can not re-create a userdata*.backup file.
What you can do is unpacking it. make a guess. cut off the first 512 byte header of each file which is probably the checksum. then merge the files together. Now you have a file for further analysis. Its probably either a ext4 disk image or a (gz compressed) tarball archive. a disk image can be mounted as a new drive, metadata keeps preserved in this case. a tarball archive must extracted with gnu tar to linux file system. when extracting with 7-Zip you will lose metadata.
There is a risk of tarball archive is unheadered Tar, in this case 7-zip will not extract it. If your phone is encrypted, the disk image is probably encrypted disk image (thats where the hacker stuff starts).
If you want to remove the checksum in windows, there is a small problem. There is no such command. You can use a third party command line utility Trunc to try it. (truncate deletes only from tail)
Another way for Windows, you can use some linux utils with cygwin. I don't know exactly how to do it, but @Doc_cheilvenerdi.org released a Windows script Odinatrix which converts unheadered Tar to Ustar Tar. From this you can use some linux utils (i don't know if it works for converting backups, too)
1. unpack the Odinatrix-WINDOWS.zip file. copy the folder named "files" containing cygwin linux utils. rename the folder to bash (or any meaningful name)
2. create a new folder on Windows Desktop
3. move the backup files to <some folder>
4. open the Windows Command Prompt
goto Windows Start - Run...
type: %SystemRoot%\system32\cmd.exe - press OK
now type the following commands in Windows terminal console:
5. add bash folder to windows environment variable %PATH%
(example: PATH=%PATH%;C:\Program Files\bash)
Code:
PATH=%PATH%;<path to bash folder>
6. change directory and list backup files
Code:
cd %UserProfile%\Desktop\<some folder>
dir /a userdata*.backup*
7. cut off 512 byte header from each file using (cygwin) gnu "dd" linux util like @ektoric suggest in post #6.
do this for each file, skipping 512 bytes only (without unpacking). replace the wildcard * with <date>_<time>
Code:
dd if=userdata*.backup of=userdata*.part0 bs=512 skip=1
dd if=userdata*.backup1 of=userdata*.part1 bs=512 skip=1
dd if=userdata*.backup2 of=userdata*.part2 bs=512 skip=1
dd if=userdata*.backup3 of=userdata*.part3 bs=512 skip=1
8. merge the files with windows
Code:
copy /v /y userdata*.part0 /b + userdata*.part1 /b + userdata*.part2 /b + userdata*.part3 /b userdata*.img /b
9. try to mount the userdata*.img with OSFMount. if not working, try extracting with 7-zip.
Besides this linux is no hacker-os and just as easily operated as windows. You can boot a live distribution from usb-stick without installing.
for further questions, please visit the main thread
[Q] How to Extract data from .Backup file ? - Created with android system recovery
zelendel said:
What do you expect. You are trying to edit a Linux based file. Not to mention a closed sourced compressed file.
Click to expand...
Click to collapse
Thank you for the answer!
Please comment next:
1) Video how to extract files from
"Linux based, Not to mention, a closed sourced compressed" backup file with metadata:
Распаковка и извлечение файлов из резервной копии - YouTube
m.youtube.com/watch?v=HNXed7RGR2g
2) quote from Android Backup Extractor's README-TXT-instruction:
"Usage:-- Windows: very easy"?
Android Backup Extractor - -- sourceforge.net/projects/adbextractor/files
-sourceforge.net/projects/adbextractor/reviews?source=navbar
I tried to use Android Backup Extractor In WinXp SP3
but windows version of this app shows cygwin&some other files missing.
Do you know why it doesn't work?
I don't need to recover backup on its own place.
My target is to extract and open few files: photos, videos, documents...
Strangely 7zip also doesn't work. Thank you in advance!
adbextractor is for adb backups *.ab only (btw open source).
cygwin is a implementation of linux utils running in windows.
the above solution uses cygwin, did you try?
aIecxs said:
adbextractor is for adb backups *.ab only (btw open source).
cygwin is a implementation of linux utils running in windows.
the above solution uses cygwin, did you try?
Click to expand...
Click to collapse
Thank you for first very detailed answer!
It seems that you have a remarkable grasp of this subject,
that's why I ask you to comment my previous post about video and Android Backup Extractor.
Your second post is not clear for me: adbextractor is only for *.ab files??
I have few files cygwin, is it a separate program??
I attempted to run file start.exe - windows version of Android Backup Extractor with those few cygwin files
but unsuccessful.
I read and test a lot, but The problem is still unsettled.
i came up two years ago with same question, how to unpack, and ended up with learning linux. i have uploaded a bash script, but i don't know if it works. i am not a developer and still learning, and nobody give feedback.
what is exactly file name of your backup? suffix *.ab or *.backup? these are completely different, don't mix up tools.
if you mean userdata_20180313_161000.backup files, please try mini tut above beginning 1.
aIecxs said:
i came up two years ago with same question, how to unpack, and ended up with learning linux. ... i am not a developer and still learning
Click to expand...
Click to collapse
It is classic aphorismic sentence!! I like it.
What's the bash script? for what goal? it is for Windows? If yes, I'll try it. give me the link.
my files are userdata_20100102_045926.backup, -=-=.backup1, 2, 3......
I'm not Englishman, "mini tut" is mini tutorial?
You have 100 posts and 25 thanks - super rate for notdeveloper.
the tool in video (adbextractor) can not unpack your backup. your backup is a splitted ext4 partition image. OSFMount can open ext4 partition images from Windows
bckp2cwm.sh script is basically doing the same steps like mini tutorial above. unfortunately it is for linux. main goal is convert userdata*.backup to cwm backup, but its paused in the middle (after unpacking, before repacking)
as windows user, all you need is a usb-stick. there is a tool unetbootin running in windows. it is a one-click-solution for downloading and copying any linux distribution to usb-stick. you can boot into linux from this usb-stick, for example ubuntu
aIecxs said:
OSFMount can open ext4 partition images from Windows
Click to expand...
Click to collapse
OSFMount can extract few files from my backup?
Thank you very much for efficient advices!!!:highfive:
I'll try them in sequence.
although Linux is not my :angel:dream.
Solution for Windows
1. Download and install free hhd hex editor neo.
2. Open each of your .backup files, in select menu select range at 0 offset size 512 decimal, delete and save.
3. Use Windows copy command to join files as described in post#11 (Thanks to the author for free education).
4. Use any program that reads Linux disk image files. I used diskinternals (mount image from the drive menu first). Openext worked too.
This won't work on tar archives if I understand correctly. This took me days to figure out and only minutes to execute. No thanks to confusing android prompts while upgrading to a new OS.
yoyohelp said:
1. Download and install free hhd hex editor neo.
2. Open each of your .backup files, in select menu select range at 0 offset size 512 decimal, delete and save.
3. Use Windows copy command to join files as described in post#11 (Thanks to the author for free education).
4. Use any program that reads Linux disk image files. I used diskinternals (mount image from the drive menu first). Openext worked too.
This won't work on tar archives if I understand correctly. This took me days to figure out and only minutes to execute. No thanks to confusing android prompts while upgrading to a new OS.
Click to expand...
Click to collapse
Hi i have a problem i have 5 files from the backup each with 2gb when i do the command from post 11 it works nice but when goes to backup part 3 it gives an error, what could it be? Im i doing something wrong?

Software Development FYT Firmware Workbench 2.0

# FYT-Firmware-Workbench
PLEASE DO NOT USE WITH T'EYES CC3 FIRMWARE
Scripts intended to mount the FYT UIS7862 firmware, make modifications and reassemble it back
They can retrieve the firmware from specified location and after modification, they can put the packed and signed firmware into another specified location
Files:
1-) config.ini = A file to setup parameters, paths for the original firmware and patched firmware, temp directory to work with firmware files and mount point to edit the firmware
2-) import_original.sh = Retrieves the ZIP file from the location specified in config.ini
3-) import_patched.sh = Retrieves the same files that 'import_original.sh' but from the patched location specified in the config.ini (normally a firmware that you've already patched before)
4-) unpack.sh = (autorun after import*) Unpack the imported firmware and create the mount moints (as specified in the config.ini file) to work with the firmware
5-) tweaker.sh = Allows change Locale, Language, Country and allows enabling ADB and OTG (if hardware supports it)
6-) inject_mods = Copies all contents of "_mods" folder into system partition, like gps.conf or even bootanimation, up to you to creat the same folder structure with your own files to inject
7-) repack.sh = Unmount the modified firmware from the mount points, delete the mount points, assembly the new ZIP file, sign it and move it to the patched directory as specified in config.ini
clean_local.sh = This script will unmount the firmware and delete it, it will also delete temporary files. as its name says, it cleans the local workbench !
N'joy it !
[CHANGELOG]
2.0 Introduces a different ZIP signature method
1.0 Initial release
Did you already try to flash it? I seed that you sign with the test keys but does that now work on the 7862?
On the previous architectures the recovery did not allow self signed zips.
Yes it works well, of course I flashed a modified 6315_1 befor make this post. You can trust the scripts, take a look at the tweaker.sh who allow you to modify some settings, Locale,Region, Coutry, and more to come !
Hi,
I tried your tools. Nice work.
I first did the "import_original.sh" and then the "unpack.sh". I did use this on a RPi4 running Debian Linux. All my Linux machines are currently RPi boxes and I use my headless server RPi4 for most stuff I do myself on images. (Next to that I have a Chromebook running Linux as well, but that one doesn't allow me to mount images in the linux sandbox.)
In the unpack.sh I get errors after brotli on the resizing of all the images:
Bash:
**********************************************
Processing 'system' image ...
BROTLI -- Handling system.new.dat.br...
Converting system.new.dat file into system.img file
When tring the "Converting .." is where it goes wrong without error message. The sdat2img is using "#!/usr/bin/env python" which, on an python3 only system gives "/usr/bin/env: ‘python’: No such file or directory"
When I change the call to "python3 sdat2img.py <etcetera>" it works. It might be better to use something like
Code:
if [ `which python` ]; then
./tools/sdat2img.py
elif [ `which python3`]; then
python3 ./tools/sdat2img.py
else
printf "\n\nNo python found!!\n\n"
exit 1
fi
Otherwise your created dat file is 0 bytes (simply an echo of 0 bytes to a new file), then giving corrupt empty images of 128 MB when trying to resize them.
And about the resizing/shrinking of the images: Why do you do that?
Simply leave the img as is and mount it read-write, not read-only.
Please use
Code:
mount -t ext4 -o loop,rw $unzippedPath$i.img $MOUNTPOINT/$i
and then simply copy (as root) your stuff in or make the modifications directly (as root). After unmounting you can immediately repack and brotli-compress it again. No extra intermediate steps necessary.
****
And some other remarks (actually a bit of nit-picking, please don't feel offended. I think you did a great job):
You use and pack a 64bit jdk with it, which is of course very convenient in most cases but doesn't work on my ARM raspberry pi.
I would put something in the shell script like
Bash:
echo "Singning '${FIRMWAREZIPFILENAME}' file..."
if [ -n `which java` ]; then
# Not found. Use packed version and hope it is a 64bit system
tools/jdk64/bin/java -jar tools/SignApkv2.jar <etcetera>
else
# Use system version
java -jar <etcetera>
fi
You also use
Bash:
echo " "
echo "READY !!!."
echo " "
Why not use
Code:
printf "\n\nREADY !!!\n\n"
Don't feel offended at all fellow, that's normal you're improving the scripts so suit your needs, that's normal, and your code (above) seems much more adapted than mine, I packed a 64bit java 8 cause java 11 does not sign the ZIP, (or at least I didn't reach the sign correctly)
Y have a giltab at home with that projects (FYT, TS10 etc....) y you want to participate and pull-request your changes, os help me improving that scripts, you're welcome and I'll send you the link via PM
mariodantas said:
I packed a 64bit java 8 cause java 11 does not sign the ZIP, (or at least I didn't reach the sign correctly)
Click to expand...
Click to collapse
Yes, you are right. the signapkv2 is already very old. I forgot that. I just tested and java V11 comes without the sun packages.
Will add and arm64 java 8 and detect the proc architecture by scripts to select the right java
@surfer63 I forgot to tell you that I released FYT Firmware Workbench 2.0 which includes another 6315_1 signature method (no more signapkV2), (as required with lsec6315update after Jul/2/22) thos signs well the new 6315_1 files, so we can still modify their contents and repack again and flash without the message: "Please use legal system"
I finally got my images to mount. (had to sudo)
I used the modifications @surfer63 suggested. (python3 was the trick here)
edit: are the mountpoints supposed to be RO? I'm getting "no space.." error running the tweaker.
j-5 said:
I finally got my images to mount. (had to sudo)
I used the modifications @surfer63 suggested. (python3 was the trick here)
edit: are the mountpoints supposed to be RO? I'm getting "no space.." error running the tweaker.
Click to expand...
Click to collapse
No, they shoud have 128Mb + each uhntil repack
NOTE: before running FYT Firmware Workbench do a "sudo su" (you must run as ROOT) that's why it didn't work flawlessly, I'll modify the scripts to ask for sudo su if needed !
@mariodantas : Your FYT workbench was still in the Android head units section. I had it moved to the FYT forum.
mariodantas said:
No, they shoud have 128Mb + each uhntil repack
NOTE: before running FYT Firmware Workbench do a "sudo su" (you must run as ROOT) that's why it didn't work flawlessly, I'll modify the scripts to ask for sudo su if needed !
Click to expand...
Click to collapse
OK, got it.
I had commented out the "expand' part, my bad .
Is there a github repo for the latest scripts? I'd love to try this out.
No Github, I'll release some fixes soon !
mariodantas said:
I'll release some fixes soon !
Click to expand...
Click to collapse
this is very good, thanks for your hard work!
I am also having trouble parsing the system.new.dat.br file (I only chose to edit it in config). After changing to python3, file began to be mounted and repack. But I get an error on the device in the middle of installation related to "dynamic_partitions_op_list" even though I didn't change anything
Where are the 2.0 tools?
Andy826 said:
Where are the 2.0 tools?
Click to expand...
Click to collapse
In the OP
surfer63 said:
And about the resizing/shrinking of the images: Why do you do that?
Click to expand...
Click to collapse
@surfer63 I do that to allow me to add content inside, if not, the free size is 0Kb after mount
@mariodantas The CC3 Firmware Tools don't seem to work with the January firmware. The error when using them on the January firmware is:
Code:
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open _tmp/_firmware/elable.img
Any chance of this being fixed please?
ahmed123 said:
Any chance of this being fixed please?
Click to expand...
Click to collapse
Not compatible with CC3 anymore

Categories

Resources