Install TWRP or Magisk on a Samsung A5 2017 (SM-A520F) Android 8.0? - USB port broken

Mikebdict

New member
Jun 2, 2020
3
0
0
Im trying to get TWRP or Magisk installed on this phone so I can install Lineage, but the major stumbling block is that the USB port is broken.
It will only charge from the port. Ive tried looking for a replacement usb board from parts resellers, but have only been able to find ones for different A5 models, or the USB port itself which would require my buying a heatgun.

LSUSB / DMESG never reports anything when its plugged in and every now and then when I charge it the phone displays a "Moisture in USB port" message, despite it having been in a box for several years. I think it was stress on the USB cable that killed it initially.

Ive read that you can use ADB over TCP instead, but this requires root access to run the commands if you cant start off by connecting with a USB cable, so no joy there.

Is it possible to install Magisk via Magisk manager on a non rooted phone?
Looking at threads on the Magisk github page It seems like I need to build a custom ROM using a stock one + some modifications from a python script that Magisk manager can then try to install. Where can I get those ROM's, if this is even possible?

More info about the device / Android version below:

Android 8
Kernel 3.18.14-13712092-QB20832987
[email protected] #1
Thu Nov 29 08:29:34 KST 2018
R16NW.A520FXXU7CRK7
SM-A520F
 

Mikebdict

New member
Jun 2, 2020
3
0
0
So, Ive found and downloaded the stock firmware for my phone (SM-A520F_1_20200211163854_iyofhdwau9_fac.zip). I let the phone update to the latest official update as I couldn't find a decent mirror for the older version.
Im now trying to follow the instructions for payload_dumper so I can patch payload.bin, but the 2.4 GB file didnt have this inside, only these files that im unable to extract any further.

AP_A520FXXUDCTB1_CL13712092_QB29074577_REV00_user_low_ship_meta.tar.md5
BL_A520FXXUDCTB1_CL13712092_QB29074577_REV00_user_low_ship.tar.md5
CP_A520FXXUDCTB1_CP15068674_CL13712092_QB29074577_REV00_user_low_ship.tar.md5
CSC_OXA_A520FOXADCTB1_CL17962365_QB29105314_REV00_user_low_ship.tar.md5
HOME_CSC_OXA_A520FOXADCTB1_CL17962365_QB29105314_REV00_user_low_ship.tar.md5

Can I get the OTA Update zip file from somewhere on the phone?
find -name *.zip hasnt turned up anything obvious.
 
Last edited:

MaDaLiNoSt

Senior Member
Aug 15, 2013
795
275
63
Im trying to get TWRP or Magisk installed on this phone so I can install Lineage, but the major stumbling block is that the USB port is broken.
It will only charge from the port. Ive tried looking for a replacement usb board from parts resellers, but have only been able to find ones for different A5 models, or the USB port itself which would require my buying a heatgun.

LSUSB / DMESG never reports anything when its plugged in and every now and then when I charge it the phone displays a "Moisture in USB port" message, despite it having been in a box for several years. I think it was stress on the USB cable that killed it initially.

Ive read that you can use ADB over TCP instead, but this requires root access to run the commands if you cant start off by connecting with a USB cable, so no joy there.

Is it possible to install Magisk via Magisk manager on a non rooted phone?
Looking at threads on the Magisk github page It seems like I need to build a custom ROM using a stock one + some modifications from a python script that Magisk manager can then try to install. Where can I get those ROM's, if this is even possible?

More info about the device / Android version below:

Android 8
Kernel 3.18.14-13712092-QB20832987
[email protected] #1
Thu Nov 29 08:29:34 KST 2018
R16NW.A520FXXU7CRK7
SM-A520F
Try using non-PC root methods like the old KingRoot or something new/similar. :good:
 
  • Like
Reactions: Mikebdict

Mikebdict

New member
Jun 2, 2020
3
0
0
Try using non-PC root methods like the old KingRoot or something new/similar. :good:
Cheers. Its been an adventure in uninformed badly written web articles :D and spyware ridden apps :eek: installed via APK, but I dont think anything can actually do it to an Oreo device.
Kingo root claims it can, but just crashes when you try to root.

Im going to try and find a new usb board and tool from some where and pull it apart :)

edit - sadly the usb port is part of the mainboard, so they arent actually that cheap. I set up an ebay watcher for broken / old ones. :<
 
Last edited: