How to edit and make .nbf file for extended ROM - JAM, MDA Compact, S100 Software Upgrading

Hi everybody
I want to edit ms.nbf, add/remove program in ExROM file, how can i do that?
And I want to create the ms.nbf from the Extended Rom folder ( that i copy from PPC). How can i do that?
Thanks so much!!!

http://wiki.xda-developers.com/index.php?pagename=ER2003Edit
http://wiki.xda-developers.com/index.php?pagename=BackupExistingRom
no real need to backup an extented rom though if one
can edit it one can just unhide it and copy out the cabs and txt file

Rudegar said:
http://wiki.xda-developers.com/index.php?pagename=ER2003Edit
http://wiki.xda-developers.com/index.php?pagename=BackupExistingRom
no real need to backup an extented rom though if one
can edit it one can just unhide it and copy out the cabs and txt file
Click to expand...
Click to collapse
ER2003Edit will not work on Magician EXTROM
You have to extract the FAT image using magician_ext_rom_tool [http://forum.xda-developers.com/attachment.php?attachmentid=24969&d=1130526115], modify it, and reencode it using magician_ext_rom_tool.

sounds like alot less hassel to just unhide and unlock it
and mess around that way then

Backup ROM need whole SD, and "size of the backup file nb1" = "size of SD"
I use 256MB -> it 's too large. And I not really like that.
Now I want to keep 1 ROM that i like most (include nk.nbf, Radio.nbf, ms.nbf).
Now I have 2 file radio.nbf and nk.nbf and I want create 1 file ms.nbf for myself that i like most.
I just got "Extended ROM" folder (By HR, and SR 3s before PPC auto config)
I dont know how to convert that folder to .nbf file?
How can i use "magician_ext_rom_tool" ? What is the header file?

Nobody help me?

hensiferum said:
Nobody help me?
Click to expand...
Click to collapse
The search function is made for that! Lazy!

Encode: -e -n <nbf filename> [-f <fat16 filename>] [-h <header filename>]
Decode: -d -f <fat16 filename> -h <header filename> [-n <nbf filename>]
I dont know what is header?
b0ris747, can you explain me?

The header file will be created on decode process
C:\ROMs>magician_ext_rom_tool.exe -d -n ms_.nbf
[msg] usage() - Generating FAT16 filename from NBF filename.
[msg] usage() - Generating Header filename from NBF filename.
It will contain device specific options to recreate the header contained in the nbf (which make it uploadable and recognizable on your device).
After modifying the FAT image, you'll have to encode header and FAT image to create a new NBF
C:\ROMs>magician_ext_rom_tool.exe -e -f ms_.fat -h ms_.hdr -n ms2.nbf
Will create a ms2.nbf (rename it to ms_.nbf and upload it.)
EDIT: wiki page created: http://wiki.xda-developers.com/index.php?pagename=MagicianExtrom

Oh, thank you.
When using it before, i have a mistake with encode and decode, so it not work...
Thank you very much

Can somebody explain to me how i can cook an external rom file? I would like to include the installation of tomtom with it so it is automatically installed (since battery runs empty occasionally). Any help maybe?

Related

Dumping,Modifying and Re-compiling Kaiser Rom tethering issues

Thanks to POF and all his good men we have now finally got hardspl and super cid available for our kaisers now.
The next step is to start building cooked roms which will be available soon as soon as we find a way around the some tools which aren't compatable with the kaiser.
I have managed to dump and start re-building the rom but stuck at second process of the ImgFS Tools Version
This is what I have encountered so far.
1. Dump rom is ok
2. ImgfsFromDump imgfs.bin imgfs-new.bin ok
3. ImgfsToNb imgfs-new.bin os.nb.payload os-new.nb.payload came with error msflsh50 headernot found. exiting. If i can bypass this then the next step will be merging the os.nb which i think possibility it might work and might not work.
Hope all the senior pros out there could give us a hand in this
@POF dONATIONS WILL BE SENT TO YOU TODAY
I'm not sure what that error is but even when you try to dump the xip from the os.nb process went ok but actually no files are dumped.
If anyone has dumped the rom and xip using pofs recommendation here http://forum.xda-developers.com/showthread.php?t=334680 can you please upload, as I am getting errors on my vista machine
duttythroy said:
If anyone has dumped the rom and xip using pofs recommendation here http://forum.xda-developers.com/showthread.php?t=334680 can you please upload, as I am getting errors on my vista machine
Click to expand...
Click to collapse
I can upload the dumped mine, but is spanish one....
Do you want it?
One question, what imgfs tools are you using? (give me a link, please, i'm trying to dump part03 dumped, but gives me a " Unable to load compression dll" error, and i have all files from mamaich's ZIP in the same folder...)
EDIT: The Imgfs partition is Part02, not Part03 (i don't know what is), so you must use ImgfsToDump with Part02.raw to get dumped the Imgfs.
same tools
jcespi2005 said:
I can upload the dumped mine, but is spanish one....
Do you want it?
One question, what imgfs tools are you using? (give me a link, please, i'm trying to dump part03 dumped, but gives me a " Unable to load compression dll" error, and i have all files from mamaich's ZIP in the same folder...)
Click to expand...
Click to collapse
i'm using the same tools but only difference I am dumping the latest htc rom posted somewhere here recently.
pdocread method keep giving me errors.
I am trying all sorts at the moment
I have tried cooking a rom using the kitchen everything went ok apart from getting the error.
error building default hv and user hv
If I remember right you have to set the evirmental variable
austinsnyc said:
If I remember right you have to set the evirmental variable
Click to expand...
Click to collapse
hi mate can you be more specific, killing myself here to find a way to re-compile the rom
Its my birthday today and the wife has the whole day planned out for me! Figures the day after HardSPL comes out so I am not going to be much help to you guys today sorry to say. I'll be back in about 3 hours and then have about 2 to spend helping out with the dumping and cooking methods. Also Dutty you should have your computer dual boot with XP and Vista i have found its the only way really to cook fast and right. I have a Vista Key that works on any vista be it basic, prem... or ultimate. Just make sure you install XP first on a seperate partition since XP always loads on the first partition then load Vista.
Here this will help you a bunch!!!
http://forum.xda-developers.com/showthread.php?t=249836
AND THIS
3) Download rdmsflsh.pl script
4) Extract the contents of imgfs by running these commands making sure that the raw file and script are in the same directory:
(Windows users should run the commands from Windows Command Prompt)
c:\dump> mkdir files
c:\dump> perl rdmsflsh.pl -d files Part02.raw
[...]
1334 0047 2006-01-24 11:37:24 direct16.2bp
1334 0045 2006-01-24 11:29:32 alerts.bmp
1334 0047 2006-01-24 11:38:28 PNotes.2bp
1263 0047 2006-01-24 11:29:44 seekthumb96S.gif
1256 0047 2006-01-24 11:38:28 question.bmp
1248 0045 2006-05-30 09:59:42 ding.amr
statistics:
16595 [ 0x000040d3 ] compressed
22868 [ 0x00005954 ] datablocks
1521 [ 0x000005f1 ] ent_fffff6fd
767 [ 0x000002ff ] ent_fffff6fe
1013 [ 0x000003f5 ] ent_fffffefb
398 [ 0x0000018e ] ent_fffffefe
768 [ 0x00000300 ] files
397 [ 0x0000018d ] modules
1521 [ 0x000005f1 ] sections
2490 [ 0x000009ba ] uncompressed
c:\dump>All the rom contents will be extracted to the folder named "files".
ok using Jas's info i have been able to fully dump the rom but I am lost on putting it back together for flashing!
austinsnyc said:
ok using Jas's info i have been able to fully dump the rom but I am lost on putting it back together for flashing!
Click to expand...
Click to collapse
thats was the easiest way to dump the rom but when I try to compile it keep getting the same error i mentioned in my first post

