Announcement
Collapse
No announcement yet.
Announcement
Collapse
No announcement yet.
TWRP for Amlogic devices.
Collapse
This is a sticky topic.
X
X
-
Originally posted by adagre View PostWill this work from a usb memory card or must it be on an sdcard?
Comment
-
Originally posted by Zybex74 View PostHello, abdul_pt
I have big trouble with M8 TV Box - got brick, please help me!
I used "TWRP_2.8.7.0_K200.img" (Size: 11 074 904 - in Total Commander)
After one of the attempts in TWRP of transfer partitions from one model "M8 TV Box" to another model (from PCB "M8 V5_0" to PCB "M9&M8_V0.92") i did "Advanced Wipe": Dalvik Cache / Cache / System / Data / Internal Storage.
After that i did "Restore Partitions": Bootloader / Logo / Recovery / Boot / System.
After rebooting M8 Box a got black screen, nothing happens, got bricked device.
Any attempts to flash from SD-card firmwares for any models "M8 TV Box" do not succeed, each time at the end it loads "Stock Recovery" from SD-card with errors about "Cache" partition, it is missing. Also missing all other partitions. Recovery of partitions via TWRP do not succeed.
At this stage, i have had normal partitions "bootloader" and "ubootenv" in M8 box memory.
my commands via ADB Shell:
cat /proc/partitions
major minor #blocks name
31 0 1024 mtdblock0
31 1 64 mtdblock1
179 0 15440896 mmcblk0
179 1 15422400 mmcblk0p1
that all, and nothing else partitions
cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00001000 "bootloader"
mtd1: 00010000 00001000 "ubootenv"
but after my attempts to flash some IMG firmwares of potentially compatible S802 models, via USB-OTG using "USB Burning Tool" with option "Erase Flash" > "Force Erase All", it broke my partitions "bootloader" and "ubootenv", and unfortunately any attempts to flash firmware via "USB Burning Tool" stuck at 4% of progress, after formatting command, with error "disk_initial failed" / "[0x32030202]disk_initial command return error value".
I also tried to short NAND pins (29+30 for my model) but it did not help.
i can start now my M8 TV Box only from booting SD-card with hidden loader made by program "BootcardMaker". I still can load TWRP, can control box via ADB Shell, can try flash it via "USB Burning Tool". But i still can not recovery any firmware because of all my partitions are broken/lost.
=============================================
So what i have now in ADB Shell in my bricked "M8 TV Box" PCB "M9&M8_V0.92":
cat /proc/partitions
major minor #blocks name
179 0 7777280 mmcblk0
179 1 7759395 mmcblk0p1
cat /proc/mtd
dev: size erasesize name
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 818672 128 818544 0% /dev
tmpfs 818672 20 818652 0% /tmp
/dev/block/mmcblk0p1 7755296 447072 7308224 6% /external_sd
ls -l -R /dev/block
/dev/block:
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
brw------- root root 7, 0 2026-11-03 09:04 loop0
brw------- root root 7, 1 2026-11-03 09:04 loop1
brw------- root root 7, 2 2026-11-03 09:04 loop2
brw------- root root 7, 3 2026-11-03 09:04 loop3
brw------- root root 7, 4 2026-11-03 09:04 loop4
brw------- root root 7, 5 2026-11-03 09:04 loop5
brw------- root root 7, 6 2026-11-03 09:04 loop6
brw------- root root 7, 7 2026-11-03 09:04 loop7
brw------- root root 179, 0 2026-11-03 09:04 mmcblk0
brw------- root root 179, 1 2026-11-03 09:04 mmcblk0p1
drwxr-xr-x root root 2026-11-03 09:04 platform
brw------- root root 253, 0 2026-11-03 09:04 zram0
/dev/block/platform:
drwxr-xr-x root root 2026-11-03 09:04 aml_sdio.0
/dev/block/platform/aml_sdio.0:
drwxr-xr-x root root 2026-11-03 09:04 by-num
lrwxrwxrwx root root 2026-11-03 09:04 mmcblk0 -> /dev/block/mmcblk0
lrwxrwxrwx root root 2026-11-03 09:04 mmcblk0p1 -> /dev/block/mmcblk0p1
/dev/block/platform/aml_sdio.0/by-num:
lrwxrwxrwx root root 2026-11-03 09:04 p1 -> /dev/block/mmcblk0p1
=============================================
i want to manually recreate all blank stock partitions via ADB Shell using SGDISK as written there:
http://forum.xda-developers.com/show....php?t=1605664
http://ram.kossboss.com/writing-new-...nd-sfdisk-mbr/
and after that i will try restore firmware of some methods:
- flash via "USB Burning Tool" from IMG image
- install from SD-card ZIP-firmware
- recovery via ADB Shell from IMG partitions backups (i made them earlier from normal "M8 TV Box" PCB "M9&M8_V0.92")
- recovery via TWRP from partitions backups (i made them earlier from normal "M8 TV Box" PCB "M9&M8_V0.92")
i have logs from ADB Shell commands from normal "M8 TV Box" PCB "M9&M8_V0.92":
cat /proc/partitions
cat proc/mtd
cat proc/ntd
cat /proc/mounts
ls -l -R dev/block
(and can send it to you PM or publish it in that public forum topic - depends from what variant you prefer)
But i don't know which exactly commands i must make via "SGDISK" for recreate needed partitions.
It should be something like:
/sdcard # ./sgdisk /dev/block/mmcblk0 -a 256 -n 1:256:511 -n 0:0:1023 -n 0:0:31743 -n 0:0:65535 -n 0:0:163839 -n 0:0:262143 -n 0:0:1019903 -n 0:0:2273279 -n 0:0:3145727 -n 0:0:+12G -n 0:0:0
But i don't know what exactly parameters of that command needed for my M8 Box, so abdul_pt please help me to unbrick my "M8 TV Box", and also if someone else knows about it and can help me, i'll be very grateful.
gptfdisk (gdisk + sgdisk)
for Android compiled:
[SOURCE] sgdisk and gptfdisk for android
http://forum.xda-developers.com/show....php?t=1605535
Best way to unbrick is making a bootable SDcard put the rom image and the ini file in root of SDcard to make it flash. You might need to try with different value in the erase_flash flag.
Comment
-
Originally posted by abdul_pt View PostDo you have a stock rom in image format ?
Best way to unbrick is making a bootable SDcard put the rom image and the ini file in root of SDcard to make it flash. You might need to try with different value in the erase_flash flag.
it included aml_autoscript.zip
so can you check that file and make some fixes in it ?
Comment
-
Guest
Originally posted by Zybex74 View Postfor example i have that firmware: k200-ota-20150613
it included [ATTACH]n535561[/ATTACH]
so can you check that file and make some fixes in it ?
Comment
-
Guest
Originally posted by dincis1 View PostJust make bootable sd card with amlogic bootcard maker first then unzip files on sd card... I fill try to upload zip file for you on google drive
Comment
-
Originally posted by dincis1 View PostHere is the link https://yadi.sk/d/Ciix5giIiDf9z
Comment
-
Originally posted by dincis1 View Postanyways just get stock firmware and flash it, first prepare sd card with amlogic bootcard maker
Originally posted by Zybex74 View PostAny attempts to flash from SD-card firmwares for any models "M8 TV Box" do not succeed, each time at the end it loads "Stock Recovery" from SD-card with errors about "Cache" partition, it is missing. Also missing all other partitions.
Comment
-
Put the image Rom and the aml_sdc_burn.ini file on root of the bootable EXternalSD, short pins and wait, flashing should start automatically. If you got any errors try changing the value of the "erase_flash = 0" flag.
Code:[COLOR=#444444][FONT=Open Sans][SIZE=14px]0 – Do not erase flash[/SIZE][/FONT][/COLOR] [COLOR=#444444][FONT=Open Sans][SIZE=14px]1 – Normal erase (same as in USB Burning Tool)[/SIZE][/FONT][/COLOR] [COLOR=#444444][FONT=Open Sans][SIZE=14px]2 – ???[/SIZE][/FONT][/COLOR] [COLOR=#444444][FONT=Open Sans][SIZE=14px]3 – Erase all (erase NAND/eMMC content and bootloader which exists in protected area)[/SIZE][/FONT][/COLOR] [COLOR=#444444][FONT=Open Sans][SIZE=14px]4 – Force erase all (this option unprotects all protected areas of NAND/eMMC/SPI, raw formats everything and reparitions storage)[/SIZE][/FONT][/COLOR]
Comment
-
Originally posted by abdul_pt View PostPut the image Rom and the aml_sdc_burn.ini file on root of the bootable EXternalSD, short pins and wait, flashing should start automatically. If you got any errors try changing the value of the "erase_flash = 0" flag.
Comment
-
Originally posted by abdul_pt View PostPut the image Rom and the aml_sdc_burn.ini file on root of the bootable EXternalSD, short pins and wait, flashing should start automatically. If you got any errors try changing the value of the "erase_flash = 0" flag.Originally posted by Zybex74 View PostI've tried it earlier, with "erase_flash = 3", without success, will try later with "erase_flash = 4"
aml_sdc_burn.ini
u-boot.bin
aml_upgrade_package.img
after loading from SD-card - blue LED on box blinks, no any signal at TV by AV-out, and so on indefinitely, nothing happens.
I've tried 2 different firmware, and original and modified "aml_sdc_burn.ini", with NAND pins shorted and without, with Reset button and without - there is no difference, the result is the same.
I've tried different "u-boot.bin" to make bootable partition at SD-card via "BootcardMaker" - there is no difference, the result is the same.
but if i copy TWRP to that bootable SD-card, it is loaded successfully and i see normal signal via AV-out from TWRP, and while loading in that case blue LED lights up continuously, not blinking, so bootloader at SD-card is OK, but firmware can not flash.
-------------------------------------------------------
original "aml_sdc_burn.ini":
[common]
erase_bootloader = 0
erase_flash = 3
reboot = 1
;package will filled by sdacard burning tool
[burn_ex]
package = aml_upgrade_package.img
;media =
-------------------------------------------------------
modified "aml_sdc_burn.ini":
[common]
erase_bootloader = 1
erase_flash = 4
reboot = 1
;package will filled by sdacard burning tool
[burn_ex]
package = aml_upgrade_package.img
;media =
-------------------------------------------------------
Comment
What's Going On
Collapse
There are currently 3949 users online. 1 members and 3948 guests.
Most users ever online was 37,478 at 04:14 on 26 June 2024.
Comment