Hi Dw
I'm planning to create an application for mobile phone, now my problem is that I've never done this before and I don't know the filing or the root files of a mobile device but I use to hear that it also has a 'c:\' drive which is good for this application I'm planning but the problem is that I don't know if a file named etc exist on a mobile phone or not, the application that I'm planning will be the add or it will come with my program for windows pc and I'm trying to enable the feature of controlling the web access which will limit or block certain websites from being accessed by the device, in windows pc I used that file for controlling so was thinking of using it too on mobile device if it do have the file c:....\etc\host and also how can I explore these file on my computer let say I connect a phone with a cable which program should I have and if the file exist does all the smartphones have it and is it located the same root from symbian, android, blackberry, etc? Thank you.

Recommended Answers

All 5 Replies

Similiar to linux, an Andoid will mount a filesystem to / (and others) to access the files within. C:\ is a DOS/Windows invention. So to etc/hosts will usually be found at /etc/hosts.

Thank you but I've never used Linux OS I'm using windows but I think the approach is more the same to rooting files but I'm not sure of that, in windows I can access this file by 'C:\Windows\System32\drivers\etc\hosts' how will or what is the full path to this file in android and symbian because I don't think they have 'windows\System32\' and also how can I explore this on a computer when I've connected the phone to a computer so that I can make sure that I get the correct and accurate path to this file. Thank you

In Android, the hosts file is located at /etc/hosts

I can't find the path even if I point the DOS to Drive f:/ where my phone is at but the command prompt says can't find the path. Any help?

You can't do this on a phone mounted like a usb disk. You must turn on dev options and use adb to access the phone. Or use a file manager (i think you may need root for this) and on the phone look for /etc/hosts

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.