[Q] Access local adb from android terminal - General Questions and Answers

I want to use adb logcat from my device via the terminal. Because it seems to be the only way to access all logs without root. I think Clockworkmod found a way in the Helium Backup app

Related

[Q] adb backup

I was looking through the adb options the other day and noticed the "adb backup" option. This seems to grab all the files you need for a full app backup (from the console! yay!). I can use adb shell just fine but adb backup doesn't work. It tells me it can't connect. Anyone know why that is?

[APP]MTK ADB, Use ADB directly on your device

MTK ADB gets you a privileged shell at the push of a button, allowing you to run commands directly on your MediaTek device. Some might wonder if rooting hasn't already solved this. Firstly, root access is persisted by modifying system files. When the real binary gets substituted by that of the root app's, if the device is rebooted, the init daemon running as root runs the binary giving the app root. What's wrong with this? If you have “purist” tendencies, you probably would want your phone as stock as possible, or at least with your permission. Sadly, not only binaries are dumped. Extra temp files, logs and helper binaries too, that manually removing them is like dancing on floor of pins and a prick means a brick. Not only that, consider yourself blocked from updates. If you're unfortunate enough, an update could result in bricking your phone as the files supposed to be present had been changed. This is more common than you think. MTK ADB makes no changes to your files whatsoever. Also, there's the matter of security/privacy. Root apps tend to always do something in the background. Either sneaking in a new app, or phoning home with your private data, or both. MTK ADB doesn't steal your data. The Internet permission is for Telnet, etc. On some devices, MTK ADB can get root access (depending on manufacturer) while all devices can get shell access. You just have to check which yours belongs.
IMPORTANT
•Refresh before (and after) clicking Start to check ADB status.
•Supports all ADB functionality. Just run "adb <command>" eg "adb pull" (without quotes).
•The minimalist terminal is for those who haven't any. Feel free to use your regular terminal (I use Terminal IDE) and keyboard (Hacker's Keyboard is really good). Just run "adb shell" on it.
•You can connect to your device using another phone, PC, or anything with a terminal and in the same network by running "adb connect IP_address".
•If you get a " device offline" error, disable and enable USB debugging. Next time connect to the network before running the app.
http://www.youtube.com/watch?v=_bt8BVaDCf0
http://slaycode.WordPress.com
Bump
Proof:
http://forum.xda-developers.com/gen...iled-error-t3191150/post62611445#post62611445
More Proof:
http://forum.xda-developers.com/fire-phone/general/root-fire-phone-supersu-t3105546/page10
Proof:
http://forum.xda-developers.com/gen...iled-error-t3191150/post62611445#post62611445
More Proof:
http://forum.xda-developers.com/fire-phone/general/root-fire-phone-supersu-t3105546/page10
When I open the app it opens but it doesn't work when I enter the commands and moreover the app when I try to start the adb it says unsupported device
Am using infinix hot 4 pro running NOUGAT xos 2.2
LordFME said:
MTK ADB gets you a privileged shell at the push of a button, allowing you to run commands directly on your MediaTek device. Some might wonder if rooting hasn't already solved this. Firstly, root access is persisted by modifying system files. When the real binary gets substituted by that of the root app's, if the device is rebooted, the init daemon running as root runs the binary giving the app root. What's wrong with this? If you have “purist” tendencies, you probably would want your phone as stock as possible, or at least with your permission. Sadly, not only binaries are dumped. Extra temp files, logs and helper binaries too, that manually removing them is like dancing on floor of pins and a prick means a brick. Not only that, consider yourself blocked from updates. If you're unfortunate enough, an update could result in bricking your phone as the files supposed to be present had been changed. This is more common than you think. MTK ADB makes no changes to your files whatsoever. Also, there's the matter of security/privacy. Root apps tend to always do something in the background. Either sneaking in a new app, or phoning home with your private data, or both. MTK ADB doesn't steal your data. The Internet permission is for Telnet, etc. On some devices, MTK ADB can get root access (depending on manufacturer) while all devices can get shell access. You just have to check which yours belongs.
IMPORTANT
•Refresh before (and after) clicking Start to check ADB status.
•Supports all ADB functionality. Just run "adb <command>" eg "adb pull" (without quotes).
•The minimalist terminal is for those who haven't any. Feel free to use your regular terminal (I use Terminal IDE) and keyboard (Hacker's Keyboard is really good). Just run "adb shell" on it.
•You can connect to your device using another phone, PC, or anything with a terminal and in the same network by running "adb connect IP_address".
•If you get a " device offline" error, disable and enable USB debugging. Next time connect to the network before running the app.
http://slaycode.WordPress.com
Click to expand...
Click to collapse
Are you familiar with an APK that utilizes mtk_bypass to directly flash firmware to device.
I'm looking for an APK that basically does what sp flash tool does because I don't have a computer.

