phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.39k stars 655 forks source link

Samsung a30 #1730

Open realartin opened 3 years ago

realartin commented 3 years ago

Hi i dl all version of your android 11 arm 64 ab And i flashed on my samsung a305f It is amazing fast and responsive and i love it thank you The main issue is i haved randomly reboot s I try to flash other kernels but problem is still / steel here I use another build that they are using your build as the main build like havoc os but the problem ( rendom reboot ) is here Please fix it Tnx a lot.

ponces commented 3 years ago

Don't know if my files help, but here you have: config.gz init.samsung.bsp.rc.zip

phhusson commented 3 years ago

Ok thanks, it's much clearer now. It also explains why this issue also happen on Magisk. The issue triggers because of this part of the init.samsung.bsp.rc:

on property:ro.boot.verifiedbootstate=orange  # orange : unlocked state of GSI img
    write /dev/watchdog1 "V"

Many custom kernel and ROMs will set androidboot.verifiedbootstate to green rather than orange to pass safetynet. But this will break this rule, thus triggering software watchdog. I'll workaround that in my GSI. But again, this wouldn't happen on stock unmodified oem images.

realartin commented 3 years ago

Okay I better understand the issue now, and what @ponces kernel change did.

There are two competing watchdogs. In this log, the hardware watchdog is properly reset every 100s, but the software watchdog is triggered, but never reset.

@ponces 's kernel disables hardware watchdog, which was previously working so not the cause of the issue. My guess is that disabling hardware watchdog means watchdogd can reset only one watchdog at a time.

My guess is that original kernel doesn't have soft watchdog enabled, only hardware.

Please send me your /vendor/etc/init/init.samsung.bsp.rc and /proc/config.gz

Hi , I think I'm not pretty sure but my issue has been solve I will send those files in your mail .

realartin commented 3 years ago

Okay I better understand the issue now, and what @ponces kernel change did.

There are two competing watchdogs. In this log, the hardware watchdog is properly reset every 100s, but the software watchdog is triggered, but never reset.

@ponces 's kernel disables hardware watchdog, which was previously working so not the cause of the issue. My guess is that disabling hardware watchdog means watchdogd can reset only one watchdog at a time.

My guess is that original kernel doesn't have soft watchdog enabled, only hardware.

Please send me your /vendor/etc/init/init.samsung.bsp.rc and /proc/config.gz

Hi , I think I'm not pretty sure but my issue has been solve I will send those files in your mail .

phhusson commented 3 years ago

Should be fixed with https://github.com/phhusson/device_phh_treble/commit/61d163657a07d43a43ed3762628d43a51091d3c9 if someone can test.

ponces commented 3 years ago

Ok thanks, it's much clearer now. It also explains why this issue also happen on Magisk. The issue triggers because of this part of the init.samsung.bsp.rc:

on property:ro.boot.verifiedbootstate=orange  # orange : unlocked state of GSI img
    write /dev/watchdog1 "V"

Many custom kernel and ROMs will set androidboot.verifiedbootstate to green rather than orange to pass safetynet. But this will break this rule, thus triggering software watchdog. I'll workaround that in my GSI. But again, this wouldn't happen on stock unmodified oem images.

Amazing! Thanks! My kernel is not touching androidboot.verifiedbootstate. I believe this is being done by rw-system.sh for a "securized" device, right? And this is still needed...

realartin commented 3 years ago

Should be fixed with phhusson/device_phh_treble@61d1636 if someone can test.

A30 device ? I can test it

realartin commented 3 years ago

So if I have no issue in phhh gsi then I can install havoc ? , If I install kernel manager that would broke the installation? Like htkkernel manager

ponces commented 3 years ago

Should be fixed with phhusson/device_phh_treble@61d1636 if someone can test.

Can confirm that this works on A40!

realartin commented 3 years ago

Should be fixed with phhusson/device_phh_treble@61d1636 if someone can test.

Can confirm that this works on A40

