Stane1983 / aml-linux-usb-burn

Linux version of Amlogic USB Burn Tool
146 stars 42 forks source link

Unpacking image [OK] not found #1

Closed darkyass closed 6 years ago

darkyass commented 6 years ago

I managed to install these tools but get this error: $ ./aml-flash --img=amlupgrade113.img --soc=gxl --wipe --reset=n --parts=all Unpacking image [OK] not found

$ ./tools/update identify AmlUsbIdentifyHost This firmware version is 2-2-0-0

any help ?

Stane1983 commented 6 years ago

Which board (SoC) you're trying to flash?

darkyass commented 6 years ago

X96 s905X p212

Stane1983 commented 6 years ago

I'm not really sure what's happening. Try to run it with --debug flag and share output. Maybe there will be some clue.

darkyass commented 6 years ago

`$ ./aml-flash --img=XTMODEXP3.img --soc=gxl --wipe --reset=n --parts=all --debug

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null identify 7

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null identify 7

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null bulkcmd " echo 12345"

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null identify 7

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null rreg 4 0xc8100228

C8100228: adfc318c

0xc8100228 = 0xadfc318c Secure boot bit = 0 Unpacking image [Msg]Image package version 0x2 [Msg]Unpack item [USB , DDR] to (/tmp/aml-flash-tool-3wS2/DDR.USB) size:49152 bytes [Msg]Unpack item [USB , UBOOT] to (/tmp/aml-flash-tool-3wS2/UBOOT.USB) size:884736 bytes [Msg]Unpack item [UBOOT , aml_sdc_burn] to (/tmp/aml-flash-tool-3wS2/aml_sdc_burn.UBOOT) size:934400 bytes [Msg]Unpack item [ini , aml_sdc_burn] to (/tmp/aml-flash-tool-3wS2/aml_sdc_burn.ini) size:602 bytes [Msg]Unpack item [PARTITION , boot] to (/tmp/aml-flash-tool-3wS2/boot.PARTITION) size:8519372 bytes [Msg]Unpack item [PARTITION , bootloader] to (/tmp/aml-flash-tool-3wS2/bootloader.PARTITION) size:933888 bytes [Msg]Unpack item [PARTITION , logo] to (/tmp/aml-flash-tool-3wS2/logo.PARTITION) size:941648 bytes [Msg]Unpack item [xml , manifest] to (/tmp/aml-flash-tool-3wS2/manifest.xml) size:84101 bytes [Msg]Unpack item [dtb , meson1] to (/tmp/aml-flash-tool-3wS2/meson1.dtb) size:79872 bytes [Msg]Unpack item [conf , platform] to (/tmp/aml-flash-tool-3wS2/platform.conf) size:202 bytes [Msg]Unpack item [PARTITION , recovery] to (/tmp/aml-flash-tool-3wS2/recovery.PARTITION) size:13758464 bytes [Msg]Unpack item [PARTITION , system] to (/tmp/aml-flash-tool-3wS2/system.PARTITION) size:936917596 bytes [Msg]Write config file "/tmp/aml-flash-tool-3wS2/image.cfg" OK! Image unpack OK! [OK]

Parsing image configuration files

platform_conf_name = platform.conf ddr_filename = DDR.USB uboot_filename = UBOOT.USB uboot_comp_filename = dtb_meson_filename = dtb_meson1_filename = meson1.dtb dtb_meson1_enc_filename = ddr_enc_filename = uboot_enc_filename = keys_filename = platform = 0x0811 bin_params = ddr_load = 0xd9000000 ddr_run = 0xd9000000 uboot_down = uboot_decomp = uboot_enc_down = uboot_enc_run = uboot_load = 0x200c000 uboot_run = 0xd9000000 bl2_params = 0xd900c000 nb_partitions = 5

Partition list

0 boot.PARTITION boot normal 1 bootloader.PARTITION bootloader normal 2 logo.PARTITION logo normal 3 recovery.PARTITION recovery normal 4 system.PARTITION system sparse

Bootloader/DTB files

bootloader_file = /tmp/aml-flash-tool-3wS2/bootloader.PARTITION dtb_file = not found

Cleanup`

