[Q] [Help] Android not recognizing files pushed over adb - Android Q&A, Help & Troubleshooting

Hey guys!
I have a very weird problem regarding adb and Android. I am developing a little script to synchronize a folder's content with another one on the handset using PHP-CLI and ADB. I have no problem with using ADB over PHP but Android has a problem with files pushed via ADB.
Let's say my script found a local folder that is not on the device, to be more accurate, a music folder:
Code:
adb push /Volumes/Data/Music/Example.mp3 /sdcard/Music/Example.mp3
The file is successfully pushed BUT is neither recognized by Google Play Music nor by Android File Transfer for Mac. But I see the file via
Code:
adb shell ls /sdcard/Music/
and also see it in every file manager I have on my phone.
Why is that and how can I get over it?

Make folder in sdcard/bluetooth called music .
And navigate your music file,maybe this will work

Bluezzy said:
Make folder in sdcard/bluetooth called music .
Click to expand...
Click to collapse
Doesn't help. It still isn't recognized.

bluefirex said:
Doesn't help. It still isn't recognized.
Click to expand...
Click to collapse
Then clear app data,restart phone.

Bluezzy said:
Then clear app data,restart phone.
Click to expand...
Click to collapse
That's what I always do when such problems occur. This time nothing happened.

bluefirex said:
That's what I always do when such problems occur. This time nothing happened.
Click to expand...
Click to collapse
Try with other player?

Bluezzy said:
Try with other player?
Click to expand...
Click to collapse
As I stated in my original post it's not the player alone. Android File Transfer (the app for Mac since Mac doesn't support MTP) also does not show the file.

Related

[How to] Install apps from NC (Not by ADB install)

I didn't see a thread for this anywhere and it's not included in the rooting documentation so i figured I'd make one.
This will allow you to install apk files directly from the device, no need to adb them over. Just get the apk from the web or whatever source you want and install. Of course this is all assuming you have completed the current root process and have adb access already.
Thanks to godsfilth for finding these directions for the origninal nook.
1. Open a command prompt and navigate to your sdk tools folder
2. Run the following commands
Code:
C:\android-sdk-windows\tools>adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
C:\android-sdk-windows\tools>sqlite3 settings.db
sqlite> update secure set value=1 where name='install_non_market_apps';
sqlite> .q
C:\android-sdk-windows\tools>adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
3. Reboot
4. Install apps from NC without ADB.
You might have to restart your homescreen for the apps to show up, but i've had sucess with every app i've tried that is known working on the NC.
This was done on a Windows 7 x64 machine, although i'm sure it's the same or similiar for Linux and MUC OSx.
Also, sqlite3.exe was already in my sdk tools folder, if it's not for you then you can download from here.
Yep, and you can ADB install a file manager app, then just use the file manager to install anything else, from the SD card.
Bimboy said:
Yep, and you can ADB install a file manager app, then just use the file manager to install anything else, from the SD card.
Click to expand...
Click to collapse
So...the nook doesn't stop apps from deing installed if Iinstall them manger astro file Manger?
What is the command in sqllite to see if the db entry has been changed?
I copied & pasted your commands and after a reboot still get "Can't install downloaded apk"
I did the same - even adapted the commands because the folder name wasn't the same, etc.
However, I'm trying to use SlideMe to install APKs and it keeps coming up with "Install Blocked" - any ideas?
sudermatt said:
So...the nook doesn't stop apps from deing installed if Iinstall them manger astro file Manger?
Click to expand...
Click to collapse
Once you enable this it will allow you to install the apps, it doesn't have anything to do with astro per se. You can just use astro to navigate to apks stored on your sd card. I use estrongs file manager myself and have installed apks from my sd card, dropbox and downloads from dolphin browser hd.
I'm getting the same error as everyone else.
I made the edits per your first post and pushed the file back to the NC. Then I rebooted. Placed an apk in the NC and tried to open it using Root Explorer. I try to install it and I get the "Installation of donwload apks is not supported" error.
barrosd12 said:
I did the same - even adapted the commands because the folder name wasn't the same, etc.
However, I'm trying to use SlideMe to install APKs and it keeps coming up with "Install Blocked" - any ideas?
Click to expand...
Click to collapse
Slideme works perfect for me so you did something wrong. Not sure what though, I would just redo it.
lovelacer said:
What is the command in sqllite to see if the db entry has been changed?
I copied & pasted your commands and after a reboot still get "Can't install downloaded apk"
Click to expand...
Click to collapse
just use
Code:
sqlite3 settings.db ".dump"
and then scroll down and look for INSERT INTO "secure" VALUES(4,'install_non_market_apps','1'); you want a 1 there at the end.
barrosd12 said:
I did the same - even adapted the commands because the folder name wasn't the same, etc.
However, I'm trying to use SlideMe to install APKs and it keeps coming up with "Install Blocked" - any ideas?
Click to expand...
Click to collapse
look in your tools folder for the settings.db file and check the modified by time and make sure the change you are making is made.
To clarify if there's a misunderstanding the path info and text before the > in the commands is just what you would see in your command prompt. the actual commands are after the >. These are the actual commands.
Code:
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
sqlite3 settings.db
update secure set value=1 where name='install_non_market_apps';
.q
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
What command did you have to alter?
also, maybe try
Code:
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
to push... I didn't have any problem with the other command and both appear to work for me.
Oh none, your commands worked awesomely, I just had to yank the folder designations that were there, which you've now done for everyone, so thanks!
I think it might be a problem somewhere else, I'm re-doing everything right now, I'll let everyone know
Ran these commands again with the additional adb push and still no dice. I checked to see that the db entry had been updated and it correctly has the install non market apps set to 1. I'm using root explorer as well I'll try estrongs as you have. Thanks for the help.
lovelacer said:
Ran these commands again with the additional adb push and still no dice. I checked to see that the db entry had been updated and it correctly has the install non market apps set to 1. I'm using root explorer as well I'll try estrongs as you have. Thanks for the help.
Click to expand...
Click to collapse
Confirmed now that SlideMe is not the issue - the settings are all correct on the PC, I can't confirm these settings for the NC. I tried re-adb-pushing and still no cigar here either. I'm getting app rejections from any source, downloaded on the NC and the SD card. Any idea what could be wrong?
Ok, definitely isolated the problem now.
I pull the settings from the NC, modify them, and everything works great, then it refuses to push it back, but says it succeeds, or something to this effect, because whenever I pull the file back from the NC, it says value=0
barrosd12 said:
Confirmed now that SlideMe is not the issue - the settings are all correct on the PC, I can't confirm these settings for the NC. I tried re-adb-pushing and still no cigar here either. I'm getting app rejections from any source, downloaded on the NC and the SD card. Any idea what could be wrong?
Click to expand...
Click to collapse
Not sure, I've got it working using this method on 3 different NCs myself. The only thing i can think of is that i had already installed estrongs file manager and a few other games before doing it. Maybe try using adb to install estrongs or astro and see if it will let you then.
estrongs i'm using: www mediafire com ?sxw6adfzvyp250m
astro: www mediafire com ?05scsbrnx2wfw4v
Novaglarion said:
Not sure, I've got it working using this method on 3 different NCs myself. The only thing i can think of is that i had already installed estrongs file manager and a few other games before doing it. Maybe try using adb to install estrongs or astro and see if it will let you then.
estrongs i'm using: www mediafire com ?sxw6adfzvyp250m
astro: www mediafire com ?05scsbrnx2wfw4v
Click to expand...
Click to collapse
Thanks for the file links - I'll give them a try, I really think the problem though is that the NC keeps resetting the value I push back for the non-market apps. I have no idea why it's doing this...
barrosd12 said:
Thanks for the file links - I'll give them a try, I really think the problem though is that the NC keeps resetting the value I push back for the non-market apps. I have no idea why it's doing this...
Click to expand...
Click to collapse
try pulling it back right after pushing the modified one, before rebooting, and see if it's even pushing correctly at all. If it is then being reset on reboot i don't know what the issue is.
Novaglarion, I am not able to do it either.
When you say "reboot", is that the same as power off and on?
boret said:
Novaglarion, I am not able to do it either.
When you say "reboot", is that the same as power off and on?
Click to expand...
Click to collapse
yes, the same.
make sure you're pushing the modified db file to /data/data/com.android.providers.settings/databases not to /data/data/com.android.providers.settings
it needs to be in the databases folder so it overwrites the original
bular211 said:
make sure you're pushing the modified db file to /data/data/com.android.providers.settings/databases not to /data/data/com.android.providers.settings
it needs to be in the databases folder so it overwrites the original
Click to expand...
Click to collapse
DAMN YOU!!!! such a simple thing and i missed it! You are correct. I'll update the original commands. Thanks for the good catch there.

