Related
I'm trying to start busybox's httpd at boot w/o success. However, I can start it manually post-boot w/o problems. Can I enable a syslog facility so I can see what happens when the bootup script calls it?
Code:
httpd -p 80 -u 80 -h /sdcard/www -c /etc/httpd.conf
I've tried running the process as -u 80 and as -u 0, both work post-boot, not before.
It's Linux - if there is an rc.local you should be able to drop a string in there to make it start.
KaiserLinux said:
It's Linux - if there is an rc.local you should be able to drop a string in there to make it start.
Click to expand...
Click to collapse
Not that simple
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Go into applications and turn on debugging mode. Plug your phone into your computer and run 'adb logcat' or something to that effect. You can play around with your phone and watch the log scroll by.
Your gonna need the whole ADB setup. Go to the samsung epic 4G wiki and check the article about getting root and flashing a new kernel. This will have the instructions for getting ADB on your system as well.
KaiserLinux said:
Go into applications and turn on debugging mode. Plug your phone into your computer and run 'adb logcat' or something to that effect. You can play around with your phone and watch the log scroll by.
Your gonna need the whole ADB setup. Go to the samsung epic 4G wiki and check the article about getting root and flashing a new kernel. This will have the instructions for getting ADB on your system as well.
Click to expand...
Click to collapse
I've compiled my own rooted kernel and a new busybox with syslogd to see if I can diagnose why bb's httpd isn't starting at boot. As I mentioned, it starts manually w/o a problem. adb logcat isn't very useful in this particular situation. Thanks for the reply though.
jocala said:
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Click to expand...
Click to collapse
I'm kind of a noob myself, but I recall reading that init.rc isn't really a shell script. It has a special syntax that is parsed by Android init, I'm not sure just throwing shell commands in there is going to work. I'd post a link to the doc but I can't post links yet
coldguy said:
I'm kind of a noob myself, but I recall reading that init.rc isn't really a shell script. It has a special syntax that is parsed by Android init, I'm not sure just throwing shell commands in there is going to work. I'd post a link to the doc but I can't post links yet
Click to expand...
Click to collapse
Weird, the first 500 lines of init.rc are nothing BUT shell commands.
i.e. chmod 0666 /dev/input/event0
Anyway, further along in init.rc the daemon processes are started up. syntax looks like:
Code:
service playlogo /system/bin/playlogo
user root
oneshot
I've tried setting up my programs (httpd,syslogd) as services, no joy.
jocala said:
Not that simple
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Click to expand...
Click to collapse
sorry to hijack your post.
but i want to know how do you modify the /init.rc,
because when i reboot, the /init.rc will automatic recovery the old verison.
did you check the /init.rc, is it modified, after your phone reboot?
Does logcat not give you the info you want?
You can go here to find out how to redirect stdout and stderr to the logcat as well.
init.rc is part of the root fs, which is compiled into the kernel. So, a custom kernel is required. Search for custom kernel for details.
After 2 days of testing i think i have a clean solution to fix the mobile data drain by setting the preferred network mode to 1 (GSM only). No need to delete or rename anything. Just update the db that is already there .
You need a rooted device for this.
Extract the sqlite3.zip and push to your device with the following commands:
Code:
adb shell mount -o rw,remount /dev/block/mmcblk0p3 /system
adb push sqlite3 /system/bin
adb shell chmod 6755 /system/bin/sqlite3
adb shell
su (to gain root permissions)
sqlite3 /data/data/com.android.providers.settings/databases/settings.db 'update secure set value="1" where name="preferred_network_mode"'
reboot
I'll give this a try. Thanks
Edit: Is it possible I can do this on the device without adb? Adb doesn't want to detect my tablet with debugging enabled.
agentdax5 said:
I'll give this a try. Thanks
Edit: Is it possible I can do this on the device without adb? Adb doesn't want to detect my tablet with debugging enabled.
Click to expand...
Click to collapse
Sure, as long as you have some sort of terminal emulator installed.
agentdax5 said:
I'll give this a try. Thanks
Edit: Is it possible I can do this on the device without adb? Adb doesn't want to detect my tablet with debugging enabled.
Click to expand...
Click to collapse
with root explorer and a terminal app (eg connectbot) you can do it.
What exactly does this do? Is it the same result as renaming the phone and telephone apks?
Sent from my SPH-D700 using XDA App
Thanks! Mine is done. I'll report back later after I charge and give it a go.
mrkrabs said:
What exactly does this do? Is it the same result as renaming the phone and telephone apks?
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
This updates the database configuration setting that causes the phone to not to look for 3G networks only 2G (GSM which includes GPRS and EDGE). I'll let the OP elaborate more, but this config change must reduce the battery usage by causing the phone and telephony services to chill out out a bit when in standy mode.
_motley said:
This updates the database configuration setting that causes the phone to not to look for 3G networks only 2G (GSM which includes GPRS and EDGE). I'll let the OP elaborate more, but this config change must reduce the battery usage by causing the phone and telephony services to chill out out a bit when in standy mode.
Click to expand...
Click to collapse
couldn't describe it better
2g = only poll cell if request is made that needs cell, 3g = poll all the time, which means that if you change to only 2g then it should not check for cell if you are in wifi range.
I am sure thats how the tech works if i remember my time at nokia right LOL
is there a post around here to explain how to get ADB working on this thing? i can ADB shell in but i get "operation not permitted" when i try to mount /system as r/w
(yes i'm rooted)
thanks guys
edit: i got permission to mount the /system as r/w but when i try to push the sqlite3 i get "Device not found"
i suppose i can give a little more info
i'm running windows 7 ultimate 64 bit with an administrator command prompt and the newest iconia a500 usb drivers from acer's support site and i have my SDK up to date
I did this and it doesn't seem to have a big effect. 2 hours on battery mostly in sleep, Display 33%, Cell 31%, Idle 18%, etc.
Richard:
Just out of curiosity (Yes, I fully acknowledge I should have done something like "select * from secure where name='preferred_network_mode'" beforehand! ) what is the default value of "preferred_network_mode" before this modification sets it to "1"?
-----
Doc Kinne
Somerville, MA
kinnerc said:
Richard:
Just out of curiosity (Yes, I fully acknowledge I should have done something like "select * from secure where name='preferred_network_mode'" beforehand! ) what is the default value of "preferred_network_mode" before this modification sets it to "1"?
-----
Doc Kinne
Somerville, MA
Click to expand...
Click to collapse
Default value is 0 (zero).
agentdax5 said:
I did this and it doesn't seem to have a big effect. 2 hours on battery mostly in sleep, Display 33%, Cell 31%, Idle 18%, etc.
Click to expand...
Click to collapse
It's not about what your stats say, but what your mA drain is. i loose only a couple of % in a night (sleep).
edgemaster191 said:
is there a post around here to explain how to get ADB working on this thing? i can ADB shell in but i get "operation not permitted" when i try to mount /system as r/w
(yes i'm rooted)
thanks guys
edit: i got permission to mount the /system as r/w but when i try to push the sqlite3 i get "Device not found"
i suppose i can give a little more info
i'm running windows 7 ultimate 64 bit with an administrator command prompt and the newest iconia a500 usb drivers from acer's support site and i have my SDK up to date
Click to expand...
Click to collapse
@edgemaster191
I am getting the same error; I also am rooted, running ADB from Windows 7 (and Mac OS X - tried both, same error). I also have latest drivers, and latest ADB.
I get "operation not permited error." Did you have any luck on getting further?
try this instead as a work around:
adb push sqlite3 /sdcard/sqlite3
adb shell
$ su
# mount -o remount,rw /system
# cp /sdcard/sqlite3 /system/bin/sqlite3
# chmod 6755 /system/bin/sqlite3
# sqlite3 /data/data/com.android.providers.settings/databases/settings.db 'update secure set value="1" where name="preferred_network_mode"'
# reboot
I've never been able to use root level adb cmnds with this device from outside the adb shell env, I think you need to update the default.prop, but this gets overwritten on reboot, I'm sure there is a way to fix this, and has proabably been discussed in another thread I've been too lazy to go find lol.
nycbjr said:
try this instead as a work around:
adb push sqlite3 /sdcard/sqlite3
adb shell
$ su
# mount -o remount,rw /system
# cp /sdcard/sqlite3 /system/bin/sqlite3
# chmod 6755 /system/bin/sqlite3
# sqlite3 /data/data/com.android.providers.settings/databases/settings.db 'update secure set value="1" where name="preferred_network_mode"'
# reboot
I've never been able to use root level adb cmnds with this device from outside the adb shell env, I think you need to update the default.prop, but this gets overwritten on reboot, I'm sure there is a way to fix this, and has proabably been discussed in another thread I've been too lazy to go find lol.
Click to expand...
Click to collapse
FTFY. 10char.
I am going to have to run some logs....just not seeing any drain that would justify doing this ....will definitely keep an eye out for it though
nycbjr said:
try this instead as a work around:
adb push sqlite3 /sdcard/sqlite3
adb shell
$ su
# mount -o remount,rw /system
# cp /sdcard/sqlite3 /system/sqlite3
# chmod 6755 /system/bin/sqlite3
# sqlite3 /data/data/com.android.providers.settings/databases/settings.db 'update secure set value="1" where name="preferred_network_mode"'
# reboot
I've never been able to use root level adb cmnds with this device from outside the adb shell env, I think you need to update the default.prop, but this gets overwritten on reboot, I'm sure there is a way to fix this, and has proabably been discussed in another thread I've been too lazy to go find lol.
Click to expand...
Click to collapse
such things will be able with kernels that overwrite the default.prop
matguard said:
@edgemaster191
I am getting the same error; I also am rooted, running ADB from Windows 7 (and Mac OS X - tried both, same error). I also have latest drivers, and latest ADB.
I get "operation not permited error." Did you have any luck on getting further?
Click to expand...
Click to collapse
i was able to finally get it, i copied the splite3 to /system/bin using root explorer, ran chmod through terminal emulator then ran the final command from adb shell.
not ideal but it worked
I'd like to get CIFS working on my Tab 10.1. Has anyone got it working or have the module that will work for me?
Thanks!
muzicman82 said:
I'd like to get CIFS working on my Tab 10.1. Has anyone got it working or have the module that will work for me?
Thanks!
Click to expand...
Click to collapse
i could build this for you.
pull me:
/proc/config.gz
and
a uname -a output.
adb pull /proc/config.gz .
adb shell uname -a > my_uname
pershoot said:
i could build this for you.
pull me:
/proc/config.gz
and
a uname -a output.
adb pull /proc/config.gz .
adb shell uname -a > my_uname
Click to expand...
Click to collapse
Output says uname is not defined? Files are attached (zipped).
Thanks for the help!
I believe all I should have to do once the cifs.ko is built is put it in a folder (such as /system/lib/modules/) and tell CIFS Manager to load it?
muzicman82 said:
Output says uname is not defined? Files are attached (zipped).
Thanks for the help!
I believe all I should have to do once the cifs.ko is built is put it in a folder (such as /system/lib/modules/) and tell CIFS Manager to load it?
Click to expand...
Click to collapse
ah yes thats right. no uname in stock.
could you pls go to system settings or dload an app to get it?
you would put it in /data/local/modules (for ex) and let cifs manager load it in.
pershoot said:
ah yes thats right. no uname in stock.
could you pls go to system settings or dload an app to get it?
you would put it in /data/local/modules (for ex) and let cifs manager load it in.
Click to expand...
Click to collapse
Ok, you lost me.. do I need to set a uname, or is it actually there somewhere just not being reported?
Where would I find it in System Settings?
muzicman82 said:
Ok, you lost me.. do I need to set a uname, or is it actually there somewhere just not being reported?
Where would I find it in System Settings?
Click to expand...
Click to collapse
you cant do a uname. your stock retail does not come with the functionality.
get this to me some other way. either through system settings or even through setcpu (that will report that whole string).
pershoot said:
you cant do a uname. your stock retail does not come with the functionality.
get this to me some other way. either through system settings or even through setcpu (that will report that whole string).
Click to expand...
Click to collapse
Attached is the full output from "Under the Hood" app.
The Settings -> About tablet tab has the following:
Kernel - 2.6.36.3 | [email protected] #1
Build Number - HMJ37.UEKF3 P7510UEKF3
If none of those are it... redirect me.
Thanks!
muzicman82 said:
Attached is the full output from "Under the Hood" app.
The Settings -> About tablet tab has the following:
Kernel - 2.6.36.3 | [email protected] #1
Build Number - HMJ37.UEKF3 P7510UEKF3
If none of those are it... redirect me.
Thanks!
Click to expand...
Click to collapse
install setcpu and go to about, device, and under kernel, paste that whole output for me.
pershoot said:
install setcpu and go to about, device, and under kernel, paste that whole output for me.
Click to expand...
Click to collapse
"Linux version 2.6.36.3 ([email protected]) (gcc version 4.4.3 (GCC)) #1 SMP PREEMPT Mon Jun 6 08:59:10 KST 2011"
try this:
http://droidbasement.com/galaxy/kernels/2636/stock-modules/cifs.zip
unzip it.
adb shell mkdir /data/local/modules
adb push cifs.ko /data/local/modules
adb shell chmod 755 /data/local/modules
adb shell chmod 644 /data/local/modules/cifs.ko
adb shell insmod /data/local/modules/cifs.ko
adb shell dmesg <-- after running this, look at the end of the log, do you see it loaded in?
adb shell lsmod <-- if the above is true, do you see it in memory?
pershoot said:
try this:
http://droidbasement.com/galaxy/kernels/2636/stock-modules/cifs.zip
unzip it.
adb shell mkdir /data/local/modules
adb push cifs.ko /data/local/modules
adb shell chmod 755 /data/local/modules
adb shell chmod 644 /data/local/modules/cifs.ko
adb shell insmod /data/local/modules/cifs.ko
adb shell dmesg <-- after running this, look at the end of the log, do you see it loaded in?
adb shell lsmod <-- if the above is true, do you see it in memory?
Click to expand...
Click to collapse
On:
Code:
adb shell insmod /data/local/modules/cifs.ko
I get:
Code:
insmod: init_module '/data/local/modules/cifs.ko' failed (Operation not permitted)
muzicman82 said:
On:
Code:
adb shell insmod /data/local/modules/cifs.ko
I get:
Code:
insmod: init_module '/data/local/modules/cifs.ko' failed (Operation not permitted)
Click to expand...
Click to collapse
your not allowed to insmod.
youll need root access.
if you have an unlocked bootloader, flash in CWM, then push to your system at the bare minimum, su and superuser, then back to nvlfash and put back your stock recovery.
if you dont have an unlocked bootloader, then youll have to intrusively gain root.
pershoot said:
your not allowed to insmod.
youll need root access.
if you have an unlocked bootloader, flash in CWM, then push to your system at the bare minimum, su and superuser, then back to nvlfash and put back your stock recovery.
if you dont have an unlocked bootloader, then youll have to intrusively gain root.
Click to expand...
Click to collapse
what you can try is get CIFS manager, and load it in via that app. it may take.
try it, and see if it works out.
Finally, site is back up.
Ok, if I use CIFS Manager, tell it to load via insmod and set the correct path, kill the program, launch the program, then the end of dmesg reads:
Code:
<3>[ 160.853751] cifs: version magic '2.6.36.3-58 SMP preempt mod_unload ARMv7 ' should be '2.6.36.3 SMP preempt mod_unload ARMv7 '
If I do lsmod, I get:
Code:
dhd 225862 0 - Live 0xbf000000
Lastly, if I try to mount a SMB share, I get "No such device".
I thought I was already rooted... Or at least the superuser app works. And I am on CWM. Is there a reason to go back to stock?
Ill change the vermagic string in the module.
Ill repost tonight.
if you are using the kernal from pershoot, cifs manager simply will work with the module ... i was told so few days ago and i am using it. now .
see the link below
http://forum.xda-developers.com/showthread.php?t=1141307
Sent from my SHW-M110S using XDA App
rainby said:
if you are using the kernal from pershoot, cifs manager simply will work with the module ... i was told so few days ago and i am using it. now .
see the link below
http://forum.xda-developers.com/showthread.php?t=1141307
Sent from my SHW-M110S using XDA App
Click to expand...
Click to collapse
I'm just on stock kernel. Don't really want to overclock... I like my battery life.
unless i am wrong, i believe after flash the kernel..... if you do not install setcpu and overclock by using it, it runs at 1Ghz.
kernel flash also won't erase whatever installed on the 10.1 ..... just in case you will worry that as i originally did ...
muzicman82 said:
I'm just on stock kernel. Don't really want to overclock... I like my battery life.
Click to expand...
Click to collapse
pershoot said:
Ill change the vermagic string in the module.
Ill repost tonight.
Click to expand...
Click to collapse
try this:
http://droidbasement.com/galaxy/kernels/2636/stock-modules/cifs.zip
rainby said:
unless i am wrong, i believe after flash the kernel..... if you do not install setcpu and overclock by using it, it runs at 1Ghz.
kernel flash also won't erase whatever installed on the 10.1 ..... just in case you will worry that as i originally did ...
Click to expand...
Click to collapse
But you can flash the kernel only on tabs with an unlocked bootloader, isn't it?
So if your bootloader is locked you need cifs.ko for the stock kernel.
i'm new here so first of all hello to everyone.
heres my problem. hopefully somebody can help me.
how can i get an inode of a file. that meens to read a
particular part in the data partition. of course that
could only be possible with su, thats clear.
You've got to use the command line for every root thing.
You can get the inode as described here: http://www.cyberciti.biz/faq/howto-print-inode-data-structure/
How to use root commands: http://forum.xda-developers.com/showthread.php?t=2226664
nikwen said:
You've got to use the command line for every root thing.
You can get the inode as described here: http://www.cyberciti.biz/faq/howto-print-inode-data-structure/
How to use root commands: http://forum.xda-developers.com/showthread.php?t=2226664
Click to expand...
Click to collapse
thanks for the quick response.
i find out that ls has no option -i on android to show inodes.
does anybody know another way to get them
xiyuo said:
i find out that ls has no option -i on android to show inodes.
does anybody know another way to get them
Click to expand...
Click to collapse
Compile or use a version of busybox which has it and use that one. Add it to your apps assets and copy it to the data directory of your app. Then use that binary for the ls command.
That part is very difficult on Android. On one device you have got the ls command but the output might look completely different on another phone. (Some time ago someone reported that he noticed "ls" being linked to "ls -l" on one phone. On another phone the option "-l" might be missing.
So it is recommended to use busybox for every root command.
..
nikwen said:
Compile or use a version of busybox which has it and use that one. Add it to your apps assets and copy it to the data directory of your app. Then use that binary for the ls command.
So it is recommended to use busybox for every root command.
Click to expand...
Click to collapse
i did that.
but with
./busybox ls -i
i get
cant execute permission denied.
even if i use su. how could that be?
does anybody know how i get the permission?
xiyuo said:
i did that.
but with
./busybox ls -i
i get
cant execute permission denied.
even if i use su. how could that be?
does anybody know how i get the permission?
Click to expand...
Click to collapse
In Linux you have to add the right to execute it first:
Code:
su
chmod 775 <filename>
Can someone post a current kernel version screenshot off of their phone please..
Update: (11/08/2014)
Instructions:
Grab file at --> https://drive.google.com/file/d/0B31X8bH_5Gl-NmExWmhlbzJ5T3c/view?usp=sharing
adb push root /data/local/tmp
adb shell
cd /data/local/tmp
chmod 777 root
./root
If you get # symbol for prompt, you have root.
Let me know the results please.. I am trying to do this without actually having a phone, I might as well go get one today though, because this might end up being to painful this way..
Update (11/15/2014):
Well, at this point I have been able to establish a remote shell to my PC. This might not sound like much, but if your on the phone and run my binary it will establish a remote shell to anywhere that you specify where a valid listener is listening on an IP and port that is specified. Malware people would go nuts with this. Why? Because with this essentially I could grab all personal information from your SDcard and other areas without your permission. Pretty much run any command that you can do now locally, I could do on your phone remotely. So, I am seeing now what leverage points I might be able to make with this..
Gl
AngelsPunishment said:
Gl
Click to expand...
Click to collapse
Ohhh. yummy....
Is this root already available??
SM-N910V
http://download.chainfire.eu/590/CF-Root/CF-Auto-Root/CF-Auto-Root-trltevzw-trltevzw-smn910v.zip
Am I missing something or has chainfire already accomplished this.. ?
gatesjunior said:
SM-N910V
http://download.chainfire.eu/590/CF-Root/CF-Auto-Root/CF-Auto-Root-trltevzw-trltevzw-smn910v.zip
Am I missing something or has chainfire already accomplished this.. ?
Click to expand...
Click to collapse
I thought that was for the DE (Developer Edition).
Nooter said:
I thought that was for the DE (Developer Edition).
Click to expand...
Click to collapse
I don't think so. Look at your model, the developer edition I believe would be a different model..
Well, hold on, maybe.. It might have an identical model number. That would be strange...
gatesjunior said:
I don't think so. Look at your model, the developer edition I believe would be a different model..
Well, hold on, maybe.. It might have an identical model number. That would be strange...
Click to expand...
Click to collapse
It's for the Dev edition. It was listed as the retail version model number but it is indeed for the dev version.
Someone want to try this
Instructions:
Grab file at --> https://drive.google.com/file/d/0B31X8bH_5Gl-NmExWmhlbzJ5T3c/view?usp=sharing
adb push root /data/local/tmp
adb shell
cd /data/local/tmp
chmod 777 root
./root
Let me know the results please..
Can you tell us how this method achieves root?
ronaldheld said:
Can you tell us how this method achieves root?
Click to expand...
Click to collapse
Well, it is essentially overflowing to try and gain root, it will not in any way cause any permanent change to your phone or flag anything.
gatesjunior said:
Instructions:
Grab file at --> https://drive.google.com/file/d/0B31X8bH_5Gl-NmExWmhlbzJ5T3c/view?usp=sharing
adb push root /data/local/tmp
adb shell
cd /data/local/tmp
chmod 777 root
./root
Let me know the results please..
Click to expand...
Click to collapse
did you fo this? what did it achieve?
mrnick81 said:
did you fo this? what did it achieve?
Click to expand...
Click to collapse
No, I do not have the phone yet.. Probably go out tonight and get it. But I wanted to start work and get things moving..
Thank you for the attempt!
Has anyone tried it yet? If not I am will give it a whirl.
Chuckleb0ne said:
Has anyone tried it yet? If not I am will give it a whirl.
Click to expand...
Click to collapse
exactly, not going to adb an unproven method
I'll give it a try in a second.
---------- Post added at 03:52 PM ---------- Previous post was at 03:37 PM ----------
Where do i place the root file on my computer? It stops me at (cannot stat root, No such file or directory).
I have a windows computer with adb installed and everything.
gatesjunior said:
No, I do not have the phone yet.. Probably go out tonight and get it. But I wanted to start work and get things moving..
Click to expand...
Click to collapse
Ok, so here is the results.
NM. same results as above.
mrlaigle said:
NM. same results as above.
Click to expand...
Click to collapse
O.k. guys, well that was shot one with no phone. Now I have phone in hand All mine, precious...
Let me know if you need restore tar.