search filename over adb shell possible - LineageOS News & Discussion

Hello forum
does adb shell support searching filenames (of insgtalled APKs)?
Thank you very much for any feedback!
Joe
PS
filename-strings would be even better, for the case, a user cannot remember the entire filename =

Related

Replacing HTC apps with ANDROID ones

Hi,
After reading this thread and learning that you CAN replace HTC's apps with stock Android ones, I have started messing around to see what other apps I can / should change. I'll use this thread as kind of a log, so if I mess things up I can come back and see where I went wrong. Fellow noobs can surely use it too!
I am using SDK in Ubuntu, but the procedure should be pretty similar in Windows.
First, follow the Unlockr's method to root your phone.
Download a stock Android rom and extract its /system/apps folder inside /sdk/tools. I named the folder "Apps-stock
Check if Ubuntu recognises your phone:
Code:
./fastboot devices
Load the recovery image and mount the system:
Code:
./fastboot boot cm-hero-recovery.img
./adb shell mount /system
Replacing HTC's calendar:
Code:
./adb shell rm /system/app/Calendar.apk
./adb shell rm /system/app/Calendar.odex
./adb push Apps-stock/Calendar.apk /system/app/
I'll edit the thread, add details as I go on
Nice one!
Please keep us informed!
Thanks for this thread.
Post moved to a more appropriate topic :
http://forum.xda-developers.com/showthread.php?p=4477971#post4477971
Thanks for setting this thread up!
Firstly, you should probably say in the first post that everyone should do a Nandroid backup first - it's saved my bacon. Might be an idea to link to the files, too?
Second, I've got a problem trying to run this method. I removed the original calendar.apk and .odex without any problems, and copied the new one over, but on rebooting, it wasn't in the list of applications anywhere. I browsed there in Astro and opened the file, which gave me an option to install it - which then gave an error of "Calendar could not be installed on this device".
I'm running the MoDaCo 2.1 custom ROM and using the calendar.apk from this thread.
Thanks for your time!
fastboot
can you tell me where this fastboot command is located? I am using Ubuntu too, but can not find fastboot. What is it for by the way?
dragonflyFZX said:
can you tell me where this fastboot command is located? I am using Ubuntu too, but can not find fastboot. What is it for by the way?
Click to expand...
Click to collapse
fastboot and adb are executables you get from the Android SDK - see here.
This thread does require your phone to be rooted, though, which would require you to have already used adb at least once....
frandavid100 said:
........
Replacing HTC's calendar:
Code:
./adb shell rm /system/app/Calendar.apk
./adb shell rm /system/app/Calendar.odex
./adb push Apps-stock/Calendar.apk /system/app/
I'll edit the thread, add details as I go on
Click to expand...
Click to collapse
how about simply replacing those files using a file explorer (like linda)? possible, or would that screw up my system?

[Q] how to use adb shell and put code in shell window?

I am so close to use Tmobile GT as a phone but one hurdle is i don't know how to use hex editor or adb shell method. Please give advice me on this, if it's already answer please give the link for the thread. Thanks

ADB Pull Error

