Using ADB - General Questions and Answers

Hi All,
I'd like to know how to use ADB to pull files off a Sony Xperia Z2 convertly when it is plugged into a PC.
I am suspecting my son is misbehaving and he is behaving very coy.
Would is also be possible to install some spy software using ADB so that I can more accurately confirm my suspicions?
Thank you in advance.

saagark said:
Hi All,
I'd like to know how to use ADB to pull files off a Sony Xperia Z2 convertly when it is plugged into a PC.
I am suspecting my son is misbehaving and he is behaving very coy.
Would is also be possible to install some spy software using ADB so that I can more accurately confirm my suspicions?
Thank you in advance.
Click to expand...
Click to collapse
First of all, you should talk to your son about this. Spying and hacking a phone won't solve any parenting issues.
And now to answer your question: Probably not.
If the phone is locked and USB Debugging is disabled you cannot use ADB at all. You have to first enable USB debugging, but to be able to do that you need to know the phone's password.
You could, however, boot into recovery mode to unconditionally activate ADB, but in most cases when you try to do anything the phone will say that you're unauthorized and not allow you to do anything. To authorize ADB you, once again, need the phone's password.
If you do get ADB to work and get it to authorize here are the commands you need:
Pulling files:
Code:
adb pull /path/to/file
Installing an app:
Code:
adb install /path/to/app/appFileName.apk
There are more methods for what you need that use fastboot, hboot, bootloader unlocking, JTAG etc. but they are a lot harder to do than to talk a problem out with your son.

Related

#1 newb has troubble with first time custom rom

