problem with pushing a file via adb and/busybox - Android

I am using Samsung Galaxy Note with stock ICS 4.0.4 and notecore kernel v13 std by g.lewarne.
here is the link for the kernel: http://forum.xda-developers.com/showthread.php?t=1749863 (it is hydracore now. but same for tw roms)
You may have heard the program called Droid Manager by deep unknown xda presented it to us a couple of days ago.
here is the link ıf the program: http://forum.xda-developers.com/showthread.php?t=1772338
my problem is that:
the program cannot push edited build.prop file to my phone. It can do so for any other phones.
I communicated with the dev of the program and he infırmed me that the program uses busybıx and/or adb commands to push the new build.prop file. we tried a couple of things yet could bot find a sokution. we tried the way to create a new file within the phone. (cat command). We 8succeeded however we need to push "enter" button to push the content to the file which is not possible to do so with the coding of droid manager. (i dont know how to tell the problem properly since i am not a dev )
what could be the possible solutions way???
TIA
p.s: i will ask devs to look at the thread. maybe they can shed more light to the problem...

I have opened Teamviwer with "ardicli2000" and worked directly from his laptop on his phone.
Done the following via Droid Manager and Command Line (CMD):
1. remount system as RW: succeeded.
2. Create a file on "/system" using: "touch /system/1.txt" also succeeded.
3. tried pushing a file from his desktop (file name was: 1.txt) FAILED !!
No matter what, once I start using "Adb push" I fail on putting anything on "/system" I get: Permission denied :-/
but when I attempt to create anything on "/system" using busybox commands I SUCCEED !!
what could be the issue?! everything in the program functions without issues except for "adb push" to "/system" :crying:

DeepUnknown said:
I have opened Teamviwer with "ardicli2000" and worked directly from his laptop on his phone.
Done the following via Droid Manager and Command Line (CMD):
1. remount system as RW: succeeded.
2. Create a file on "/system" using: "touch /system/1.txt" also succeeded.
3. tried pushing a file from his desktop (file name was: 1.txt) FAILED !!
No matter what, once I start using "Adb push" I fail on putting anything on "/system" I get: Permission denied :-/
but when I attempt to create anything on "/system" using busybox commands I SUCCEED !!
what could be the issue?! everything in the program functions without issues except for "adb push" to "/system" :crying:
Click to expand...
Click to collapse
Could no one help

Related

[Q] Please help me... (problems with md5sum mismatch)

