📜 ⬆️ ⬇️

Transfer Android to HDD in Mele A100 (and similar, Allwinner A10)



I got such a device, a Mele A100 with a bat of nand memory, a couple of reboots worked after the firmware, then it did not boot (bootloop).

The first thing that came to mind was to connect the console, but there was nothing informative there. The second thing that came to mind, after a brief googling, is to write the firmware on the sd card, there is one on w3bsit3-dns.com , but I only had a 32G card from my mobile phone, I didn’t want to buy, and the speed would not be very good. The third thing that came to mind after a long examination of the board in searching for usb inside (since the android detektil is over 3x usb, and there are only 3 outwards), the look caught on sata is unweldable, I have a hard one.

The console is connected here, like this (cd-audio):
')

Actually, I liked it with an abundance of interfaces, on the side there are still SD and USB-OTG
image

Feeling joy and funnies of a colleague, I soldered sata to him, I don’t attach my own photo, everything is filled with hot melt, and then I didn’t believe in victory.



3 not isolated, I soldered to 3m on the right, and paired to paired , Be careful, do not solder “top”, you need to look at the key drawn on the other side of the board
I took only GND and 5V power supply on the sata connector, for 2.5 "hard enough, I took power from the power supply input.
After such bullying, android discovered sata, which surprised me and made me happy.
Next, I'll skip a bunch of wasted time I spent learning how it works and why, installing debian - ubuntu , pimp-my-mele , and debian-installer
I didn’t want to Debian, because I want to watch the video on this thing, but debian doesn’t know how to accelerate the video, but maybe it can :-) but still need a remote, and LazyMedia , but this debian doesn’t.

I stumbled upon the ImgRepacker utility ( w3bsit3-dns.com , xda ), which can rebuild firmware images for PhoenixSuit and LiveSuit, disassembled the firmware and in the file init.sun4i.rc in the folder firmware.img.dump \ boot.fex.dump \ ramdisk.dump changed everything calls to nand calls to sda (There is a problem if the flash drive is on, it is mounted as sda, and hdd as sdb, which suggests that hdd on the usb bus, but hdd is still faster than the flash drive, at least visually).
Replacement code
# - what was
## - source comments
on fs # mount ext4 /dev/block/nandd /system wait noatime nodev barrier=0 wait /dev/block/sda mount ext4 /dev/block/sda2 /system wait noatime nodev barrier=0 ## try to mount /data # wait /dev/block/nande # mount ext4 /dev/block/nande /data wait noatime nosuid nodev barrier=0 # setupfs /dev/block/nande mount ext4 /dev/block/sda3 /data wait noatime nosuid nodev barrier=0 # setupfs /dev/block/nande # umount /data # exec /system/bin/logwrapper /system/bin/e2fsck -y /dev/block/nande # exec /system/bin/busybox mount -t ext4 -o noatime,nosuid,nodev,barrier=0,journal_checksum,noauto_da_alloc /dev/block/nande /data ## try to mount /cache # mount ext4 /dev/block/nandh /cache wait noatime nosuid nodev barrier=0 # setupfs /dev/block/nandh # umount /cache # exec /system/bin/logwrapper /system/bin/e2fsck -y /dev/block/nandh # exec /system/bin/busybox mount -t ext4 -o noatime,nosuid,nodev,barrier=0,journal_checksum,noauto_da_alloc /dev/block/nandh /cache # exec /system/bin/busybox mount -t ext4 -o noatime,nosuid,nodev,barrier=0,journal_checksum,noauto_da_alloc /dev/block/sda7 /cache mount ext4 /dev/block/sda7 /cache wait noatime nosuid nodev barrier=0 # format_userdata /dev/block/nandk apollo # exec /system/bin/busybox mount -t ext4 -o noatime,nosuid,nodev,barrier=0,journal_checksum,noauto_da_alloc /dev/block/sda4 /mnt/sdcard mount ext4 /dev/block/sda4 /mnt/sdcard wait noatime nosuid nodev barrier=0 # try to mount /private export PRIVATE_STORAGE /mnt/private # format_userdata /dev/block/nandi PRIVATE mkdir /mnt/private 0000 system system # mount vfat /dev/block/nandi /mnt/private format_userdata /dev/block/sda6 PRIVATE mount vfat /dev/block/sda6 /mnt/private 


You can also write your commands in /system/etc/install-recovery.sh, you can create it already in the working system.

Disc preparation
Partitions are created on the disk, sizes of your choice, those that are used in nand are listed below.
sda1
sda5 swap
sda6 private nandi/16 vfat
sda7 cache nandh/512 ext4
sda2 system nandd/1024 ext4
sda3 data nande/1024M ext4
sda4 sdcard nandk/2048M ext4

I copied the information with the help of dd when I launched Ubuntu liveSD
dd if = / dev / nandd of = / dev / sda2
and spent e2fsck / dev / sda2

Next, we flash a packed image with an PhoenixCard onto an SD card, flash mele and connect hdd, then the system loads with hdd.



For those who do not want to do it all themselves, the image is based on the Toucan Smart (Android + iconBIT TV Launcher 01.22.2013)
Firmware on Yandex.Disk
Folder with files on Yandex.Disk
OneDrive Firmware
Folder with files on OneDrive

It was discovered that I did not have a 4 * 256M RAM on the board, and I couldn’t find where to change this setting, so I decided not to soar the brain:

We connect the usb console
At the time of the hit , we press the spacebar to stop the autoboot: click the space bar and get into the bootloader
in the bootloader:
setenv setargs_nand setenv bootargs console=\${console} root=\${nand_root}init=\${init} loglevel=\${loglevel} partitions=\${partitions} mac_addr=\${mac} mem=1024M

The command mem = 1024M sends to Android that there are 1024M operatives, then
if the printenv mac command shows mac = 00: 00: 00: 00: 00, then most likely every time you start the mac, the ethrernet address will change, so that this does not happen, enter your poppy, it is often pasted on the card, inside the case.
setenv mac 12:34:56:78:90:12
In order to save variables
saveenv
after reset reset we get a working Android on which 1yg operatives
In fact

I registered swap in /system/etc/install-recovery.sh
mount -o remount,rw /system
echo swapon /dev/block/sda5 > /system/etc/install-recovery.sh
chmod +x /system/etc/install-recovery.sh
mount -o remount,ro /system



PS I ask to write errors in personal, I will correct them, and comments will look silly
I wanted to put OpenWRT, but I asked myself the question in time: “but on ... why?”

Source: https://habr.com/ru/post/261667/


All Articles