Hi Friends, is the title says I have a problem getting into the custom rom think on my old z3 6603 .291? 6.0.1 i think android...
now whats my problem?
I am despered already! spent almost 2 full days trying around without luck.
little off topic:
I did custom roms a few years ago and it worked pretty well with a step by step tutorial.
now i started to read around and try to update the Z3 to android 7Nougat or at least GoogleStylev1 because the standard/stock rom is sooo full with s**t i never really used and pure clean 5.1 from my mothers 60€ Chinamobile is fast and has all i need...
the z3 is much slower than it could i belive and the batterylife should be longer(new replaced battery >3000mAh, its almost like my new s7edge, wich i have to recharge every 3 days, the sony almost every night...)
back to topic:
i read so many different ways to do the update and everything is super complicated and at some point it doesn´t work out like in the tutorials. stupiiiid..
for example: hold power+vol down to enter recoverymode utility, i tried it so many times but my z3 is booting as usual. somone mentioned to let power button go as soon the led blinks or the vibration appers. sad: my screen is replaced and as i replaced it by myself i disconnected the vibration and glued the backplate on ... sh**
maybe someone can tell me how many secods to wait until let the power button go or other ways of erasing the system before i continue with linage install.
what i have:
win7 pc ( lack of updates and stuff but i already got the insane big android studio and somehow installed the usb driveds as it seems but thats all i still have missing drivers as i connect the phone trough flash-tool for example. xperia companion detects the phone most of the time..
so i went to my mac mini os x..
similar but little better: i can detect the device when i connect flashtool it says device connected in flash mode, good!?
i downloaded:
flashtool-driver
android tools
flashtool 0.92.1mac
lineage14.1 xkeita
twrp 3.1.1 xkierta
sr1 super su v2.82
D6603 23.5.A.0.291_kernel.zip
D6603 23.5.A.0.575_kernel.zip
root.rar
I guess i first have to get a little XDA developer university degree to update a sony mobile device hummmm???
sorry i am stressed out, please could somebody take a newb like me by hand and guide trough this piece of complicated labyrinth?
I want to give this phone to my gf for the next few years and i whink a clean slim and stable system would be much more pleasure in future than what i have now.
its a nice phone...
thanks
forgot to mention, usb debugging and developer mode are activated on the phone.. when i type in the *#7384whatever code it says: bootload activation: yes does it mean its ready to be activated or is it already active?
please its so many steps and tutorials i tried i am comletely confused
HI, glad to hear you're trying to install my rom
Since you're already on 6.0.1 all you need to do is unlock your bootloader before flashing the custom rom. To do so please refer to this page which will provide all the help you need for this step https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ (before doing this, make a backup of your internal storage because it will be wiped after unlocking the bootloader)
After unlocking your bootloader, let's proceed to installing the recovery. To do this unpack the contents from the TWRP zip and copy recovery.img to the folder where you have fastboot.exe and run this command from Windows command line
Code:
fastboot flash FOTAKernel recovery.img
Now for our final step, boot into recovery by using the power on+volume down combo, connect your phone to the computer and copy the LineageOS zip to your internal storage. Before flashing the rom remember to wipe system/data/cache/dalvik. And you're all good to go.
thanks for replying xkeita,
i did this step until the point where i got a code for bootloader.
after this they tell me to go to connect my phone to the pc and to do what?
A. Install the Android SDK and the device drivers (what drivers? i have mac) i have android studio on my mac, but i have no clue how it works.
b. If you’re running OSX or Linux, you are not required to install any additional drivers. (check!)
2. On your device, turn on USB debugging by going to Settings > Developer options and click to enable USB debugging. (check!)
B. Connect to Fastboot
1. Turn off your Xperia™ Z3.
2. Connect a USB-cable to your computer.
3. On your Xperia™ Z3, press the Volume up button at the same time as you connect the other end of the USB-cable.
(check!) i did it...
4. When your device is connected, open a command window on your computer and go to the platform-tools folder within the Android SDK folder.
5. Enter the following command: fastboot devices
here i am struggeling... how to do this on mac? i have no directories and no idea how to proceed, please help me!
xdan00b#1 said:
thanks for replying xkeita,
i did this step until the point where i got a code for bootloader.
after this they tell me to go to connect my phone to the pc and to do what?
A. Install the Android SDK and the device drivers (what drivers? i have mac) i have android studio on my mac, but i have no clue how it works.
b. If you’re running OSX or Linux, you are not required to install any additional drivers. (check!)
2. On your device, turn on USB debugging by going to Settings > Developer options and click to enable USB debugging. (check!)
B. Connect to Fastboot
1. Turn off your Xperia™ Z3.
2. Connect a USB-cable to your computer.
3. On your Xperia™ Z3, press the Volume up button at the same time as you connect the other end of the USB-cable.
(check!) i did it...
4. When your device is connected, open a command window on your computer and go to the platform-tools folder within the Android SDK folder.
5. Enter the following command: fastboot devices
here i am struggeling... how to do this on mac? i have no directories and no idea how to proceed, please help me!
Click to expand...
Click to collapse
Extract this zip https://forum.xda-developers.com/attachment.php?attachmentid=1396782&d=1350078941 and open terminal in the directory where you have unpacked the zip, then you can run the command directly
Mac-mini:android "XXXXX"$ fastboot devices
-bash: fastboot: command not found
should any software run in the background like xperiacompanion or flash-tool? i managed to open the terminal in the android directory but no luck...
this z3 is a tough piece...
thanks again for your effort to help me out, maybe you or somebody else can help me trough this. I have the feeling that we can crack this device together, it cant be that compliceted, can it?
nobody has Ideas as what could be going wrong in my case?
i was thinking XdaDevelopers is a big international site, and z3 is a mainstream phone, why the heck is there nobody to guide me trough this
remember how it was when you did your first Rom experiances, difficult, many different new steps, after foing it couple of times its getting easier, like everything in life.
please somebody sacrifice a litte time on me and my priject, it wont be my last for sure but i need a little help in the beginning, xperia z3 seems to be much more complicated than my old (p880LG 4xhd or xpezia z from 2012)
xkeita said:
Extract this zip https://forum.xda-developers.com/attachment.php?attachmentid=1396782&d=1350078941 and open terminal in the directory where you have unpacked the zip, then you can run the command directly
Click to expand...
Click to collapse
do i have to extract on my mac, or onto the phone? i extracted into my desktop and it didnt work ether in desktop/android/
i am going to try out to extract onto the cellphones memory and to run fastboot line from there
should i record a video how i do all my steps and somebody can tell me what im doing wrong?
eeehh.. official sony webpage is so flapsy and unprecise when it comes to bootloader...
bump
did i say something wrong or..?
...
You should use windows instead of mac it's better for unlocking your bootloader then follow the sony unlock bootloader website exactly don't skip any steps
hello omar, and thanks for reply!
my problem is to unlock the bootlocker on this phone.. i cant get my phone bpptloader unlocked and i dont know why.. its the staps on this website that dont work. i will take time on weekend maybe and try again..
piece of crap phone , replaced screed and back and my girlfriend drops it once and everything is broken again many years ago sony was better. they should make walkmans again.. casette walkmans

Cracked screen, is there anyway to get my files transferred?

Title. The charging etc still works but no display. But if I plug into pc, the default is charging, I can't select the transfer mode. ADB/developer mode is enabled
Phone is rooted. If there is any way to get to my photos/files I'd greatly appreciate any advice. Am planning to send phone for repair to Oneplus but they wipe data.
Try this if you have adb access.
https://github.com/Genymobile/scrcpy
Kinghacker said:
Try this if you have adb access.
https://github.com/Genymobile/scrcpy
Click to expand...
Click to collapse
Tried launching it. I'm 99% sure I enabled usb debugging and pretty sure I enabled adb. But I still get "device unauthorized" when I try to access the adb shell
Leeoku said:
Tried launching it. I'm 99% sure I enabled usb debugging and pretty sure I enabled adb. But I still get "device unauthorized" when I try to access the adb shell
Click to expand...
Click to collapse
Adb needs Authorization. You have to guess and click "Allow" if touch is working.
Adb works only if you have previously authorised the pc. If you have authorised some pc(even OS change matters) before, you can try using that.
Sadly our device doesn't support DisplayPort over type-c i.e. type -c to hdmi.
Do you have TWRP installed ? If yes, you can try boot into TWRP and connect your phone to your PC.
Azhar_Fahry said:
Do you have TWRP installed ? If yes, you can try boot into TWRP and connect your phone to your PC.
Click to expand...
Click to collapse
Do have TWRP but the screen doesn't even power on so I can't even see the screen when I boot into it... O well I had most of the stuff backed up rest will be an expensive lesson

LEO-BX9 No USB Debug option ... Help?

#1- I have the LEO-BX9 and can not get it to connect to a computer via USB regardless what I try. The computer does not even acknowledge anything is connected when I plug in the charger with the watch. I have tested the charging cable and every connection is working fine (no broken wire or issues detected). I've tried on multiple computers with multiple OS and nothing.
#2- There is no option in Developer Options for "Debug by usb" it only has Debug by wifi or bluetooth.
I have been able to connect adb via wifi, and can send commands, but when i reboot into bootloader, it obviously loses wifi connectivity and I cant send any fastboot commands, and can not communicate at all with the watch. As such, I can not unlock or do anything.
I appreciate any help you can offer and thank you in advance for your awesomenes!
I guess my ultimate question is, How do I get a custom ROM on this watch without being able to connect while in stock bootload? Can I push a file over with ADB and use it somehow to install the custom ROM as a fake update or recovery. Can i unlock somehow. Anything? I beg help from you oh wise and kind xda'ers
extremegraphic said:
I guess my ultimate question is, How do I get a custom ROM on this watch without being able to connect while in stock bootload? Can I push a file over with ADB and use it somehow to install the custom ROM as a fake update or recovery. Can i unlock somehow. Anything? I beg help from you oh wise and kind xda'ers
Click to expand...
Click to collapse
change charger to a different one
Mira444 said:
change charger to a different one
Click to expand...
Click to collapse
Did that also... Still no option for USB debug and watch is not recognized by any device connected by usb.
Just looking for some way to load any custom ROM without usb. Anyone?

Huge problem with ADB (Doogee S55)

Hi guys,
I have a terrible problem with my father's DOOGEE S55.
The phone won't start, but recovery mode does.
So I can access recovery, but as USB debug was never activated on the phone (and the phone is not rooted of course) I can do almost nothing with ADB.
I can just activate "apply update from ADB" and ADB sees the phone as "sideload", but of course once i try to install the ZIP file of the firmware, nothing happens as USB debug is not activated.
In all other cases ADB cannot do anything as the device is always "unautorized".
So the question is: what can I do?
Thank you all in advance for your help mates!
Hint: Add DOOGEE S55 to this thread's title thus mainly owners of such phone get addressed.
The 1st thing of all things a serious owner of a mobile device is to enable ADB to have the door to the device's Android open in case it's necessary. My guess is you're out of luck.
jwoegerbauer said:
Hint: Add DOOGEE S55 to this thread's title thus mainly owners of such phone get addressed.
The 1st thing of all things a serious owner of a mobile device is to enable ADB to have the door to the device's Android open in case it's necessary. My guess is you're out of luck.
Click to expand...
Click to collapse
I know but this is my father's phone he does not know how to enable usb debugging of corse..
Believe it or not, that to clone phone's user-data both ADB must got successfully enabled on phone and additonally phone's Android must got successfully rooted: there is no way around it.

Samsung M30s Not Recognized By PC Via USB

Hello Everyone..!
I Am Using Samsung M30s [Rooted]
[Please Read Patiently]​4 To 5 Months Ago My Phone MTP Stopped Working.
Still Finding Solutions.
My Device Can't Be Recognized As A MTP Device By Any PC Via USB.
I Tried Many Cables And Many PCs.
My Phone Doesn't Show Fast Charging Since It Started Not Recognized By PC.
I Watched Almost All YouTube Videos About This Issue None Of Them Worked.
I Think It Would Be Charging Port Problem But I Am So Confused.
Please Help And Suggest Me Someting.
Whenever I Restart Or Switch-Off From Home Button My Root Getting Lost.
I Have To Click Factory Reset To Get Into Recovery In Order To Restore Root.
[I TRIED 100+ METHODS. I DID EVERYTHING BUT NO LEAD]
Thank You.!​
In Android settings enable USB-MTP mode if not done yet.
BTW: If in phone's USB-options PTP is listed but not MTP, then maybe what Android may refer to as "File transfer" is the same as MTP.
Thanks For Your Reply But Sadly It Is Not The Problem.
As I Mentioned Above I Explored Almost All YouTube Videos On Related Topic.
This Is Not The Problem.
BTW Thanks...
cursedhawk said:
Hello Everyone..!
I Am Using Samsung M30s [Rooted]
[Please Read Patiently]​4 To 5 Months Ago My Phone MTP Stopped Working.
Still Finding Solutions.
My Device Can't Be Recognized As A MTP Device By Any PC Via USB.
I Tried Many Cables And Many PCs.
My Phone Doesn't Show Fast Charging Since It Started Not Recognized By PC.
I Watched Almost All YouTube Videos About This Issue None Of Them Worked.
I Think It Would Be Charging Port Problem But I Am So Confused.
Please Help And Suggest Me Someting.
Whenever I Restart Or Switch-Off From Home Button My Root Getting Lost.
I Have To Click Factory Reset To Get Into Recovery In Order To Restore Root.
[I TRIED 100+ METHODS. I DID EVERYTHING BUT NO LEAD]
Thank You.!​
Click to expand...
Click to collapse
The USB issues might be a hardware problem, the port itself might be faulty or maybe the soldering around the pins where it connects to your main board may need re-flowing due to breakdown from heat. Have you tried using wireless methods of transferring files between your device and PC?
But I don't see how that has anything to do with your device losing root. These issues may or may not be related.
Is your bootloader unlocked(OEM unlock)?
Do you have stock recovery or custom recovery?
What method did you use to root the device?
Hello Brother Thank You For Your Reply...
And I Will Sure Check Out My Charging Pin.
I Thought It Could Be
Soon If I Discover Something I'll Tell You
And One More Thing. I Used A Method From YouTube Channel AndroidHowTo 10 Months Ago.
I Have TWRP Custom Recovery.(But I Can't Boot Into It) [Because Of This USB Problem]
I Have Root.
Bootloader Unlocked.
cursedhawk said:
Hello Brother Thank You For Your Reply...
And I Will Sure Check Out My Charging Pin.
I Thought It Could Be
Soon If I Discover Something I'll Tell You
And One More Thing. I Used A Method From YouTube Channel AndroidHowTo 10 Months Ago.
I Have TWRP Custom Recovery.(But I Can't Boot Into It) [Because Of This USB Problem]
I Have Root.
Bootloader Unlocked.
Click to expand...
Click to collapse
When you installed TWRP, what method did you use to install it? Which rooting method did you use, SuperSu or Magisk? Did your rooting method include flashing DM-verity?
Can you give me a link to the specific guide/video that you followed?
Install a terminal emulator app on the device, open the app and type the following commands:
su (press enter, grant superuser permission if prompted)
Then type:
reboot recovery
If you are properly rooted, have granted su permission to terminal emulator and if TWRP is properly installed in the correct partition, this should boot you into TWRP.
You may have overlooked a step or you may have missed a detail somewhere in your rooting method. Or you may have used an incorrect method or file for your specific device. Your device might require something that wasn't in the guide that you followed.
Off the top of my head, those are possible causes of your issue, I may think of others, if I do, I'll post them here.
Droidriven said:
When you installed TWRP, what method did you use to install it? Which rooting method did you use, SuperSu or Magisk? Did your rooting method include flashing DM-verity?
Can you give me a link to the specific guide/video that you followed?
Install a terminal emulator app on the device, open the app and type the following commands:
su (press enter, grant superuser permission if prompted)
Then type:
reboot recovery
If you are properly rooted, have granted su permission to terminal emulator and if TWRP is properly installed in the correct partition, this should boot you into TWRP.
You may have overlooked a step or you may have missed a detail somewhere in your rooting method. Or you may have used an incorrect method or file for your specific device. Your device might require something that wasn't in the guide that you followed.
Off the top of my head, those are possible causes of your issue, I may think of others, if I do, I'll post them here.
Click to expand...
Click to collapse
The Video Guide I Followed While Rooting.
I Did All The Guy Did.
The Method You Told That Using "reboot recovery" Code In Terminal Emulator Is Booting As Usual Like ReBooting.
Doesn't Seems TWRP Exists
Thank You For Your Help..!
And I Wanted To Change The Port But When I Go To Nearby Service Centers They Are Not Seem To Be Right...!
They Told Me To Reset But I Can't Do It.
Whenever I Click On Factory Resett It Just Reboots
I Can't Reset My Phone.
But The Service Guys May Not Know About The Problem
I Have To Send It To A Samsung Repair Center

Categories

Resources