Giter VIP home page Giter VIP logo

android_device_oneplus_hotdog's Introduction

TWRP device tree for OnePlus 7T Pro (hotdog)

Disclaimer - Unofficial TWRP!

These are personal test builds of mine. In no way do I hold responsibility if it/you messes up your device. Proceed at your own risk.

Compile

Install repo tool from here: https://gerrit.googlesource.com/git-repo

Initialize and sync minimal manifest TWRP: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp

Clone device tree:

# Assuming you're in the synced TWRP repo
mkdir -p  device/oneplus
git clone https://github.com/arminask/android_device_oneplus_hotdog device/oneplus/hotdog

To build, execute these commands in order

source build/envsetup.sh
export ALLOW_MISSING_DEPENDENCIES=true
export LC_ALL=C
lunch twrp_hotdog-eng
mka adbd recoveryimage

To test it:

# To temporarily boot it
fastboot boot out/target/product/hotdog/recovery.img 

# Since 7T / Pro has a dedicated recovery partition, you can flash the recovery with
fastboot flash recovery recovery.img

Features

Blocking checks

  • Correct screen/recovery size
  • Working Touch, screen
  • Backup to internal/microSD
  • Restore from internal/microSD
  • reboot to system
  • ADB

Medium checks

  • update.zip sideload
  • UI colors (red/blue inversions)
  • Screen goes off and on
  • F2FS/EXT4 Support, exFAT/NTFS where supported (F2FS support is untested)
  • all important partitions listed in mount/backup lists
  • backup/restore to/from external (USB-OTG) storage
  • backup/restore to/from adb (https://gerrit.omnirom.org/#/c/15943/)
  • decrypt /data
  • Correct date

Minor checks

  • MTP export (Untested)
  • reboot to bootloader
  • reboot to recovery
  • poweroff
  • battery level
  • temperature
  • encrypted backups (Untested)
  • input devices via USB (USB-OTG) - keyboard, mouse and disks
  • USB mass storage export (Untested)
  • set brightness
  • vibrate
  • screenshot
  • partition SD card (Device doesn't have an SD card slot)

Tested / Working

  • Flashing ROMs (custom OS's)
  • all important partitions listed in mount/backup lists
  • MTP export
  • ADB: sideload, push/pull, logcat, shell
  • FBEv1: decrypt /data - Only working for Custom OS's (not tested on STOCK)
  • FBEv1: decrypt /data/media (internal storage)
  • Backup/Restore to/from internal storage
  • A/B slot switching

Untested

  • F2FS support
  • backup/restore to/from external (USB-OTG) storage
  • backup/restore to/from adb

Issues

  • adb connection only starts working when user decrypts userdata on TWRP bootup prompt. Not sure if it's by design, but expected functionality is adb starts working immediately on bootup. This will mainly affect users who use roms with different userdata encryption, to get around it, start adb sideloading and then cancel it, adb connection will start working normally.

Credits

android_device_oneplus_hotdog's People

Contributors

steadfasterx avatar arminask avatar

Stargazers

 avatar

android_device_oneplus_hotdog's Issues

Fix ADB

The ADB connection on PC will only start working after the user enters the PIN and decrypts userdata on TWRP bootup decrypt prompt.
If you don't enter your PIN (or can't because your ROM doesn't use FBEv1 and the prompt doesn't show up), ADB won't work.
To fix this, qcom/usb init scripts need to be fixed. I haven't found a fix for that yet, if anyone here knows how to, please make a pull request :)

Workaround: Start ADB sideload and then cancel it, then ADB connection will start working normally.

dmesg log snippet with the possible issue:

read descriptors
[   14.700378] read strings
[   14.700678] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/system/etc/init/hw/init.rc:201)
[   14.701407] init: Command 'symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.rc:204) took 0ms and failed: symlink() failed: File exists
[   14.761933] android_work: did not send uevent (0 0 0000000000000000)
[   14.761995] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/system/etc/init/hw/init.rc:205) took 60ms and succeeded
[   14.762297] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/init.recovery.usb.rc:74)
[   14.808119] dwc3 a600000.dwc3: request 0000000000000000 was not queued to ep0out
[   14.808242] init: Command 'rm /config/usb_gadget/g1/configs/b.1/f2' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.recovery.usb.rc:77) took 0ms and failed: unlink() failed: No such file or directory
[   14.808287] init: Command 'rm /config/usb_gadget/g1/configs/b.1/f3' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.recovery.usb.rc:78) took 0ms and failed: unlink() failed: No such file or directory
[   14.808329] init: Command 'rm /config/usb_gadget/g1/configs/b.1/f4' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.recovery.usb.rc:79) took 0ms and failed: unlink() failed: No such file or directory
[   14.808372] init: Command 'rm /config/usb_gadget/g1/configs/b.1/f5' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.recovery.usb.rc:80) took 0ms and failed: unlink() failed: No such file or directory
[   14.808413] init: Command 'rm /config/usb_gadget/g1/configs/b.1/f6' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.recovery.usb.rc:81) took 0ms and failed: unlink() failed: No such file or directory
[   14.808458] init: Command 'rm /config/usb_gadget/g1/configs/b.1/f7' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.recovery.usb.rc:82) took 0ms and failed: unlink() failed: No such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.