Folder can't be deleted?

I installed the Galaxy S3 Retail Mode found in Google Play but had problems setting it up so I uninstalled it.
Now, I have a folder in /sdcard/ named RetailMode that contains photos used by the RetailMode application. But no matter what I do, I can't delete it. Can't delete any of the photos either.
I tried changing owners and changing permissions but failed. I even tried via adb shell.
Any ideas of how I can delete it?
Thanks in advance!
Beach_Head said:
I installed the Galaxy S3 Retail Mode found in Google Play but had problems setting it up so I uninstalled it.
Now, I have a folder in /sdcard/ named RetailMode that contains photos used by the RetailMode application. But no matter what I do, I can't delete it. Can't delete any of the photos either.
I tried changing owners and changing permissions but failed. I even tried via adb shell.
Any ideas of how I can delete it?
Thanks in advance!
Click to expand...
Click to collapse
Could try running a KIES update or one of the Jellybean OTA's that will wipe the internal sd card
Are you trying to do so as root? If you open a terminal (download Android Terminal from the market) and run:
Code:
su
rm -rf /sdcard/RetailMode
(upper/lower case is important!) what is the output?
Yes. Tried via ConnectBot on the phone and adb. Issued the exact same command you posted.
The reply was: rm failed for -rf, No such file or directory
I wonder what the problem is...
Steve_max said:
Are you trying to do so as root? If you open a terminal (download Android Terminal from the market) and run:
Code:
su
rm -rf /sdcard/RetailMode
(upper/lower case is important!) what is the output?
Click to expand...
Click to collapse
Beach_Head said:
Yes. Tried via ConnectBot on the phone and adb. Issued the exact same command you posted.
The reply was: rm failed for -rf, No such file or directory
I wonder what the problem is...
Click to expand...
Click to collapse
Reboot?
Tried that first. No go.
Since Retail Mode is installed and activated as a Device Administrator, I think it modified some settings. I just don't know what those settings are.
I don't want to re-flash so hopefully someone can help me with this...
kulisap said:
Reboot?
Click to expand...
Click to collapse
first you have to deactivate RetailMode as an administrator. than check if is also disabled in Accessibility also, just in case. than try to delete it. It might work.
Did that already too.
This is so frustrating...
Chaitanyapatel8880 said:
first you have to deactivate RetailMode as an administrator. than check if is also disabled in Accessibility also, just in case. than try to delete it. It might work.
Click to expand...
Click to collapse
only one choice left than... Full wipe...
There has to be another way...
Chaitanyapatel8880 said:
only one choice left than... Full wipe...
Click to expand...
Click to collapse
Had this one before but the app was smart app protector. Deleted it but it left a folder and cant delete it even in the pc. But iwas able to delete it using root explorer.
Sent from my GT-I9300 using Tapatalk 2
Beach_Head said:
Yes. Tried via ConnectBot on the phone and adb. Issued the exact same command you posted.
The reply was: rm failed for -rf, No such file or directory
I wonder what the problem is...
Click to expand...
Click to collapse
Install a BusyBox from the market (if you already have it, reinstall). if "rm" is trying to remove "-rf", it's NOT a standard "rm", which can explain your problems. Then try again.
After having followed the above: Should you get a "permission denied" as root (execute 'whoami' on the console to make sure you're root!)
then the file(s) is most probably flagged as immutable.
Executing the following will then resolve the issue: chattr -iR /sdcard/RetailMode
This is what I get when I issue that command: reading flags on /sdcard/RetailMedia: innapropriate ioctl for device
d4fseeker said:
After having followed the above: Should you get a "permission denied" as root (execute 'whoami' on the console to make sure you're root!)
then the file(s) is most probably flagged as immutable.
Executing the following will then resolve the issue: chattr -iR /sdcard/RetailMode
Click to expand...
Click to collapse

[Q] help with factory mode

hi
im very new in the forum thats my first post
i tried to install an app that required a rebbot in my gt-i9300, i rebooted and i got an pop-up window said that factory mode has crashed.
i searched for days in the internet and i found this thread: http://forum.xda-developers.com/showthread.php?t=1762204&page=53
i did all but my galaxy says that its unable to chmod /efs/FactoryApp/factorymode: no such file or directory
then i realised that i have no efs directory and that i can download one from here http://forum.xda-developers.com/showthread.php?t=888193
so' my question is,
if i will flash it with odin, will the error will dissapear?
and if the answer is yes,
i understand that some people flash it because they have no imei and the phone dont recognize their sim card.
and my fear it can happen to me if ill flash it
some help please?
What app did you try installing?
slaphead20 said:
What app did you try installing?
Click to expand...
Click to collapse
the swapsd app.
but theres no matter what app i installed
i just want to know if i can install the efs directory without problems
so please help me everyone!
You have a backed up EFS on your phone ???
jje
JJEgan said:
You have a backed up EFS on your phone ???
jje
Click to expand...
Click to collapse
yes i have a backup named efs.tar in my root directory
can i restore the folder from it?
arimal199 said:
yes i have a backup named efs.tar in my root directory
can i restore the folder from it?
Click to expand...
Click to collapse
Well, obviously you can. That's what an efs backup is for
Copy the tar file to your PC and download the Android SDK.
Once the Android SDK is installed, open up a command prompt.
Once you're in the command prompt, CD to the directory where the ADB executables and libraries are.
Usually it's here:
Code:
cd C:\android-sdk\platform-tools\
Once you're in the directory where the files are, unpack the TAR file and type the following code:
Code:
adb start-server
adb push <path-to-your-unpacked-TARfile> /efs/
adb kill-server
If you need further assistance, feel free to PM or email me
Hope I could help!
Lg
familyguy59 said:
Well, obviously you can. That's what an efs backup is for
Copy the tar file to your PC and download the Android SDK.
Once the Android SDK is installed, open up a command prompt.
Once you're in the command prompt, CD to the directory where the ADB executables and libraries are.
Usually it's here:
Code:
cd C:\android-sdk\platform-tools\
Once you're in the directory where the files are, unpack the TAR file and type the following code:
Code:
adb start-server
adb push <path-to-your-unpacked-TARfile> /efs/
adb kill-server
If you need further assistance, feel free to PM or email me
Hope I could help!
Lg
Click to expand...
Click to collapse
wow
thanks man ill try it
arimal199 said:
wow
thanks man ill try it
Click to expand...
Click to collapse
oh i forgot
my pc doesnt recognize my galaxy
maybe i can go to someone that already has a adb and see if he can fix it
but really thanks
I believe you'll also need to change files owners and access rights for it to work.
Edit : if you don't have any efs folder, I think your efs partition might not be mounted. Type "mount" in a terminal emulator and check if a line refers to /efs (that should be block 3)
arimal199 said:
oh i forgot
my pc doesnt recognize my galaxy
maybe i can go to someone that already has a adb and see if he can fix it
but really thanks
Click to expand...
Click to collapse
Check out the links in my description. (Win8 help - ADB etc. etc. ...) that works with Windows Vista, 7 and 8. If you need the ADB binaries, in that same thread, you can donate a bit of money to me and I'll license you a program (Always with updated binaries) that installs ADB and fastboot to your system's root. With the click of a button
Lg
Edit: You can also download my universal Android tool kit and with the next update, all the Samsung Galaxy S III variants will be supported and you can easily backup/restore your /efs partition from there (With the Pro version, that is)
spocky12 said:
I believe you'll also need to change files owners and access rights for it to work.
Edit : if you don't have any efs folder, I think your efs partition might not be mounted. Type "mount" in a terminal emulator and check if a line refers to /efs (that should be block 3)
Click to expand...
Click to collapse
i looked in mounts and storage in cwm and saw that efs is not mounted.
can i mount it and it will work?
arimal199 said:
i looked in mounts and storage in cwm and saw that efs is not mounted.
can i mount it and it will work?
Click to expand...
Click to collapse
no i understood' i wasnt at factory mode at all!
all the time i had imei and call function , the only problem was that factory test has stopped.
so, i downloaded titanum backup pro and turned factory test app off.
now my galaxy went back to normal all works as well!
thanks for trying to help guys!

Access /System ??

How do i access /system of my rom on my computer ??
I want to change whole /system folder from another rom and es file explorer doesn't work for it !
Maybe someone can help me ?
invince2 said:
How do i access /system of my rom on my computer ??
I want to change whole /system folder from another rom and es file explorer doesn't work for it !
Maybe someone can help me ?
Click to expand...
Click to collapse
Es works. You need to go to settings-tools-root explorer-mount R/W and mount system as writeable
donkeykong1 said:
Es works. You need to go to settings-tools-root explorer-mount R/W and mount system as writeable
Click to expand...
Click to collapse
Did that...i wanted to replace the whole /system....and the phone crashes between the copying process...it cannot be done by es.
Need another method to do itfrom my laptop .
invince2 said:
Did that...i wanted to replace the whole /system....and the phone crashes between the copying process...it cannot be done by es.
Need another method to do itfrom my laptop .
Click to expand...
Click to collapse
Crash could happen because you don't have enough memory. I did it for some system files on my phone and it always worked fine. But I always deleted the files I wanted to replace first
donkeykong1 said:
Crash could happen because you don't have enough memory. I did it for some system files on my phone and it always worked fine. But I always deleted the files I wanted to replace first
Click to expand...
Click to collapse
i really need a solution to access that on my laptop !!
Someone help !
http://m.androidcentral.com/android-201-10-basic-terminal-commands-you-should-know
I would imagine adb would be your best option
Sent from my PG86100 using xda app-developers app
Oh GOD seriously?
Man you cannot replace the WHOLE system in any way except from recovery or bootloader...........NO ADB NO ES NOTHING will work.
ADB is feature that relies in the system of android. And when replacing the WHOLE system, the files needed for adb to work cannot change as they are in use, or if they change your phone will crash.
You can in no way change necessary system files while android is booted up beacause they are in use. Your whole operating system is in /system. Only recovery or bootloader will do.
mnomaanw said:
Oh GOD seriously?
Man you cannot replace the WHOLE system in any way except from recovery or bootloader...........NO ADB NO ES NOTHING will work.
ADB is feature that relies in the system of android. And when replacing the WHOLE system, the files needed for adb to work cannot change as they are in use, or if they change your phone will crash.
You can in no way change necessary system files while android is booted up beacause they are in use. Your whole operating system is in /system. Only recovery or bootloader will do.
Click to expand...
Click to collapse
I thought you could use adb in fastboot?
Then push the files
Sent from my PG86100 using xda app-developers app
hossman said:
I thought you could use adb in fastboot?
Then push the files
Sent from my PG86100 using xda app-developers app
Click to expand...
Click to collapse
Im pretty sure you can't. ADB commands does not work in fastboot and vice-versa. ADB only works in Android environment AFAIK. Though you can use fastboot flash commands and not adb push....
Gotcha, thanks for clearing that up.:thumbup:
Sent from my HTCEVOV4G using xda app-developers app
What if i want to just replace some files ??
Is that possible ??
invince2 said:
What if i want to just replace some files ??
Is that possible ??
Click to expand...
Click to collapse
Yes, as long as they are not needed for the system to function properly. You can replace them with ES or Push them via ADB with root access.

[Q] adb pull fails with 'cannot create...'

Hello everyone,
I am trying to copy my entire sd card from my Nexus 4 to pc using adb pull /mnt/sdcard E:\Backups\nexus-4-sdcard-final\
It's going fine for a while, it's transfering all my files but after a while i get this error message:
Code:
cannot create 'E:\Backups\nexus-4-sdcard-final\Android\data\com.google.android.apps.docs.editors.slides\files\pinned_docs_files_do_not_edit\454c288823047ca656676a9effef1cb5\files\documents\1-MHOqmLRrNLLzh9TfmnCIzJBWxW-TNz3MrEHMsRWjkM\image\1nFkukIkRz4mJ6HfTZCaSv8gv94X-HBr8Rw5Uyy8Y': No such file or directory
I googled for a while and the only thing i found is this guy with similar error but he had folder on his phone with file name longer than 255 characters, it couldn't be created in windows and that's why adb was failing.
My question is:
Is there any flag for adb pull or way to skip files that can not be copied and keep copying?
Or if you can tell me how to avoid this error it's even better solution.
Thanks,
Milos
milos91 said:
Hello everyone,
I am trying to copy my entire sd card from my Nexus 4 to pc using adb pull /mnt/sdcard E:\Backups\nexus-4-sdcard-final\
It's going fine for a while, it's transfering all my files but after a while i get this error message:
Code:
cannot create 'E:\Backups\nexus-4-sdcard-final\Android\data\com.google.android.apps.docs.editors.slides\files\pinned_docs_files_do_not_edit\454c288823047ca656676a9effef1cb5\files\documents\1-MHOqmLRrNLLzh9TfmnCIzJBWxW-TNz3MrEHMsRWjkM\image\1nFkukIkRz4mJ6HfTZCaSv8gv94X-HBr8Rw5Uyy8Y': No such file or directory
I googled for a while and the only thing i found is this guy with similar error but he had folder on his phone with file name longer than 255 characters, it couldn't be created in windows and that's why adb was failing.
My question is:
Is there any flag for adb pull or way to skip files that can not be copied and keep copying?
Or if you can tell me how to avoid this error it's even better solution.
Thanks,
Milos
Click to expand...
Click to collapse
Why not use ADB Backup?
Far better than manually pulling (and easier to restore too).
Jaskaranbir Singh said:
Why not use ADB Backup?
Far better than manually pulling (and easier to restore too).
Click to expand...
Click to collapse
Because I would like to be able to access my files without having to restore them back to a phone.
But if I don't find better solution I will do that. It's better than nothing, right? Thanks for the suggestion.
I have this problem too right now, What was your fix?
The first part of the problem is windows 10 you have to enable long file name support for paths longer than 260 characters . https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/ The second part is we need to get Google or one of the XDA members to include a manifest file in the adb that tells windows it supports long file names then it may work otherwise do the adb pull in Linux.
idocinthebox said:
The first part of the problem is windows 10 you have to enable long file name support for paths longer than 260 characters . https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/ The second part is we need to get Google or one of the XDA members to include a manifest file in the adb that tells windows it supports long file names then it may work otherwise do the adb pull in Linux.
Click to expand...
Click to collapse
is there a fix yet bro ?
milos91 said:
Hello everyone,
I am trying to copy my entire sd card from my Nexus 4 to pc using adb pull /mnt/sdcard E:\Backups\nexus-4-sdcard-final\
It's going fine for a while, it's transfering all my files but after a while i get this error message:
Code:
cannot create 'E:\Backups\nexus-4-sdcard-final\Android\data\com.google.android.apps.docs.editors.slides\files\pinned_docs_files_do_not_edit\454c288823047ca656676a9effef1cb5\files\documents\1-MHOqmLRrNLLzh9TfmnCIzJBWxW-TNz3MrEHMsRWjkM\image\1nFkukIkRz4mJ6HfTZCaSv8gv94X-HBr8Rw5Uyy8Y': No such file or directory
I googled for a while and the only thing i found is this guy with similar error but he had folder on his phone with file name longer than 255 characters, it couldn't be created in windows and that's why adb was failing.
My question is:
Is there any flag for adb pull or way to skip files that can not be copied and keep copying?
Or if you can tell me how to avoid this error it's even better solution.
Thanks,
Milos
Click to expand...
Click to collapse
did u find any soutions bro

Categories

Resources