Stane1983 commented 6 years ago

I'd say that img file you have is not for your platform. You're missing dtb.PARTITION file in your image.

darkyass commented 6 years ago

thanks for the help, i'll try another img and replay.

darkyass commented 6 years ago

all the img downloaded don't have dtb.PARTITION file. Where can i get one ?

Stane1983 commented 6 years ago

Which version of android you're trying to flash? Can you share one of links from where you downloaded firmwares?

darkyass commented 6 years ago

One of img is from forum xda: https://forum.xda-developers.com/android-stick--console-computers/amlogic/rom-mini-m8s-ii-2gb-xannytech-custom-t3513805

Rom: https://mega.nz/#!F9dmgShJ!IQm_AnwUr1mBwlIU1XgGkpDsXMlnyPVGqbvGCQGCDas

darkyass commented 6 years ago

Another one: https://yadi.sk/d/Fg3MpCNkze9Rd

Stane1983 commented 6 years ago

I updated script to work with pretty old img files on GXL platform and I tested rom from Mega - I have x96 device (yadi.sk link download limit reached). Check that rom too and please report. If also working, I'll close issue as fixed.

darkyass commented 6 years ago

Thanks, i'll test it and replay.

darkyass commented 6 years ago

Now i get another error, i've tested 3 different img, here is the same output: `$ ./aml-flash --img=X96.img --soc=gxl --wipe --reset=n --parts=all --debug

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null identify 7

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null identify 7

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null bulkcmd " echo 12345"

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null identify 7

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null rreg 4 0xc8100228

C8100228: adfc318c

0xc8100228 = 0xadfc318c Secure boot bit = 0 Unpacking image [Msg]Image package version 0x2 [Msg]Unpack item [USB , DDR] to (/tmp/aml-flash-tool-QASm/DDR.USB) size:49152 bytes [Msg]Unpack item [USB , UBOOT] to (/tmp/aml-flash-tool-QASm/UBOOT.USB) size:868352 bytes [Msg]Unpack item [UBOOT , aml_sdc_burn] to (/tmp/aml-flash-tool-QASm/aml_sdc_burn.UBOOT) size:918016 bytes [Msg]Unpack item [ini , aml_sdc_burn] to (/tmp/aml-flash-tool-QASm/aml_sdc_burn.ini) size:602 bytes [Msg]Unpack item [PARTITION , boot] to (/tmp/aml-flash-tool-QASm/boot.PARTITION) size:8329216 bytes [Msg]Unpack item [PARTITION , bootloader] to (/tmp/aml-flash-tool-QASm/bootloader.PARTITION) size:917504 bytes [Msg]Unpack item [PARTITION , logo] to (/tmp/aml-flash-tool-QASm/logo.PARTITION) size:2299376 bytes [Msg]Unpack item [xml , manifest] to (/tmp/aml-flash-tool-QASm/manifest.xml) size:65275 bytes [Msg]Unpack item [dtb , meson1] to (/tmp/aml-flash-tool-QASm/meson1.dtb) size:79872 bytes [Msg]Unpack item [conf , platform] to (/tmp/aml-flash-tool-QASm/platform.conf) size:202 bytes [Msg]Unpack item [PARTITION , recovery] to (/tmp/aml-flash-tool-QASm/recovery.PARTITION) size:11255808 bytes [Msg]Unpack item [PARTITION , system] to (/tmp/aml-flash-tool-QASm/system.PARTITION) size:1170438568 bytes [Msg]Write config file "/tmp/aml-flash-tool-QASm/image.cfg" OK! Image unpack OK! [OK]

Parsing image configuration files

platform_conf_name = platform.conf ddr_filename = DDR.USB uboot_filename = UBOOT.USB uboot_comp_filename = dtb_meson_filename = dtb_meson1_filename = meson1.dtb dtb_meson1_enc_filename = ddr_enc_filename = uboot_enc_filename = keys_filename = platform = 0x0811 bin_params = ddr_load = 0xd9000000 ddr_run = 0xd9000000 uboot_down = uboot_decomp = uboot_enc_down = uboot_enc_run = uboot_load = 0x200c000 uboot_run = 0xd9000000 bl2_params = 0xd900c000 nb_partitions = 5

