15

Development - (experimental) boot.img for SM-A127F with the touch and MTP fixed...

 1 year ago
source link: https://forum.xda-developers.com/t/experimental-boot-img-for-sm-a127f-with-the-touch-and-mtp-fixed.4536735/#post-87966359
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Development (experimental) boot.img for SM-A127F with the touch and MTP fixed

uluruman

Senior Member
Here is the boot.img (tarred for Odin) intended to be used together with GSI systems (e.g. LineageOS). It contains the recompiled stock U4 kernel taken from Samsung Open Source with only a couple of the most necessary fixes, namely the freezing touchscreen and the non-functional MTP. 99.9% unaltered, 100% open-source.

If the fixed boot.img does not work for you for some reason, I've also attached the original U4 boot (taken from the SM-A127F_NPB_A127FXXU4AUK1 firmware) so you could revert the changes.

All credits for the touchscreen fix go to manteiga25, he's done an amazing job on figuring this all out, still from his solution which includes additional performance tweaks I've taken the absolute bare minimum so that the problem is no longer present. Also huge thanks to Osvaldo Costa for the wonderful bootimgtool.

If you don't trust me or if you're in desperate need of a more recent kernel, here are the steps how to rebuild it all yourself (on Debian 11):
  1. Download the kernel source from Samsung Open Source (A127FXXU3AUJ5)
  2. Unpack SM-A127F_RR_Opensource.zip and Kernel.tar.gz inside
  3. Unpack SM-A127F_RR_Opensource_A127FXXU4AUK1.zip into the same dir (overwriting the files)
  4. Unpack the attached source.tar.gz, it contains only the changed files and build.sh facilitating compilation
  5. From root: apt install clang-9 gcc-9-aarch64-linux-gnu
  6. Remove any other versions of clang. Then cd /usr/bin; ln -s clang clang-9; ln -s clang++ clang++-9; ln -s clang-cpp clang-cpp-9
  7. Back in the Kernel dir, run build.sh and wait for the kernel to compile
  8. Download bootimgtool and compile it (just "make")
  9. Download the stock firmware
  10. Extract boot.img from AP_A127FXX[...].tar.md5 (unpack using tar, ignore the .md5) to the root dir of your Kernel
  11. bootimgtool disassemble boot.img
  12. cp Kernel/arch/arm64/boot/Image kernel
  13. bootimgtool create -o boot.img
  14. Flash boot.img as is using Heimdall or pack into .tar and flash using Odin
P.S.: the U5 kernel sources are suspicously segregated between RR (rest of the world), EUR, CIS and CIS-SER (Russia). It's quite interesting what are the differences?

Attachments

  • source.tar.gz
    19.1 KB · Views: 4
  • boot_sm-a127f_u4_fixed.zip
    17 MB · Views: 10
  • boot_sm-a127f_u4_orig.zip
    17 MB · Views: 0
Last edited: Yesterday at 8:39 AM

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK