[Q] ADB multiple line file listing - Android Q&A, Help & Troubleshooting

Hello,
I have developed a program that will allow android users to navigate through the files. But the problem is that when I use the "ls" command it doesn't make always a new line after each file but it places it in one line.
Here is a screenshot
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
So my question is: Is there a way to make it list each file in new line? (using adb commands)

What you are looking for is "ls -1" command. It works on bash shell. But not sure that it will work with adb.
Sent from my HTC Sensation XE with Beats Audio using Tapatalk 2 Beta-2

musarraf172 said:
What you are looking for is "ls -1" command. It works on bash shell. But not sure that it will work with adb.
Sent from my HTC Sensation XE with Beats Audio using Tapatalk 2 Beta-2
Click to expand...
Click to collapse
Oh great. Thank You for such a quick answer. It works !!! Now I can keep going with my program.
One more question. Do You know maybe how to handle files that have space in the name?

jakuburban said:
Oh great. Thank You for such a quick answer. It works !!! Now I can keep going with my program.
One more question. Do You know maybe how to handle files that have space in the name?
Click to expand...
Click to collapse
for every space you have to use a back slash. Example "/etc/my folder" will be "/etc/my\ folder"
Sent from my HTC Sensation XE with Beats Audio using Tapatalk

Would you mind to share more about your app?
Sent from my HTC Sensation XE with Beats Audio using Tapatalk

musarraf172 said:
for every space you have to use a back slash. Example "/etc/my folder" will be "/etc/my\ folder"
Sent from my HTC Sensation XE with Beats Audio using Tapatalk
Click to expand...
Click to collapse
Nope, that doesn't work

adb shell ls -1
works for me!!!
ignore this!!!!

jakuburban said:
Nope, that doesn't work
Click to expand...
Click to collapse
It should . Open adb shell and try . Do'nt omit the space . You need to put the back slash to tell that a white space is coming in the file name . So "My Folder" will be "My\ Folder" not "My\Folder"

musarraf172 said:
It should . Open adb shell and try . Do'nt omit the space . You need to put the back slash to tell that a white space is coming in the file name . So "My Folder" will be "My\ Folder" not "My\Folder"
Click to expand...
Click to collapse
musarraf172 said:
Would you mind to share more about your app?
Sent from my HTC Sensation XE with Beats Audio using Tapatalk
Click to expand...
Click to collapse
1. I've tried to do it in many ways, the space was there but it just doesn't work. It won't work, it only shows the basic adb commands.
2.Yes, the app is in my description. This "Managing..."

jakuburban said:
1. I've tried to do it in many ways, the space was there but it just doesn't work.
Click to expand...
Click to collapse
Did you use both quotation marks and escaped the whitespace using backslash?
You have to use either or, so either
Code:
adb shell ls "/path/to/some file with space"
or
Code:
adb shell ls /path/to/some\ file\ with\ space
.
The ls I have on my android device do not accept the -1 argument, so if you are aiming for compatibility using that is perhaps not a good idea.

Yes I did. The ls -1 works fine but this "\ " doesn't work. It is still just seen as a normal space. Maybe there is a newer version of adb.exe that supports it
Here are some screens

But what about just quotation marks?
Code:
adb pull "/sdcard/INSTALKI/font smolna.zip"

eppeP said:
But what about just quotation marks?
Code:
adb pull "/sdcard/INSTALKI/font smolna.zip"
Click to expand...
Click to collapse
Thanks, that's what I wanted. We don't need to use "\ " only just a normal space but the whole location name must be in quotation marks

Related

Nexus one bootscreen for Tattoo

Hi all,
Before you say something I just "ported" a boot screen from Nexus One to Tattoo (this included resizing the picture to our screen res). Here it is:
Nexus One Bootscreen for HTC Tattoo
Here is how you backup your old boot screens and how you set up the new one to be used (u must be root and I also think that Android 2.1 has a different location for these files, but I have only 1.6. If someone know how to do this on 2.1 tell me how and I will update my post!):
1. Unpack the zip file (a new folder named 'boot' should be created)
2.
Code:
adb shell
# cd /system/media/bootscreen
# mkdir /sdcard/bootscreen_backup
# cp /system/media/bootscreen/* /sdcard/bootscreen_backup
# rm *
# exit
3. Now perform
Code:
adb push pathtobootfolder\boot /system/media/bootscreen
That's it. If you're tired of the Nexus Onbe Bootscreen and you want the old one, do:
1. adb shell
Code:
rm /system/media/bootscreen/*
cp /sdcard/bootscreen_backup/* /system/media/bootscreen
Finito!
Have fun!
/Edit1: I have set Audio=0 in the xml-config because I'm tired of the boot sound...
/Edit2: Changed screenX to 0, thanks to coolbits for this
/Edit3: For those guys having problems understanding what to do - look at this post
Thanks for this
Also change:
screenX="0"
to not get empty first 40 pixels of the screen
Working
Good Work, it's all good on my Tattoo
to have this in my tattoo, it has to be rooted?
djhancks said:
to have this in my tattoo, it has to be rooted?
Click to expand...
Click to collapse
Yes! Root is required.
How to do this in Android 2.1? There is no /system/media/bootscreen folder.
aam.. because i'm a newbie here where do i have to unpack those files?
and where should i write those commands?
djhancks said:
aam.. because i'm a newbie here where do i have to unpack those files?
Click to expand...
Click to collapse
My dear fellow Tattoo user, you can unpack the zip file wherever you like, eg. Desktop.
djhancks said:
and where should i write those commands?
Click to expand...
Click to collapse
First, you need to have working connection from PC to your phone trough ADB. Those commands you must type in Terminal i.e. Command Line, like this (this is Terminal in Ubuntu, don't be confused - menu is localized in my native language):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
thanks a lot m8
i think you should edit your first post and add this for all us newbies to understand
thanks again
dejandekic said:
My dear fellow Tattoo user, you can unpack the zip file wherever you like, eg. Desktop.
First, you need to have working connection from PC to your phone trough ADB. Those commands you must type in Terminal i.e. Command Line, like this (this is Terminal in Ubuntu, don't be confused - menu is localized in my native language):
Click to expand...
Click to collapse
Nice explanation
dejandekic said:
Yes! Root is required.
How to do this in Android 2.1? There is no /system/media/bootscreen folder.
Click to expand...
Click to collapse
Sorry, I don't have Eclair Tattoo build installed (will flash it when FM Radio and Camera are working). I have updated my 1st post with requirements and restrictions...
those commands work on windows cmd ???
sure they do, but you have to be in the same folder with adb.exe and type adb.exe instead of adb
NForce25 said:
sure they do, but you have to be in the same folder with adb.exe and type adb.exe instead of adb
Click to expand...
Click to collapse
thanks m8, i'm a lil' newbie for all that stuff, but thanks to this guide i can manage
to do this
nice bootscreen, biggest win is turning that F***ing sound off
havok123 said:
nice bootscreen, biggest win is turning that F***ing sound off
Click to expand...
Click to collapse
i like this sound
What am I doing wrong?
I've done a similar bootscreen, but I kept the proportions on the logo and it's oriented the right way (top left to bottom right: blue, red, yellow & green).
Also, I kept the green little buddy and its sound but I removed the annoying sound when the htc-logo should appear.
I attached the zip-file which contains everything (boot.gif, boot1.gif, boot2.gif, boot_bg.gif, boot_animation.xml and boot.mp3)
sheik_yerbouti said:
View attachment 319318
What am I doing wrong?
Click to expand...
Click to collapse
Did you remount RW?
worked for me great
same error by mine,
someone tell me how to "Did you remount RW?"
Greets
"adb remount"
in terminal...

Cant Install custom recovery on Mac

idk what im doing wrong. I know im a little rusty at this but i did root my nexus 1 couple yrs ago and i dont remember having any problems
i followed the steps in this thread http://forum.xda-developers.com/showthread.php?t=1426377
i unlocked the bootloader but i'm getting stuck at #3. (im on a Mac)
on page 4-5 of that thread some1 else was stating they were getting stuck also. i tried to do what they did but it still not working. they also said something about choosing the option "install from SD card"...but im not seeing that option anywhere (& i do have debugging enabled)
I've put the .zip file on my sd card but when I go to fastboot on my phone, it just says keep saying "no image or wrong image"
this is what it says when i try to fastboot
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
any help is greatly appreciated
Try this...
Download this- http://d-h.st/Vsy
then extract the folder within the zip to your home folder.
open a terminal (it should start up in your home folder)
type sudo chmod 777 Recovery_Flasher
then type cd ~/Recovery_Flasher
once there type ./Flash.sh
Let me know if you get errors... i will try to fix them for you. also, this will reboot your phone into recovery mode when its done to test if it worked. if 4ext recovery loads then it worked
thanks!!!
but could u elaborate on what or where exactly this "home" folder is? the android folder? or is it folder on my sd card?
and i tried to enter those commands in terminal and all i got was "no such file or directory'
acjei said:
thanks!!!
but could u elaborate on what or where exactly this "home" folder is? the android folder? or is it folder on my sd card?
and i tried to enter those commands in terminal and all i got was "no such file or directory'
Click to expand...
Click to collapse
Your home directory on your mac
Sent from.... wait! where am I?
oh ok.
the commands still arent working. still says no such file or directory
im about to call it quits
where can i get the HTC drivers that im supposed to install on my mac?
I have one more idea... Will type it when I get home from school
Sent from.... wait! where am I?
acjei said:
where can i get the HTC drivers that im supposed to install on my mac?
Click to expand...
Click to collapse
Shocking I know, but Google and perhaps HTC would solve your question
Sent from my HTC_Amaze_4G using xda app-developers app
Spastic909 said:
Shocking I know, but Google and perhaps HTC would solve your question
Sent from my HTC_Amaze_4G using xda app-developers app
Click to expand...
Click to collapse
already did that..im only seeing .exe files....i have a Mac
where can i get the link for this toolkit?
the link on his site is dead
http://forum.xda-developers.com/showthread.php?t=1493905
You need to find a recovery image. I think the command in fastboot is ./flash recovery.IMG. dont forget commands in mac are ./ then the command.
Sent from my HTC_Amaze_4G using xda app-developers app

[Q] Copy files from device to pc hdd via adb shell

I am having trouble finding the right command to copy a file from a device via adb shell to my pc. I tried -mv- but that just renamed it.
Code:
mv Camera c:/camera
renamed to c:camera
adb pull /path/to/Camera C:\camera
RoberGalarga said:
adb pull /path/to/Camera C:\camera
Click to expand...
Click to collapse
yeah I tried that. I think that since my phone is locked, I can't su the shell. I actually tried a single file also. No luck.
das-heftige said:
yeah I tried that. I think that since my phone is locked, I can't su the shell. I actually tried a single file also. No luck.
Click to expand...
Click to collapse
I don't have to unlock my tablet to pull files. You are doing the command from the PC, right, like in a DOS box? You should be able to see the files by doing "adb shell ls /sdcard/DCIM/Camera/". "adb pull /sdcard2/DCIM/Camera ." will pull all of the pictures on my Hisense external sdcard into the current "." windows directory on my computer.
BSODs when using usb 3.0
das-heftige said:
I am having trouble finding the right command to copy a file from a device via adb shell to my pc. I tried -mv- but that just renamed it.
Code:
mv Camera c:/camera
renamed to c:camera
Click to expand...
Click to collapse
Hi,
I have facing out weird problem. Why, when i using adb command to copy file from PC windows to android Devices using Port usb 3.0. Windows will be immediately Blue Screen. Note: in blue screen appears, Bluescreen: Physical Memory Dump
I using Windows 7 (Zotac CPU). But, when i using standart USB port in zotac. Will be running.
Anyone knows, why the problem appears?
Thanks
Android All In One Toolkit - Data Transfer Via ADB
das-heftige said:
I am having trouble finding the right command to copy a file from a device via adb shell to my pc. I tried -mv- but that just renamed it.
Code:
mv Camera c:/camera
renamed to c:camera
Click to expand...
Click to collapse
Hii
I Developed an application named "Android All In One Toolkit" With Windows GUI...
1. Data Transfer
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
No Need to type single command
just put path in text box & Press Pull From Device button..
It has feature for fast data transfer over adb without mounting sd card...
It also has many more features that will make your workflow much easier..
Check out my Application
Thread : http://forum.xda-developers.com/showthread.php?t=2494319
aditya.kamble said:
Hii
I Developed an application named "Android All In One Toolkit" With Windows GUI...
1. Data Transfer
No Need to type single command
just put path in text box & Press Pull From Device button..
It has feature for fast data transfer over adb without mounting sd card...
It also has many more features that will make your workflow much easier..
Check out my Application
Thread : http://forum.xda-developers.com/showthread.php?t=2494319
Click to expand...
Click to collapse
Sorry aditya, but I got an error launching the app,
It said "Could not find the main class : androidallinonetoolkit. Program will exit

(script) Access all those hidden menus

To go with the thread on hidden menus/settings/dialer codes:
http://forum.xda-developers.com/showthread.php?t=2578216
I made a script to easily access them.
For convienence I put it in /system/bin and call it from terminal >$ but however you do it is fine. Not required to be called from root prompt but su binary installed to one of your PATH is. Extract gmenu from zip attachment.
Anyways enjoy ppl.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Update: Added some more menus.
Added another menu and ability to send secret codes with no formatting (e.g. *#*#xx#*#* ##xx# etc etc) also nice about this is many that just dont work from the dialer WORK this way!!
A great thread by E:V:A with many working codes here: http://forum.xda-developers.com/galaxy-s3/general/ref-secret-codes-hidden-features-t1687249
can this be made in an apk? i guess termianl emulator needs a root access to work?
how can i access usbsettings without rooting? plz guide
swapyworld said:
can this be made in an apk? i guess termianl emulator needs a root access to work?
how can i access usbsettings without rooting? plz guide
Click to expand...
Click to collapse
Check out GalaxyTools in the themes and apps subforum. It does need root though.
or from dialer try ##diag# or ##dmmode# or ##port# if you dont have root.
idone said:
Check out GalaxyTools in the themes and apps subforum. It does need root though.
or from dialer try ##diag# or ##dmmode# or ##port# if you dont have root.
Click to expand...
Click to collapse
Sorry but how can type diag in dialer? I mean ##344424# is diag?
Sent from my SM-N900P using Tapatalk
swapyworld said:
Sorry but how can type diag in dialer? I mean ##344424# is diag?
Sent from my SM-N900P using Tapatalk
Click to expand...
Click to collapse
Yes letters are on the number buttons. The logical words and abbreviations are easier to remember than numbers.
I have download the gmenu.zip but can't seem to get the menu to open. I have tried ( # ls /storage/emulated/0/download/gmenu) and nothing happens. Please help
Sent from my SM-N900P using XDA Free mobile app
Titan_evo said:
I have download the gmenu.zip but can't seem to get the menu to open. I have tried ( # ls /storage/emulated/0/download/gmenu) and nothing happens. Please help
Sent from my SM-N900P using XDA Free mobile app
Click to expand...
Click to collapse
You could checkout my app which has all these menus and more.
http://forum.xda-developers.com/not.../app-one-click-hotspot-enabler-menus-t2816159
But I just retested my script on 4.4.4 for you.
Call it from root prompt #source /pathtofile/gmenu or if you have copied it to xbin bin sbin just execute like #source gmenu and it will run.
tutorials
idone said:
You could checkout my app which has all these menus and more.
http://forum.xda-developers.com/not.../app-one-click-hotspot-enabler-menus-t2816159
But I just retested my script on 4.4.4 for you.
Call it from root prompt #source /pathtofile/gmenu or if you have copied it to xbin bin sbin just execute like #source gmenu and it will run.
Click to expand...
Click to collapse
any video tutorial on how to use this

[Mod] add all apps support to splitview

Ok, this was super easy. You'll need basic knowledge on editing your build.prop. Change this line under additional build properties (section way down at the bottom):
persist.splitwindow.support_all=false
To:
persist.splitwindow.support_all=true
Reboot - profit...
I had difficulty opening my build.prop in text editor with root explorer (go figure), something about the file being too large - I'm at a loss on this one. So I used the build editor in rom toolbox.
Any screenshots of this? You're talking about dual window right
Sent from my VS985 4G using Tapatalk
czerdrill said:
Any screenshots of this? You're talking about dual window right
Sent from my VS985 4G using Tapatalk
Click to expand...
Click to collapse
Yup, all installed apps can be used.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now that is awesome...thanks!
Sent from my VS985 4G using Tapatalk
LMAO.. i must be blind. i can't find it in the list
droidrev71 said:
LMAO.. i must be blind. i can't find it in the list
Click to expand...
Click to collapse
I got and done!!!!
oneandroidnut said:
I got and done!!!!
Click to expand...
Click to collapse
Congratulations! I found it and I'm done too. Plus, I thanked the OP!
I can't find it either!!! Have been looking for 30 minutes!
yousefarman89 said:
I can't find it either!!! Have been looking for 30 minutes!
Click to expand...
Click to collapse
hey as the OP mentioned you wont find it using Root Explorer cuz the file is too big to open...use rom toolbox's build editor
I have a quick question regarding split screen.. I was playing with a G3 today and couldn't tell if their was screen rotation lock but when you do split screen, can you go into landscape mode?
I'm about to ditch my S5 but split screen in landscape is great for google maps and music while driving
You know what I've realized that this doesn't work for me as I thought. I do see all my apps listed when I do this mod but when I select them in the dual window ui, it just brings up the app full screen. Has anyone gotten this to work with an unsupported out of the box app
Sent from my VS985 4G using Tapatalk
socalwrxx said:
I have a quick question regarding split screen.. I was playing with a G3 today and couldn't tell if their was screen rotation lock but when you do split screen, can you go into landscape mode?
I'm about to ditch my S5 but split screen in landscape is great for google maps and music while driving
Click to expand...
Click to collapse
just tried it and yes it works in landscape mode
Is everyone who it works for using the stock launcher? Also on verizon?
Edit nevermind got it...thanks again OP
Sent from my VS985 4G using Tapatalk
neckbonest said:
just tried it and yes it works in landscape mode
Click to expand...
Click to collapse
Thanks!
First off thanks to the OP for this!
For those who aren't comfortable editing their build prop the Flex Multi Window Mod also works.
http://forum.xda-developers.com/showthread.php?t=2707310
It's just an apk you install them select which apps you want included
- Sent From My G3
Thanks annoyingduck. Very easy.
Sent from my SM-P600 using Tapatalk
I use root explorer as well. I didn't realize that the text editor cant handle that large of a file... Anyway this is the way that I got around it on my Mac:
On Mac:
adb pull /system/build.prop .
vi build.prop
<Make changes>
adb push ./build.prop /mnt/sdcard/
On phone:
Remount /system RW in Root explorer
Rename /system/build.prop to /system/build.prop.bak
Move /sdcard/build.prop to /system/build.prop
Reboot
t1n0m3n said:
I use root explorer as well. I didn't realize that the text editor cant handle that large of a file... Anyway this is the way that I got around it on my Mac:
On Mac:
adb pull /system/build.prop .
vi build.prop
<Make changes>
adb push ./build.prop /mnt/sdcard/
On phone:
Remount /system RW in Root explorer
Rename /system/build.prop to /system/build.prop.bak
Move /sdcard/build.prop to /system/build.prop
Reboot
Click to expand...
Click to collapse
Cool, thanks for sharing. I notified speed software about the issue and they have been getting reports of the issue on lg devices. They are "looking into it".
So when do we get this for qslide lol
Sent from my VS985 4G using Tapatalk
czerdrill said:
So when do we get this for qslide lol
Sent from my VS985 4G using Tapatalk
Click to expand...
Click to collapse
if you install xsposed and xhalo floating window, it almost the same thing

Categories

Resources