yashsingh1/xdaforums huggingface dataset:
[General Questions and Answers] alecxs:
we can enable adb in boot.img - please backup from adb while in TWRP recovery, share zip here so I will have a look.

adb pull /dev/block/bootdevice/by-name/boot boot.img

with adb enabled we can use scrcpy to mirror lock screen and unlock from PC.
[General Questions and Answers] Zumbuh:
Thanks for the response, I've got the boot image backed up.
[General Questions and Answers] Renate:
Just for fun a built a digitizer emulator. It will work even when the ADB is turned off.
[General Questions and Answers] alecxs:
are you sure that is actually the boot.img dumped off your current boot partition? there is a twrp.fstab inside? However, I have modified prop.default and added custom.rc in overlay.d to enable adb. try this without flashing, then check adb. if it works, you can run scrcpy (link above)

fastboot devices
fastboot boot boot.img
adb devices

in case it does not work, you could also try to boot this TWRP (do not flash)

https://xdaforums.com/t/official-twrp-3-2-3-0-for-essential-ph-1.3840931

you can decrypt pattern from adb too

https://twrp.me/faq/openrecoveryscript.html

(attachment removed)
[General Questions and Answers] Zumbuh:
Yeah it is, that is there probably because you need to install TWRP to the boot partition for the Essential Phone. Anyway, it didn't work sadly. I get the same result, all I got in device manager is "Essential MTP Device" and an inaccessible folder cause it's still locked. and it appears that twrp for the Essential Phone can't decrypt Android 12 data. I couldn't get it decrypted back when I could see my screen & used a pin either iirc

How do I use it?
[General Questions and Answers] alecxs:
okay flash this boot.img to boot_a and boot_b and try again. I have added some flags for TWRP in recovery ramdisk too, maye it decrypts now. at least, it should enable adb. it may require ADB Interface Driver re-installed from device manager.
[General Questions and Answers] Zumbuh:
Unfortunately neither situation has changed, also reinstalled the ADB drivers
[General Questions and Answers] alecxs:
can you please provide TWRP recovery.log after passing encoded pattern from cmd line?

adb shell twrp decrypt '12357'
adb pull /tmp/recovery.log

what custom ROM you are running?

maybe startup script requires u:r:init:0 secontext, or it is executed too early and just dropped before zygote? or maybe it is too late, as usually build.prop properties are triggers for init.rc so the resetprop is not working.

this is how I did

https://topjohnwu.github.io/Magisk/guides.html#root-directory-overlay-system

it will work, it's just a matter of right parameters. you can unpack boot.img your own and replace late-init with boot or post-fs-data or something different.

you can also try to write log to /cache partition and view from TWRP afterwards, so you will figure out script is even executed.
[General Questions and Answers] Renate:
This was really just a proof of concept using a microcontroller that gets the swipe/click details from a desktop.

If you had a 2nd rooted Android that had HID USB Gadget built in (g_hid) it would be possible to write an app to do this.

You'd tether the two Androids together.

Edit: I did get it working with just the rooted Android and the target Android.

It's just a bit cumbersome to install. You need a custom USB config daemon and a udevd.

No design awards here, but it works.
[General Questions and Answers] alecxs:
I spend mostly 2 hours, I could change properties from overlay.d and also confirmed double check after boot. However, my Xiaomi denies any usb connection in case of modifications. So the default.prop trick did not work for me.

What worked is get a copy of %UserProfile%\.android\adbkey.pub rename it to adb_keys and copy to cache partition.

adb push %UserProfile%\.android\adbkey.pub /cache/adb_keys

adding these two files in boot.img overlay.d will copy /cache/adb_keys -> to /data/misc/adb/adb_keys. this worked for me, so give it one more shot.
[General Questions and Answers] Zumbuh:
I actually saw your earlier version of this reply so I was trying it myself, then when I went to reply I saw that you added a boot image and tried that as well. Though neither worked for me. I've attached my recovery.log though I assume the part you wanted to see was this.

I:operation_start: 'TWRP CLI Command'
Attempting to decrypt data partition via command line.
get_crypt_ftr_info crypto key location: ''
Unexpected value for crypto key location
Error getting crypt footer and key
Failed to decrypt data.
I:Done reading ORS command from command line
[General Questions and Answers] alecxs:
does phone have cache partition at all? you can check if /cache/adb_keys still exist. if you can see /cache/adb_keys.bak that is dump including all the existing keys. if not increase the timeout 60 seconds.

What ROM you are using? crypto-footer sounds more like FDE encryption, but I did only add flags FBE + metadata encryption.

kindly provide recovery.log. you can share via pastebin.com with expire date
[General Questions and Answers] Zumbuh:
I'm using this Pixel Extended 12L rom. For whatever reason it wouldn't attach recovery.log to the last post, anyways here's the pastebin link

Starting TWRP 3.2.3-0-007de98f-dirty on Thu Jan 1 00:00:13 1970 (pid 601)I: - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com
[General Questions and Answers] alecxs:
the log is not from my (3) boot.img

I:Mount: Unable to find partition for path '/cache'

where did you place your adb_keys?
[General Questions and Answers] Zumbuh:
In cache originally, but yeah I noticed that it didn't mount earlier as well. I did try placing them in a new directory I created and modifying the adbguard.sh file but it didn't work. The adb_keys file is still in that directory but there is no .bak file. Got anywhere else I could place it?
[General Questions and Answers] alecxs:
what directories can you access unencrypted on /data?
[General Questions and Answers] Zumbuh:
Seems the only one that isn't encrypted is /data/gsi
[General Questions and Answers] alecxs:
so you can place adbkey.pub there instead. change these lines in overlay.d/sbin/adbguard.sh. increase the timeout. you can also add some output to see if script is running at all.

while [ ${i:-0} -le 60 ]; do
set_adbkey /data/gsi/adb_keys
echo "Hello World ($i)" >> /data/gsi/hello.txt

adb push adbkey.pub /data/gsi/adb_keys

according to the ROM you linked, that is just FBE encryption, I bet some dev can fix that TWRP.

/vendor/etc/fstab.mata

# Android fstab file.
# 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

#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/soc/1da4000.ufshc/by-name/system / ext4 ro,barrier=1 wait,slotselect,verify
/dev/block/platform/soc/1da4000.ufshc/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc latemount,wait,check,formattable,fileencryption=ice,quota
/dev/block/platform/soc/1da4000.ufshc/by-name/misc /misc emmc defaults defaults
/dev/block/platform/soc/1da4000.ufshc/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=222,fmask=333,context=u:object_r:firmware_file:s0 wait,slotselect
/dev/block/platform/soc/1da4000.ufshc/by-name/dsp /vendor/lib/dsp ext4 ro,nosuid,nodev,barrier=1,context=u:object_r:adsprpcd_file:s0 wait,slotselect
/devices/*/xhci-hcd.0.auto* auto auto defaults voldmanaged=usb:auto
/devices/*/0000:01:00.0* auto auto defaults voldmanaged=usb:auto
/dev/block/zram0 none swap defaults zramsize=2147483648,max_comp_streams=8
[General Questions and Answers] Zumbuh:
Alright I have replaced those lines and that file was never created, so it looks like it never runs the script
[General Questions and Answers] satyam360:
if you have the developer's option enabled then you can use 'Scrcpy' to mirror the screen & control your device through pc.
[General Questions and Answers] alecxs:
overlay.d only works on Magisk rooted devices. you can however place custom.rc /system_root/system/etc/init directly.
[General Questions and Answers] Renate:
A good idea, but apparently they can't access ADB.
[General Questions and Answers] alecxs:
refer to post #2 ;)
[General Questions and Answers] Zumbuh:
My phone is rooted with Magisk though, that's the weird thing. I don't seem to have access to system_root as well
[General Questions and Answers] alecxs:
it's either /system/system or /system_root/system (maintainer hasn't fixed, but I changed in boot.img) depending on which boot.img flashed, just type and see

adb shell
# mount /system_root -w
# mount /system -w
# df -ah
# find /system*/system/etc/init

might be the case that recent Magisk doesn't support overlay.d anymore (as it already dropped SafetyNet, MagiskHide, Magisk-Modules Repo, Riru and SElinux permissive. topjohnwu has gone undercover at google now)

https://github.com/topjohnwu/Magisk/issues/6093

or it simply doesn't boot at all.
[General Questions and Answers] Zumbuh:
I can tell it boots, since when I connect with HDMI I can see the boot screen, then that lock icon. It's probably just the older version of TWRP that I can't access the system partitions.
[General Questions and Answers] alecxs:
post the output of above adb shell commands please. according to recovery.log it's mountable:

/system | /dev/block/bootdevice/by-name/system_a | Size: 3968MB Used: 3094MB Free: 874MB Backup Size: 3094MB
Flags: Can_Be_Mounted Can_Be_Wiped Can_Be_Backed_Up Wipe_Available_in_GUI IsPresent SlotSelect Mount_Read_Only

Note: you can copy-paste terminal output in cmd.exe - select with mouse and copy with Enter key. in forum use [CODE]tags[/CODE] for formatting.
[General Questions and Answers] Zumbuh:
Okay, I got system_root to mount. What would I put in custom.rc to enable adb?
[General Questions and Answers] alecxs:
init.adbguard.rc

on boot
exec u:r:magisk:s0 root root -- /system/bin/sh /system/xbin/adbguard.sh

save the file and copy from adb.

adb push init.adbguard.rc /system_root/system/etc/init

then copy your modified adbguard.sh to /system_root/system/xbin (if xbin not available use bin)

adb push adbguard.sh /system_root/system/xbin
adb shell
# cd /system_root/system/xbin
# chmod 0755 adbguard.sh
# chown 0.2000 adbguard.sh
# chcon u:object_r:system_file:s0 adbguard.sh
[General Questions and Answers] Renate:
Do you have access to a (different) unlocked Android that you know you can fastboot boot?

It can be a junk phone.

If so, send me the boot image (Magisk-ed if that's what you're running).
[General Questions and Answers] Zumbuh:
It is connected and it's authorized!! Though for whatever reason after unlocking the phone and using scrcpy my /data/media/ folder was inaccessible to the system. It was still decrypted from unlocking though so I was able to use chmod to give myself permission to access it and now I have my data backed up. Thank you!!

I do but I just got my data off it, thank you :)
[General Questions and Answers] alecxs:
so what does that mean? custom.rc no longer works from overlay.d? is that because of Android 12? or because of Magisk v25.2?

(kindly remove boot.img from your post #3, let's safe 64 mb of space) ;)
[General Questions and Answers] Zumbuh:
Unsure, it definitely never worked for me, even though when I finally got back into my phone I was still rooted and could do su commands in shell
[General Questions and Answers] alecxs:
If you don't mind, can you double check after patching overlay.d from zip and successful booted

1) /init.adbguard.rc exist in rootdir?

2) /sbin exist?

3) /sbin/adbguard.sh exist?

4) /sbin have a different random name?
[General Questions and Answers] Renate:
@aIecxs Thanks!

I've been working assiduously on my swiper solution. I've had a hardware box for years for injecting text. It beats the speed of input text hands down as that runs under Java and it has to start up. When I was working on a commerce app and had to test a customer info form with a dozen entries, I could fill up the entire form in a fraction of a second.

This was my first try using Android as a USB HID peripheral. The whole goofy Android USB config setup is a barrier, but I had already dumped that. I'm not sure how many kernels are built with g_hid support in them.

Then there is the question of sleep. On my Windows desktop I can Sleep() 5 or 10 mS without a problem. On Android it appears that 30 mS is the smallest interval. In the end I just decided to swipe "wide open" which is limited by the bInterval in the USB endpoint descriptor (which was 4 mS). That doesn't appear in /config/usb_gadget/g1/functions/hid.0 but could be patched in the kernel*. I also went to 16 bit coordinates. 8 bit is plenty, but 16 bits looks prettier.

*It's been on the FIXME list for years:

.bInterval	= 4, /* FIXME: Add this field in the
* HID gadget configuration?
* (struct hidg_func_descriptor)
*/
[General Questions and Answers] alecxs:
I tried yesterday on display broken SM-T590, overlay.d working, I can see in TWRP the script is executed and adb_keys is placed. But cannot enable usb-debugging, although /system/bin/settings is executed. even resetprop doesn't have any effect..

I ordered a second tablet with working display, will try to figure out right commands.
[General Questions and Answers] alecxs:
tablet arrived today, the commands are the same for Samsung SM-T590 and scrcpy workes fine on stock ROM.

settings put global development_settings_enabled 1
settings put global adb_enabled 1

/system/bin/settings exist and is a shell script.

#!/system/bin/sh
cmd settings "$@"

/system/bin/cmd is a binary and the commands doesn't even need root. I tried to call cmd from init script directly but it cannot enable adb on the broken tablet.

/system/bin/cmd settings put global development_settings_enabled 1
/system/bin/cmd settings put global adb_enabled 1

edit: got a logcat from service.d script. the commands are executed. seems that samsung knox prevents something. strange that this device is rooted, knox should be disabled.

D SettingsProvider: isChangeAllowed() : name = development_settings_enabled
D SettingsProvider: edmUri: content://com.sec.knox.provider/RestrictionPolicy3
D SettingsProvider: projectionArgs: isSettingsChangesAllowed
D SettingsProvider: selectionArgs: false
D SettingsProvider: selectionArgs: 0
D SecContentProvider: query(), uri = 17 selection = isSettingsChangesAllowed
D SecContentProvider: called from fail to get caller name
D SettingsProvider: ret = -1
D SettingsProvider: edmUri: content://com.sec.knox.provider/RestrictionPolicy1
D SettingsProvider: projectionArgs: isDeveloperModeAllowed
D SecContentProvider: query(), uri = 15 selection = isDeveloperModeAllowed
D SecContentProvider: called from fail to get caller name
D SettingsProvider: ret = -1
D SettingsProvider: isChangeAllowed() : name = adb_enabled
D SettingsProvider: edmUri: content://com.sec.knox.provider/RestrictionPolicy3
D SettingsProvider: projectionArgs: isSettingsChangesAllowed
D SettingsProvider: selectionArgs: false
D SettingsProvider: selectionArgs: 0
D SecContentProvider: query(), uri = 17 selection = isSettingsChangesAllowed
D SecContentProvider: called from fail to get caller name
D SettingsProvider: ret = -1
D SettingsProvider: edmUri: content://com.sec.knox.provider/RestrictionPolicy3
D SettingsProvider: projectionArgs: isUsbDebuggingEnabled
D SecContentProvider: query(), uri = 17 selection = isUsbDebuggingEnabled
D SecContentProvider: called from fail to get caller name
D SettingsProvider: ret = -1
D SettingsProvider: edmUri: content://com.sec.knox.provider/RestrictionPolicy1
D SettingsProvider: projectionArgs: isDeveloperModeAllowed
D SecContentProvider: query(), uri = 15 selection = isDeveloperModeAllowed
D SecContentProvider: called from fail to get caller name
D SettingsProvider: ret = -1

edit 2: factory reset tablet, still no luck. I installed LineageOS 20.0 that comes with usb-debugging enabled by default, now I have adb access but no scrcpy (because of a bug).

I still have the old TWRP backup of stock ROM and full access to /data partition - couldn't be that hard to enable adb from TWRP, so anyone have idea (display broken SM-T590, rooted, no encryption, no lock screen)?
[Google Pixel 7 Pro] UltimateGamer83:
Pretty much what the topic says. And Im talking about of course with root.
[Google Pixel 7 Pro] schmeggy929:
Why would you need to install Microg on a stock ROM? It will have Google app support. Not quite sure your question makes any sense (well to me at least lol).
[Google Pixel 7 Pro] 96carboard:
Its not possible because microG depends on a change in the platform source code to use fake signatures. Further, gooble is so thoroughly intermeshed with the factory firmware that trying to get it removed would not end well.
[Asus ROG Phone 6 / 6 Pro] Sselxuyt:
I have the 6d Ultimate and my wondrous wife got me the Nreal Air AR glasses for Christmas. They're amazing, but when I plug them into the side port of my phone, it locks the phone up for a few seconds before it crashes and reboots. It works great on my son's ROG Phone 5s, and with any other lightning port enabled computer I've tried it on.

Other info: I have a USB 3.0 monitor that works well with my phone, so I don't think it's a video out problem. I've contacted Nreal's Customer Support, and their final answer was that they haven't tested it on this phone and can't offer support.

My question is this: Has anyone else tried this on the 6 model? Is this just an issue with the 6D Ultimate?
[ASUS ROG Phone 3 Questions & Answers] ayolyas:
Hi Guys,

I really need help with this one. I have tried almost everything.

Here is my problem.

I have an Rog phone 3 strix edition QUALCOMM based.

I repaired the screen because i dropped the phone.

Everything was fine working well. Me with my big head decided to do an factory reset to wipe everything clean from the phone and then the problem started.

The phone was restarting every time i plugged in a usb c cable. If i wanted to listen to some music on headset wont work because it will end in a bootloop.

Now the phone is stuck in CSC Fastboot mode and PC wont recognized it. The screen will turn on and send me to CSC fastboot but that's it. I can turn it back off.

Can i Revive the phone or is it food for the recycling bin?

Please Help.

Sincerely,

Ayolyas
[ASUS ROG Phone 3 Questions & Answers] Andrologic:
With some effort you should be able to get back on track - unless it's hardware related to the display change you've done.

Can you do a reboot to bootloader from the boot menu? If you can confirm if you have fastboot access. If you do, RAW flash the device.

Worst case, you force the device into EDL mode and do a flash from there, but leave at as the last option.

If the relpaced display is causing harware issues, that's a bigger problem...
[ASUS ROG Phone 3 Questions & Answers] ayolyas:
Hi Andrologic,

I cannot reboot to the bootloader. I am stuck in csc fastboot. I was trying to put it in edl mode i even bought an edl cable. But i have no idea how to use it or how to put the phone in edl.

I went back to the repair shop but the phone was working fine when it left the phone shop. The problem started when i decided to go for factory reset.
[ASUS ROG Phone 3 Questions & Answers] Andrologic:
So, when you turn on the device, it falls into CSC FB and you can't navigate anywhere at all from there?

What happens if you try to do a RAW flash from CSC FB?

Flashing it in EDL mode may otherwise be the only option. Power off the device completely. Then hold Vol up+down pressed and connect to the USB side port. You should land with a completely black screen and on your pc see the device identified in 9008 mode - that's EDL. Since you have a flash cable, you can obviously use that too.

Remember you need Qualcom drivers installed to work in EDL mode. There is a guide with steps for EDL flashing somewhere here on the forum. All the steps are explained.
[ASUS ROG Phone 3 Questions & Answers] ayolyas:
I cannot navigate anywhere from csc. If i try to reboot bootloader i will end in the same place.

I try to connect like you told me Vol up + down but i ended up at the same place. An raw flash from csc fb how do i do that?

And the steps for edl if you can help where to find those steps because my google history is full off items and still no luck finding the right one.
[ASUS ROG Phone 3 Questions & Answers] Andrologic:
Yes, you have flash cable, so getting into EDL shouldn't be an issue any way.

This is a useful video on how to use your flash cable to force the device to EDL:

Just remember you need QCom drivers installed to flash in EDL mode, the normal drivers won't do it in EDL.

What is the device identified as on your PC when in CSC FB? Can you send any FB commands to the device at all? Does 'Fastboot Devices' return your device id? If so, try first to do a RAW flash from the Fastboot state you are stuck at. You don't really want to mess with EDL if you can avoid it. Download one of the RAW rom's from the links here on the forum. Version number doesn't matter as long as it matches with your device version, i.e. WW assuming you're on Global.
[ASUS ROG Phone 3 Questions & Answers] osomakohj:
Have you fix it?
[ASUS ROG Phone 3 Questions & Answers] ayolyas:
Hi,

Nope. I can get into EDL mode so i think it is hardware related. You can say it is fresh for the garbage.
[ASUS ROG Phone 3 Questions & Answers] osomakohj:
maybe try edl cable maybe it'll work? its very cheap in online store
[ASUS ROG Phone 3 Questions & Answers] ayolyas:
I did use a EDL cable and i also build one but no succes for both.
[ASUS ROG Phone 3 Questions & Answers] osomakohj:
Hope you did the proper way of entering edl mode. btw you can still send that to service center. but first try some other way as your phone still boot
[Tilt, TyTN II, MDA Vario III General] aagil001:
I accidentally deleted the .cab for the HTC 5 button today screen; when I reinstalled it, the tab for controlling sound profiles was practically non-functional. How can I reestablish the sound/vibrate control without constantly adjusting it in the seperate phone and message settings window?
[Vivo X90 Pro Plus] Badger50:
Please be respectful and observant of all XDA rules, as well as towards each other.

Please use the links below if you have any questions about content you wish to post, or need help from the Moderator Staff.

Best Regards: Your Friendly Moderation Team

XDA Developers Forum Rules

Moderation Team

Rules for posting Development Threads

XDA-Developers and the GPL

Regarding Paid Themes On XDA

***WARNING*** Do Not Spam, Sell or Trade on XDA

Telegram Chat Channels - WayForward

Spoiler content hidden.
[OnePlus 7 Pro Guides, News, & Discussion] almahix:
I had an online chat with someone at OnePlus expressing my dissatisfaction that the final 7Pro build was still Android 12. (I didn't bother to mention that I had abandoned their stock Android a year or more ago when updates became almost non-existent.)

This person told me that the 7Pro phone was not capable of running Android 13.

I presently have the newest Lineage Android 13 installed and running like a champ.

OnePlus has fallen so far since I bought my 7Pro. A year later I bought an 8Pro and sold it off as I didn't like it. I bought a Pixel 6Pro and love it. OnePlus was briefly the developer's and power users' go to phone but that ended suddenly. Now I wouldn't consider another OnePlus phone. As I said my 7Pro is doing great with Android 13 and OnePlus is a lying has been.
[OnePlus 7 Pro Guides, News, & Discussion] RolandStoner:
My cousin has the 10 and it seems like it could be pretty fire
[OnePlus 7 Pro Guides, News, & Discussion] ite ite:
What android 13 version are you running and how did you get it installed? Want to try updating my 7 pro as it seems like we won't be getting it naturaly