Can you make a kernel for a30 ? Idk how to make it i will be so excited if you make this favor for me

ponces commented 3 years ago

With phhusson's fix there is no need for a kernel! Only the edit mentioned by phhusson! Which ROM do you have installed now? Stock or GSI?

realartin commented 3 years ago

With phhusson's fix there is no need for a kernel! Only the edit mentioned by phhusson! Which ROM do you have installed now? Stock or GSI?

Havoc os v4.1 bassed on latest phh gsi android 11

ponces commented 3 years ago

Ok. Do you have a way to edit the file at /system/bin/rw-system.sh? Root or TWRP?

realartin commented 3 years ago

Ok. Do you have a way to edit the file at /system/bin/rw-system.sh? Root or TWRP?

I have twrp , but i dont have root

realartin commented 3 years ago

If i take the logs you can find out what is the main issue exactly on this kernel(eureka)on this rom(havoc os) also i can make it root

ponces commented 3 years ago

Ok. With TWRP, you can use the terminal to edit the file previously mentioned... Or you have no clue on how to use a terminal?

ponces commented 3 years ago

If i take the logs you can find out what is the main issue exactly on this kernel(eureka)on this rom(havoc os) also i can make it root

The issue was already found!! I'm telling the steps on how to fix it on your own... If you don't understand this, then you'll need to wait for phhusson's next release!

realartin commented 3 years ago

If i take the logs you can find out what is the main issue exactly on this kernel(eureka)on this rom(havoc os) also i can make it root

The issue was already found!! I'm telling the steps on how to fix it on your own... If you don't understand this, then you'll need to wait for phhusson's next release!

I will understand tnx men

realartin commented 3 years ago

If i take the logs you can find out what is the main issue exactly on this kernel(eureka)on this rom(havoc os) also i can make it root

The issue was already found!! I'm telling the steps on how to fix it on your own... If you don't understand this, then you'll need to wait for phhusson's next release!

Hi can you make it clear witch dir i must put it ? , Or how to excuted this ?

realartin commented 3 years ago

Ok. With TWRP, you can use the terminal to edit the file previously mentioned... Or you have no clue on how to use a terminal?

WITHOUT ROOT PERIMISSION ? / IN TERMINAL JUST RUN THIS FILE? ./SH THE SYSTEM WILL KNOW WHERE TO PUT AND EXCUTED?

realartin commented 3 years ago

Screenshot_2021-02-23-13-00-28 ![Uploading Screenshot_2021-02-23-11-00-21.png…]()

realartin commented 3 years ago

I have issue in rooting and excute .sh file

realartin commented 3 years ago

If i take the logs you can find out what is the main issue exactly on this kernel(eureka)on this rom(havoc os) also i can make it root

The issue was already found!! I'm telling the steps on how to fix it on your own... If you don't understand this, then you'll need to wait for phhusson's next release!

Screenshot_20210223-223853_Termux I rooted and using terminal , i saved text as .sh file and excited but said unknown id !

ponces commented 3 years ago

You're doing it all wrong man... You don't even need root or su or sudo or whatever as you already have elevated access inside TWRP's terminal. Due to this, forget everything that you already made. Open that same terminal on TWRP and run the following command:

echo "echo -n V > /dev/watchdog1" >> /system/bin/rw-system.sh

Reboot and play a little with your ROM to check if no hard reboot happens.

realartin commented 3 years ago

Tnx i will test it

On Wed, Feb 24, 2021, 2:54 AM Alberto Ponces notifications@github.com wrote:

You're doing it all wrong man... You don't even need root or su or sudo or whatever as you already have elevated access inside TWRP's terminal. Due to this, forget everything that you already made. Open that same terminal on TWRP and run the following command:

echo "echo -n V > /dev/watchdog1" >> /system/bin/rw-system.sh

Reboot and play a little with your ROM to check if no hard reboot happens.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/1730#issuecomment-784592588, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMS2NGNJG7EGWEJ3P264D43TAQ2LDANCNFSM4YCDHQBA .