Dumping the pharos rom: help needed...

I tried to dump my pharos rom for a guy who needs it: http://forum.xda-developers.com/showthread.php?t=417330
While editing the registry HKLM\Security\Policies\Policies valuename '00001001' I changed it to dword:1
So far no problems
In the next step I tried to check that all the partition sizes reported by pdocread were correct. Here I got the first error message (see screenshot).
I tried to skip the verification of the partition sizes reported by pdocread and tried to go on with the reported partition sizes. But here it's the same error message again and I can't go on with further steps (see screenshot).
My pharos is not modified in any way, has no sim lock and the original shipped rom. No HardSPL so far.
in the command line you need to change "FLASHDR" with "DSK1:"
this is the right command:
pdocread -w -d DSK1: -p Part00 0 0x313400 Part00.raw
remember that the the os is Part02.raw
bye
Copy the files included in this zip to your tools directory and use this bat file to dump the firmware. You will get the SYS and OEM folders on the dump directory. It only dumps part02.
I'm trying to do a automated dumper like elf's one, but it isn't finished.
Files missing..
Thanks to both of you for your help.
@jose_sonseca: Your tool is absolutly fantastic ****many thanks****
But I still need two files, one is something like ...prepare_imgfs...
Where can I find them...?
You need itsutils (if you have pdocread, it's ok), and imgfs tools -> http://forum.xda-developers.com/showthread.php?t=249836 Download imgfs_tools_182.zip
They include prepare_imgfs and viewimgfs. DMP2PKG tool is included in my zip file.
jose_sonseca said:
You need itsutils (if you have pdocread, it's ok), and imgfs tools -> http://forum.xda-developers.com/showthread.php?t=249836 Download imgfs_tools_182.zip
They include prepare_imgfs and viewimgfs. DMP2PKG tool is included in my zip file.
Click to expand...
Click to collapse
Thank you - Great
Very nice job!!!
I search this to my Touch PRO
Thx a lot!!

android's init / working with .img files

hey everyone, this all started when i began to try and get my sd partitioned for apps. i have the stock rogers fw with haykuro's root based off cyangens recovery? anyway, i got the partition to work and all and even copied files over. my only problem is that the ext2 does not mount unless i do it manually from the terminal on device. i have come up with an init.rc file that i believe should work. currently it is in /etc
Code:
on boot
export PATH /data/busybox
mount -rw -t ext2 /dev/block/mntblk0p2 /system/sd
on device-added-/dev/block/mntblk0p2
mount -rw -t ext2 /dev/block/mntblk0p2 /system/sd
any ideas?
Tried lucids script to do everything?
http://forum.xda-developers.com/showthread.php?t=480582 I mean I know that rom you have has a adds2sd thing in it, but I can only speak with what I use and know. =)
i'll check it out, but my rom is stock. there is no apps2sd in it. i just partitioned and was going to set up some links when i realized the partition wasn't mounting on it's own. thanks for the link though
The init.rc isn't a shell script, and doesn't run normal commands - its built-in mount command has a different syntax from normal mount. Check out the source or other init.rc files for the syntax.
gwydionwaters said:
i'll check it out, but my rom is stock. there is no apps2sd in it. i just partitioned and was going to set up some links when i realized the partition wasn't mounting on it's own. thanks for the link though
Click to expand...
Click to collapse
Check your PM
i figured it out a little, i have noticed that the init i create is being overwritten when i reboot. i would assume perhaps i need to add the modified file into the system.img and then flash that version on? does that sound right to anyone?
The init is flashed during boot. Its in the boot.img. you can check the stickys to see how to crack one open and put it back together. Ill fix it for you this weekend as promised. Ill even show you what I did but I gotta get time at my computer. Patience my internet friend, patience.
Edit
Also check the "all you need to know" post by haykuro. Its the most recent thread started by him in this forum I believe
If you are using a stock rom did you get the modified mount.conf that supports partition mounts?
lol no i didn't know there was one. i did modify my mount.conf on my own and added the entry for the ext.
i'm having some serious trouble unpacking my boot image, and yes i have read all there is to read and then some. i originally tried unyaffs on the image i got from my nandroid back up i made before root, but it was claiming a broken image. so i made a current back up and tried that boot, the same problem. i figured maybe the nandroid backup utility was creating bad images so i went another route. i started on device and created an image of my boot mount
Code:
cat /dev/mtd/mtd2 > /sdcard/boot.img
i stripped off the header and kernel, saved the remainder as a raw file. then
Code:
gunzip -c boot | cpio -i
and it sort of works, maybe with errors and then asks for the name of archive 2 ..
cpio: Cannot identify format. Searching...
cpio: Cpio file name length 46200 is out of range
cpio: Invalid header, starting valid header search.
cpio: Cpio file name length 6960 is out of range
cpio: Cpio file name length 40367 is out of range
cpio: Cpio file name length 21330 is out of range
gunzip: /device/here/boot: decompression OK, trailing garbage ignored
cpio: End of archive volume 1 reached
ATTENTION! cpio archive volume change required.
Ready for archive volume: 2
Input archive name or "." to quit cpio.
Archive name >
Click to expand...
Click to collapse
and if i enter anything it can't find/read the file (the one i named of course) and if i quit there is nothing gained, no files or anything

Getting image out of splash.img

OK. This is a bit embarrassing. I created a splash screen 2 years ago from scratch. But, I didn't keep the original image I used to make it. I have the splash.img. I want to extract the original image from it. Can someone share the method of doing this? Thank you.
First youll have to re add the extention .nb at the end of the file. For example splash.img is kade to splash.img.nb then you Just reverse the command you used to convert to to a splash image
So instead of nbimg -F splash.bmp etc
You'll use nbimg -f splash.img.nb etc
marsdta said:
First youll have to re add the extention .nb at the end of the file. For example splash.img is kade to splash.img.nb then you Just reverse the command you used to convert to to a splash image
So instead of nbimg -F splash.bmp etc
You'll use nbimg -f splash.nb etc
Click to expand...
Click to collapse
Thanks! I tried that before, but I didn't know I had to add .nb extension to it first. I appreciate your help.

[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?

Categories

Resources