[Q] Updater-script - Android Q&A, Help & Troubleshooting

Hi.
I'm using a Samsung SGH-i997 Infuse 4g. GB 2.3.6
I'm using root explorer to describe file system.
I hope someone with experience with updater_script can help.
I was interested in running a command from /system/xbin.
When you run root explorer, in the root, there is a /bin folder and a /system/bin folder. They contain same commands
Commands in it will have: mount, unmount, reboot etc
To run this in updater-script, you will need this:
run_program("sbin/mount", argument etc);
I wanted to run a command in /system/xbin
These command are: (ex:chmod, clear, grep, insmod etc)
I know these commands can be included in a script file, ex: mumbojumbo.sh
and can be extracted, given permission and run as a script.
What I was interested in was if it was possible to run these from updater-script without going through a *.sh script.
Example:
run_program("system/xbin/chmod", argument);
Obviously I have tried without succeeding using different combinations
Thank you

bump
10 chars

just run_program("sbin/chmod", blah) will do.
while in recovery...connect to the adb shell and look into sbin/

Related

Removing hard links & /system/bin/ command options

1) How do I remove hard linked files on the X10 Android file system? I also need to identify them with the "ls" command, but it doesn't work the same as linux by listing the count in the ls listing of hard links to a specific file. The reason is, when I try to move a file in /system/app, it tells me it failed due to cross-device link - likely because the OS knows the link will fail if I move the file to my /sdcard directory. I want to remove the hard-link.
2) Is there a listing of all the options available to the commands in the /system/bin directory? It seems the ls command, for example, is a stripped down version of the ls that comes with linux.
Thanks.
what method are you using to move the files in system/app? you should be able to move them using root explorer, or copy out using dd if= of= statements then rm, the xperia system does not seem to like cp and mv commands
I'm using:
Code:
mv /system/app/Facebook.apk /sdcard/backup/system/app
...it fails. A dd works, because it just does a block copy and doesn't move the file. I'll try moving it with Root Explorer.
I'd prefer an actual command instead of using an app on the phone, as I've connected the phone to my PC with the USB cable and using adb.exe.
FYI, I tried Root Explorer, for some reason it can move the file just fine! My phone is rooted and I'm running the adb shell with super-user access.
use this:
busybox ls -l
busybox cp
busybox mv
Or even better, use "busybox --install /system/bin" and let it install all the symlinks for you
aln688 said:
I'm using:
Code:
mv /system/app/Facebook.apk /sdcard/backup/system/app
...it fails. A dd works, because it just does a block copy and doesn't move the file. I'll try moving it with Root Explorer.
I'd prefer an actual command instead of using an app on the phone, as I've connected the phone to my PC with the USB cable and using adb.exe.
FYI, I tried Root Explorer, for some reason it can move the file just fine! My phone is rooted and I'm running the adb shell with super-user access.
Click to expand...
Click to collapse
biktor_gj said:
use this:
busybox ls -l
busybox cp
busybox mv
Or even better, use "busybox --install /system/bin" and let it install all the symlinks for you
Click to expand...
Click to collapse
Thanks for the tip, you've just explained what busybox is. I always wondered why Titanium Backup wanted Busybox for it to run properly. I'll try these commands out.
UPDATE: Nice, I get VI as well! I was wanting that. I got fedup editing a file on the PC and pushing it back to the phone. Thanks.

[SOLVED] Problems with busybox installer (help required)

I had installed the latest busybox installer (v7.3) by Stericson. It had an option to uninstall existing busybox installations.
Since I had multiple versions of busybox already installed on my P500, I decided to uninstall a few of them but on hitting uninstall it seems it removed a lot of binaries.
Now when I try to use any application that requires root it simply FC's.
Then I tried using ADB shell but it gave me the following error:
-exec /system/bin/sh: No such file or directory
I then manually tried to look into /system/bin from FileExpert app that I had installed on my mobile. I had almost every required essential binaries but sh was missing.
Therefore I did a adb push of sh from one of my other phones(a ZTC blade). It was successful but now ADB shell gives another error:
/system/bin/sh: Permission denied(13)
I need someones help in this. Am I proceeding the correct way. If yes, how do I set permissions without adb shell?
Also I few more points I had noticed (If it might me helpful)
--------------------------------------------------------
1) adb devices: now gives some generic device name (e.g- 80565403440...). Previously I think it was something like "LGP500" if I am not mistaken.
2) only /system/bin now holds some binaries. No binaries are to be found on other locations like /system/xbin, etc.
3) Is copying sh from another phone the correct way to proceed? Or shells are different for different mobiles. If yes, can a P500 owner provide a sh from /system/bin please? Thanks.
[EDIT: The problem has been resolved. Setting executable permission externally and making a adb push worked out. Only thing I needed was a Linux installation and VirtualBox saved my day. Windows powershell may also work it seems but I didnt try it.
I assumed the binary compiled for ZTC Blade will work successfully for the days to come. Thanks XDA]
Can someone please provide me the sh binary from P500 please? It resides in the /system/bin folder.
Also if anyone knows how to use the phones internal memory without adb and set file permissions, it would be a great help.
Someone please provide the sh binary from /system/bin . I will try pushing it with executable permissions set outside to see if it works...

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

problem with pushing a file via adb and/busybox

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

[Q] - exec '/system/bin/sh' failed: Permission denied (13) -

Does anyone know how to use linux to push an original sh file or even just the whole bin folder?
I am unable to use the shell command in adb because I really messed that up by replacing my bin folder with another phones bin folder (same phone make and model - Samsung Proclaim).
(whoops, as you can tell I don't understand much about the system files and therefore I shouldn't be messing with them but my phone was stuck in a bootloop and I got google happy and desparate)
But I've read a few things about possibly using linux to get in there and put the originals back. I have been using linux for a short while but I lack the skills necessary to do this.
Does anyone know if this is something that I can learn to do in a few days or is this something that only years of experience can accomplish?
I'm willing to search and read whatever is necessary I just need a push in the right direction.
Download Stock ROM
Open and decompress zip file (or whatever)
not just adb push the sh executable but all /system folder
remount /system
Code:
adb remount
Code:
adb push ./STOCK_DECOMP/system /system
if you get errors on copying app, just copy each internal folder one by one
at least i got internal shell on a Kindle doing this way (just copying an original sh didn't resolve my problem), but all environment was a little messy.
good luck.

Categories

Resources