android – I cannot build or modify TWRP

I’m running Windows 11 (24H2) and WSL (WSL version: 2.3.26.0, Kernel version: 5.15.167.4-1) Running Ubuntu 24.04.1 LTS. My TWRP version is twrp-3.7.1_12-0-guacamole. My phone is a OnePlus 7 Pro

I’m trying to automate a reinstall TWRP and magisk after a factory reset and TWRP is where I’m getting stuck.

My goals are:

  1. When loading TWRP for the first time, the warning screen does not appear and I do not have to swipe to enter into TWRP.
  2. ADB is runs whenever TWRP is loaded (I think adb always runs if MTP is enabled but I’m not entirely sure).
  3. TWRP then installs itself as the recovery program instead of the stock recovery. (I have the .zip and .img) files.
  4. TWRP then installs magisk.

I feel like I tried everything under the sun in terms of utilizing different programs to unpack and repack but no matter what I do, I’m never able to boot into the new, modified TWRP. (I even tried just unpacking and repacking without making any edits, just to test things, and to no avail.) I think the error is in how linux is unpacking (and maybe repacking) TWRP.

I’ve been trying to do some of this through “openrecoveryscript” but because the initial boot of TWRP is from my computer, then any reboot deletes the openrecoveryscript and doesn’t execute it.

I appreciate any help. Thanks!

I’ve tried several unpacking and repacking programs in linux. I’ve tried editing init.rc and default.prop at different times.

Read more here: Source link