Android Tablets Forum banner
1 - 20 of 22 Posts

·
Registered
Joined
·
90 Posts
All this is done on Ubuntu 10.04Extract!1. Create folder to mount in.
Code:
mkdir /mnt/ubi
2. Load modules
Code:
modprobe mtdblockmodprobe ubimodprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15
3. Validate
Code:
cat /proc/mtddev:    size   erasesize  namemtd[COLOR=red]0[/COLOR]: 10000000 00020000 "NAND simulator partition 0"
Code:
ls -l /dev/mtd*crw-rw---- 1 root root 90, 0 2010-08-04 15:17 /dev/mtd0crw-rw---- 1 root root 90, 1 2010-08-04 15:17 /dev/mtd0robrw-rw---- 1 root disk 31, 0 2010-08-04 15:17 /dev/mtdblock[COLOR=red]0[/COLOR]
4. Copy the contents block device(orginal firmware is not as big)
Code:
dd if=ubi.img of=/dev/mtdblock[COLOR=red]0[/COLOR] bs=204848000+0 records in48000+0 records out98304000 bytes (98 MB) copied, 3.20704 s, 30.7 MB/s
Code:
ubiattach /dev/ubi_ctrl -m [COLOR=red]0[/COLOR]UBI device number 0, total 2048 LEBs (264241152 bytes, 252.0 MiB), available 0 LEBs (0 bytes), LEB size 129024 bytes (126.0 KiB)
First time it will ask you to install mtd-utils.
Code:
ls -l /dev/ubi*crw-rw---- 1 root root 250,  0 2010-08-04 15:29 /dev/ubi0crw-rw---- 1 root root 250,  1 2010-08-04 15:29 /dev/ubi0_0crw-rw---- 1 root root  10, 54 2010-08-04 15:17 /dev/ubi_ctrl
5. Mount the shit!
Code:
mount -t ubifs ubi0_0 /mnt/ubi
And now in the folder /mnt/ubi will the files be found.Rebuild!1. Create the ubifs image
Code:
mkfs.ubifs -m 2048 -e 129024 -c 2047 -r /mnt/ubi ubifs.img
2. Create an ubi image around the ubifs image, start with ini file
Code:
nano ubi.ini
It should contain:
Code:
[ubifs]mode=ubiimage=ubifs.imgvol_id=0vol_size=200MiBvol_type=dynamicvol_name=rootfsvol_flags=autoresize
Then create the image.
Code:
ubinize -o ubi.img -p 131072 -m 2048 -s 512 ubi.ini
Then replace the original ubi.img with the one you just created and flash like normal.Good Luck!
 

·
Registered
Joined
·
47 Posts
I dont believe so but its very easy to install Sun Virtual Box and then create a Ubuntu 10.4 virtual machine within windows. Alternatively you 'could' do this via a Ubuntu live cd although I wouldn't reccomend it.
 

·
Registered
Joined
·
18 Posts
Thanks!I already have VirtualBox installed and downloaded the ubuntu iso only for extract ubi, but I feel very noob with linux systems. I can master only windows box.So I try to follow the above steps, but if something goes wrong I am not able to do anything, like a donkey in the sea.
 

·
Registered
Joined
·
18 Posts
Sorry for boring you again.I followed all the steps and i got the right result shown in the post, but when I try to mount ubi I get a mount: unknown filesystem 'ubifs' (not the exact massage, but a translation of what I got in my language).The 3 modprobe commands returns no errors.Someone can show me the way to go on?Forgot to tell that I am using Virtualbox 3.2.4 on Win7 Host and Ubuntu 10.04 (lucid)Thanks.Bye!
 

·
Registered
Joined
·
18 Posts
Thank you Jete for your reply.not a typo issue.I am a donkey with linux, so I copy/paste from the post into terminal window with root access. (yes root, I did it
donkey but not stupid
).I used the netbook version of ubuntu. Now I am installing the normal desktop version of Ubuntu in virtualbox.Let you know if this solve the issue.
 

