Physwizz Collection
4.09K subscribers
38 photos
651 files
809 links
Guides, kernels and hints for the Samsung a-series
Download Telegram
Channel created
physwizz
From Sydney, Australia

BSc in Physics and Mathematics (1973 - 1975)
Wrote my first program in FORTRAN on mainframe terminal in 1975
My first computer TRS-80 MC-10 (1983)
TRS-80 MC-10 https://g.co/kgs/bzRYoh
6
How to Overclock
==============

Use Hktweaks to set CPU and GPU minimums to highest stable.
In GPU make
Mali: always_on
GPU Governor: static
GPU Thermal Manager: off
Leave hktweaks running in the background. (Don't close it down)

https://t.me/a127f_res/257

@physwizz
To go to download mode

Method 1: Normal method
1. Turn off phone
2. Hold down both volume keys
3. Plug in computer

Method 2: Bootlooping
1. Plug in to computer
2. Hold down both volume keys

Method 3: For a difficult phone
1. Connect usb to computer but not to phone
2. Hold down all 3 keys
3. When it buzzes release power and quickly plug in usb to phone.
It might take a few times to get it right.

Method 4: If it's REALLY BAD
1. Wait for the battery to completely run down and use normal method.
1👍1
Beginners guide to github

I have always had a lot of difficulty with github.

I have jotted down a few things which might help some new kernel builders.

A. Github Setup

1. Go to github and Open a new Repo
I called mine "physwizz_kernel"

2. To set up SSH key

$ git config --global user.email "you@example.com"
$ git config --global user.name "Your Github Name"

$ ssh-keygen -t rsa -b 4096 -C "you@example.com"

Press enter 3 times

$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/id_rsa
$ sudo apt-get install xclip
$ xclip -sel clip < ~/.ssh/id_rsa.pub

3. The SSH key will be in clipboard
Go to github settings => SSH and GPG keys
New SSH key

Paste key here

B. Using github

1. Open Terminal In The Kernel Folder

$ git init
$ git remote add origin (github id) mine is git@github.com: physwizz/physwizz_kernel.git
$ touch README
$ git add README
$ git add --all
$ git commit -m "Initial commit"
$ git push -u origin main

If you don't see the files on the GitHub repo you might need to
$ git commit -a
Ctrl-o
Initial
Ctrl-x
$ git push origin main -f

2. To cherry pick a commit from another github repository

firstly add the other repository to your kernel
$ git remote add other https:<other address>
$ git fetch --all
$ git cherry-pick [hash_id]

$ git config merge.renameLimit 999999

For a repo with branches use this

git remote add -f a127u9 <repo>


To cherry-pick a range of commits
$ git cherry-pick [first hash_id]^..[last hash_id]

Sometimes you get extra lines of text in one of the files that should be deleted. The log on screen will tell you which file is corrupt.
Search the file for odd lines like this.

Head
=========

<<<<

>>>>>>>> Txt txt txt txt

Delete the lower line
Then delete all lines from
<<<< to Head

git commit -a
ctrl-o enter ctrl-x
git push origin main -f

git cherry-pick —continue

3. to push changes to github

$ make clean && make mrproper
$ git add --all

if the change is your own

$ git commit -a -m "message"

Or

$ git commit -a

write comment
ctrl o (to output)
enter
ctrl x (to exit)

then
$ git push origin main

if the change is a cherry pick
$ git commit "change made" --author="Author's name<author's email>"

then
$ git push origin main

4. If it doesn't work or if you want to try something else

$ git revert <commit hash code>
$ git push origin main

Or
$ git reset --hard < last clean commit hash >
$ git push origin main -f
$ git cherry pick <clean commits >
$ git push origin main


5. to edit last commit

$ git commit --amend -e
$ git push origin main

6. Don't use
$git add --all
after you build

Please give any feedback.
@physwizz
physwizz_stock_kernel&dtbo(a20-OneUI).zip
12.5 MB
If you want to go back to stock kernel (on OneUI) for testing, flash this.
It won't give stock ROM.

@physwizz
Back to Stock ROM after hard crash
@physwizz
A. On your PC
- Firmware: download from one of these sites
https://samfrew.com or https://www.samfirmware.net


Fastest
https://samfw.com/


1. Connect phone cord to PC
2. Reboot into download mode

Normal method
1. Turn off phone
2. Hold down both volume keys
3. Plug in computer

Bootlooping
1. Plug in to computer
2. Hold down both volume keys

For a difficult phone
1. Connect usb to computer but not to phone
2. Hold down all 3 keys
3. When it buzzes release power and quickly plug in usb to phone.
It might take a few times to get it right.

If it's REALLY BAD
Wait for the battery to completely run down and use normal method.

Escaping the Black screen of Death.

Method 1 - to reboot to TWRP recovery
1. Plug in USB cable to PC
2. Hold down all 3 buttons on phone.
3. When it buzzes release volume down and plug in USB cable to phone.
4. Restore a backup

Method 2 - to reboot to download
1. Plug in USB cable to PC
2. Hold down all 3 buttons on phone.
3. When it buzzes release power button and plug in USB cable to phone.

3. Flash each part of the firmware into its slot.
BL_xxxxxxx.tar.md5 goes into the BL slot
AP_xxxxxxx.tar.md5 goes into the AP slot
CP_xxxxxxx.tar.md5 goes into the CP slot
CSC_xxxxxx.tar.md5 goes into the CSC slot.
Note: if you want to revert to a version with a lower binary, just flash AP and CSC.

4. Factory data reset
5. Wait for the restart
6. Skip through a minimal setup
7. Activate developer mode
8. Allow usb debugging
9. Reboot into download mode
10. Flash recovery.tar in the AP slot
11. Reboot into TWRP and mount everything that you can.
12. Format Data (not just wipe) - don't restart
13. Flash multidisabler or Disable_Dm-Verity_ForceEncrypt if needed by your device.
14. Wipe both caches then go back and Reboot into Recovery.
15. Restore your data backup.
16. Reboot
dtbo-physwizz-kernel.zip
461.9 KB
GPU 343 - 1300 for the a20(a205xx)

If your current kernel doesn't have GPU overclocked you can flash this file.


Minhker has everything in the image file.
Eureka has CPU and GPU in dtbo.img.
Physwizz_kernel has CPU in the image file and GPU in the dtbo.img

@physwizz
Disable_Dm-Verity_ForceEncrypt_03.04.2020 (1).zip
3.4 MB
Decrypt

1. Boot to recovery
2.Format data (not just wipe) and then Install dmverity
3. Wipe caches
4. Reboot to recovery install dmverity
5. Reboot

@physwizz
physwizz_a10s_v1.05f.zip
11.9 MB
physwizz v1.05f A10s
@physwizz
Zip from @topser
-Most securities disabled
-CPU Governors: conservative, ondemand, userspace, powersave, interactive, performance, schedutil.
-Schedplus is default governor
-SE linux enforcing
-Works with Magisk 19.3 - 21.4
-Spectrum support enabled
- Can be used with GSI without mtp
- built using A107FXXU7BTK1 source code
- includes mtk.dtb

Bugs
1. Rear camera not working
2. You Tube crashes
3. Bluetooth not working

https://github.com/physwizz?tab=repositories
Building with Clang version 4

Some phones need clang to build the kernel instead of gcc

Follow the instructions in README_kernel.txt
Download the correct toolchain
Here are a few examples

Note:
For Mediatek you will need to apply the strcpy patch
https://github.com/physwizz/a22/commit/5b705dfa2e98961d3b72b0ba32ac77884e9a42e0

Build Method #1 Clang

You will need 3 toolchains
1. Cross-compile (gcc)
https://github.com/physwizz/toolchain_cross-compile
Or
https://github.com/physwizz/compiler

I put it here
/home/<user>/gcc

2. Clang
https://github.com/physwizz/toolchain_clang
Or
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/android-10.0.0_r3/clang-r353983c.tar.gz

I put it here
/home/<user>/clang

3. Clang-triple
https://github.com/physwizz/toolchain_clang-triple
Or
https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz

I put it here.
/home/<user>/gcc-linaro



Edit Makefile with these

CROSS_COMPILE=/home/<user>/gcc/bin/aarch64-linux-android-

CC=/home/<user>/clang/bin/clang

CLANG_TRIPLE=
/home/<user>/gcc-linaro/aarch64-linux-gnu-

To build I used these commands

$ make clean && make mrproper
$ export ANDROID_MAJOR_VERSION=q
$ export ARCH=arm64
$ make -C $(pwd) O=$(pwd)/out KCFLAGS=-w CONFIG_SECTION_MISMATCH_WARN_ONLY=y <your-device_defconfig
$ make -C $(pwd) O=$(pwd)/out KCFLAGS=-w CONFIG_SECTION_MISMATCH_WARN_ONLY=y

Output can be found in
home/<user>/out

Build Method #2 Proton-Clang

Download Proton-Clang
https://github.com/physwizz/Toolchains-for-Eureka

I put it here.
/home/<user>/toolchains/proton-clang

Don't edit Makefile

Add proton-clang to your path

export PATH="$HOME/toolchains/proton-clang/bin:$PATH"

Build with
$ make clean && make mrproper
$ export ANDROID_MAJOR_VERSION=r
$ export ARCH=arm64
$ export CC=clang
$ export CROSS_COMPILE=aarch64-linux-gnu-
$ make -C $(pwd) O=$(pwd)/out KCFLAGS=-w CONFIG_SECTION_MISMATCH_WARN_ONLY=y <your-device>_defconfig
$ make -C $(pwd) O=$(pwd)/out KCFLAGS=-w CONFIG_SECTION_MISMATCH_WARN_ONLY=y


Output can be found in
home/<user>/out

If you get a python error
Change "python" to "python3" in Makefile

Mediatek
Patch for strcpy error

git remote add a125 git@github.com:physwizz/A125M.git
git fetch --all
git cherry-pick 3aea117fb57d4eba3e592cc953054b98256a31c6
git push origin main -f

For clang errors
https://github.com/kdrag0n/proton-clang




@physwizz