I am getting the following error when I try to pull a TWRP backup from my Nexus 4. Can anyone please help?
Code:
remote object '/sdcard/TWRP' does not exist
It doesn't exist there. /sdcard/ is really a symlink. The actual location is /data/media/0/TWRP, but try /storage/emulated/0/TWRP as well.
Next time type "adb shell" to go into the phone, then type:
find / -type d -iname twrp
this will search the entire phone for folders with the name TWRP and list their path.
/ is the root folder of the phone to search in
-type d means search for folders only, leave it out if you want to search for file names
-iname means to search for terms case insensitive
sent from xda premium app
Thanks for the help eksasol. I've tried to pull many different paths and they all return the same remote object does not exist error. I've even tried sudo adb pull, with the same result. I've tried this, find / -type d -iname twrp but, all I get is Permission denied. If anyone else has got some ideas I'd be happy to hear them. Thanks. :good:
If you are using Ubuntu or linux, typing 'find' only search what is in your PC. You get permission denied because you want to search in a root directly that required root permission.
To search for files in your phone, you need to log into your phone by typing "adb shell". TWRP give you root by default, then you can use the find command.
Since you have root by default in TWRP, you don't need to use sudo, also Android do not have "sudo" installed. The correct way to gain root privilege in linux (Android) is by typing: su -
To tell if you have are root, you should see # where your user name is in the command window.
Once you are done finding the path, you need to exit the adb shell in order to make contact with your PC, so just type exit. Only then you can start using "adb pull".
by the way, its "adb pull /data/media/0/TWRP/ \home\username\backup\"
Rememer in linux (Android), it's case sensitive.
OK, I see my mistakes now. I was not exiting adb shell when typing adb pull. Anyway, thanks to your help, everything is working correctly now. Thank you again, I really appreciate it. Now I can flash the 4.4 update safely.
eksasol said:
If you are using Ubuntu or linux, typing 'find' only search what is in your PC. You get permission denied because you want to search in a root directly that required root permission.
...
by the way, its "adb pull /data/media/0/TWRP/ \home\username\backup"
Rememer in linux (Android), it's case sensitive.
Click to expand...
Click to collapse
Thanks for helping me re-learn that linux (Android) is case sensitive

[ADB] Fullscreen 'Edge' Handle

I was always annoyed by how small the edge screen is even at its largest, so I crawled through the Global settings through ADB and found a setting that seemed relevant "edge_handle_size_percent"
I ran the command
Code:
adb shell settings put global edge_handle_size_percent 100.00
with ADB from a computer, I then opened the edge menu (Still the old size and position) and when I went into handle settings, it had become fullsize. This may also work on the Note and S7 series as well as ported roms, I have only tested this on my S8+.
Let me know if it worked for you! Screenshot as proof below.
original edge default settings ?
worked for me!
hasanben35 said:
original edge default settings ?
Click to expand...
Click to collapse
If I recall correctly, its around 37%
However if you adjust the slider in the settings, it'll pop straight back to normal values
PS C:\Users\hasanben35\Desktop\platform-tools> adb devices
List of devices attached
ce------------------------- device
PS C:\Users\hasanben35\Desktop\platform-tools> adb shell
dream2lte:/ $ adb shell settings put global edge_handle_size_percent 100.00
/system/bin/sh: adb: not found
help
hasanben35 said:
PS C:\Users\hasanben35\Desktop\platform-tools> adb devices
List of devices attached
ce------------------------- device
PS C:\Users\hasanben35\Desktop\platform-tools> adb shell
dream2lte:/ $ adb shell settings put global edge_handle_size_percent 100.00
/system/bin/sh: adb: not found
help
Click to expand...
Click to collapse
There is no need to run the adb shell command first. Its an all in one command. Just fire up adb and input it all.
Pedroc1999 said:
There is no need to run the adb shell command first. Its an all in one command. Just fire up adb and input it all.
Click to expand...
Click to collapse
Thanks work
Great to hear! Any S7/S6/N8/N7 users able to confirm?
I'll let you know shortly, I didn't read the whole forum and moved the slider and you guessed it!!! Back to default it went ....SOOOOOO I'm running the new command and will let you know very shortly

search for all files with the string "abcd" in their names (over adb)

Hello Forum
I would like to search for all files with the string "friendly" in their names over ADB on an USB attached mobile phone (LineageOS 14.1).
(to make sure that i can connect to the mobile phone over adb
[email protected] ~/Desktop/adb $ sudo adb devices
List of devices attached
AB13560G3Z device
I tried many commands like 'adb shell ls -1R | grep friendly', 'adb shell find / name friendly', but no luck
What am I doing wrong?
Any feedback is appreciated very much!
Joe
PS 1:
If possible, without installing additional search-apps on the mobile-phone
PS 2:
The phone is rooted
PS 3:
(as an example, that there is a file with the textstring "friendly" on my mobile phone
[email protected] ~/Desktop/adb $ adb shell pm list packages -f -3
package:/data/app/de.robv.android.xposed.installer-1/base.apk=de.robv.android.xposed.installer
package:/data/app/org.secuso.privacyfriendlynetmonitor-1/base.apk=org.secuso.privacyfriendlynetmonitor

Categories

Resources