·
Registered
Joined
·
4 Posts
Hi all,sorry for bothering, but I don't understand exactly how I am able to dump the configuration/actual installation of my device using this guide. In the first part (extraction) somewhere dd is used to extract an existing ubi.img to the NAND simulator /dev/mtdblock0 . How do I create an ubi.img of my actual device install ? Or do I misinterpret something here ? Could somebody please explain to me what I am missing here ? As far as I understand the first part just extracts an image and the second part (rebuild) shows how to recreate an Image from the mounted image after it was altered on the linux system....Tia Gil
 

·
Registered
Joined
·
75 Posts
Thanks for guide, it works for latest ubi.img images for WITS A81E/G. WITS also released firmwares for old WITS A81 with A/C screens with soft buttons. I tried ubifs.img from those images and got errors on mount:

[ 151.269844] Creating 1 MTD partitions on "NAND 256MiB 1,8V 8-bit":
[ 151.270184] 0x000000000000-0x000010000000 : "NAND simulator partition 0"
[ 153.823609] UBI: attaching mtd0 to ubi0
[ 153.823613] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 153.823615] UBI: logical eraseblock size: 129024 bytes
[ 153.823616] UBI: smallest flash I/O unit: 2048
[ 153.823618] UBI: sub-page size: 512
[ 153.823619] UBI: VID header offset: 512 (aligned 512)
[ 153.823621] UBI: data offset: 2048
[ 153.830954] UBI warning: ubi_scan: 692 PEBs are corrupted
[ 153.830957] corrupted PEBs are: 0 11 12 13 ...703 704
[ 153.831205] UBI error: ubi_read_volume_table: the layout volume was not found
[ 153.941381] UBIFS error (pid 2052): ubifs_get_sb: cannot open "ubi0_0", error -19

and cannot mount it. Is there other parameters for those images and is it possible to mount them too?
 

·
Registered
Joined
·
16 Posts
i just went through this on a ubuntu 10.10 install.. worked perfectly.. no errors.. though once i reflash it back it goes through its normal flashing process.. and all looks ok though then boots to a black screen and goes no further..

this is with the latest 221 capacitive firmware.

i just did the whole process again and DIDNT even change a single file and the same problem.. id say the process above does not work with the latest firmware.

anyone have any other suggestions?

I am keen to start making custom roms for this which i will happily share though i need a process to extract that works.
 

·
Registered
Joined
·
16 Posts
Been trying to get this to work, but so far no success.
I have tried on:
Ubuntu 10.4
Debian 4.3.5 (Squeeze)
Fedora 14

After the 'modprobe ubi mtd=0'
ls /dev/ubi*
only shows ubi_ctrl, no other ubi devices

Trying to attach the UBI to mtd0 results in:
ubiattach: error!: cannot attach mtd0
error 22 (Invalid argument)

Anyone able to offer any help on this?
The device file I'm trying to work with is the WITS A81H Capacitive with firmware 0617.
This thing has never been "quite right" since I got it, and Wits has dropped all support for it.
It starts out running great at first, then after a couple months of use, it's almost impossible to get it to boot any more.
re-flashing the firmware restores it back to functionality again, and the cycle repeats.
I'm pretty sure at this point that it is a software issue, and am trying to get the firmware mounted in Nandsim and taking a look at the files in there, maybe even replacing some of them with files from a known-good gingerbread device.

If anyone can help with this ubi mounting problem, it would be appreciated.
 

·
Registered
Joined
·
3 Posts
Hi!

I'm the developer of ubidump, the first user space ubifs image extract tool on this planet. Now that the PC testkits for Windows and Linux are also available and the mipsel Version is already released, I would be pleased if you could check them out if they are also usefull for your ubifs image extraction efforts.

ubidump allows you to extract ubifs images and ubifs volumes created by mkfs.ubifs and ubinize directly without the need for mounting them via nandsim, block2mtd or mtdram modules.

ubidump Kit and support thread is at ubidump.oozoon.de

ubidump on the PC is shareware, which means you can try it 30 days for free.

And yes, I could do an ARM Version too


gutemine
 
1 - 20 of 22 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top