How modify system.fex on Allwiner H3 - Android

I modify firmware for devices with chipset AllWinner H3. My problem is that when I modify system.fex I get bootloop.
I use alwinner-kitchen (by Miniand) for pack/unpack (system.fex): mkuserimg.sh -s SRC_DIR OUTPUT_FILE ext4 MOUNT_POINT 1024M.
After experimenting, I found that when I rebuild system.fex, I get bootloop.
If I only unpack and pack the image with the firmware, when I load the firmware to the device it works.
I have suggested that I need in another kitchen, for build system.fex.
PS Sorry for my English.

Related

[Q] Multiboot and root for A70H

is there a possibility, both the stock Archos firmware to root and also with a boot menu such as OpenAOS to use.
Need to control both the floor on my A70H firmware with root right and as a second OS Debian Linux to the possibility of the software with a panoramic head Papywizard.
The Debian Linux I've done and it works flawlessly under OpenAOS, but unfortunately I have no right under Android Root.
Have also been tested UrukDroid, unfortunately, it works with the boot of an Alternative OS will not therefore have already contacted the developer of UrukDroid, unfortunately without positive result.
Sorry for my bad English.
Best regards
kwalter
Multiboot for OpenAOS works the same as Chulris Root but not for the last FW.
So if you want Root and Linux you have to downgrade the Archos to 2.3.81.
Ich you then boot through the Multiboot menu and select Android, you have root.
fzelle said:
Ich you then boot through the Multiboot menu and select Android, you have root.
Click to expand...
Click to collapse
Doesn't this also work with the latest firmware, because openaos multiboot uses unionfs to create an overlay over the archos firmware to give you read write access, su and superuser.apk.
I didn't upgrade, because of lack of time, it is still on my todo list.
Maurice
Do you think that your Kernel and InitRam is 100% compatible with the new FW?
P.S.: Any news on cm7?
Well there are only minor changes in the kernel from the latest firmware, so I guess it would be no problem to boot the new firmware with the openaos kernel.
However like I said I didn't try it myself yet, so that is why I asked if there are problems.
PS CM7:
For CM7 we have made good progress. However we have to wait until bubu has some time to finish the new unified multiboot menu for gen7 and gen8. In the mean time we are still improving CM7.
To get an impression on the progress just look at closed tickets and the commits on our git.
Maurice
openAOS A70H
hi,
can anyone help me?
i've created a ext4 partition on my A70H 250GB Harddisk with 50GB space.
On this partition i've put the Imagefiles for debian etc., what is the correct entry in menu.lst
to boot debian or other os from openAOS Bootmenu.
On Android over openAOS, fdisk say it is sda2.
When i put the following entry on Menu.lst it will not boot Debian etc. only Android boots correct:
Archos|ARCHOS|ARCHOS|/init|0
Debian|/dev/sda2|/rootfs.debian|/sbin/init|1
Angstrom|/dev/sda2|/rootfs.angstrom|/sbin/init|1
Gingerbread|/dev/sda2|/gingerbread.img|/init|0
or
Archos|ARCHOS|ARCHOS|/init|0
Debian|/dev/block/sda2|/rootfs.debian|/sbin/init|1
Angstrom|/dev/block/sda2|/rootfs.angstrom|/sbin/init|1
Gingerbread|/dev/block/sda2|/gingerbread.img|/init|0
What is the correct path to the second partition on openAOS Boottime??????
Sorry for my bad english.
Best regards
kwalter
It depends how your partition shows up in initramfs. To find out you could try serial debugging.
You can enable serial debugging in the boot menu by going to advanced menu and select Debugging then choose serial.
When your device is connected to your pc you can use minicom to get a shell on initramfs.
This is all explained http://dev.openaos.org/wiki/SettingUpMultiRootGen8#Debugging
In the initramfs shell you can see how your partition shows up by using "df" or looking at /dev etc.
However the way you want it doesn't work, you have to create a partition for each image file and unpack that image file on that partition. Partition booting is meant to get rid of image files.
Maurice
openAOS A70H
Hi,
sorry, but I do not understand.
If the image files I in the storage directory and the menu.lst like this I can change the whole boot without problems:
Archos | Archos | Archos | / init | 0
Debian | | / rootfs.img | / sbin / init | 1
Angstrom | | / angstrom.img | / sbin / init | 1
Gingerbread | | / gingerbread.img | / init | 0
Whether floor Archos firmware, Gingerbread, Angstrom or Debian, everything works 100%.
Unfortunately, I have 4GB but only for my Debian image since FAT file system.
Best Reagards
kwalter
You could change internal storage to ext3 to overcome the filesize problem.
However when you want to boot your image file from a different partition then you don't copy the image file to that partition, but you copy the contents of the image file to that partition. That is why you need a different partition for each image file.
In the multiboot menu we only loop mount image files from internal storage and not from other partitions. From other partitions they will be directly "booted" and not loop mounted first.
So what you can do is on your pc create a folder say /temp/mount/debian
Then you do the following:
Code:
$ sudo mount -o loop (path_to_where_your_archos_is_mounted)/rootfs.img /temp/mount/debian
This will mount your image file on the folder /temp/mount/debian
Then copy everything to your created partition on your archos using -rp option for recursive and preserve rights on the files.
Code:
$ sudo cp -rp /temp/mount/debian/* /(partition_on_your_archos)
After that adjust the menu.lst like you did before.
Maurice
Multiboot and root for A70H - Bluetooth
Hello at all,
so now I've finally managed to boot the Debian from a separate partition with openAOS.
But now comes the next problem, Bluetooth works
not more.
In the image it has worked reasonably clean, but once I
openAOS've installed boot menu does not work anymore.
Both the image and also on the partition, when I try to connect a Bluetooth device, gets out Blutooth.
(Only the devices, thats need a PIN for connection, all other devices are OK.)
Is there a solution?
Hope that someone can help me.
Best regards
kwalter

[Q] How can I unpack and repack Davinci UBL Boot Image?

Phone: Alcatel Onetouch 991D
I extracted the system.img(ANDROID partition) following this guide on windows: Creating a ROM dump of your MT65x3 device (easily found by searching google, since I can't post links yet)
I then copied the system.img over to linux(ubuntu 12.10).
opened terminal and invoked the command below to see the type of image.
mkimage -l system.img
Code:
Image Type : Davinci UBL Boot Image
UBL magic : 00720019
Entry Point: 00730065
nr of pages: 0064002f
start block: 00610072
start page : 00610077
Then dried: ./simg2img system.img sys.raw
And the result...
Code:
Bad magic
Anyone know how to unpack this type of image or convert it to a raw image so then I can mount it?
If you're looking for a Tool like unpacking and repacking .img files such as boot.img maybe this helps:
http://forum.xda-developers.com/showthread.php?t=1241005

Need help analyzing a boot.img

Hi there!
Currently I am trying to extract and modify a boot.img from my car stereo (to set ro.secure=0 in default.prop - its a AV7) from MIC. ( http://www.shop.mic-deutschland.de/shop/article_W005/AV7.html?shop_param=cid=6&aid=W005& )
I did my exercises by studying the specs of a normal boot.img and learned that there should be a 2k header, followed by the gzipped kernel. I should be able to identify the kernel starting after those 2k of header and ending with some zeros finished with 1F 8B. The rest should be the ramdisk, gzipped and cpioed.
So far the theory - but apparently, I am not able to extract the kernel. I also tried some different scripts floating around - none of them ended up with an extractable kernel.
Example:
/unpackbootimg -i ../boot.img -o .
BOARD_KERNEL_CMDLINE
BOARD_KERNEL_BASE e3e0ff00
BOARD_PAGE_SIZE 1768697202
-> Kernel size 0, pretty everything ends up in the ramdisk which is NOT a gzip file.
This is the boot.img: http://ul.to/ivggomon
So you see me pretty clueless at the moment - any suggestion is highly appreciated!
Noone any idea?
unmkbootimg output:
Code:
unmkbootimg version 1.2 - Mikael Q Kuisma <[email protected]>
File ../boot.img not a plain boot image, seeking for embedded image ... not found.
boot_info (from bootimg_Toolset):
.
Code:
/boot_info ../boot.img
Android Magic not found in ../boot.img. Giving up.
The hread may be deleted. It was a uImage multi file with a gzipped cpio in it...

Help for building dtb file

Hello,
To use LibreElec, I actually use a prebuild dtb file (from kszaq repository) on my Android box (Transpeed S905 2/8G + 1Gigabit LAN) but the LAN is 100Mbps instead of Gigabit and RAM memory is 1GB instead of 2.
I yould like to build my own dtb based from the original Android ROM but I am always stuck on the startup screen.
I have tried to:
- Extract the dtb from the ROM
- Change the value for Ethernet and Memory inside the dts file from the prebuild dtb
But always the same error happen
How can I build a dtb in the "correct" way?
Someone can help me?
How can i get the dtb.img from android?
I see that in uart log
Loading Device Tree to 000000001fff4000, end 000000001fffff5e ... OK
i copied the byte by dd to image. (47.8418 kb)
But it isn't working. :/
mdz 16 ab mibox3

I need help with a MTK6752 device

Hello guys,
I have a Ulefone Be Touch 2 (with a MT6752 cpu) that only boot and stay on the ulefone logo, and I can't install any ROM (official or custom ones)...
In fact, the tools (latest SPFlashTool v5.1628 and the one provided by ulephone I used successfully earlier) do the download process until 100% without error message, but the only thing that seems to be on the phone (and working) is the recovery.
With this two softwares I am able to install the official recovery or TWRP (2.8.7.0 from needrom), and they both are usable.
But when I try to do something in recovery mod, it tells me that cache or system partitions (and others) are not mounted (or found).
In SPFlashTool, I tryed many features without success but I have (NAND and UFS) errors when doing memory tests :
#External RAM:
#
# Type = DRAM
#
# Size = 0x80000000 (2048MB/16384Mb)
#
#NAND Flash:
#
# ERROR: NAND Flash was not detected!
#
#EMMC:
#
# EMMC_PART_BOOT1 Size = 0x0000000000400000(4MB)
# EMMC_PART_BOOT2 Size = 0x0000000000400000(4MB)
# EMMC_PART_RPMB Size = 0x0000000000400000(4MB)
# EMMC_PART_GP1 Size = 0x0000000000000000(0MB)
# EMMC_PART_GP2 Size = 0x0000000000000000(0MB)
# EMMC_PART_GP3 Size = 0x0000000000000000(0MB)
# EMMC_PART_GP4 Size = 0x0000000000000000(0MB)
# EMMC_PART_USER Size = 0x00000003a3e00000(14910MB)
#
#UFS:
#
# ERROR: UFS was not detected!
I don't understand what it meens and how can I change the recovery if the NAND is gone? Are system partitions and recovery stored in different places/memory (types)?
I searched and read on differents thread (the UBT2 review, mtk6755 ERROR: NAND Flash was not detected by split52 , [GUIDE] How to 'unbrick' your Mediatek MT65xx...) and googled and watched related videos but didn't find anything than matches and can really help me.
So, if someone can help me I would really be grateful.
Thank you in advance.
I'm sorry if I post this thread in the wrong section (I think it's the first I creat).
sylkyls
I had a problem like your's when I walked all over my partition layout because of a botched flash. Didn't have UFS errors tho. No info anywhere. Had to verify my scatter file and recovery fstab layout agreed with each other. Ended up modifying my scatter file. Took it one partition at a time using the fstab until the recovery recognized all partitions then backed up my files, reformatted and flashed the stock rom using SPF Tools. Took a while to boot. After that, the original scatter file worked. Still don't make sense why it worked that way but it got me back working.
smith901 said:
I had a problem like your's when I walked all over my partition layout because of a botched flash. Didn't have UFS errors tho. No info anywhere. Had to verify my scatter file and recovery fstab layout agreed with each other. Ended up modifying my scatter file. Took it one partition at a time using the fstab until the recovery recognized all partitions then backed up my files, reformatted and flashed the stock rom using SPF Tools. Took a while to boot. After that, the original scatter file worked. Still don't make sense why it worked that way but it got me back working.
Click to expand...
Click to collapse
Thank you smith901,
I don't know how to do this: I can run a terminal into the recovery but if I do cat /etc/fstab or less /etc/fstab , I only have :
/system ext4 rw
/cache ext4 rw
/data ext4 rw
/external_sd auto rw
I think I'm doing the wrong way.
Could you tell me (or redirect me to) a method please?
Have a nice day
sylkyls
sylkyls said:
Thank you smith901,
I don't know how to do this: I can run a terminal into the recovery but if I do cat /etc/fstab or less /etc/fstab , I only have :
/system ext4 rw
/cache ext4 rw
/data ext4 rw
/external_sd auto rw
I think I'm doing the wrong way.
Could you tell me (or redirect me to) a method please?
sylkyls
Click to expand...
Click to collapse
Seems to be fstab problems.
Use whatever unpacking tool you are comfortable with to unpack the stock recovery and TWRP. Then replace your fstab files in the root and /etc directories after changing what you want, rw to /system or whatever. Modify the twrp.fstab file in /etc using the values from stock fstab. You might have to add in or replace your rc and mt6735 files also. Repack then flash. The log screen in TWRP will let you know what partitions can't be read. Choosing the correct encryption partition took some trial & error.
Once you get it all to read, the modified twrp.fstab, files in the unpacked stock recovery folder plus a device tree, and the TWRP building thread will get a recovery built by yourself as soon as you can sync from git.
smith901 said:
Seems to be fstab problems.
Use whatever unpacking tool you are comfortable with to unpack the stock recovery and TWRP. Then replace your fstab files in the root and /etc directories after changing what you want, rw to /system or whatever. Modify the twrp.fstab file in /etc using the values from stock fstab. You might have to add in or replace your rc and mt6735 files also. Repack then flash. The log screen in TWRP will let you know what partitions can't be read. Choosing the correct encryption partition took some trial & error.
Once you get it all to read, the modified twrp.fstab, files in the unpacked stock recovery folder plus a device tree, and the TWRP building thread will get a recovery built by yourself as soon as you can sync from git.
Click to expand...
Click to collapse
Thank you again, but I'm really sorry that I can't apply your instructions... ( unpacking with 7-zip does not give me any fstab file )
Could you try to do it with the official rom please? ( download link is in the bottom of this page: http://ulefone.com/download/betouch2.html , at the next step my phone needs the "option 2" rar file).
With custom roms (zip files flashable with a custom recovery or rar archive), I can unpack thems and obtain/open a fstab file ( recovery.fstab ) but not with things flashable with SPFlashTool.
sylkyls
sylkyls said:
Thank you again, but I'm really sorry that I can't apply your instructions... ( unpacking with 7-zip does not give me any fstab file )
Could you try to do it with the official rom please? ( download link is in the bottom of this page: http://ulefone.com/download/betouch2.html , at the next step my phone needs the "option 2" rar file).
With custom roms (zip files flashable with a custom recovery or rar archive), I can unpack thems and obtain/open a fstab file ( recovery.fstab ) but not with things flashable with SPFlashTool.
sylkyls
Click to expand...
Click to collapse
I meant an unpacking tool like Carliv Image Kitchen or Android Image Kitchen. I'm rarely this helpful so once I finish cleaning the carpet I'll have a look.
The recovery.fstab file look slim in this recovery but that is what they made.
Download Aindroid Image Kitchen.
Follow the instructions to unpack your stock recovery and TWRP recovery.
Make the changes you want. Copy needed files, /etc/recovery.fstab, fstab.mt6752 and probably the *.rc files from stock to TWRP. Just check everything to be sure.
Repack TWRP then flash.
I don't use Windows so I couldn't use the program provided in the archive.
sylkyls,
did you solve the issue? I have the same problem.
cmarqz said:
sylkyls,
did you solve the issue? I have the same problem.
Click to expand...
Click to collapse
Hello,
Sorry every one but I forgot to follow this thread as I had a lot of work and someone giave me another phone ( a samsung note 4 N910F) that I repared (and am using now) and then I did let my ulefone away from my priorities.
Sorry cmarqz but I didn't try the solution proposed by smith901 on my MTK6752 device.
Maybe I'll try it later.
Did you find a solution for your device?
Best regards XDA users.

Categories

Resources