This might be a dumb question, but I'm trying to connect a tablet so I can make an app in Android Studio. All the guides I see (https://developer.android.com/studio/command-line/adb.html#wireless) tells me to go to the command line and use adb commands. Where do I have to navigate to to use that command?
I've gone to C:/Users/myusername/AppData/Local/Android/sdk/tools
from there I've tried navigating to other directories and try to use the adb command but it won't let me. I don't know which directory I have to navigate to to use the adb commands, but I believe it's somewhere around where I'm looking, but I can't exactly find it.
C:\Users\username\AppData\Local\Android\sdk\platform-tools
from there right click and open command window here and then continue as described here: https://stackoverflow.com/a/3623727/3838663
Related
I am new to Android Open Source Project (AOSP) and trying to build my own version of Android OS. Currently, I am trying to learn to modify the codes of Android 10 and trying to find whether it works or not. To do that, I have firstly added a few codes in "LocationManager" class in the framework. I just added some Log code to output some message in the code like in the below:
Log.i(TAG,"Lets see");
After that, I have built the code using the following code:
. build/envsetup.sh
lunch sdk-eng aosp_x86-eng
make sdk
What should be my next step if I want to see whether my changes works or not in an Genymotion emulator device? I have been trying to understand some online sources but not understanding them totally. I have also been trying to use "adb sync" command and finding out the emulator not working. I have also pushed some files as well but no result. I would be glad if someone can direct me in the right path. Thanks in advance for your kind assistance. Have a good day.
Building the system image and then trying it out would be the ideal way, but here's a hacky approach: Replace xxx with the actual path intermediate.
adb root && adb remount
adb push out\target\product\xxx\system\framework\services.jar /system/framework/
adb push out\target\product\xxx\system\framework\services.jar.prof /system/framework
adb push out\target\product\xxx\system\framework\oat\arm64\services.art /system/framework/oat/arm64/
adb push out\target\product\xxx\system\framework\oat\arm64\services.odex /system/framework/oat/arm64/
adb push out\target\product\xxx\system\framework\oat\arm64\services.vdex /system/framework/oat/arm64/
adb reboot
Does anyone know how to auto-run a command or a script in GNURoot Debian when opening a new terminal window?
I'm trying to make make an SSH server run automatically when I open GNURoot,
so right now I'm manually typing:
service dropbear start
I found an "Initial Command" option in the GNURoot app preferences and typed the command in there, but it doesn't seem to do anything. Even worse it seems to make the new terminal window to open up in a non-working state where I can't run any command.
thanks!
First root your device. Then find the file com...xml in /data/data/com.gnuroot.debian/shared_prefs/, change its initialcommand value to empty. Then your gnuroot should launch ok. I just met this question and checked androidterm source code to find this solution.
I am new to Android development. I have been going through the tutorials.
I would like to know which is the right way to debug / log an application during its execution. I am guessing I should be able to execute my application directly on my android device and be able to view a log or so to catch runtime errors and logs?
How could I accomplish this ?
I am using this to install the application on my phone
adb install <path to apk>
p.s. I am sure this question might seem like something I should already know. But I could not figure it out :) Hence I am here :)
You can build on the command line with ant. See this guide.
& install it by using adb on the command line.
adb install MyApp.apk
path of apk with file extension
update
for getting logcat or crash report
do this way:
adb logcat
note: make sure only one device is connected to adb bridge
for filtering:
check this & this.
repeatedly my LogCat in Eclipse seems to stuck.
reproducible when creating/modifying a filter.
switching to DDMS and selecting my device doesn't help as suggested in other answers in stackoverflow.
Only a restart of eclipse helps, but this is not usable that way.
Any hints ?
Yes there is a smart way for doing this, what you need to do is to refresh your debug bridge, most of the time ddms loose conncetion hence logs are not shown. Just perform the following when this happenes next.
Open CMD,
Navigate to Android SDK, Platform Tools
Write ADB KILL-SERVER, enter, ADB START-SERVER
this will open debug bridge in new port, after doing this just open ddms and select your device
I have a strange problem where everytime I run adb from command line (devices command or pull, or uninstall etc), the device goes offline but if I now go into DDMS in eclipse and reset ADB, it comes back online. If I am running the game from within eclipse, it runs (by which I mean my Eclipse DDMS is able to use adb just fine) but from command line, doing anything adb-related brings the device offline and the only way to bring it back online is adb reset from DDMS inside eclipse. Effectively, I cannot do anything adb-related through command line.
I have tried solutions like switch the debug option of device on and off, adb-kill-server and then start-server, android 51 rules file, and more weirder solutions like change cable, change port etc. Many of those bring the device online, but whenever I run a adb command from the terminal, poof! device is back offline.
I have been facing this for over a month now and I have done all research I could, on google and on stackoverflow but nothing have I found which could address this specific issue.
Any help is appreciated. Thanks.
The problem is that you are having two version of adb in your computer.
Remove adb.exe,AdbWinApi.dll and AdbWinUsbApi from C:/Windows and everything will be fine.