root? - G1 General

sorry to be such an ignoramus but wth is "root"? been trying to do my research but all I come up with is a bunch of tech terms I don't really understand...basically, if anyone can explain in layman's terms what it is, what it does, and how essential it is to the g1, i would really appreciate it...thanks in advance...

root is the name of the most powerful administrative account on Unix operating system.
You may know that Unix (Linux is a Unix. G1 runs on Linux) has user based permission so that a normal user cannot modify the file of the system or of another user. (unless permissions are given)
a "root" account can do anything he wants on the system, delete or change file anywhere, access any resource of the computer.
It's important to people who want to modify their G1 because without "root" access you cannot modify the system files. For example if you want to modify the startup picture you have to replace a file on the G1 that is owned by the root. So as a normal user since you don't have the permission to modify file you cannot change your startup picture. That is why people want root.
Because root is all powerful, root is dangerous. If you are root the system will let you do anything even if it is dangerous.

thank you thank you very much....but now that I know, it's somewhat scary to have this on your phone when you can actually brick your phone if mess around with this "root" thing...

Related

Deploying an app that uses root

I've got a small collection of files I'd like to package (dund, chat, a couple of scripts).
On any other OS I'd just stick it in whatever package management system is in use but I'm finding the documentation to apk's to be very sparse - it just says 'use eclipse' but as there is no java component (I might make a gui one day but I wrote this to get my tomtom working not with anyone else in mind really) and everything requires root access I really don't see how.
Ideally I'd want to just be able to do 'adb install xxx' and it would copy the files to the right place, set the init script to run on boot, and be sorted.. I can't be the first person to want to do that, surely?
TonyHoyle said:
I've got a small collection of files I'd like to package (dund, chat, a couple of scripts).
On any other OS I'd just stick it in whatever package management system is in use but I'm finding the documentation to apk's to be very sparse - it just says 'use eclipse' but as there is no java component (I might make a gui one day but I wrote this to get my tomtom working not with anyone else in mind really) and everything requires root access I really don't see how.
Ideally I'd want to just be able to do 'adb install xxx' and it would copy the files to the right place, set the init script to run on boot, and be sorted.. I can't be the first person to want to do that, surely?
Click to expand...
Click to collapse
The APK format is designed for traditional apps. When you install an APK it pretty much just moves the file to /data/app, and performs a few other maintenance tasks. There's no control over what happens to the files inside.
What you describe is usually done from an update.zip flashed from recovery.
However, if someone wanted to get crazy, one could port ipkg and use that to install arbitrary files to the system, but it would still a two step process (adb push file, adb shell ipkg file). You could even set up an ipkg repository. But this is probably overkill.
Hmm... probably won't bother then. Probably not enough people interested be worth the time.. it's a bit of a niche app (tomtoms have wierd requirements for their DUN stuff so they're a bit of a git to get working).

Can we try EVO's new root method for 1.49?

Ran across this thread in the evo section, seeing how we also have htc's flash lite. It made me hopeful of attaining root. Ive tried every card mentioned as being successful on three different systems:-(
http://forum.xda-developers.com/showthread.php?t=718889
bowtieduece said:
Ran across this thread in the evo section, seeing how we also have htc's flash lite. It made me hopeful of attaining root. Ive tried every card mentioned as being successful on three different systems:-(
http://forum.xda-developers.com/showthread.php?t=718889
Click to expand...
Click to collapse
Even though I didn't really think it would work, I gave it a shot anyway. Naturally, it was unsuccessful. The Eris take FOREVER to load that website, and it never triggers the shell script to ask for a reload, therefore permission is denied for the second part when you reboot with adb shell.
Interesting exploit, though. I wonder if there is some way to modify it for the Eris. Maybe you could contact the devs.
Really, nobody else is interested in this?
MyFixofAndroid said:
Yep that's what I expected. Yea there's gotta be someone here that can do the changes to the EVO files so they work with Eris, and upload the proper files to file sites and have us downloading in no time, so we can get root finally. Yes please anyone here up and willing
Click to expand...
Click to collapse
Toastcfh used to do some work for the Eris someone may want to start there since he provided what looks to be a pretty main part of the EVO root.
sickbox said:
Toastcfh used to do some work for the Eris someone may want to start there since he provided what looks to be a pretty main part of the EVO root.
Click to expand...
Click to collapse
Thanks for the tip. I sent him a PM. Will report back when I find something.
Anyone with an Eris can help out - rooted or unrooted.
I looked at those scripts last night - what seems like the necessary conditions for the beginning of the exploit (part1) are:
(1) there is a directory read/write/traversal permission security flaw in the data area for flash-lite;
(2) apparently, when flash-lite is running it must have root privilege at a moment when it performs a file "chmod" operation
So, an unprivileged user goes in, and makes a symlink (at the correct moment in time) in flash-lite's data area that points to a mtd partition - moments later, flash-lite "chmods" what it thinks is a file in it's data area, but instead, it is chmod'ing the target of a symlink - the normally protected mtd partition.
This allows use of flash_image to write whatever is wanted to that partition - even as an unprivileged user.
It should be easy enough for someone with Linux/Unix command line scripting experience to test to see if these conditions prevail on the Eris. You don't even need to be root - make your symlink point to something in /data/local if you are worried about something bad happening to a mtd partition. Chmod it initially to 600, and see if it get's changed by flash-lite when (and if) you drop the symlink into place.
I would do it, but I've got to go buy all the parts for ( & build) a new computer (no dev station as of last night ).
bftb0
bftb0 said:
Anyone with an Eris can help out - rooted or unrooted.
bftb0
Click to expand...
Click to collapse
Thank you for the detailed explanation. I'll have a look at the scripts, though it's more about learning new things for me, as this exceeds the current state of my unix knowledge. Hope others with more immediate knowledge of the subject will take a crack at it.
The shell script points to sharedobjects within /data/data/com.android.browser/flashlite, but sharedobjects, nor any folder for that matter, exists within that directory on the Eris. Is there a different place this could point; does the Eris have the same objects stored in a different location?
UPDATE: I'm searching my filesystem on my Eris right now to find it. I will report back later with results.
Also If we find a sharedobjects folder (and the right one) then we can point the script in the proper direction and have root very soon.
MyFixofAndroid said:
Maybe the "sharedobjects" folder and other missing folders are really on the Eris, one of you should look for them. Use ASTRO or a different file manager and search most of the whole filesystem and see if you can find "sharedobjects" on your Erises.
In the meantime I'll try the same thing. Maybe there's a search engine for the file system of the Eris that you can get in the Android Market, that would do the trick. A file and/or folder search engine.
If we find a sharedobjects folder (and the right one) then we can point the script in the proper direction and have root very soon.
Click to expand...
Click to collapse
From what I see (and this may just be my eris), the directory probably does exist but we can't touch it:
ls -l
...
drwxrwx--x system system 2010-04-15 02:23 data
...
No read or write permissions to the directory using adb or Astro.
I do have permissions for /sdcard/data on my Eris:
d---rwxr-x system sdcard_rw 2010-06-26 13:26 data
but it doesn't contain the referenced folders and I don't think the browser downloads temporary files to the SD card.
I checked on my other Eris which is rooted. It seems that these may be the directories that we are looking for. However I don't find anything in an app-cache directory.
# find / -name *flashlite
find / -name *flashlite
/data/data/com.android.browser/flashlite
find: /proc/851: No such file or directory
# find / -name com.android.browser
find / -name com.android.browser
/data/data/com.android.browser
Well this appears to be the deal breaker then. Because non-root users of Eris cannot access /data as non-root, they cannot see anything in app-cache, and therefore cannot root yet, at least with this particular method unless there's another way to do it.
We should think of a way to still exploit Flash Lite on Eris, but use a different folder/folders in the Part? scripts that they point to for the operations of the script. This may be possible to do, however, still unlikely to work, and it is still going to be hard at this point.
But does anyone want to give my modified EVO method but for Eris a try? One of you should, so that we can root this thing and get it over with.
jimbonj said:
From what I see (and this may just be my eris), the directory probably does exist but we can't touch it:
ls -l
...
drwxrwx--x system system 2010-04-15 02:23 data
...
No read or write permissions to the directory using adb or Astro.
I do have permissions for /sdcard/data on my Eris:
d---rwxr-x system sdcard_rw 2010-06-26 13:26 data
but it doesn't contain the referenced folders and I don't think the browser downloads temporary files to the SD card.
Click to expand...
Click to collapse
I dont think we would need read write permissions to begin with to use this root, if we had them to start we would be rooted
Because is he using a exploit in flash lite to write to a restricted folder, hes not just found a folder where the permissions aren't set correctly.
If flash lite can invoke admin access and we can exploit it there should be a way to root this.
I am going to the bar going to get some beers for my friends birthday, when I get home I am going to see if I can modify this into an eris root
Yeah JVWARD!
On your rooting effort, all the better, try modifying it for Eris and let all of us know if you succeed, hope you can, so we can get root too. Keep trying it with different changes until you get it to work.
Thanks.
You are able to cd directly into /data/data/com.android.browser/ and then ls, so all hope may not be lost yet. The flashlite directory does not show up, I'm guessing because I haven't used my browser yet so I need to try and get to a flash site and see if it is created. I'm having some problems with the touch screen my leak Eris right now that I'm trying to fix right now if anyone else wants to give it a shot.
You are able to cd directly into /data/data/com.android.browser/ and then ls, so all hope may not be lost yet. The flashlite directory does not show up, I'm guessing because I haven't used my browser yet so I need to try and get to a flash site and see if it is created. I'm having some problems with the touch screen my leak Eris right now that I'm trying to fix right now if anyone else wants to give it a shot.
Click to expand...
Click to collapse
Yes sickbox, by all means, keep trying stuff, and finding that "flashlite" directory etc. till you get it to root. Hope your touchscreen returns to normal, and that you can create the directory that you mentioned in your previous post by using a flash site.
Hey guys, I know this is a tall order, but I want to help. Any chance you could do a "step by step" set of instructions, or at least copy & paste the Evo instructions with the appropriate changes to try this on the Eris? I'm still not rooted, and the SD card Timing root method isn't working for me. I'd like to try something different.
hey can someone with a rooted Eris using a an almost 100% stock Rom setup dump there file system and post it. Anyone using a highly customized Rom don't bother.
Sent from my Eris using Tapatalk
lostpilot28 said:
Hey guys, I know this is a tall order, but I want to help. Any chance you could do a "step by step" set of instructions, or at least copy & paste the Evo instructions with the appropriate changes to try this on the Eris? I'm still not rooted, and the SD card Timing root method isn't working for me. I'd like to try something different.
Click to expand...
Click to collapse
Link to the Evo instructions is in the OP. Currently working to see if it's possible on the Eris, so that's a no-go for now.
Stay tuned.
Team,
I've been working with the scripts with the awesome folks on IRC and have currently gotten thus far:
Part1 - http://pastebin.com/FUJWM3zW
Part2 - http://pastebin.com/6h07zrdm
I believe at this point I've screwed up my FlashLite plugin with my testing, so I'm going to try to recover that and keep moving along.
LR

[Q] How can I access files across users in 4.2?

I'm having a little trouble with sharing music and videos between users in 4.2. Is there any way to be able to access them via a file manager or music app. I've been messing around with it for awhile with no luck.
I'm wondering the same thing.
I know that /sdcard/ now links to /storage/emulated/legacy/ or /storage/emulated/[user_number] (where user_number is 0 for the main user).
But I haven't been able to access files from another user, even with a root explorer or terminal emulator. I can change the permissions on the directories, but I never see any files in them.
Does anyone know? I couldn't find any documentation on this...
It's not on mine, but the rest of the family just got a Transformer and a Nexus 7. It's pretty bad if you can't share across users, they really need to fix that if it's not currently possible.
Bump.
I also want to know how to share the media files with different users. I know that it's good to separate some private folders but we still need to have some common folders that every user can access.....
Yeah, have to agree we need to have some "Common" folders across users. I want media I choose to be available across users. I like the idea of walled off access per user, but some shared folder goodness would be appreciated.
I like the idea of having to "install" apps for each user (It fakes the download and install essentially). It will be nice when apps will have multi user support such as the Kindle app so that different users can be at different places in the same book even.
admin
The tablet owner (which the tab already knows to be user 0) should have administrator privileges. it's my tablet, I want to know what's on it, and share whichever content I choose with whichever user I choose... Not so 'open' now, is it? This will no doubt get a fix before long.
Solution?
Has anyone found a solution to this problem yet? It seems like a major oversight.
DroidRaven said:
Has anyone found a solution to this problem yet? It seems like a major oversight.
Click to expand...
Click to collapse
posted another thread about this...It looks like either no one cares/people have better things to do, or its known to be impossible. I've never seen anything about this aside from the 1 or 2 people asking about it on xda.
You can access other user's file with a root-enabled filebrowser (rootexplorer, ghostcommander, etc.) via accessing the path
Code:
/data/media/<usernumber>/
with root priviledges.
Setting up a a common/shared storage should be fairly easy with a couple of symlinks.
I haven't tried it yet, but might.
The basic idea is to create a folder for the shared storage at like "/data/media/common/" for example and then change permissions and set symlinks accessible for all users at"/storage/common/" or inside each's users own storage....
HellcatDroid said:
You can access other user's file with a root-enabled filebrowser (rootexplorer, ghostcommander, etc.) via accessing the path
Code:
/data/media/<usernumber>/
with root priviledges.
Setting up a a common/shared storage should be fairly easy with a couple of symlinks.
I haven't tried it yet, but might.
The basic idea is to create a folder for the shared storage at like "/data/media/common/" for example and then change permissions and set symlinks accessible for all users at"/storage/common/" or inside each's users own storage....
Click to expand...
Click to collapse
tried that, but im having issues with accessing the linked folder. For some reason everywhere it just shows up as a file (created a symlink to /data/media/shared). SYmlinked plain don't work properly tbh. Permissions are just wierd, in either accounts folders are owned by media_rw and have the same permissions yet, the secondary account cannot acess some of them (notably folders inside /data/media/0) and so on. I have NO idea whats going on with tihs and its very confusing.
As I said, untested basic idea.
And yeah, the permissions of /data are what makes the symlink to /data/media/shared nonworking.
It would be better (and more systemconform) anyways to loopmount it via /dev/fuse, like the actual /sdcard target is as well.
I'll look into this into a bit.
HellcatDroid said:
As I said, untested basic idea.
And yeah, the permissions of /data are what makes the symlink to /data/media/shared nonworking.
It would be better (and more systemconform) anyways to loopmount it via /dev/fuse, like the actual /sdcard target is as well.
I'll look into this into a bit.
Click to expand...
Click to collapse
Ty.
At some point i am hoping this wud become a standard in every AOSP/CM based ROM and so on. shared data is a no brainer.
I've got the same problem..try to make ln -s to the file...but when i try to mv the file or access from other user..it's 0 byte...
Sent from my Nexus 7 using xda app-developers app
will 4.3 provide a solution?
I was wondering if 4.3 addresses this issue or is shared local data not going to happen on android across multiple users?
Put it in the cloud!
Sent from my Lean Mean Jelly Bean Machine. N7

Modify Windows 8 apps problem

Hello
When i try to modify a file in Windows 8 apps. it says "You need permission to perform this action. You require permission from Administrator to make changes in this file"
I have full admin rights. i had followed the tutorial https://www.youtube.com/watch?v=KX3Ev_MfyPM and apply anything but i can't still modify the file. i just want to change background, text and other thing in metro apps like this http://justinangel.net/BlogFiles/WindowsLiveWriter/Hacking-Windows-8-apps_947C/image_22.png
Check the file / directory permissions on the item you're trying to change. Odds are, Admin doesn't have the requisite permissions and you need to be SYSTEM or TrustedInstaller or something.
However, Admin *does* have the permissions to overwrite access controls. If nothing else, you can take ownership of the item and then you can set its permissions any way you want.
Be aware that this kind of tampering may break the app.
GoodDayToDie said:
Check the file / directory permissions on the item you're trying to change. Odds are, Admin doesn't have the requisite permissions and you need to be SYSTEM or TrustedInstaller or something.
However, Admin *does* have the permissions to overwrite access controls. If nothing else, you can take ownership of the item and then you can set its permissions any way you want.
Be aware that this kind of tampering may break the app.
Click to expand...
Click to collapse
how can i be SYSTEM and TrustedInstaller?

Change hosts file without root?

I am thinking of keeping my phone stock given (Android Pay, Security Updates, Work requirements for email/messages). Is there any way to update the hosts file without unlocking the bootloader and installing TWRP? I just want to get rid of the ads as they are soo annoying for non-donate/IAP/Pro-version apps.
Thanks! :fingers-crossed:
Don't Think it is Possible
Unfortunately I do not think that it is possible to adjust the host file without root access. It is in a protected area of the system storage.
Zlatty said:
I am thinking of keeping my phone stock given (Android Pay, Security Updates, Work requirements for email/messages). Is there any way to update the hosts file without unlocking the bootloader and installing TWRP? I just want to get rid of the ads as they are soo annoying for non-donate/IAP/Pro-version apps.
Thanks! :fingers-crossed:
Click to expand...
Click to collapse
There's no way to do this without root access, it's within the /system partition so that says it all really. You don't have to install TWRP, you can live-boot it instead. There's no way around unlocking your bootloader though, plus I'd strongly recommend unlocked it anyway, if something goes wrong with your phone one day and you can't unlock it you're gonna wish you did.
Dang it. I gave non-root a day. It's not for me. Thanks y'all!
can the system.img be modified so that the hosts file is overwritten? when i go in through TWRP and copy an edited hosts file over the one in /system/etc, i can copy it back out and confirm that the file has had its contents changed. but once the device boots up, it acts as if nothing is different.
is it a matter of when the system folder is mounted/read-only?
640k said:
can the system.img be modified so that the hosts file is overwritten? when i go in through TWRP and copy an edited hosts file over the one in /system/etc, i can copy it back out and confirm that the file has had its contents changed. but once the device boots up, it acts as if nothing is different.
is it a matter of when the system folder is mounted/read-only?
Click to expand...
Click to collapse
https://source.android.com/security/verifiedboot/
As far as I understand it, dm-verity will overwrite those changes on boot. Many ROM / Kernels disable it for that reason. Maybe @Heisenberg or someone else can give you a better explanation, though.

Categories

Resources