Hello,
I am having a major problem... earlier today i made a backup of my ics'd out v8 rom in order to try the new CM7 Kang. I got the kang running but needed to install gapps. For some reason rom manager was not letting me install it from there because it wasn't an updated version of rom manager and i couldn't get an updated version. So i figured I would go back to my ics'd rom, download gapps on the sdcard, and then go back to cm7 to install... NOPE.
Every time I try to restore my backup I get md5 mismatch error. I went through a bunch of different threads for different phones and tried all the adb stuff it said and nothing worked. For some reason when I ran the command (given here http://forum.xda-developers.com/showthread.php?t=714114) "cd /sdcard..." the pound # changed to a > and everything I typed would just be repeated back at me. The phone never even asked for superuser permission. I am pretty sure that I have the adb stuff right since when I type in "adb devices" in command I see the device, but I just have no clue how to fix this. Maybe the instructions given on this page only applies to that particular phone?
I would really like to be able to recover this backup and if anyone has instructions on how to fix this error on this phone it would be very much appreciated.
Thanks!
ADB was working if you got a # prompt
Custom kernels are almost all "insecure" kernels - ADB sessions automatically have root permissions.
This was the case for you - a # prompt means you have root privileges.
A $ prompt means you don't
A > prompt means that something you typed on the previous line made the shell decide you wanted to type more before executing the command. Control-C will break out of this. So if you got a > prompt after the "cd /sdcard/clockworkmod/backup/blahblah" command - you mistyped something on that line. Possibly you put a ; in there by accident, or you have opening quotes without closing quotes
There is a comment later in that thread "the folder name for your backup couldn't have spaces in it" - Weird characters in the directory name would be a possible cause of your cd command failing.
CWM should never have created a folder name that behaves like this, unless you did a nandroid backup using ROM Manager. If you did - another reason NOT to use ROM Manager.
Did you change the file name of the backup? make sure there is no spaces in file name. hope this help.
I would just download gapps to computer then move the file to phone. Then reboot into cwm and flash galls.
Sent from my SAMSUNG-SGH-I777 using XDA App
Artimus009 said:
I would just download gapps to computer then move the file to phone. Then reboot into cwm and flash galls.
Sent from my SAMSUNG-SGH-I777 using XDA App
Click to expand...
Click to collapse
Code:
adb push
is your friend - great way to put a file on the phone when it's in recovery
Entropy512 said:
ADB was working if you got a # prompt
Custom kernels are almost all "insecure" kernels - ADB sessions automatically have root permissions.
This was the case for you - a # prompt means you have root privileges.
A $ prompt means you don't
A > prompt means that something you typed on the previous line made the shell decide you wanted to type more before executing the command. Control-C will break out of this. So if you got a > prompt after the "cd /sdcard/clockworkmod/backup/blahblah" command - you mistyped something on that line. Possibly you put a ; in there by accident, or you have opening quotes without closing quotes
There is a comment later in that thread "the folder name for your backup couldn't have spaces in it" - Weird characters in the directory name would be a possible cause of your cd command failing.
CWM should never have created a folder name that behaves like this, unless you did a nandroid backup using ROM Manager. If you did - another reason NOT to use ROM Manager.
Click to expand...
Click to collapse
Thanks for the reply! Yeah that would make sense but I copied the file path directly from windows explorer and I checked for spaces too... Yeah I only do backups straight from CWM.
getbuzzin said:
Did you change the file name of the backup? make sure there is no spaces in file name. hope this help.
Click to expand...
Click to collapse
I did change the name from the original name, I added like "ics'doutv8siyah2.6.1blahblahblah" to the beginning so that I could distinguish which backup was which. Could this make a difference? I mean I have done this before without issue.
Shadow12347 said:
Thanks for the reply! Yeah that would make sense but I copied the file path directly from windows explorer and I checked for spaces too... Yeah I only do backups straight from CWM.
I did change the name from the original name, I added like "ics'doutv8siyah2.6.1blahblahblah" to the beginning so that I could distinguish which backup was which. Could this make a difference?
Click to expand...
Click to collapse
Change it back and see if it works
Only letters, numbers and periods. the ' is probably to blame.
Sent from my SAMSUNG-SGH-I777
Well I deleted the beginning and it looked like it was going to work because it was checking md5 sums for a while and then it said md5 mismatch. But it wasn't instant like the other times.
I think I read on one of the pages that you could take the nandroid.md5 from another backup and replace it with the one in the nonworking backup, is this true and would it work?
Ok nevermind, I forgot to do the ADB thing again xD it worked... THANK YOU SO MUCH!
karth500 said:
Only letters, numbers and periods. the ' is probably to blame.
Sent from my SAMSUNG-SGH-I777
Click to expand...
Click to collapse
Most likely.
I usually rename my backups manually to something like romname_date in ADB
e.g.
villainrom_1224
I NEVER put spaces or other characters in the rom name
Right now I think I have:
modstock_1128
villainrom_1224
uckk6_1224
one other ROM...
Ok guys I'm sorry, it happened again... except this time I think it may be a problem with ADB. When I am in adb shell, it shows up as "~ #" instead of just "#", however, typing "su" changed it to just "#". However, in both instances ("~ #" and "#") it gets an error:
~ # cd /sdcard/clockworkmod/backup/2012-01-22.18.04.05
cd /sdcard/clockworkmod/backup/2012-01-22.18.04.05
/sbin/sh: cd: can't cd to /sdcard/clockworkmod/backup/2012-01-22.18.04.05
and
# cd /sdcard/clockworkmod/backup/2012-01-22.18.04.05
cd /sdcard/clockworkmod/backup/2012-01-22.18.04.05
cd: can't cd to /sdcard/clockworkmod/backup/2012-01-22.18.04.05
This is the original name, there are no spaces, I checked the driver for the phone, etc.
Anyone got any ideas?
Oops double post -_-
Try tab-completion (type part of a directory name and hit tab - sometimes it works and sometimes it doesn't, usually should work when ADBing into CWM), and use "cd" and "ls" to navigate through directories instead of just pasting the whole path.
ls = same thing as dir in DOS
Alright so I did that and found out the sdcard isn't mounting...
C:\android-sdk-windows\platform-tools>adb shell
~ # su
su
# ls
ls
acct fota.rc recovery.rc
app-cache init res
cache init.goldfish.rc sbin
config init.rc sdcard
customkernel init.smdkc210.rc sys
d init.smdkv310.rc system
data init_kernel_only.rc tmp
dbdata lib ueventd.rc
default.prop lpm.rc ueventd.smdkc210.rc
dev misc ueventd.smdkv310.rc
efs mnt vendor
etc proc
# cd /mnt
cd /mnt
# ls
ls
asec obb sdcard secure usb
# cd /sdcard
cd /sdcard
# ls
ls
#
I also went into root explorer and it said "SD card is not currently mounted"
...uhhh I feel like a noob to ask this but, how do you mount it? xD
The thing is, though, that it dismounts when I plug it into the computer to transfer files/adb, but it is mounted afterwards...

[Q] problem when rooting nook tablet

my NT is not working, if you can please click here to help me
anyway, before that - when it was working, i tried to root it by using this method:
http://forum.xda-developers.com/showthread.php?t=1354487
at debloat menu, i chose "extreme" because i want to delete all of B&N content. i just want a normal android tablet, i know i can still read books by using the NOOK app for android.
so i chose extreme mode. and the command prompt window closed right after that.
so my NT was rooted, but not successfully, it was even worse than it was before i rooted.
i open the batch file (NookandZergy.bat) to see what the command lines are to find the reason why it didn't work. and i saw this:
adb shell rm -r /system/app/Accessories.apk
Click to expand...
Click to collapse
i opened command prompt, and typed this. and i got something like "failed because the file is not exist." -> i knew the batch script was wrong in some ways. i was going to unroot and root again with the option "full debloat" (not extreme), but before i do that, i was trying to remove netflix, i wanted to type this to the command line to see what will happen.
adb shell rm -r /system/app/netflix.apk
Click to expand...
Click to collapse
but i accidentally type adb shell rm -r /system/app/, and then it removed everything in /system/app/
i got the error in the nook tablet's screen, i don't remember what the error is, but when i pressed "force close", it kept showing me that error, i tried about 20 times but still not work.
i turned off my NT, and when i boot it, it stuck at "read forever",
that's why i created this thread.
my question is: how do i do "extreme debloat"? i want to remove everything from B&N. can you please give me the correct "command lines" to do this? and how to use that "command lines"?
prepare a sdcard to boot into ClockworkMod (CWM) which is a custom recovery (replaces stock recovery). And from there flash this ROM, for extreme-debloat is easy you can modify the script just to debloat or i can make it for you. First focus in restore your system.
As i said in my last post in your other thread read my FAQ and you will find your what you need there, if you have any question me or any other user will try to help.
PS: here is post i made for a user about how to re-bloat but the thing is that i post the list of all the B&N apps for reference to you so it might be helpfull.
~ Veronica
i have a little knowledge about batch file, so i think i can edit the script
(just edit the wrong file name -> make it become correct file name)
but i don't know what files are inside the folder /system/app/
for example: the file Accessories.apk is not exist, so how should i edit the script
nooktablet said:
i have a little knowledge about batch file, so i think i can edit the script
(just edit the wrong file name -> make it become correct file name)
but i don't know what files are inside the folder /system/app/
for example: the file Accessories.apk is not exist, so how should i edit the script
Click to expand...
Click to collapse
Well you got the error probably 'cause when you ran the script it removed that file so when you typed the same command again it won't remove it because is already gone.
In the link i provided is the list of all the B&N applications that are removed in the extreme debloat option. So you basically have keep that part of the code plus the intro to get in adb shell.
In that post you will also find a link to the complete system/app folder just in case you by "playing around" with adb remove any important system app, so you can push it back.
~ Veronica
lavero.burgos said:
Well you got the error probably 'cause when you ran the script it removed that file so when you typed the same command again it won't remove it because is already gone.
In the link i provided is the list of all the B&N applications that are removed in the extreme debloat option. So you basically have keep that part of the code plus the intro to get in adb shell.
In that post you will also find a link to the complete system/app folder just in case you by "playing around" with adb remove any important system app, so you can push it back.
Click to expand...
Click to collapse
no, when i chose extreme debloat, it closed the command prompt window, before it closed, i saw something "failed...". when i typed the command again it showed "failed...", i'm sure it's exactly what it said before,
and i know after debloat, it should go back and do other command like "thank you for using" (i read the batch file). i also saw B&N apps were still on my NT, debloat didn't work because of the missing file -> the script stopped.
btw, you said i can use adb to push the apps back. so that means i can also use adb to remove apps? can i not debloat when rooting, and after root, i use adb to remove apps later? will adb work at that time?
and can i use adb to explore what files are in the /system/app/ folder? or any other program?
nooktablet said:
no, when i chose extreme debloat, it closed the command prompt window, before it closed, i saw something "failed...". when i typed the command again it showed "failed...", i'm sure it's exactly what it said before,
and i know after debloat, it should go back and do other command like "thank you for using" (i read the batch file). i also saw B&N apps were still on my NT, debloat didn't work because of the missing file -> the script stopped.
btw, you said i can use adb to push the apps back. so that means i can also use adb to remove apps? can i not debloat when rooting, and after root, i use adb to remove apps later? will adb work at that time?
and can i use adb to explore what files are in the /system/app/ folder? or any other program?
Click to expand...
Click to collapse
Yes adb works at anytime even in dockworkers (CWM) .
To know how to use adb go to my FAQ (link below in my signature) and look in the how-to's made by me section for the how to use and install adb.
"adb shell rm -r" is one of the adb commands and is used for remove files.
adb shell = is to get superuser permissions (root/su)to run advanced commands.
rm = remove
-r = recursive
~ Veronica
Sent from my Nook Tablet using xda premium

Edited build.prop; phone now hangs during boot

Well I've had my first issue with my shiny new handset! I rooted it this afternoon and decided to modify the build.prop to change the dalvik heap size as recommended by various people. However on rebooting, the phone's now hanging on the splash screen.
I can get into download and recovery ok - any ideas on how to fix this? Is build.prop editable in either of these modes?
If you have adb, boot in to CWM, adb pull /system/build.prop
Edit the file, please note that if you're on windows, DO NOT USE WORD or anything similar, it'll mess up your line endings (Newline Format), I suspect this is what happened in the first place.
In any case, if you need to edit the file in plain notepad, download "ToFroDos" and run todos on the file before editing,
then edit, then run fromdos on the file, then adb push it back on to the device.
Note on Re-uploading: you may need to execute adb remount rw in order to upload the file.
In any case, short form:
1. Boot to recovery
2. adb pull /system/build.prop
3. Edit locally (Making sure to keep the proper newline format (\n))
3.5 adb remount rw
4. adb push ./build.prop /system/build.prop
As said extract the original one from the rom and push it manually via adb push command
Sent from my GT-I9300 using Tapatalk 2
Oddly enough I used the build.prop editor app from the Play store. Seems that the issue was that it didn't put an 'm' at the end of the line specifying the size - so it read as '128'. Anyway, I've done what you suggested, and it worked - excellent stuff, thanks!
Next time, just use Jota Text Editor on your phone
I have use it many times to edit my build.prop file and never have issue
I tried adb pull /system/build.prop, but the build.prop file doesn't appear anywhere on my PC, so I can't edit it. My device appears in adb devices, and the command line responds with "718 KB/s (2943 bytes in 0.004s)" when I enter "adb pull /system/build.prop", but I can't find it
guitarplayer365 said:
I tried adb pull /system/build.prop, but the build.prop file doesn't appear anywhere on my PC, so I can't edit it. My device appears in adb devices, and the command line responds with "718 KB/s (2943 bytes in 0.004s)" when I enter "adb pull /system/build.prop", but I can't find it
Click to expand...
Click to collapse
Make sure you're not in a readonly directory on the host,
a default cmd in windows will start in the dir of %ComSpec% (Usually C:\windows\system32).
Abd will try to put files wherever you're located in you filesystem, unless you tell it otherwise. (adb pull {source} [destination])
Sent from my GT-I9300 using XDA
T0yK4T said:
If you have adb, boot in to CWM, adb pull /system/build.prop
Edit the file, please note that if you're on windows, DO NOT USE WORD or anything similar, it'll mess up your line endings (Newline Format), I suspect this is what happened in the first place.
In any case, if you need to edit the file in plain notepad, download "ToFroDos" and run todos on the file before editing,
then edit, then run fromdos on the file, then adb push it back on to the device.
Note on Re-uploading: you may need to execute adb remount rw in order to upload the file.
In any case, short form:
1. Boot to recovery
2. adb pull /system/build.prop
3. Edit locally (Making sure to keep the proper newline format (\n))
3.5 adb remount rw
4. adb push ./build.prop /system/build.prop
Click to expand...
Click to collapse
How do I do ADB pull/push if I can only get to the stock recovery screen? (The one with Mr. Android on his back with the ! above him)
BTW, I'm on a Note 3
Check the permissions!!!!!
The build.prop file should have 644 permissions.
Check if it fits, else change them using adb.
See other thread
http://forum.xda-developers.com/showthread.php?t=1927198

changed permission of /system/ with yaffs explorer. phone keeps rebooting

Hi,
i accidently changed the permission of the folder "system" to READ only. atleast i think so... i used Yaffs Explorer to change permission of "system" and i ticked the first line on all 3.
again.. this was an accident cuz i didnt know what i was doing.
now the problem is my phone just keeps restarting ... and then it boots into recovery (3e) on its own...
i tried using ADB to change the permission with adb shell ... and all that.. problem is
adb works. phone connects and shows off as device.
but if i try using the adb shell command or any other command with adb ( except sideload ) it tells me
"PERMISSION DENIED" and similar messages...
i have no clue how to safe my phone now any help would be much much appreciated.
i thought something of my own...
is it possible to write a shell script which changes the permission of "system" folder to its correct one.. make it as a .ZIP file and update use it with "update from adb"
please any help^^
best regards
Krype
I assume you are rooted have you gone into CWM and reset permissions?

[Q] Please help- simple mistake... bricked phone

Hi all-
I have unknowingly renamed the framework-res.apk file to framework-res.bak, following the suggestion of a website (who had said to copy the file over, not rename it). I had no idea that would make the phone instantly useless, and render everything inoperative
I was rooted. All I need to do is copy the backup back over, but how?
I am able to get into CMM-based Recovery v5.0.2.7 and can mount the system directory and see it on my PC, but for some reason the framework directory is invisible. There is talk on the web about getting to a prompt and typing:
adb push framework-res.apk /system/framework/framework-res.apk
But how in the world do you get to a prompt? I don't see it on any menu, anywhere and the adb command is unrecognized on my OS.
Hoping I'm not ruined...... thanks for any advice.
Samsung Captivate Glide Android 2.3, Ubuntu
To get ADB, you first have to install the Android SDK.
http://developer.android.com/sdk/index.html
Then, you have to put ADB in the PATH variable.
http://www.redmondpie.com/how-to-set-up-android-adb-and-fastboot-on-windows-tutorial/
After that, you can just type adb in the command prompt and it should work.
Hi,
I downloaded the SDK tools and got the adb command, but when I mount the phone with recovery I still don't see any framework directory.
I got to DOS and navigated to the directory where my copied framework-res.apk file was, and ran:
c:\adb\adb push framework-res.apk L:\framework\framework-res.apk
it replied with:
1319 kb/s (7979827 bytes in 5.905s)
However, then I rebooted the phone and it won't get past the SAMSUNG screen at all, it just sits there forever.
- why can't I see the framework directory, even though I have mounted it through CWM based recovery?
- can I see it using the ADB tools?
- has just copying the copied file back over, destroyed the cell phone? I can't possibly see how.
Thanks for any help
OK I found out the problem.
you need to use forward slashes and put the whole pathname in:
C:\adb\adb push framework-res.apk /system/framework/framework-res.apk
Thats assuming you have the adb command in the c:\adb directory.
It seems the phone is working again.
WHEW! Man that file is dangerous. be warned.

Categories

Resources