phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.32k stars 654 forks source link

Root Detection with AOSP 11.0 v312 #2046

Open AlleSchonWeg opened 2 years ago

AlleSchonWeg commented 2 years ago

Hi, i'm using AOSP 11.0 v312 Ab Image with gapps. Our goverment corona warn app (https://github.com/corona-warn-app/cwa-app-android) reports that the image has root access. Internally the app uses rootbeer (https://github.com/scottyab/rootbeer) to detect root. How can i prevent that the app detects root?

phhusson commented 2 years ago

you can disable root altogether by pressing "securize" in treble settings

Le mar. 26 oct. 2021 à 07:55, AlleSchonWeg @.***> a écrit :

Hi, i'm using AOSP 11.0 v312 Ab Image with gapps. Our goverment corona warn app (https://github.com/corona-warn-app/cwa-app-android) reports that the image has root access. Internally the app uses rootbeer ( https://github.com/scottyab/rootbeer) to detect root. How can i prevent that the app detects root?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/2046, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4OU57P6RQKQ7MSMJSS3UIZGE7ANCNFSM5GW5IUQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AlleSchonWeg commented 2 years ago

It's not working. Securize asks me: Remove Root Continue? [Cancel] [OK]

After clicking Ok it takes a few seconds and nothing happens. The root warning still appears. Also restarting the phone doesn't help.

phhusson commented 2 years ago

Flash vndklite ab variant, and then you should be able to securize

Le mar. 26 oct. 2021 à 09:09, AlleSchonWeg @.***> a écrit :

It's not working. Securize asks me: Remove Root Continue? [Cancel] [OK]

After clicking Ok it takes a few seconds and nothing happens. The root warning still appears. Also restarting the phone doesn't help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/2046#issuecomment-951626334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4OV5I7BQBDOUX4CCTIDUIZO4PANCNFSM5GW5IUQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AlleSchonWeg commented 2 years ago

Trying to flash system-roar-arm64-ab-vndklite-gapps.img.xz, but i get an error:

Invalid sparse file format at header magic

Fastboot cancels and phone can't boot (bootloop). Flashing system-roar-arm64-ab-gapps.img.xz and phone works again.

phhusson commented 2 years ago

That's not an error

26 oct. 2021 17:57:14 AlleSchonWeg @.***>:

Trying to flash system-roar-arm64-ab-vndklite-gapps.img.xz, but i get an error:

Invalid sparse file format at header magic

Fastboot cancels and phone can't boot (bootloop). Flashing system-roar-arm64-ab-gapps.img.xz and phone works again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub[https://github.com/phhusson/treble_experimentations/issues/2046#issuecomment-952081142], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAAA4OXLZGHQE2JAW3ZD3ELUI3MWVANCNFSM5GW5IUQA]. Triage notifications on the go with GitHub Mobile for iOS[https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android[https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. [data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAAjSURBVGiB7cEBDQAAAMKg909tDwcUAAAAAAAAAAAAAADApwExOAABR9ZGcwAAAABJRU5ErkJggg==###24x24:true###][Image de pistage][https://github.com/notifications/beacon/AAAA4OQPLCB55CXFBRKESCDUI3MWVA5CNFSM5GW5IUQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHC7ZV5Q.gif]

AlleSchonWeg commented 2 years ago

But fastboot terminates execution at first writing 'system' I did not cancel fastboot by myself.

AlleSchonWeg commented 2 years ago

Today i updated adb/fastboot to latest versions an tried flashing vndklite again. Still get an error:

C:\Daten>adb reboot bootloader

C:\Daten>fastboot flash system C:\Daten\system-roar-arm64-ab-vndklite-gapps.img Invalid sparse file format at header magic Sending sparse 'system' 1/7 (460796 KB) OKAY [ 26.376s] Writing 'system' FAILED (remote: 'sparse flash write failure') fastboot: error: Command failed

nation888 commented 2 years ago
Best way is to use TWRP. Cancel the login, Format data, Wipe cache, system, dav, data. Reboot back to recovery then install ROM image to system and then flash Magisk. Regards, Trevor W. From: AlleSchonWegSent: December 27, 2021 7:40 AMTo: phhusson/treble_experimentationsCc: SubscribedSubject: Re: [phhusson/treble_experimentations] Root Detection with AOSP 11.0 v312 (Issue #2046) Today i updated adb/fastboot to latest versions an tried flashing vndklite again. Still get an error:C:\Daten>adb reboot bootloaderC:\Daten>fastboot flash system C:\Daten\system-roar-arm64-ab-vndklite-gapps.imgInvalid sparse file format at header magicSending sparse 'system' 1/7 (460796 KB) OKAY [ 26.376s]Writing 'system' FAILED (remote: 'sparse flash write failure')fastboot: error: Command failed—Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>