@@ -189,7 +189,8 @@ export async function getRootCommand(adbClient: Adb.DeviceClient): Promise<RootC
189
189
// Run our whoami script with each of the possible root commands
190
190
const rootCheckResults = await Promise . all (
191
191
runAsRootCommands . map ( ( runAsRoot ) =>
192
- run ( adbClient , runAsRoot ( ...rootTestCommand ) , { timeout : 1000 } ) . catch ( console . log )
192
+ run ( adbClient , runAsRoot ( ...rootTestCommand ) , { timeout : 1000 } )
193
+ . catch ( ( e : any ) => console . log ( e . message ?? e ) )
193
194
. then ( ( whoami ) => ( { cmd : runAsRoot , whoami } ) )
194
195
)
195
196
)
@@ -206,7 +207,7 @@ export async function getRootCommand(adbClient: Adb.DeviceClient): Promise<RootC
206
207
// We prefer explicit "su" calls if possible, to limit access & side effects.
207
208
await adbClient . root ( ) . catch ( ( e : any ) => {
208
209
if ( isErrorLike ( e ) && e . message ?. includes ( "adbd is already running as root" ) ) return ;
209
- else console . log ( e ) ;
210
+ else console . log ( e . message ?? e ) ;
210
211
} ) ;
211
212
212
213
// Sometimes switching to root can disconnect ADB devices, so double-check
@@ -268,6 +269,8 @@ export async function injectSystemCertificate(
268
269
stringAsStream ( `
269
270
set -e # Fail on error
270
271
272
+ echo "\n---\nInjecting certificate:"
273
+
271
274
# Create a separate temp directory, to hold the current certificates
272
275
# Without this, when we add the mount we can't read the current certs anymore.
273
276
mkdir -p -m 700 /data/local/tmp/htk-ca-copy
@@ -343,7 +346,7 @@ export async function injectSystemCertificate(
343
346
rm -r /data/local/tmp/htk-ca-copy
344
347
rm ${ injectionScriptPath }
345
348
346
- echo "System cert successfully injected"
349
+ echo "System cert successfully injected\n---\n "
347
350
` ) ,
348
351
injectionScriptPath ,
349
352
// Due to an Android bug, user mode is always duplicated to group & others. We set as read-only
0 commit comments