File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -87,14 +87,12 @@ let isEnvironmentSupported = false;
8787 }
8888 async function getRootMethod ( ) {
8989 try {
90- const { stdout : ksudOut } = await exec ( 'ksud --version' ) ;
91- const { stdout : apdOut } = await exec ( 'apd --version' ) ;
92- const { stdout : magiskOut } = await exec ( 'magisk -V' ) ;
93-
90+ const { stdout : ksudOut } = await exec ( "su -c 'ksud debug version | sed s/Kernel\\ Version://g'" ) ;
91+ const { stdout : apdOut } = await exec ( "su -c apd --version" ) ;
92+ const { stdout : magiskOut } = await exec ( "magisk -V" ) ;
9493 let methods = [ ] ;
95-
96- if ( ksudOut . includes ( 'ksud' ) ) {
97- methods . push ( `KernelSU (${ ksudOut . replace ( 'ksud' , '' ) . trim ( ) } )` ) ;
94+ if ( ksudOut . trim ( ) ) {
95+ methods . push ( `KernelSU (${ ksudOut . trim ( ) } )` ) ;
9896 }
9997 if ( apdOut . includes ( 'apd' ) ) {
10098 methods . push ( `APatch (${ apdOut . replace ( 'apd' , '' ) . trim ( ) } )` ) ;
@@ -300,4 +298,4 @@ async function viewLogs() {
300298 window . open ( url , '_blank' ) ;
301299 }
302300 }
303- initializeEnvironment ( ) ;
301+ initializeEnvironment ( ) ;
You can’t perform that action at this time.
0 commit comments