Never flash files not made for your device. You could use the 2021 model (Denver/Osaka) device trees as a base to start editing and build from source maybe. Talk to the dev for that device, they will know what you need.I am new and looking to create the twrp recover images for my Moto G Stylus 5G 2022 (MilanF). I know there are twrp files for the 2021 model (Denver/Osaka). Are is it a good idea to use these as a base for my attempt or should I try to compile from scratch?
My intuition told me I would have to compile from sources using last year's model as a starting point.Never flash files not made for your device. You could use the 2021 model (Denver/Osaka) device trees as a base to start editing and build from source maybe. Talk to the dev for that device, they will know what you need.
I meant the dev for last years model. Depends on how much they changed between years.My intuition told me I would have to compile from sources using last year's model as a starting point.
As for the dev for my specific device, I'm not certain there is one.
Check TWRP Building Support Group on telegram. If you fill out their error template you should get the help or answers you need.Hello! I'm hoping to find somebody who could help me out with developing TWRP for the Microsoft Surface Duo. I'm having trouble with getting touch to work. I have the vendor blobs and device tree, but I'm not sure what I'm missing.
I'm using 11.0 minimal branch from TeamWin to build TWRP. It boots up on the device, but touch doesn't work and dm_verity is on so /data can't be accessed and system can't be mounted.
Here are the vendor blobs:
![]()
GitHub - JengaMasterG/vendor_microsoft_duo at surfaceduo/11/2022.215.137
Vendor Blobs for Microsoft Duo. Contribute to JengaMasterG/vendor_microsoft_duo development by creating an account on GitHub.github.com
Here is the device tree:
![]()
GitHub - JengaMasterG/device_microsoft_duo at 11.0
Device Tree for Microsoft Surface Duo. Contribute to JengaMasterG/device_microsoft_duo development by creating an account on GitHub.github.com
Any help is appreciated! Thanks!
Edit: I've uploaded the logs I have been pulling from the TWRP build
Surface_Duo - Google Drive
drive.google.com
I'm getting help on the Zulip support page!Check TWRP Building Support Group on telegram. If you fill out their error template you should get the help or answers you need.
I am confused about my device tree, can you please help me to see the current parameters
For example USB.qcom.rc I don't know where this file came from
![]()
GitHub - x1906875173/android_device_oneplus_negroni
Contribute to x1906875173/android_device_oneplus_negroni development by creating an account on GitHub.github.com
Thanks for the reminder, but I don't understand what the problem is, hope it can be pointed out![]()
android_device_oneplus_negroni/device.mk at 4621e5d7260d6b6a5669e592496ac8c875c06c63 · x1906875173/android_device_oneplus_negroni
Contribute to x1906875173/android_device_oneplus_negroni development by creating an account on GitHub.github.com
You haven't provided any information about your problem aside from your device tree. Nobody is going to look through your device tree and pin point your "problem" without knowing what the problem is. Please provide additional information about your issue. Feel free to PM if you'd like.Thanks for the reminder, but I don't understand what the problem is, hope it can be pointed out
it is extracted from boot.imgI am confused about my device tree, can you please help me to see the current parameters
For example USB.qcom.rc I don't know where this file came from
![]()
GitHub - x1906875173/android_device_oneplus_negroni
Contribute to x1906875173/android_device_oneplus_negroni development by creating an account on GitHub.github.com
17:03:20 ************************************************************
17:03:20 You are building on a machine with 15.5GB of RAM
17:03:20
17:03:20 The minimum required amount of free memory is around 16GB,
17:03:20 and even with that, some configurations may not work.
17:03:20
17:03:20 If you run into segfaults or other errors, try reducing your
17:03:20 -j value.
17:03:20 ************************************************************
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-47-generic-x86_64-Ubuntu-22.04.1-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RQ1A.210205.004
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl
============================================
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b
out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build
-globs.ninja -o out/soong/build.ninja Android.bp
***************************************************************************
Could not find ui.xml for TW_THEME: not set
Set TARGET_SCREEN_WIDTH and TARGET_SCREEN_HEIGHT to automatically select
an appropriate theme, or set TW_THEME to one of the following:
landscape_hdpi landscape_mdpi portrait_hdpi portrait_mdpi watch_mdpi
****************************************************************************
(theme selection failed; exiting)
17:03:20 soong bootstrap failed with: exit status 1
#### failed to build some targets ####
I've been around some years and the best way to get help doing anything development wise is to research and read read read and if you run in to some sort of hang up and aren't sure exactly what to do and you search about whatever it is and can't seem to locate a solution.. I mean like REALLY REALLY SEARCHED good, then if you come to the community explaining exactly what you've done on your project "in fine detail" and what's got you stumped , then you stand a MUCH BETTER chance of someone possibly helping you. I'm just sharing my own experience here since Nexus S days & that's what I've found that works. Most things about android development are already here on xda somewhere it's just a matter of searching and finding them and following directions and trying different things.. Also depends how much time you have to spend doing it (it can be time consuming lol.) and how quick you learn. Hope this helps.
Try deleting your repo and syncing it again using repo sync -j5 --current-branch --no-clone-bundle --no-tags. I was too getting this error and this is what worked for me.this guide doesnt work
i keep getting
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
***************************************************************************
Could not find ui.xml for TW_THEME: not set
Set TARGET_SCREEN_WIDTH and TARGET_SCREEN_HEIGHT to automatically select
an appropriate theme, or set TW_THEME to one of the following:
landscape_hdpi landscape_mdpi portrait_hdpi portrait_mdpi watch_mdpi
****************************************************************************
(theme selection failed; exiting)
16:15:40 soong bootstrap failed with: exit status 1
even though i have declared TW_THEME in my device's boardconfig.mk
please update the guide to one that works
that worked! thank youTry deleting your repo and syncing it again using repo sync -j5 --current-branch --no-clone-bundle --no-tags. I was too getting this error and this is what worked for me.
PRODUCT_COPY_FILES += device/lge/hammerhead/twrp.fstab:recovery/root/etc/twrp.fstab
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot
/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384
/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache
/recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery
/efs ext4 /dev/block/platform/msm_sdcc.1/by-name/efs flags=display="EFS";backup=1
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable
/preload ext4 /dev/block/platform/msm_sdcc.1/by-name/hidden flags=display="Preload";wipeingui;backup=1
/modem ext4 /dev/block/platform/msm_sdcc.1/by-name/apnhlos
/mdm emmc /dev/block/platform/msm_sdcc.1/by-name/mdm
/external_sd vfat /dev/block/mmcblk1p1 flags=display="Micro SDcard";storage;wipeingui;removable
/efs1 emmc /dev/block/mmcblk0p12 flags=backup=1;display=EFS
/efs2 emmc /dev/block/mmcblk0p13 flags=backup=1;subpartitionof=/efs1
/efs3 emmc /dev/block/mmcblk0p14 flags=backup=1;subpartitionof=/efs1
/usb-otg vfat /dev/block/sda* flags=removable;storage;display=USB-OTG
/devices/soc.0/f9200000.ssusb/f9200000.dwc3/xhci-hcd.0.auto/usb* auto auto defaults voldmanaged=usb:auto
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,verify
/dev/block/bootdevice/by-name/cust /cust ext4 ro,barrier=1 wait,verify
/devices/hi_mci.1/mmc_host/mmc1/* auto auto defaults voldmanaged=sdcard:auto,noemulatedsd
/devices/hisi-usb-otg/usb1/* auto auto defaults voldmanaged=usbotg:auto
/dev/block/bootdevice/by-name/userdata /data f2fs nosuid,nodev,noatime,discard,inline_data,inline_xattr wait,forceencrypt=footer,check
/dev/block/bootdevice/by-name/cache /cache ext4 rw,nosuid,nodev,noatime,data=ordered wait,check
/dev/block/bootdevice/by-name/splash2 /splash2 ext4 rw,nosuid,nodev,noatime,data=ordered,context=u:object_r:splash2_data_file:s0 wait,check
/dev/block/bootdevice/by-name/secure_storage /sec_storage ext4 rw,nosuid,nodev,noatime,discard,auto_da_alloc,mblk_io_submit,data=journal,context=u:object_r:teecd_data_file:s0 wait,check
/boot emmc /dev/block/platform/hi_mci.0/by-name/boot
/recovery emmc /dev/block/platform/hi_mci.0/by-name/recovery flags=backup=1
/cust ext4 /dev/block/platform/hi_mci.0/by-name/cust flags=display="Cust";backup=1
/misc emmc /dev/block/platform/hi_mci.0/by-name/misc
/oeminfo emmc /dev/block/platform/hi_mci.0/by-name/oeminfo flags=display="OEMinfo";backup=1
/data f2fs /dev/block/dm-0
/system_image emmc /dev/block/platform/hi_mci.0/by-name/system
make clean && make -j# recoveryimage
make -j# bootimage
/dev/block/bootdevice/by-name/boot_a
/dev/block/bootdevice/by-name/boot_b
/dev/block/bootdevice/by-name/system_a
/dev/block/bootdevice/by-name/system_b
/dev/block/bootdevice/by-name/userdata
/dev/block/bootdevice/by-name/vendor_a
/dev/block/bootdevice/by-name/vendor_b
AB_OTA_UPDATER := true
flags=slotselect
/boot emmc /dev/block/bootdevice/by-name/boot flags=slotselect
/system ext4 /dev/block/bootdevice/by-name/system flags=slotselect
/system_image emmc /dev/block/bootdevice/by-name/system flags=slotselect
/vendor ext4 /dev/block/bootdevice/by-name/vendor flags=slotselect;display="Vendor";backup=1
/vendor_image emmc /dev/block/bootdevice/by-name/vendor flags=slotselect
AB_OTA_UPDATER := true
BOARD_USES_RECOVERY_AS_BOOT := true
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
BOARD_USES_RECOVERY_AS_BOOT := true
adb shell getprop ro.boot.slot_suffix
fastboot --set-active=_a
fastboot flash boot twrp.img && fastboot reboot
if [ ! -f $OUT/system/bin/gdbserver64 ]; then
echo Building gdbserver64
make -j8 gdbserver64
fi
adb shell stop recovery
adb push $OUT/system/bin/gdbserver /sbin/
adb shell chmod 755 /sbin/gdbserver
adb forward tcp:5039 tcp:5039
cp $OUT/symbols/recovery/root/sbin/recovery $OUT/symbols/sbin/recovery
adb push $OUT/symbols/sbin/recovery /sbin/recovery && adb shell chmod 755 /sbin/recovery
cp $OUT/symbols/system/bin/linker64 $OUT/symbols/sbin/linker64
cp $OUT/symbols/system/lib64/* $OUT/symbols/sbin
if [ "$#" = 1 ]; then
adb push $OUT/symbols/sbin/$1 /sbin/
fi
echo In another terminal run:
echo gdbclient pid_goes_here
adb shell gdbserver :5039 /sbin/recovery
make recoveryimage
adb shell stop recovery
make gdbserver64
adb push $OUT/system/bin/gdbserver64 /sbin
adb shell chmod 755 /sbin/gdbserver64
adb forward tcp:5039 tcp:5039
adb shell gdbserver64 :5039 /sbin/recovery
Process /sbin/recovery created; pid = [COLOR="Green"]575[/COLOR]
cp -R $OUT/symbols $OUT/../qcom/symbols
adb push $OUT/symbols/sbin/recovery /sbin/recovery && adb shell chmod 755 /sbin/recovery
adb push $OUT/symbols/sbin/libfoo.so /sbin/libfoo.so
gdbclient 575
It looks like gdbserver is already attached to 575 (process is traced), trying to connect to it using local port=5039
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/dees_troy/build/oomni/out/target/product/qcom/symbols/sbin/recovery...done.
__dl__start () at bionic/linker/arch/arm64/begin.S:32
32 mov x0, sp
(gdb)
continue
bt
quit
on init
export PATH /sbin
export LD_LIBRARY_PATH .:/sbin
PRODUCT_COPY_FILES += device/lge/hammerhead/twrp.fstab:recovery/root/etc/twrp.fstab
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot
/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384
/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache
/recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery
/efs ext4 /dev/block/platform/msm_sdcc.1/by-name/efs flags=display="EFS";backup=1
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable
/preload ext4 /dev/block/platform/msm_sdcc.1/by-name/hidden flags=display="Preload";wipeingui;backup=1
/modem ext4 /dev/block/platform/msm_sdcc.1/by-name/apnhlos
/mdm emmc /dev/block/platform/msm_sdcc.1/by-name/mdm
/external_sd vfat /dev/block/mmcblk1p1 flags=display="Micro SDcard";storage;wipeingui;removable
/efs1 emmc /dev/block/mmcblk0p12 flags=backup=1;display=EFS
/efs2 emmc /dev/block/mmcblk0p13 flags=backup=1;subpartitionof=/efs1
/efs3 emmc /dev/block/mmcblk0p14 flags=backup=1;subpartitionof=/efs1
make clean && make -j# recoveryimage
make -j# bootimage