Building
This will build the default output for your Samsung Galaxy A5 (2017).
$ nix-build --argstr device samsung-a5y17lte -A build.default
Installation
The device will need to be booted in its bootloader, or odin, mode.
The boot image can be installed using the following command, assuming it was built using the previous command.
$ result/flash-critical.sh
If you have a system image (system.img
) built, you can use heimdall
to
flash it to the device. Note that it might be too big to fit over the SYSTEM
partition. In such case, it can be flashed on the USERDATA
partition.
Warning
|
This will erase everything on the partition. Additionally, the
common backups methods, e.g. TWRP, will not backup the USERDATA partition.
|
$ heimdall flash --USERDATA system.img
Device-specific notes
Force-rebooting
To force-reboot the device, hold Volume Down
+ Home
+ Power
for a couple
of seconds.
Odin mode
Holding Volume Down
+ Home
+ Power
during power-up will go to the Samsung
specific bootloader mode.
Recovery
Holding Volume Up
+ Home
+ Power
during power-up will boot the recovery
boot image.
Flashing system image
Using heimdall
to flash system.img
, either on the USERDATA
or on the
SYSTEM
partition seems to fail, for unclear reasons.
One can use TWRP to flash the partitions:
$ adb shell dd of=/dev/block/platform/13540000.dwmmc0/by-name/SYSTEM bs=8M < .../system.img
$ # or
$ adb shell dd of=/dev/block/platform/13540000.dwmmc0/by-name/USERDATA bs=8M < .../system.img