[Samsung Galaxy Tab A series Questions & Answers] knreddy:
samsung unlockBL downgraderoot AutoBootCharge autoSd3HrIdle Charge to 65%

It is sharing of experience only without any liability or warranty.

Why: I use the tab very rarely but in critical requirement, I am getting it in discharged condition when i needed. Good news is that , in off condition it consumes around 1% per 10 days. I did not want to root it, but this tab at least shoud have have scheduled shutdown like other makes. The battery protect mode does not function properly. However thanks to Samsung for leaving the facility to unlock the Bootloader, rooting etc for advanced users (I feel definitely it has the capability to lock fully like apple )

Pre requirements

1.	Samsung Tab A 2019 P200 (I have no experience on other models) charged more than 50%

2.	Usb cable

3.	Samsung USB Drivers

4.	Windows 10 PC with UPS

5.	Firmware suitable to your phone / region

6.	Odin3-v3.14.4

7.	7Z ZS

8.	Magisk Manager

9.	Root explorer

I.	Unlocking Bootloader

Normally I wouldn’t provide instructions for this, but since things had changed drastically from previous Samsung devices, and there are some caveats, I figure this would be helpful.

The following worked for me

•	Installed Samsung USB driver on PC

•	Allow bootloader unlocking in Developer options → OEM unlocking

•	Disconnect the USB cable

•	Power off the device

•	Press and hold Volume Up & Down keys

•	Insert USB cable

•	Long press Volume up key

•	Press Volume up ( yes) to unlock BootLoader

Just when you think the bootloader is unlocked, it is actually not! Samsung introduced VaultKeeper, meaning the bootloader will reject any unofficial partitions before VaultKeeper explicitly allows it.

•	Go through the initial setup. Skip through all the steps since data will be wiped again later when we are installing Magisk. Connect the device to internet in the setup!

•	Enable developer options, and confirm that the OEM unlocking option exists and grayed out! (yes it happened in my case) The VaultKeeper service will unleash the bootloader after it confirms that the user has the OEM unlocking option enabled.

•	Your bootloader now accepts unofficial images in download mode.

II.	Downgrade Flash instructions

1. Extract (unzip) the Samsung firmware file. Recommended using 7-Zip ZS

2) Install Samsung USB driver on PC if already not installed

3. , Extract Odin ZIP file Odin Tool 3.14.4 Downloaded, Open Odin execute file

4.) Remove Samsung . Google etc accounts from Tab

5. Reboot Samsung phone in Download Mode (hold Power + Volume Up buttons, it will booted to Recovery, select reboot to bootloader, Downloading screen will come then plug-in cable)

6. Connect you Samsung phone and wait until you get a blue symbol with com port no in Odin

7. Add the 1 file Samsung firmware to AP/PDA or 4 files Samsung firmware (AP/BL/CP/CSC) to it's slots (for P205 it will be 5 files)

8. Make sure re-partition is NOT ticked at Options at Odin

9. Click the START button, sit back and wait few minutes

Downgrading BootLoader-Theory

Downgrading BootLoader is Not possible unless you modify the BL….. .tar.md5 by removing the .bin files in it, then tar it up and flash in odin (- NOT TRIED).

The secure bootloader (sboot.bin) won't allow the downgrade of itself. you can't downgrade because the bootloader is protected by Rollback Prevention, So apparently I can only install firmware files which come with the same Bootloader.

