recovery mode – Apply update from ADB: how to use it when you are locked out of the device

My cousin’s kid has played with his Samsung A8 (2018) phone and has changed his unlock pattern. So, nobody knows the pattern the child has set.

  • The phone has no Google account set up
  • The USB debugging is not activated on device before

I have rebooted into recovery mode, and entered the option Apply update from ADB:

Recovery screen

There is a message on recovery screen saying:

Now send the package you want to apply
to the device with adb sideload <filename>

I’m able to see the device by adb devices command:

Command line screenshot

According to another post, looks like it is possible to use TWRP for Samsung Galaxy A8 2018 to clear the screen lock. So, I have downloaded the following apk package:

TWRP for Samsung Galaxy A8 2018

Now I plan to install TWRP on phone by the following command and then follow the previous post:

adb sideload me.twrp.twrpapp-26.apk

Questions

Now, before doing so, I have these questions:

  • Is it possible to install *.apk packages by adb sideload? Is there any possibility that it would mess up the phone?
  • What else can I do with adb sideload to clear the screen lock?
  • What else can be done with adb sideload to back up the phone camera images and videos without wiping the data?

Thanks =)