Partition list

0 boot.PARTITION boot normal 1 bootloader.PARTITION bootloader normal 2 logo.PARTITION logo normal 3 recovery.PARTITION recovery normal 4 system.PARTITION system sparse

Bootloader/DTB files

bootloader_file = /tmp/aml-flash-tool-QASm/bootloader.PARTITION dtb_file = /tmp/aml-flash-tool-QASm/meson1.dtb

Initializing ddr Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null cwr /tmp/aml-flash-tool-QASm/DDR.USB 0xd9000000

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null write /home/antergos/aml-usb-burn/tools/usbbl2runpara_ddrinit.bin 0xd900c000

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null run 0xd9000000

........ Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null identify 7

[OK] Running u-boot Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null write /tmp/aml-flash-tool-QASm/DDR.USB 0xd9000000

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null write /home/antergos/aml-usb-burn/tools/usbbl2runpara_runfipimg.bin 0xd900c000

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null write /tmp/aml-flash-tool-QASm/UBOOT.USB 0x200c000

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null run 0xd9000000

........[OK]

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null mwrite /tmp/aml-flash-tool-QASm/meson1.dtb mem dtb normal

Create partitions Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null bulkcmd " disk_initial 1"

[KO]

Cleanup`

darkyass commented 6 years ago

I tried these roms: http://www.multiup.org/en/mirror/f97df1f56052ee8cb076a3d6b801897a/X96.img https://mega.nz/#!F9dmgShJ!IQm_AnwUr1mBwlIU1XgGkpDsXMlnyPVGqbvGCQGCDas

first i get the output above now i get this: $ ./aml-flash --img=XTMODEXP3.img --soc=gxl --wipe --reset=n --parts=all --debug

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null identify 7

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null identify 7

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null bulkcmd " echo 12345"

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null identify 7

Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null rreg 4 0xc8100228

C8100228: adfc318c

0xc8100228 = 0xadfc318c Secure boot bit = 0 Unpacking image [Msg]Image package version 0x2 [Msg]Unpack item [USB , DDR] to (/tmp/aml-flash-tool-epP9/DDR.USB) size:49152 bytes [ERR]f(AmlImagePack.cpp)L1795:Write item data not complete! [KO]

Cleanup

I don't understand ??

darkyass commented 6 years ago

Ok the [ERR]f(AmlImagePack.cpp)L1795:Write item data not complete! error is fixed after pc restart. now back to the first error: `Create partitions Command -> /home/antergos/aml-usb-burn/tools/update 2>/dev/null bulkcmd " disk_initial 1"

Results --------------------------------------------------- AmlUsbBulkCmd[ disk_initial 1] [AmlUsbRom]Err:bulkInReply=[failed:] ERR: AmlUsbBulkCmd failed!`

waiting for help.

Stane1983 commented 6 years ago

Dumb question but do you have all files from within tools folder (dump files etc.)? Is it possible that you're missing dependencies for update binary which are: libusb-0.1.so.4 libc.so.6 ld-linux-x86-64.so.2

Do you have correctly created udev rule? Did you try to run this under root account? Now it's matter why it doesn't work on your system. Which Linux distro? I know for a fact that Mega link is working just fine because I tested it on my X96 device. Now downloading 2nd file to test that too. Again dumb question, but do you have just X96 or X96 mini? X96 mini is S905w device and X96 firmware's (Marshmallow ones at least) for sure won't work on S905w.

darkyass commented 6 years ago

here are my box images: https://i.imgur.com/tr3xzW2.jpg https://i.imgur.com/rAPW23P.jpg

OS: Antergos (Archlinux distro) $ locate libusb-0.1.so.4 libc.so.6 ld-linux-x86-64.so.2 /usr/lib/ld-linux-x86-64.so.2 /usr/lib/libc.so.6 /usr/lib/libusb-0.1.so.4 /usr/lib/libusb-0.1.so.4.4.4 /usr/lib32/libc.so.6

udev rule created running under root account

Stane1983 commented 6 years ago

As discussed here and via email, issue is no longer with script. Therefore I'm closing it.