realartin commented 3 years ago

Thank you all it seems its working even on havoc os 4.1 on a305f i just mount system in twrp then type bellow code : echo "echo -n V > /dev/watchdog1" >> /system/bin/rw-system.sh Tnx for everything guys 😊 Also i have 1 last question , is this changes permanent or every boot i need to do it again ?

On Wed, Feb 24, 2021, 9:05 AM Artin Nemati masalbrothers@gmail.com wrote:

Tnx i will test it

On Wed, Feb 24, 2021, 2:54 AM Alberto Ponces notifications@github.com wrote:

You're doing it all wrong man... You don't even need root or su or sudo or whatever as you already have elevated access inside TWRP's terminal. Due to this, forget everything that you already made. Open that same terminal on TWRP and run the following command:

echo "echo -n V > /dev/watchdog1" >> /system/bin/rw-system.sh

Reboot and play a little with your ROM to check if no hard reboot happens.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/1730#issuecomment-784592588, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMS2NGNJG7EGWEJ3P264D43TAQ2LDANCNFSM4YCDHQBA .

ponces commented 3 years ago

Thank you all it seems its working even on havoc os 4.1 on a305f i just mount system in twrp then type bellow code : echo "echo -n V > /dev/watchdog1" >> /system/bin/rw-system.sh Tnx for everything guys 😊 Also i have 1 last question , is this changes permanent or every boot i need to do it again ? On Wed, Feb 24, 2021, 9:05 AM Artin Nemati @.> wrote: Tnx i will test it On Wed, Feb 24, 2021, 2:54 AM Alberto Ponces @.> wrote: > You're doing it all wrong man... You don't even need root or su or sudo > or whatever as you already have elevated access inside TWRP's terminal. > Due to this, forget everything that you already made. > Open that same terminal on TWRP and run the following command: > > echo "echo -n V > /dev/watchdog1" >> /system/bin/rw-system.sh > > Reboot and play a little with your ROM to check if no hard reboot happens. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <#1730 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AMS2NGNJG7EGWEJ3P264D43TAQ2LDANCNFSM4YCDHQBA > . >

Permanent 😉

realartin commented 3 years ago

Tnx a lot 🙂 ❤️

On Wed, Feb 24, 2021, 11:34 AM Alberto Ponces notifications@github.com wrote:

Thank you all it seems its working even on havoc os 4.1 on a305f i just mount system in twrp then type bellow code : echo "echo -n V > /dev/watchdog1" >> /system/bin/rw-system.sh Tnx for everything guys 😊 Also i have 1 last question , is this changes permanent or every boot i need to do it again ? … <#m_-3874041161304815600m-9064514375207650053_> On Wed, Feb 24, 2021, 9:05 AM Artin Nemati @.> wrote: Tnx i will test it On Wed, Feb 24, 2021, 2:54 AM Alberto Ponces @.> wrote: > You're doing it all wrong man... You don't even need root or su or sudo > or whatever as you already have elevated access inside TWRP's terminal. > Due to this, forget everything that you already made. > Open that same terminal on TWRP and run the following command: > > echo "echo -n V > /dev/watchdog1" >> /system/bin/rw-system.sh > > Reboot and play a little with your ROM to check if no hard reboot happens. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <#1730 (comment) https://github.com/phhusson/treble_experimentations/issues/1730#issuecomment-784592588>,

or unsubscribe > https://github.com/notifications/unsubscribe-auth/AMS2NGNJG7EGWEJ3P264D43TAQ2LDANCNFSM4YCDHQBA . >

Permanent 😉

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/1730#issuecomment-784878616, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMS2NGPQ3O6I3JT3EPTGMODTASXJPANCNFSM4YCDHQBA .

topser9 commented 3 years ago

Thanks for the solution and it really works. I tested the Havoc-OS-v4.1-arm64-ab rom with a205f model. It worked