Hi,
I was thinkting about making the tethering more user friendly. I had the idea to add the suid bit the the executables but this is not possible because the file system is mouted wth the nosuid option.
Is this required?
Is it save if we (or JF ;-) removes this option?
this would make the development of root enabled programs like tethering much easier.
Michael
/system doesn't have nosuid... you sure you are looking at the right mount or am I misunderstanding something?
Related
Probably a stupid question, I just don't know enough yet.
I need to put some entries in my g1's hosts file. However, the OS seems to have it locked down on my 1.2 rc30. Terminal Emulator tells me chown is not found. I don't have access to the SDK where I am right now, however, but I'm hoping someone can point out what I'm missing.
adnans said:
Probably a stupid question, I just don't know enough yet.
I need to put some entries in my g1's hosts file. However, the OS seems to have it locked down on my 1.2 rc30. Terminal Emulator tells me chown is not found. I don't have access to the SDK where I am right now, however, but I'm hoping someone can point out what I'm missing.
Click to expand...
Click to collapse
busybox has chown in it. RC1.2 has busybox. Also, you must use uids and gids, and can't use user names or group names with busybox on Android.
ah, there's chown, thanks! now i gotta play around and figure out what to chown it to. i tried 0 and 777 (i just recently got back into linux, i haven't done jack with it since slackware 3 came out), and it's still telling me that /etc/hosts: Read-only file system.
adnans said:
ah, there's chown, thanks! now i gotta play around and figure out what to chown it to. i tried 0 and 777 (i just recently got back into linux, i haven't done jack with it since slackware 3 came out), and it's still telling me that /etc/hosts: Read-only file system.
Click to expand...
Click to collapse
you need to remount your /system as read write first.
mount -oremount,rw /dev/block/mtdblock3 /system
I would like to copy additional files into the /data/app/ folder with an update.zip file. My script will successfully add to /system/app/ folder but not /data/app/. I've seen code to delete and then add a whole new /data/app/ folder but I would like to keep whatever is in there already, just add and remove specific files in it. This is what I've been using but it fails. Can this be done?
Code:
show_progress 0.200000 0
delete DATA:app/com.facebook.katana.apk
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
diordnahero said:
I would like to copy additional files into the /data/app/ folder with an update.zip file. My script will successfully add to /system/app/ folder but not /data/app/. I've seen code to delete and then add a whole new /data/app/ folder but I would like to keep whatever is in there already, just add and remove specific files in it. This is what I've been using but it fails. Can this be done?
Code:
show_progress 0.200000 0
delete DATA:app/com.facebook.katana.apk
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
Click to expand...
Click to collapse
While not necessarily my forte, do you happen to be running apps2sd? My guess is that the partition on the SD card hasn't mounted yet, and thus, the file(s) can't be accessed to delete.
yes I am.
Though my update script works to write and delete to /system/.. folders just fine. The update-script files I have looked at delete the whole folder first and then create/copy the new one, then correct permissions. I can't find anything specific to delete/adding individual files though.
diordnahero said:
yes I am.
Though my update script works to write and delete to /system/.. folders just fine. The update-script files I have looked at delete the whole folder first and then create/copy the new one, then correct permissions. I can't find anything specific to delete/adding individual files though.
Click to expand...
Click to collapse
The system folder is not part of apps2sd, so that would make sense.
I'm still thinking this is your issue. I'm wondering if there is a way to mount via an update script?
JsChiSurf said:
The system folder is not part of apps2sd, so that would make sense.
I'm still thinking this is your issue. I'm wondering if there is a way to mount via an update script?
Click to expand...
Click to collapse
I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcard when in recovery to do a backup of google ****s.
zippy-man said:
I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcard when in recovery to do a backup of google ****s.
Click to expand...
Click to collapse
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...
JsChiSurf said:
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...
Click to expand...
Click to collapse
yup, I've done that before. Very handy. that'll get the job done
I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcar
Click to expand...
Click to collapse
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...
Click to expand...
Click to collapse
Yep. You just create whatever script you want and add that to the update script and it will run it. I have used it for many things but have not used a script to mount the sd card.
If you get a hold of the script that cm wrote you could pull out the party that mounts the sd card and use that to write to data if it its located on the sd card.
-------------------------------------
Sent from my HTC Hero
Awsome! Great stuff.
I found this but have not tried it yet as there hasn't been need to update anything lately.
Before anyone flames me, I've searched a lot for this answer, so if I just missed it, please be kind.
Moving on, here's my problem. I got a little delete happy with Titanium Backup as root. I accidentally deleted HtcFacebook sync. My facebook still works and all that, but no longer can I sync my contacts. I've managed to acquire the .apk and the .odex and I read the little tutorial on droidsp0t.com but I can't seem to get these files moved correctly.
I'm on an EVO, Fresh Rom 3.3.0.1, using Android Terminal Emulator
Here's what I tried:
su
mount -o remount,rw yaffs2 /dev/block/mtdblock4 /system
cp /sdcard/download/HtcFacebook.apk /sdcard/download/HtcFacebook.odex
mount -o remount,ro yaffs2 /dev/block/mtdblock4 /system
My unix is a little rusty. So this could be off by a mile, but I was trying to mount the system folder, specifically so I could copy these 2 files into my /system/app/ folder. Then, unmount the system folder. Both mounting and unmounting should require read/changes I believe. Any thoughts?
Long winded, but I want to be accurate. I hope someone can help me, and thank you in advance.
Bump. Anyone have any input?
Sent from my EVO using XDA App
have you tried installing the apk with astro?
I have. It shows me all the details, but then says "Application not installed". I believe it has to be installed by root recovery, but I can't seem to figure out how to do that.
thistimearound said:
Before anyone flames me, I've searched a lot for this answer, so if I just missed it, please be kind.
Moving on, here's my problem. I got a little delete happy with Titanium Backup as root. I accidentally deleted HtcFacebook sync. My facebook still works and all that, but no longer can I sync my contacts. I've managed to acquire the .apk and the .odex and I read the little tutorial on droidsp0t.com but I can't seem to get these files moved correctly.
I'm on an EVO, Fresh Rom 3.3.0.1, using Android Terminal Emulator
Here's what I tried:
su
mount -o remount,rw yaffs2 /dev/block/mtdblock4 /system
cp /sdcard/download/HtcFacebook.apk /sdcard/download/HtcFacebook.odex
mount -o remount,ro yaffs2 /dev/block/mtdblock4 /system
My unix is a little rusty. So this could be off by a mile, but I was trying to mount the system folder, specifically so I could copy these 2 files into my /system/app/ folder. Then, unmount the system folder. Both mounting and unmounting should require read/changes I believe. Any thoughts?
Long winded, but I want to be accurate. I hope someone can help me, and thank you in advance.
Click to expand...
Click to collapse
This happened to me.. I think wiping oughta do it. Ti backup
Sent from my PC36100 using XDA App
I dont mean to jack this tread but I am having the same issue with teeter and my girl friend LOVES that game I am a bit of a noob but I tried astro same message app not installed and been searching with no result. I am using the same rom and everything some instruction would be great
any solution?
I have the same problem, if you find a solution plz share it with me..
Tried to manually push apk to system/app with permissions?
- - - - - - - - - - - - - - - - - - - - - - - - - -
LIFE!
IT'S WHAT YOU MAKE OUT OF IT!
Hello,
I'm using a Samsung GT-i9000 phone with limited size yaffs2 partition (mounting point : /datadata). On this speed memory partition are placed apps data files; so whith lots of them we've got a "low memory" warning while the 2Go ext4 /data parition as lots of free space.
I used a script developped in Samsung Vibrant forum to solve this (same problem) : Workaround for small /datadata partition, reported here in XDA : [SCRIPT][CM7/9] /datadata/ low storage notification lagless fix - init.d script.
I modified it to prevent some lag problems (explanation of what I've done in the thread linked) but it doesn't satisfied me as is.
So I'm starting a new developpement script (cleaner way of doing imho) : moving read only static files (ie : lib subdirectory) from /data/data (pointing to /datadata yaffs2 partition) to /data/local/staticdatadata/appdir/lib and making the corresponding softlink from /datadata/appdir/lib.
If script is used when running everything works fine but I've got a problem : when (re-)booting the phone it seems libs are extracted from apk files and copied to /datadata/appdir/lib (while softlink exists so it is erased).
Is someone could explain why (and when) this occurs please ? Is there a way to prevent this ?
PS : I search and read all (I hope) rc scripts and the only thing I found is a script (on /sbin) about encrypted /datadata (and doesn't seem relevant for my problem).
Anyone could help me please ?
An other question : I've seen that /sbin is not the same in recovery than in Android.
I want to modify my /sbin/setupdatadata.sh (the one used in booting process) but when editing it in recovery changes are removed at boot.
In Android it's a RO access (unless I'm root). I could remount it in RW but I think this file comes from "somewhere else" so I prefer modify it ...
Where could I found it please ?
EDIT : find -name "setupdatadata" doesn't help ...
Wendigogo said:
Anyone could help me please ?
Click to expand...
Click to collapse
+1000
Which part of boot procedure extract and copy apk's lib in /datadata (think there's a test or something like that somewhere) ?
Wendigogo said:
In Android it's a RO access (unless I'm root). I could remount it in RW but I think this file comes from "somewhere else" so I prefer modify it ...
Where could I found it please ?
Click to expand...
Click to collapse
I was right; it's part of initrd so I have to compile my own kernel for that ... not a versatile solution.
If not in good section, thanks to point it.
I was wondering if Android has a file similar to a windows hosts - a file that manually maps IP addresses to domain names.
Thanks.
Yes. It's in /system/etc/hosts. -- You'll need to be rooted, and remount /system as read/write to be able to modifiy it.
Magamo said:
Yes. It's in /system/etc/hosts. -- You'll need to be rooted, and remount /system as read/write to be able to modifiy it.
Click to expand...
Click to collapse
I'm actually following the instructions here:
http://www.howtogeek.com/140576/how-to-edit-the-hosts-file-on-android-and-block-web-sites/
And it says "failed to copy to /system/etc/hosts: Read-only file system".
Any thoughts?
That howto foolishly leaves out two crucial steps.
adb root
adb remount
Before you try pushing the file back to the phone. As I said, this requires your phone to be rooted, and /system to be remounted as read/write.
Sent from my SGH-T699 using Tapatalk
It worked, but do I need to undo the changes? (ie, unmount, unroot before I disconnect the phone).
You shouldn't need to, however, remounting /system as readonly is not a bad idea, it would prevent malicious apps, unless designed in just such a way from writing there. Worse comes to worse, if you can't figure out how to remount it as ro, you can reboot the phone, and that will do so.