We need to know what your current "Build Number" is on the phone. You also can't downgrade to other bootloaders that are lower then your current one, so if you're on bootloader 5 you need to use the Oreo bootloader 5 version firmware or it will not work. (Bootloader # is the 5th spot from the right.

Rollback Prevention (RP)

Rollback Prevention blocks the device from loading or flashing an approved but old version of boot components. Old versions of software may contain known vulnerabilities that attackers can exploit. Rollback prevention checks the version of the bootloader and kernel during both boot and updates, and blocks these processes from continuing if versions are unacceptably old. The lowest acceptable version of the bootloader is stored in secure hardware fuses when the device is flashed, and the lowest acceptable version of the kernel is stored in the bootloader itself. Whenever a vendor-applied update occurs, the lowest acceptable version can be incremented in the fuses. Because this value is kept in fuses, it cannot be decremented even through physical tampering. Rollback Prevention fuses are set at manufacturing time in the Samsung factory to prevent old firmware versions from overwriting newer ones.

Present version on device: P200ZHU2ASK2 (Settings>About Tabet>Software information>Build No XXXX XXXXXXX P200ZHU2ASK2, Service Provider SW ver ………….TGY// i.e Hongkong) , tried and failed is : P200ZHU1ASG1 , but now downgraded (bootloader is same version) P200ZHU2ASH2.

III.	Rooting

Notes Installing Magisk

•	Your device is non-A/B and uses system-as-root, so Magisk will be installed to the recovery partition of your device.

•	Installing Magisk WILL trip KNOX (void Warranty)

•	Installing Magisk for the first time REQUIRES a full data wipe, backup before continue

•	You have to have your bootloader unlocked before following the instructions

Instructions on Rooting

1.	Unzip the firmware P200ZHU2ASH2 on PC and copy the AP tar file to your Phone. It is normally named as AP_P200ZHU2ASH2_CL16717766_QB25581052_REV01_user_low_ship_meta_OS9.tar.md5

2.	Install the latest Magisk Manager

3.	In Magisk Manager: Install → Install > select and patch file> browse to location of file > tap and hold to select >open e.g AP tar file> working version / build is MagiskManager-v7.5.1.apk) (internet connection will make install button visible )

4.	Magisk Manager will patch the whole firmware file and store the output to [Internal Storage]/Download/magisk_patched.tar

5.	Copy the patched file to your PC with adb pull /sdcard/Download/magisk_patched.tar. Do not use MTP as it is reported to corrupt files.

It will be copied to PC at C:\Users\......\AppData\Local\VirtualStore\Program Files (x86)\Minimal ADB and Fastboot

6.	Reboot to download mode, and flash magisk_patched.tar as AP in Odin, together with the BL, CP and HOME_CSC files. Never flash only an AP file, as Odin can shrink your /data file-system if you do.

Important: Uncheck “Auto Reboot” in Options !

7.	Magisk is now successfully flashed to your device! But there are still several steps before you can properly use the device.

8.	We now want to boot into the stock recovery to factory reset our device.

9.	Disconnect the phone.

10.	Full data wipe is mandatory! Do not skip this step.

Press Power + Volume Down to exit download mode. As soon as the screen turns off, immediately press the combo key (Power + Volume Up) to boot to recovery continue pressing the volume up button until you see the stock recovery screen (Not patched recovery , as it has Factory data reset, try again, view recovery logs only) as we need it.

11.	Use volume buttons to navigate through the stock recovery menu, and the power button to select an option. Choose Wipe data/factory reset to wipe the data of the device.

12.	This time, we can finally boot to the system with Magisk. Select Reboot system now, and immediately press the combo key (Power + Volume Up) to recovery. After seeing the bootloader warning screen (first screen), release all buttons so it can boot to the system.

13.	The device will automatically reboot for the first time it boots. This is completely normal and done by design.

14.	After the device is booted up, done the usual initial setup. The following steps will need an internet connection.

15.	I have manually installed the APK , downloaded in step 2 and continued to the next step. The app would be a stub and it shall automatically upgrade to the full Magisk Manager when you open it.

16.	Magisk Manager will ask to do additional setups. Let it do its job and the app will automatically reboot your device.

17.	As this is a new device from 2019 with System-as-Root and Android 9.0 Magisk must be installed to the recovery partition. Everytime you reboot you must press the key combination for booting from the recovery partition. ( Vol Up + Power) but in my case it is always booting to Magisk.

Theory: Since some devices no longer use ramdisk in boot images, Magisk has no choice but to be installed in the recovery partition. For these devices, you will have to boot to recovery every time if you want Magisk. Since both Magisk and recovery lives in the same partition, what you actually end up getting when you choose to boot to recovery will be determined by how long you press volume up.

After installing Magisk in recovery:

•	(Powering up normally) → (System with NO Magisk) or if required reboot phone once OS is loaded

•	(OEM Recovery Key Combo) → (Splash screen) → (Release all buttons) → (System with Magisk)

•	(OEM Recovery Key Combo) → (Splash screen) → (Keep pressing volume up) → (Actual recovery)

In my case (for my version of firmware) once magisk system is booted as above , every time it is loading magiskpatched system if shutdown is used (while charger is not connected ), but if we use reboot it is rebooting to Stock system- further, if we shutdown while charger is connected it is will shutting down and start charging with charging animation (means if we press power button it will boot to stock system) great advantage as stock (partially rooted?) also can be booted when required.

Additional Info

•	Magisk actually patches 3 partitions on your device:

o	vbmeta: replace with empty vbmeta image to disable partition verification

o	boot: remove the signature of the image to prevent soft bricks

o	recovery: this is where Magisk is actually installed

•	Never, ever try to restore either of the 3 images mentioned back to stock! You can easily brick your device by doing so, and the only way out is to do full Odin restore following with factory reset. Just don’t do it.

•	If you want to upgrade your device, never flash the stock AP tar file with the reasons mentioned above. Always pre-patch the firmware before flashing in Odin.

•	If you don’t need to patch the full firmware, you can manually create a tar file with at least vbmeta.img, boot.img, and recovery.img to let Magisk Manager patch your images in the proper way.

Release Keys ( P&V+) for System with Magisk

Keep pressing volume up for Actual recovery

IV.	Splash screen and warning screen change

1.	Download the correct firmware of your Samsung

2.	Unzip the firmware files with an extractor (winrar, etc)

3.	Open the BL file WITH 7-ZIP EXTRACTOR (example) BL

4.	BL_P200ZHU2ASH2_CL16717766_QB25581052_REV01_user_low_ship.tar.md5

5. Extract the param.bin.lz4 file WITH 7-ZIP EXTRACTOR

6.	Open the param.bin.lz4 file WITH 7-ZIP EXTRACTOR and extract the param.bin file

7.	Extract param.bin WITH 7-ZIP EXTRACTOR. All images are extracted in a folder.

8.	edit logo.jpg and svb_orange.jpg or any other file suitably

9.	select all files(not folder) and right click and select 7-Zip ZS Add archive > select archive format tar>ok to get param.bin.tar

10.	Close 7-zip ZS, now change the name of above file from param.bin.tar to param.bin.

11.	Right click on above param.bin select 7zip ZS > add archive…> select select archive format tar>ok to get param.bin.tar again

12.	Change its name to BL_param.bin_only_to_change_logo (just to remind it is BL) Now we have the param.tar file ready for ODIN.

13.	Open ODIN 3.13.3, start your phone in download mode, load the param.bin.tar file in the BL section and click on start.

Note: At the end of the flashing with ODIN the phone restarts showing the modified image, but it starts in recovery mode, you just have to accept restarting the phone, and it will start normally without losing data or the configuration of your Samsung Tab A P200

V.	Auto Boot Charger connected once charged to more than 5 %

1.	This is a bonus, if magisk is in effective condition, it will auto boot when charger is connected.

i.e. If it boots on auto when charger is connected that means that the sytem is magisk patched

(no need to edit lpm, however if we modify lpm, phone will hang at power symbol screen in non-magisk mode –to reset it, remove charger connection , press power+VolUp+VolDown simultaneously still phone restarts )

VI.	Auto shutdown on 3 hours idle

1.	Install Automate app

2.	Import file

“Boot to on and Auto Shutdown by 3hr idle (reset by Foreground GMusicFMusicPAmp or Charge or 11 min on) V8.flo”

3. At automate settings select Run on System start up

3.	Start flow

VII.	Auto stop charging at preset max and restart charging preset min shutdown phone at preset battery low

1.	Install latest AccA 1.0.23 app from github and connect to internet

(older beta app was changing battery % with every booting , showing fast draining without any actual drain etc, if charger is connected instead of rising battery level , it is showing as decreasing , i.e. battery sync , ghost effect issues)

Or

If above does not work uninstall AccA and connect to internet , open magisk manager >options>downloads>search for acc >install Advanced Charging Controller 2019.7.21-r1 (201907211) > install > rebotot)

Or if above is also not working properly please use battery charge limit v1.1.1 from play store (it will not have all options of AccA.

2.	Configure as required like max charge 65 , re charging start level at 35 % shutdown at 5 % etc by editing config.txt file at root>data>adb>acc-data> capacity= 5, 101, 35-65 (101 not to stop intermittently between 35-65 % charging) and save

Now one can connect phone always to power source without wearing out Battery.

It my experince only and thanks and regards to all who contributed on respective sections / fields.