Help enabling adb from recovery (broken screen) - Redmi Note 9 Pro (International Model) General and

The purpose of this is to use my phone via scrcpy for my sms verification and stuff.
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Any workaround? thanks
I'm using OrangeFox recovery.

VanGreat said:
The purpose of this is to use my phone via scrcpy for my sms verification and stuff.
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Any workaround? thanks
I'm using OrangeFox recovery.
Click to expand...
Click to collapse
Orange Fox has enabled ADB by default. Your screen is broken? How do you know OF has been booted?

VanGreat said:
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Click to expand...
Click to collapse
How did you edit these files? Did you un-/repack the recovery.img inside the downloaded zip?
The prop.default in your ramdisk.img shows:
ro.adb.secure=0
persist.sys.usb.config=adb
Everything seems to be correctly from device's site. No need to edit sth.

No. Somehow I need to access to adb on OS and those settings has been disabled on new rom. As I said i need to access to my sms app

You'd like to patch the setting files via recovery to gain access with ADB in system? USB-debugging is toggled off? Are there already the adb_keys of your PC in /data/misc/adb to allow access?

Yes I need to enable usb debugging through recovery.
I think i have to enable adb first before authorizing my device on /data/misc/adb

We do both via OF:
First you should find the needed setting file and check its permissions for restoring it correctly afterwards (assuming you're already in the device's shell by entering 'adb shell'):
Code:
ls -al /data/system/users/0/settings_global.xml
Note the permissions.
Then leave the device's shell and pull the file:
Code:
exit
adb pull /data/system/users/0/settings_global.xml
Open setting_global.xml with an editor and set the line
Code:
package="com.android.settings" defaultValue="0" defaultSysSet="true" /> <setting id="7676" name="adb_enabled"
to value=1
Push the file back:
Code:
adb push settings_global.xml /data/system/users/0
and check the permissions:
Code:
ls -al /data/system/users/0/settings_global.xml

Authorizing:
On your PC search for
Code:
C:\Users\<USER>\.android\adbkey.pub
copy that file into your ADB folder. Then push it to:
Code:
adb push adbkey.pub /data/misc/adb_keys
and set the permissions:
Code:
adb shell chmod 0640 /data/misc/adb_keys
adb shell chown system:shell /data/misc/adb_keys

okay i'm now on your authorizing part, it now says something but it still says unauthorized on "adb devices"

what i actually did was to flash aosp rom and edit build.prop there and set the adb variables

USB debugging seems to be active. But I don't know why it says unauthorized. Maybe there is another setting related to ADB in settings_global.xml that needs to be activated for Xiaomi devices like yours.

VanGreat said:
what i actually did was to flash aosp rom and edit build.prop there and set the adb variables
Click to expand...
Click to collapse
Do not edit any file but the setting file. You must not change the props.

something wrong with /data encryption. I for sure pushed the adb_keys on /data/misc/adb but when I rebooted at the recovery or system it goes back nothing.
some say this was aosp system as they won't allow /data modification?

Are you able to open /data in OF and do you see the folders/files in there? With the correct names?

If yes, you don't have any problems with encryption

WoKoschekk said:
Are you able to open /data in OF and do you see the folders/files in there? With the correct names?
Click to expand...
Click to collapse
i only saw recovery folder. also gave me "cant mount /data (invalid argument)" when i try to mount it first.

VanGreat said:
i only saw recovery folder. also gave me "cant mount /data (invalid argument)" when i try to mount it first.
Click to expand...
Click to collapse
Then you have no chance to activate ADB and get access to your SMS.

