[help and advice][Google Pixel 3]: Installing su binary to gain termux access to /dev

Search This thread

jttolleson

New member
Jun 23, 2021
1
0
I have a program that must be run on android as root. After installing opencv and other dependencies from itspointless repo.... this program creates a dual cam image, video in two side by side 720 x 720, one 1440 x 720....anyway...i need to run it as root on my pixel 3. 3.....any help or advice greatly appreciated....

import cgitb
cgitb.enable()
import cv2
import numpy as np

cap = cv2.VideoCapture(0)
cap1 = cv2.VideoCapture(1)

out = cv2.VideoWriter('output.avi',cv2.VideoWriter_fourcc(*'XVID'), cap.get(cv2.CAP_PROP_FPS), (1440,720))

while(cap.isOpened()):

ret, frame = cap.read()
ret1, frame1 = cap1.read()
if ret == True:

print (frame)
reframe = cv2.resize(frame,(720, 720), interpolation = cv2.INTER_AREA)
reframe1 = cv2.resize(frame1,(720, 720), interpolation = cv2.INTER_AREA)
both = np.column_stack((reframe, reframe1))
out.write(both)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
else:
break

cap.release()
cap1.release()
out.release()
cv2.waitKey(0)


if you install the correct dependencies MP4 is possible too.
 

dcarvil

Senior Member
Apr 20, 2016
414
185
What part do you need help with? Rooting the Pixel 3? You'll need an unlockable bootloader, and some carrier specific models cannot be unlocked. Also, be aware unlocking the bootloader will wipe your phone.

See this article for bootloader unlocking instructions, but ignore the TWRP and Magisk parts. TWRP hasn't worked on the Pixel 3 for a couple of years, and the Magisk part is out of date. https://www.xda-developers.com/google-pixel-3-unlock-bootloader-root-magisk/

You'll need the latest Platform Tools from https://developer.android.com/studio/releases/platform-tools

Once the bootloader is unlocked, download Magisk from https://github.com/topjohnwu/Magisk. See Downloads section.

Magisk installation instructions are at https://topjohnwu.github.io/Magisk/install.html. See the "Patching images" section. You'll be patching a boot image, not a recovery image.

Make sure the boot image you use is the correct one for the Android version on your phone. You can get that from https://developers.google.com/android/images. Unzip the file from that site, then unzip the zip within that file. There will be a boot.img file.

Once Magisk is installed, open Termux and run "su -". That puts you at a root prompt.