Android 4.1.1 - Files executed with an ADB connection

Hi.
I'm trying to control the access to ADB on Android 4.1.1. I already have root access to the device and now I'm trying to execute some access control code at the start of an ADB connection.
Are there any scripts that are executed with the "adb shell" access?
Thank you!

Is it possible to do adb operations from android phone itself, without a computer?

I have seen discussions online such as this:
https://stackoverflow.com/questions/12634280/what-is-a-adb-daemon
If I understand the answers give there correctly, whenever I use an adb command on my computer connected to a smartphone, the reason it does anything is because there is a background process adbd, the adb daemon, running on the smartphone. Everything I see on the computer screen when I issue an adb command is the result returned by the adbd daemon.
a) Is this correct? Is this how adb is supposed to work?
b) If it is correct, is there any way to programmatically enable/disable/re-enable the adbd process? Can I programmatically interact with adbd at all (either through Java or NDK)? Can I use adbd from the android phone itself and perform actions performed using adb, without using a computer?
I am hoping to do this on a non rooted device, but if not, any kind of device will do.
mahaju said:
I have seen discussions online such as this:
https://stackoverflow.com/questions/12634280/what-is-a-adb-daemon
If I understand the answers give there correctly, whenever I use an adb command on my computer connected to a smartphone, the reason it does anything is because there is a background process adbd, the adb daemon, running on the smartphone. Everything I see on the computer screen when I issue an adb command is the result returned by the adbd daemon.
a) Is this correct? Is this how adb is supposed to work?
b) If it is correct, is there any way to programmatically enable/disable/re-enable the adbd process? Can I programmatically interact with adbd at all (either through Java or NDK)? Can I use adbd from the android phone itself and perform actions performed using adb, without using a computer?
I am hoping to do this on a non rooted device, but if not, any kind of device will do.
Click to expand...
Click to collapse
Yes, but it requires having a rooted device and the terminal emulator app. Or you can install TWRP and use the terminal emulator that is built into TWRP.
Sent from my SM-S767VL using Tapatalk
reply to answer
Droidriven said:
Yes, but it requires having a rooted device and the terminal emulator app. Or you can install TWRP and use the terminal emulator that is built into TWRP.
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
I have an old rooted samsung phone with android 4.2.2
Is there any sample code on how I can interact with the adbd daemon? In the terminal emulator if I type "adb shell" it says starting daemon but then it says device not found. how would I do some basic stuff (like take a screen shot using "adb shell screencap" for example? Can I interact with it programmatically from java or ndk?
mahaju said:
I have an old rooted samsung phone with android 4.2.2
Is there any sample code on how I can interact with the adbd daemon? In the terminal emulator if I type "adb shell" it says starting daemon but then it says device not found. how would I do some basic stuff (like take a screen shot using "adb shell screencap" for example? Can I interact with it programmatically from java or ndk?
Click to expand...
Click to collapse
When using terminal emulator, it uses the same commands as adb shell(not the standard adb), but you remove "adb shell" from the commands. For example, in terminal emulator, it is:
reboot recovery
Instead of:
adb reboot recovery
Or
adb shell reboot recovery
Also, before running your commands in terminal emulator, you need to use the su command by typing:
su (then press enter, grant the app superuser/root permissions)
Then you can run the rest of your commands.
Sent from my SM-S767VL using Tapatalk

How to use full adb command set in TWRP recovery mode?

My screen broke and I can't access the regular menus to enable adb debug mode. I can get into TWRP recovery or fastboot/odin mode which does enable MTP, so I've been able to access files on the data partition. I want to be able to access my app data though. If I can use adb backup I can make a backup and mount it offline or restore to an identical model and get access to my app data that way, but adb seems to not be enabled in TWRP. TWRP has a pretty simple menu so I could maybe fudge my way through by blind clicking, but even looking at a working model I can't find any menu option to enable adb in TWRP 3.1.1-0. Do I need a different version? The closest I can find is to enable adb sideload, but that's limited to only sideload and it doesn't work anyway. The device always shows as "offline". Seems my PC needs to be included in a trusted devices file. I've seen some clever instructions on overwriting the file containing trusted devices, but it requires the system partition is mounted, which if I could do that I'd have access to the app data anyways.
Is there some way to get access to this data? I looked at apps like vysor which work as an external display for the device which could allow me to work around the broken screen, but that seems to require adb debug is enabled, which it isn't.
Only if ADB got successfully enabled on a phone you can run Android shell-commands via ADB when phone is booted into recovery mode.

Categories

Resources