DEV Community

Matheus
Matheus

Posted on

ADB access from stock recovery

Image description
ADB has issues from TWRP on the Samsung Galaxy Gran Prime. I modified the stock recovery so that ADB can be used as in TWRP. This is composed of a modified RAM disk + kernel. The modifications introduced in the RAM disk are for allowing ADB to be used as in TWRP. For that, I rebuilt adbd from this source, as well as modified default.prop with the following parameters.

ro.secure=0
ro.debuggable=1
persist.sys.usb.config=adb
ro.adb.secure=0
Enter fullscreen mode Exit fullscreen mode

As for the kernel, I introduced a minimal modification so that SELinux remains permissive. Having SELinux in permissive mode is vital for allowing third-party utilities to run, as well as to have full privileges on the system.

Use Android Image Kitchen for extracting the RAM disk.

All requires one to root is set SELinux to permissive.

Sentry growth stunted Image

If you are wasting time trying to track down the cause of a crash, it’s time for a better solution. Get your crash rates to zero (or close to zero as possible) with less time and effort.

Try Sentry for more visibility into crashes, better workflow tools, and customizable alerts and reporting.

Switch Tools 🔁

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay