From documentation I gathered that the 'eng' build should have superuser and root privileges by default. But when I built it from source I found out that I don't actually have root. I've verified that build is indeed an 'eng' version and flashed every necessary image file. Does anybody know why the 'eng' build has no su binaries?
'eng' build doesn't have su binaries. Why is this?
fosh19991 I found the su binary and I have a root adb shell. I don't know how to activate su though - not really sure what's going on
2|akita:/system/xbin # ls
su
akita:/system/xbin #
fosh19991 It has su
and it's available within adb shell
. Are you expecting it to be available within apps? It doesn't work that way, the basic application security model is still largely intact. For the most part, it only disregards the security model within adb shell in userdebug and eng.
GrapheneOS I guess I was hoping I could get native root access without patching the boot image - I'm trying to gain access to root privileges within my Terminal Emulator app. I tried Termux and it still claims I don't have a su binary.
I suppose that I could always just patch the boot image with Magisk, but then what is the purpose of eng having elevated permissions? I do enjoy the extra logging and dev options, so I may just patch the boot image and keep running the eng build. I noticed that some apps run in priv-app such as adb-shell. Do all of these apps have access to root? I'm confused about how apps are able to access these permissions, and how root is distributed to apps in the first place. From what I can tell it seems like I should have the ability to distribute root permissions to other apps, but the apps just aren't letting me or they can't find the su binary.
$ adb shell
akita:/ # ls
acct cache dev metadata proc system
adb_keys config etc mnt product system_dlkm
apex d init odm sdcard system_ext
bin data init.environ.rc odm_dlkm second_stage_resources tmp
bootstrap-apex data_mirror linkerconfig oem storage vendor
bugreports debug_ramdisk lost+found postinstall sys vendor_dlkm
akita:/ # cd system
akita:/system # ls
apex bin etc framework lib64 product usr xbin
app build.prop fonts lib priv-app system_ext vendor
akita:/system # cd app
akita:/system/app # ls
AppCompatConfig CarrierDefaultApp GmsCompatConfig PacProcessor Stk
BasicDreams CertInstaller GmsCompatLib PartnerBookmarksProvider Traceur
BluetoothMidiService CompanionDeviceManager HTMLViewer PrintRecommendationService WallpaperBackup
BookmarkProvider EasterEgg HardeningTestApp PrintSpooler talkback
CameraExtensionsProxy ExtShared KeyChain SecureElement
CaptivePortalLogin GmsCompat LocalContactsBackup SimAppDialog
akita:/system/app # cd ..
akita:/system # cd priv-app
akita:/system/priv-app # ls
AvatarPicker DownloadProvider ManagedProvisioning SharedStorageBackup
BackupRestoreConfirmation DownloadProviderUi MediaProviderLegacy Shell
BlockedNumberProvider DynamicSystemInstallationService MmsService SoundPicker
BuiltInPrintService E2eeContactKeysProvider MtpService StatementService
CalendarProvider ExternalStorageProvider MusicFX Tag
CallLogBackup FusedLocation NetworkStack TeleService
CellBroadcastLegacyApp InputDevices ONS Telecom
ContactsProvider IntentResolver PackageInstaller TelephonyProvider
CredentialManager LiveWallpapersPicker ProxyHandler UserDictionaryProvider
DeviceAsWebcam LocalTransport Seedvault VpnDialogs
DocumentsUI LogViewer SettingsProvider
akita:/system/priv-app # cd ..
akita:/system # cd apex
akita:/system/apex # ls
com.android.adbd.apex com.android.healthfitness.apex com.android.profiling.apex
com.android.adservices.apex com.android.i18n.apex com.android.resolv.apex
com.android.apex.cts.shim.apex com.android.ipsec.apex com.android.rkpd.apex
com.android.appsearch.apex com.android.media.apex com.android.runtime.apex
com.android.art.debug.apex com.android.media.swcodec.apex com.android.scheduling.apex
com.android.btservices.apex com.android.mediaprovider.apex com.android.sdkext.apex
com.android.cellbroadcast.apex com.android.neuralnetworks.apex com.android.tethering.apex
com.android.configinfrastructure.apex com.android.nfcservices.apex com.android.tzdata.apex
com.android.conscrypt.apex com.android.ondevicepersonalization.apex com.android.uwb.apex
com.android.devicelock.apex com.android.os.statsd.apex com.android.virt.apex
com.android.extservices.apex com.android.permission.apex com.android.wifi.apex
akita:/system/apex # pm list users
Users:
UserInfo{0:Owner:4c13} running
UserInfo{10:bent:400}
akita:/system/apex #