assuming encryption is healthy in boot mode, you can enable usb-debugging and authorize RSA key from either /system or boot, no access to /data needed.
this is for custom ROM by modifying /system
[OTA] ADB-Enabler - Flashable UPDATE.ZIP File
This tool is not meant to be used on Android devices with dm-verify or Android Verify Boot (AVB) enabled Every Android device has a stock recovery installed. That default recovery typically at least offers you the 4 options reboot system now...
forum.xda-developers.com
this is for stock ROM by modifying boot
Accessing my phone with a dead screen
So my phone screen connector was liquid damaged. No touch or display. It's an Essential Phone which supports HDMI output, however I can't unlock it because I don't see the lock screen on the monitor I just see a lock icon. I have...
forum.xda-developers.com
take note (on stock MIUI only) scrcpy won't work on xiaomi devices, com.miui.securitycenter prevents that. unless you have bonded mi account, you can't enable USB debugging (Security settings) in developer options.

Related

can not mount system in read-write mode using adb without recovery mode

I wanted to change my device model, so I copied build.prop from another mobile to my mobile. I am already rooted. But unfortunately I did not change the o.s. from gingerbread to froyo in build.prop ( I have android 2.2 FROYO) When I rebooted, there were many errors. It is now showing no sim card. Mobile network search gives error. Effectively, I can not use the mobile. Terminal emulator, X-plore etc. stopped working. Only Rom toolkit free version works and astro file manager works. Other programs are forcefully closed. Needles to say, I must replace new build.prop with new one.
Using adb I can only pull files but can not write as it is in read only mode.
adb root and adb remount works only if you are in recovery mode ? Y mobile does not have any custom recovery so when I boot in recovery mode it hangs.
Superuser has installed su in system\bin directory. But from adb shell I can use su also. It gives permission denied error. Hence I can not remount the system.
I have read similar threads and found that on some mobiles adb root or adb shell su works but on some not.
I am using Vista 32 bit with admin rights, still can not use root in adb.
Please tell me, how can I mount system read-write. I can not install root explore as google play and even internet is not working.
Please help.
maheshchavan said:
Using adb I can only pull files but can not write as it is in read only mode.
Click to expand...
Click to collapse
activate USB debugging then in console
Code:
adb shell
su
mount -o rw,remount /dev/block/mmcblk0p1 /system
adb push build.prop /system/build.prop
check where is your build.prop
ruscan.calin said:
activate USB debugging then in console
Code:
adb shell
su
mount -o rw,remount /dev/block/mmcblk0p1 /system
adb push build.prop /system/build.prop
check where is your build.prop
Click to expand...
Click to collapse
OMG ruscan.calin i COULD KISS YOU! I had tried to change my OG EVO 4G's buildprop file to another phone so that I could purchase & download an incompatible Google Play app. However after I restarted the phone wouldn't start! It would boot into my rooted HTC EVO 4G Android 2.3.3 and HTC Sense 2.1 but it would get stuck on the wallpaper with just the notification bar at the top and all buttons would be frozen. However I noticed when I plugged in my phone to my computer via usb the computer recognized it. I always keep my phone with USB debugging enabled so I thought I should be good right? I have spent the last 4 hours trying to install and setup adb with no real previous experience with it. I am familiar with dos from years ago and that helped me as it's basic procedure, commands, etc. Then I found out how to install the HTC drivers which I needed and then download the Android SDK with adb that's included which many guides show easily. I started the command prompt (cmd), typed my adb devices command and hurray it showed my phone! I connected and quickly navigated to the build.prop system folder! Luckily when I changed the file I made a bak backup and left it in the same folder. Now the main issue was figuring out how to change the naming of the files which I did via usual adb commands (mv build.prop.bak build.prop). But then to no avail I couldn't get it to write due to it being a system read only folder! Arg! Then I found your post on here, above, and typed it in simply leaving out the adb push portion and replacing that with the mv file command instead and first changing the name of the bad file and then replacing the bak file as the good copy! I exited back to the adb main and unplugged my phone. Moment of truth and man was everything flashing through my head at once! I booted up and YESSSSSSSSSSSSSS, it worked! I went back into root explorer and got rid of the offending leftovers and I've learned my lesson! I just don't want to think about what would have happened if I hadn't found this post. Thank you and if anyone else makes this hug mistake let me know and maybe I can help. Moral of the story don't mess with the build.prop or any system folder unless you know what you're doing! Thanks again!
Quick Guide to Fix Android "build.prop" Issues:
1. Find and download USB drivers for your phone by model or type (HTC EVO 4G's HTC Fastboot drivers): http://downloads.unrevoked.com/HTCDriver3.0.0.007.exe
2. Download and install Android SDK and choose adb: http://developer.android.com/sdk/index.html
Guide: http://htcevohacks.com/htc-evo-hacks/how-to-install-android-sdk-and-adb-drivers-for-htc-evo-4g/
3. Run a command prompt from the "c:/program files/android/android-sdk/platform-tools/" directory. I had to copy the command prompt to get it to open there but sometimes a right-click action will do it. The guide below will help just navigate down to "Using ADB" and skip the rest.
Guide: http://www.howtogeek.com/114667/how...y-default-move-almost-any-app-to-the-sd-card/
4. Once you open the command prompt and you're in the "c:/program files/android/android-sdk/platform-tools/" foler type "adb devices" and your device should appear. If it does move on to next step.
5. Then type adb shell and use the ls command to see directories. Then you'll need to navigate to the system folder by typing "cd system" and then type "ls" to look around in the directory (similar to "dir" in DOS). You should now see the bad build.prop file.
6. You'll need to rename the file or push a correct version. First you need to use the "adb shell" command again and then "su" and finally "mount -o rw,remount /dev/block/mmcblk0p1 /system" to make the directory writable (see ruscan.calin post above for additional info).
Note: I only had to rename my build.prop as I already had my old one in the same system folder. You may have to copy the bad build.prop to your computer, edit it and then push it back to the same system directory. These directions are only for renaming files in the same folder. For the info on how to copy the file to your computer and push it back to your phone go to step *10 below or use the guide below it.
7. I already had the bad build.prop in the system directory with my old one which I had named build.prop.bak. If you have this too simply rename by changing the name first of the bad file to anything by typing "mv build.prop build.prop.bad" or similar.
8. Next rename the build.prop.bak to build.prop by typing "mv build.prop.bak build.prop". Everything should go smoothly and move onto the next step.
9. Finally, If no error messages are found, simply type "adb reboot" or "adb shell reboot" (Depending which version of ADB you have). You should be done, your phone will reboot like normal (working, lol) and everything should be working again! YAY!
*10. To copy the build.prop to your phone type "adb pull /system/build.prop c:\" and the file should be placed in the main c:/ directory on your computer. Navigate to the root (c:/) directory and then right click and "open with" the "build.prop" file using a notepad or other file editor. Then use the text editor (Notepad, etc) to change back what you originally changed to mess everything up. There is tons of stuff on the net to let you know what to fill back in depending on your phone model/type. Or it's possible to get a previous version from an old Nandroid backup or similar. Save the changed text file and make sure its named the same "build.prop" and make sure it's still in the root directory (If you're having issues on this step or just want more insight check out the guides and threads below for more help).
Guide 1: http://androidforums.com/admire-all...p-computer-not-phone-using-root-explorer.html
Guide 2: http://www.modaco.com/topic/328943-quick-guide-to-modifying-buildprop-with-adb/
Guide 3: http://forums.androidcentral.com/sp...-replaced-build-prop-phone-wont-start-up.html
*11. We've already made the directory writable in step 6 so we simply need to push the file back to the phone. If any error message appear re-do step 6 to make writable again. Otherwise push the modified file back to the phone by typing "adb push c:\build.prop /system/". Back to step 9 above! Yay!
If anyone wants to help cleanup this quick guide or make any changes feel free. I just wanted something so that if anyone else has this issue they won't have to worry or search forever to find a solution. OMG it's 2:30AM, to bed... I ride! LOL
Enjoy,
5th :highfive:
THANK YOU!!! Totally saved me today.
One thing that I noticed. After pushing the correct build.prop, I had to fully power down, then turn back on my Razr for it to load up the fixed build.prop.
error message,Help please
Hello, when i am going to mount and change the permission i am getting constant error od device not found or sh:not found.
What to do?Help me please?
jigarpattani said:
Hello, when i am going to mount and change the permission i am getting constant error od device not found or sh:not found.
What to do?Help me please?
Click to expand...
Click to collapse
What step are you on? What phone do you have? More info please?
i am have problem whit my pantech flex i need to use the build.prop.bak but when i type the su it stay in blank do nothing any ideas pls help
ehy there hope someone can help me...i have an archos 97b platinum, messed up with build.prop. So i pulled out and restored but can't push in any way. I have a cwm installed, tablet rooted but i alwais got "permission denied" at push command. Other error is operation not permitted" if i try remount command from adb. i can do mount -o rw,remount /dev/block/mtdblock7 /system but after that push still give me permission denied.
any suggestion?
http://imgur.com/FDLp4fl
i open a 2nd cmd, give the mount -o rw,remount /dev/block/mtdblock7 /system , and system is now rw, but from the first cmd when i give "push build.prop /system (or /system/build.prop) it will always return me permission denied
help
dev.block
i want to view to dev/block using adb shell #
eg . what block is boot.img
what block is recovery.img
what block is system.img
what block is cache.ing
adb shell getprop mtd is not work . Pls Help Me & sent to mail [email protected]

Android 6.0 - SD Card access

Anybody knows how to enable third-party apps to access SD Card? Things that were working under 5.1 are not under 6.0 anymore.
Well, it seems Google is really retarded regarding SD Card access, changing API every other version:
http://stackoverflow.com/questions/32129716/how-does-storage-access-change-on-android-6
Radek Hulán said:
Anybody knows how to enable third-party apps to access SD Card? Things that were working under 5.1 are not under 6.0 anymore.
Click to expand...
Click to collapse
i used the old Kitkat fix for my brief period on 6.0, but i rolled back to 5.1 for the time being, battery drain was too much.. here
Well, not going to root my device to gain basic features such as being able to delete photos Camera app put on SD card.
This is insane.
(connect phone with USB debugging)
adb reboot bootloader
fastboot boot twrp.img
** TWRP: MOUNT > SYSTEM
** TWRP: Advanced > File > "chmod 775" on system/build.prop
adb pull /system/build.prop %USERPROFILE%
** EDIT FILE, set ro.lge.adoptable_storage=true
adb push %USERPROFILE%\build.prop /system/build.prop
adb shell
chmod 644 /system/build.prop
exit
adb reboot
Now you can format SD card as internal storage and use it for data
Thanks Radek for this!!!
Radek Hulán said:
(connect phone with USB debugging)
adb reboot bootloader
fastboot boot twrp.img
** TWRP: MOUNT > SYSTEM
** TWRP: Advanced > File > "chmod 775" on system/build.prop
adb pull /system/build.prop %USERPROFILE%
** EDIT FILE, set ro.lge.adoptable_storage=true
adb push %USERPROFILE%\build.prop /system/build.prop
adb shell
chmod 644 /system/build.prop
exit
adb reboot
Now you can format SD card as internal storage and use it for data
Click to expand...
Click to collapse
interesting. i see on some lines there are twrp. so this method can only be used with G4 variants that has twrp? CMIIW
i'd really like to try this on my H818P but there's no TWRP for the variant yet...
Good work mate
Requires root ?
It does not require root, but you must have unlocked bootloader.
Odesláno z mého LG-H815 pomocí Tapatalk
Radek Hulán said:
(connect phone with USB debugging)
adb reboot bootloader
fastboot boot twrp.img
** TWRP: MOUNT > SYSTEM
** TWRP: Advanced > File > "chmod 775" on system/build.prop
adb pull /system/build.prop %USERPROFILE%
** EDIT FILE, set ro.lge.adoptable_storage=true
adb push %USERPROFILE%\build.prop /system/build.prop
adb shell
chmod 644 /system/build.prop
exit
adb reboot
Now you can format SD card as internal storage and use it for data
Click to expand...
Click to collapse
can you explain me what do you mean with
* TWRP: MOUNT > SYSTEM
** TWRP: Advanced > File > "chmod 775" on system/build.prop
adb pull /system/build.prop %USERPROFILE%
** EDIT FILE, set ro.lge.adoptable_storage=true
i dont know it, thanks
Continue working this metod?
Sorry for me bad english xD
[email protected] said:
can you explain me what do you mean with
* TWRP: MOUNT > SYSTEM
** TWRP: Advanced > File > "chmod 775" on system/build.prop
adb pull /system/build.prop %USERPROFILE%
** EDIT FILE, set ro.lge.adoptable_storage=true
i dont know it, thanks
Click to expand...
Click to collapse
Download TWRP for LG G4, run it:
https://twrp.me/devices/lgg4h815.html
In TWRP, select Mount > System, from menu, and continue according to these instructions.
ADB is part of Android SDK tools:
http://developer.android.com/sdk/index.html#Other
I don't know if it is the same problem but I believe it is, so my problem is that I can transfer files from SD to internal but it doesn't work the other way around, I don't want to unlock my bootloader so is there anything else I can do? Thanks
any idea why the G4 is stuck at the Tmobile screen after:
Using the ES root browser and changing the file build.prop manually ( ro.lge.adoptable_storage=true), got the stuck tmobile starts creen
then running the adb commands as per the instructions, then also changing the permission using TWIRP
Nazdar Radku,
the solution is known feature of MM (adopt external storage), but biggest dissadvantage of this, is that you cannot use SD card in other devices anymore - not only in PC using some reader, but not even in other LG-ie your lg g4 broke....no way to get your data back. For some reason LG didnt include this functionality of MM yet. 2nd disadvantage is slowing down your device, as acces, R/W ops are quite slower. And I agree with googles approach to SD card - they want to "protect" users is foolish - you cannot protect stupid people, they should make it as default but keep option for advanced users to access storage as before KK for advanced user as it could be done with KK & LP using that media_rw grp hack.
coolmaster121 said:
any idea why the G4 is stuck at the Tmobile screen after:
Using the ES root browser and changing the file build.prop manually ( ro.lge.adoptable_storage=true), got the stuck tmobile starts creen
then running the adb commands as per the instructions, then also changing the permission using TWIRP
Click to expand...
Click to collapse
I don't think you should ever use a file browser to modify your build.prop. Something about the file being truncated. The modified build.prop ends up being a different size/structure or something along those lines. You should use a dedicated build.prop editor app, or adb commands only. If you had done that chances are you wouldn't have any problems.
IF you have a custom recovery you may be able to restore your original prop file through it in order to get it to boot.
rick09 said:
I don't think you should ever use a file browser to modify your build.prop. Something about the file being truncated. The modified build.prop ends up being a different size/structure or something along those lines. You should use a dedicated build.prop editor app, or adb commands only. If you had done that chances are you wouldn't have any problems.
IF you have a custom recovery you may be able to restore your original prop file through it in order to get it to boot.
Click to expand...
Click to collapse
I resolved the issue by basically booting back in to TWIRP, flashing the stock image again. (didnt loose any files as I didnt do a wipe)
Then ran through the commands from the previous post. But the "set" did not work for me. I then downloaded the build.prop file to the desktop using the "get" command and edited it with wordpad, saved and then sent over the edited file, followed the rest of the permissions and it worked fine then.
Good that you got it figured out but you did it the hard way! All you have to do is download https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor
Make a backup in the app just in case, then find the entry, make your changes, and reboot. All done on your device.
rick09 said:
Good that you got it figured out but you did it the hard way! All you have to do is download https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor
Make a backup in the app just in case, then find the entry, make your changes, and reboot. All done on your device.
Click to expand...
Click to collapse
Just tried, it, does not seem to work. it changes the value, says I need to restart, but after restart it goes back to false
Lg G4 SD card as internal storage
Can someone tell me a little more detail on this im new to this and trying to figure it out for myself what software do I need and how to do this to my 2 lg G4's

How to enable USB debugging on a broken screen using ADB (Permission & Root Issue)

How to enable USB debugging on a broken screen using ADB (Permission & Root Issue)
I have a Samsung Note 2 with a Broken screen/digitizer. So no haptic feedback's. Anyway the USB Debugging is already on and I could use the Remote tools like SideSync, Mobizen & other software's on my old machine before the screen broke. But now with new laptop I need to re-enable usb debugging or accept the fingerprint thing that pops up but I can't see what's on my screen. Also I don't know how to force this.
I've tried following several guides on how to enable through build.prop and adding lines - http://forum.xda-developers.com/showthread.php?t=2652564
but when trying to push the file back -
Code:
failed to copy c:\android\build.prop /system/build.prop : permission denied.
I've tried
Code:
adb remount
&
Code:
adb shell
su
mount -o remount, rw /system
and for both I get remount failed : operation not permitted.
I've tried using
Code:
adb usb & adb root
adb root shows error -- adbd cannot run as root in production builds.
adb usb - is just stuck nothing happens.
I've tried googling the above errors but any solutions don't seem to be working.
Reason why I use this phone is because I have kodi installed and everything was working up until now. I had wifi on the device - Do you think I could just enable or rename my wifi name to the same one? Problem would be what password I used. I still have my old router.
Any advice?
Thanks
I believe the devices isn't rooted. I tried using ADB Shell and typed in captials SU but got not found however typing it in lowercase nothing happens. just goes to the next line

ADB debugging not working on reboot

I am running lineageOS on a rooted firestick. I am using ADB on the Firestick to control it via Homeassistant. The problem is that the adb debugging does not automatically work on reboot. Everytime i reboot i have to manually go to the menu turn off the ADB debugging and then turn in back on. After doing this i am able to reconnect adb via network (i.e, on homeassistant).
I want to ask is there any way i can use a script to automatically do this on restart of firestick. I have tried creating a script in init.d with the following contents but it doesn't seem to work.
adb tcpip 5555
I have added the following line to build.prop but this doesn't seem to work too
service.adb.tcp.port=5555
On restart the adb debugging is on in the developer tools but somehow it doesn't connect (either to Homeassistant or to my laptop), what seems to make it work is toggling it off and then back on.
Have you tried persist, so that the setting sticks between reboots?
Code:
ADB shell setprop persist.adb.tcp.port 5555
Just tried it. Still not working after reboot.
I there any command i can use to toggle the adb debugging via a startup script or crontab?
symbiansucks said:
Just tried it. Still not working after reboot.
I there any command i can use to toggle the adb debugging via a startup script or crontab?
Click to expand...
Click to collapse
Be sure you are running the above command as root user. Type su at the shell prompt, then type whoami to confirm you are root.
I guess you could make a script to run the following on each boot if the above doesn't work:
Code:
settings put global adb_enabled 1
setprop service.adb.tcp.port 5555
stop adbd
start adbd
exit 0
But I don't think this should be necessary.
Finnzz said:
Be sure you are running the above command as root user. Type su at the shell prompt, then type whoami to confirm you are root.
I guess you could make a script to run the following on each boot if the above doesn't work:
Code:
settings put global adb_enabled 1
setprop service.adb.tcp.port 5555
stop adbd
start adbd
exit 0
But I don't think this should be necessary.
Click to expand...
Click to collapse
Thanks. yes the command was run as root. Can i ask you one more thing, whats the best place to put the startup scripts in? I have tried init.d/ directory but the scripts don't get loaded from there i believe?
I have set permissions to chmod 755 for the script.
You can follow this guide,
Android (LineageOS 16) Execute Script on Start Up | sqall's blog
but it seems like there should be a much easier way to make ADB tcpip persist between reboots. I don't want to steer you wrong. @Sus_i would know better, he uses your build of LineageOS, and may have a cleaner solution.

[QUESTION] Unlock 6x6 Pattern Project Elixir 3.7

When I boot after the update of the rom, unlock pattern shows as 3x3 dots. I'm coming from previous version with 6x6 pattern. System doesn't accept pattern because it's not the same. I can't change pattern grid size, not showing recovery with Google account and I had disabled Google function to find the device for privacy reasons.
ictecnics said:
When I boot after the update of the rom, unlock pattern shows as 3x3 dots. I'm coming from previous version with 6x6 pattern. System doesn't accept pattern because it's not the same. I can't change pattern grid size, not showing recovery with Google account and I had disabled Google function to find the device for privacy reasons.
Click to expand...
Click to collapse
Look here, this might be your solution to bypass the screen lock feature. But for sure you need access to your /data directory.
Uluru25 said:
Look here, this might be your solution to bypass the screen lock feature. But for sure you need access to your /data directory.
Click to expand...
Click to collapse
This is what I don't have: Access to data it shows encrypted folder names.
you can change the screen lock from adb cmd line, you just need to figure out the encoding.
Code:
adb shell locksettings set-pattern --old '17=CIOPQRST' '14789'
https://blog.alxu.ca/unlocking-large-pattern-encryption-in-twrp.html
alecxs said:
you can change the screen lock from adb cmd line, you just need to figure out the encoding.
Code:
adb shell locksettings set-pattern --old '17=CIOPQRST' '14789'
https://blog.alxu.ca/unlocking-large-pattern-encryption-in-twrp.html
Click to expand...
Click to collapse
adb devices shows "device unauthorized" when system has booted so I can't use adb shell. Before the update/pattern problem I tried several times to flash magisk via TWRP, process shows ended succesfully but phone remains unrooted. I've tried to unistall renaming magisk to uninstaller.zip and fails with a message that can't access to data. I don't know if with TWRP I can do anything but I would to flash again previous version of the ROM but it's not downloadable online.
you can authorize adb with a script that runs from overlay.d or from system/etc/init
Accessing my phone with a dead screen
So my phone screen connector was liquid damaged. No touch or display. It's an Essential Phone which supports HDMI output, however I can't unlock it because I don't see the lock screen on the monitor I just see a lock icon. I have...
forum.xda-developers.com
alecxs said:
you can authorize adb with a script that runs from overlay.d or from system/etc/init
Accessing my phone with a dead screen
So my phone screen connector was liquid damaged. No touch or display. It's an Essential Phone which supports HDMI output, however I can't unlock it because I don't see the lock screen on the monitor I just see a lock icon. I have...
forum.xda-developers.com
Click to expand...
Click to collapse
Let me post the message that I have when
When I boot the system and I try adb shell:
* daemon not running; starting now at tcp:5037
* daemon started successfully
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
When I try adb devices (also with system booted):
List of devices attached
1270c2f0 unauthorized
No sure if magisk it's installed properly.
to which partition you have copied RSA key to phone? where did you place the init script?
alecxs said:
to which partition you have copied RSA key to phone? where did you place the init script?
Click to expand...
Click to collapse
I don't know how to do it, I've to read link in the post with calm. I only flashed ROM zip's from recovery and Magisk zip/apk, never modified other things manually like modifiing files with adb shell. I'm discovering a lot of things to do via adb / fastboot due to my problem. I'm a GNU/Linux user but with basic knowledge of system scripts and structure.
use AIK to modify boot.img, you will see if there exist overlay.d directory or not (only if the boot.img is patched with Magisk)
otherwise mount /system(_root) rw and place the script there. I used the /cache partition for the key. It didn't work on my Samsung but there are many ways to authorize adb, it's all written in that thread.
I have moved the off-topic discussion to separate thread.
alecxs said:
use AIK to modify boot.img, you will see if there exist overlay.d directory or not (only if the boot.img is patched with Magisk)
otherwise mount /system(_root) rw and place the script there. I used the /cache partition for the key. It didn't work on my Samsung but there are many ways to authorize adb, it's all written in that thread.
Click to expand...
Click to collapse
Hi
Seems that I have overlay.d directory when unpacked boot.img. I have to put init.adbguard.rc and adbguard.sh in this directory?
According to https://blog.alxu.ca/unlocking-large-pattern-encryption-in-twrp.html and https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1388 I think that my 6x6 pattern was 123456<BHNT but when I try adb shell twrp decrypt '123456<BHNT' I have this warning:
/system/bin/sh: can't open BHNT: No such file or directory
TWRP cannot decrypt, you need to do this in Android. Don't forget the quotes, < is a special char for redirecting files.
ictecnics said:
Hi
Seems that I have overlay.d directory when unpacked boot.img. I have to put init.adbguard.rc and adbguard.sh in this directory?
Click to expand...
Click to collapse
I'm waiting to try this but I don't know if this is the procedure.
alecxs said:
TWRP cannot decrypt, you need to do this in Android. Don't forget the quotes, < is a special char for redirecting files.
Click to expand...
Click to collapse
In Android = system booted I think. Command returned the error with quotes. I tried to put \ before < symbol (also with quotes) and command decrypt in TWRP failed with code 6.
unpack the zip and you have the directory names where the .rc and the .sh file belong to. edit the path in shell script with the location of adb_keys file, if necessary. repack the boot.img, flash it, find your local adbkey.pub, rename it adb_keys and copy to proper location on phone (I used cache partition). if the script is executed successfully, adb_keys will renamed to adb_keys.bak. after second reboot adb is authorized.
alecxs said:
unpack the zip and you have the directory names where the .rc and the .sh file belong to. edit the path in shell script with the location of adb_keys file, if necessary. repack the boot.img, flash it, find your local adbkey.pub, rename it adb_keys and copy to proper location on phone (I used cache partition). if the script is executed successfully, adb_keys will renamed to adb_keys.bak. after second reboot adb is authorized.
Click to expand...
Click to collapse
I checked the directory structure where I extracted the AIK and I only see a sbin subdirectory inside overlay.d. The path is /home/..../AIK-Linux-v3.8-ALL/AIK-Linux. Once "unpackimg.sh" is run, "ramdisk" and "split_img" directories are created. Inside "ramdisk" there is only "overlay.d", ".backup" and the "init" file, inside "split_img" only files. About the adbkey.pub file so far I have only located an "adbkey" file (without .pub) inside /home/.../.android and the first line says "-----BEGIN PRIVATE KEY---- -". I honestly don't know what to put or where
ramdisk/overlay.d is the right directory for the .rc file, and the .sh file should placed ramdisk/overlay.d/sbin. I meant this zip I have linked two days ago, you obviously didn't read that thread:
alecxs said:
you can authorize adb with a script that runs from overlay.d or from system/etc/init
Accessing my phone with a dead screen
So my phone screen connector was liquid damaged. No touch or display. It's an Essential Phone which supports HDMI output, however I can't unlock it because I don't see the lock screen on the monitor I just see a lock icon. I have...
forum.xda-developers.com
Click to expand...
Click to collapse
if there is no adbkey.pub file in ~/.android directory, run adb with another phone so a file is created.
alecxs said:
ramdisk/overlay.d is the right directory for the .rc file, and the .sh file should placed ramdisk/overlay.d/sbin. I meant this zip I have linked two days ago, you obviously didn't read that thread:
if there is no adbkey.pub file in ~/.android directory, run adb with another phone so a file is created.
Click to expand...
Click to collapse
I connected another phone, enabled OEM debugging and OEM unlock and no adbkey.pub is created in ~/.android, it shows the same files as before: adb.5037 and adbkey. Ran adb shell, connected to other phone, no file created.

Categories

Resources