Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpacking image [OK] not found #1

Closed
darkyass opened this issue May 30, 2018 · 18 comments
Closed

Unpacking image [OK] not found #1

darkyass opened this issue May 30, 2018 · 18 comments

Comments

@darkyass
Copy link

darkyass commented May 30, 2018

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
Copy link
Owner

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

@darkyass
Copy link
Author

X96 s905X p212

@Stane1983
Copy link
Owner

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
Copy link
Author

darkyass commented May 30, 2018

`$ ./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

  • Results ---------------------------------------------------
    AmlUsbIdentifyHost
    This firmware version is 2-2-0-0-0-1-0

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

  • Results ---------------------------------------------------
    AmlUsbIdentifyHost
    This firmware version is 2-2-0-0-0-1-0

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

  • Results ---------------------------------------------------
    AmlUsbBulkCmd[ echo 12345]
    usbReadFile len=512,ret=-5 error_msg=Input/output error
    [AmlUsbRom]Err:return len=-1 < strLenBusy 11
    [AmlUsbRom]Err:bulkInReply=[]
    ERR: AmlUsbBulkCmd failed!

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

  • Results ---------------------------------------------------
    AmlUsbIdentifyHost
    This firmware version is 2-2-0-0-0-1-0

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

  • Results ---------------------------------------------------
    [update]Total tansfer size 0x4

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
Copy link
Owner

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

@darkyass
Copy link
Author

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

@darkyass
Copy link
Author

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

@Stane1983
Copy link
Owner

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

@darkyass
Copy link
Author

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

@Stane1983
Copy link
Owner

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
Copy link
Author

Thanks, i'll test it and replay.

@darkyass
Copy link
Author

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

  • Results ---------------------------------------------------
    AmlUsbIdentifyHost
    This firmware version is 2-2-0-0-0-1-0

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

  • Results ---------------------------------------------------
    AmlUsbIdentifyHost
    This firmware version is 2-2-0-0-0-1-0

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

  • Results ---------------------------------------------------
    AmlUsbBulkCmd[ echo 12345]
    usbReadFile len=512,ret=-5 error_msg=Input/output error
    [AmlUsbRom]Err:return len=-1 < strLenBusy 11
    [AmlUsbRom]Err:bulkInReply=[]
    ERR: AmlUsbBulkCmd failed!

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

  • Results ---------------------------------------------------
    AmlUsbIdentifyHost
    This firmware version is 2-2-0-0-0-1-0

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

  • Results ---------------------------------------------------
    [update]Total tansfer size 0x4

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

  • Results ---------------------------------------------------
    ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
    Transfer Complete! total size is 49152 Bytes

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

  • Results ---------------------------------------------------
    ..
    Transfer Complete! total size is 32 Bytes

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

  • Results ---------------------------------------------------
    [update]Run at Addr d9000000
    AmlUsbRunBinCode:ram_addr=d9000000

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

  • Results ---------------------------------------------------
    AmlUsbIdentifyHost
    This firmware version is 2-2-0-0-0-1-0

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

  • Results ---------------------------------------------------
    ..
    Transfer Complete! total size is 49152 Bytes

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

  • Results ---------------------------------------------------
    ..
    Transfer Complete! total size is 48 Bytes

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

  • Results ---------------------------------------------------
    ............................
    Transfer Complete! total size is 868352 Bytes

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

  • Results ---------------------------------------------------
    [update]Run at Addr d9000000
    AmlUsbRunBinCode:ram_addr=d9000000

........[OK]

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

  • Results ---------------------------------------------------
    file size is 0x13800
    AmlUsbTplCmd = download mem dtb normal 0x13800 rettemp = 1 buffer = download mem dtb normal 0x13800
    AmlUsbReadStatus retusb = 1
    Downloading....
    [update]Cost time 0Sec
    [update]Transfer size 0x13800B(0MB)
    AmlUsbBulkCmd[download get_status]
    [update]mwrite success

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!

[KO]

Cleanup`

@darkyass
Copy link
Author

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

  • Results ---------------------------------------------------
    AmlUsbIdentifyHost
    This firmware version is 2-2-0-0-0-1-0

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

  • Results ---------------------------------------------------
    AmlUsbIdentifyHost
    This firmware version is 2-2-0-0-0-1-0

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

  • Results ---------------------------------------------------
    AmlUsbBulkCmd[ echo 12345]
    usbReadFile len=512,ret=-5 error_msg=Input/output error
    [AmlUsbRom]Err:return len=-1 < strLenBusy 11
    [AmlUsbRom]Err:bulkInReply=[]
    ERR: AmlUsbBulkCmd failed!

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

  • Results ---------------------------------------------------
    AmlUsbIdentifyHost
    This firmware version is 2-2-0-0-0-1-0

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

  • Results ---------------------------------------------------
    [update]Total tansfer size 0x4

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

darkyass commented May 31, 2018

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

Repository owner deleted a comment from darkyass May 31, 2018
@Stane1983
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants