Broken Display - Enable USB debugging in recovery mode via adb.


jimnr0de

Members
7 Jun 2023
7
3
Hi guys, need some help enabling USB debugging in recovery mode via adb on a MI8 with a broken screen.

Most probably i've posted initially my message in the wrong section, probably nobody looks in there anymore. Sorry about that!
Some context to my problem:

My old Mi8 display got broken and its not lighting up anymore. Except this everything seems to work fine. I'm on the last MIUI 12.5 EU ROM for the MI8.
The plan is to set it via adb to cast to wireless display so i can have access and recover some of the important stuf that can't just simply copy (apps, etc,, etc.. ) .
Now I've enabled USB recovery as far as i remember however actually i can't access it via adb, (i can't see the device attached) although i can hear it "pips" when i connect the cable. Most probably i need to do initial phone unlock and maybe acknowledge the USB access again in the phone when i connect a cable or something..
Anyway i can go into recovery mode with Power + Vol Up then I can see the device attached as recovery and i can adb shell into it.
I've believe the whole root directory ("/")is being mounted in a normal boot as "rootfs".
Searched for the build.prop in the /system, found none. Found only default.prop which is linked with the prop.default.
I tried mounting "/" as RW and editing the default.prop by adding "persist.service.adb.enable=1 persist.service.debuggable=1 persist.sys.usb.config=mtp,adb". Also add build.prop file to the /system with those persistent properties, however nothing will persist after the reboot. I ain't that familiar with the system, i presume the image is being overwritten by the image defaults from somewhere.

Hope anybody can help me, thanks a lot!
 
You could fix the phone as well, can find a new screen for around 30-50€ on aliex, it may or may not be as good as the original, but will allow you to recover data and have a backup phone later. Youtube is full of instructions and it really isn't that difficult.
 
You could fix the phone as well, can find a new screen for around 30-50€ on aliex, it may or may not be as good as the original, but will allow you to recover data and have a backup phone later. Youtube is full of instructions and it really isn't that difficult.
Thanks, this is already done. Waiting for it to arrive in few weeks hopefully.
However in the meantime is critical to get access to my apps. Still no luck with my approach though.
 
Fair enough!
My hope was some cool dev in here would take a few seconds and point me to a way to mod the config file i mentioned and make it survive the reboot.
Try XDA, we don't give modding advice here.
 
Try XDA, we don't give modding advice here.
The mi8 firmware was developed in here, i could be wrong ofc., i'm not sure the XDA devs know their way around the xiaomi.eu firmware. Anyway i'm in no way interested into "modding". I just want to boot up the phone with the USB debugging enabled so i can have access to the filesystem.

As far as i understand, what i was trying was kinda nonsense, because i was trying to make the changes to the recovery filesystem which gets uncompressed during the boot from the recovery.img which is read-only anyway.
Correct me if i'm wrong, but getting access and mounting the system.img isn't possible in recovery.
I guess the only option to change the filesystem would be to extract the system.img from the phone in recovery and make the changes in the root filesystem then flash it back in fastboot. Right?
 
The mi8 firmware was developed in here, i could be wrong ofc., i'm not sure the XDA devs know their way around the xiaomi.eu firmware. Anyway i'm in no way interested into "modding". I just want to boot up the phone with the USB debugging enabled so i can have access to the filesystem.
Trying to authorize ADB access without interacting with an authorization dialog can only be done with modding, so yes, you're talking about "modding".

As far as i understand, what i was trying was kinda nonsense, because i was trying to make the changes to the recovery filesystem which gets uncompressed during the boot from the recovery.img which is read-only anyway.
Correct me if i'm wrong, but getting access and mounting the system.img isn't possible in recovery.
I guess the only option to change the filesystem would be to extract the ROM from the phone in recovery and make the changes in the root filesystem from from system.img. Then flash the complete rebuild ROM back in twrp. Right?
Getting access and mounting the system partition as read-write is definitely possible on old devices like the Mi 8, I do it all the time (I still use a Mi 8 as a daily driver).
That's not going to help you with authorizing ADB access for your PC, because the key is generated by the system on-demand when you interact with the authorization dialog. Unauthorized ADB access is only possible on a debuggable ROM and only after clean-flashing it.
 
Trying to authorize ADB access without interacting with an authorization dialog can only be done with modding, so yes, you're talking about "modding".


Getting access and mounting the system partition as read-write is definitely possible on old devices like the Mi 8, I do it all the time (I still use a Mi 8 as a daily driver).
That's not going to help you with authorizing ADB access for your PC, because the key is generated by the system on-demand when you interact with the authorization dialog. Unauthorized ADB access is only possible on a debuggable ROM and only after clean-flashing it.
Okay, please tell me how do i mount the system partition as read-write in twrp.