How to find a file inside device ?

This is a discussion on How to find a file inside device ? within the Droid Development forums, part of the Droid Hacking category; Hi to everyone. I need some help. I need to find a file inside device, but i have just a part of the file name ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: How to find a file inside device ?

  1. Junior Droid
    asteroidg's Avatar
    Member #
    158279
    Join Date
    Jan 2011
    Posts
    8
    Phone
    Enter Current Phone Model Here
    #1

    How to find a file inside device ?

    Hi to everyone.

    I need some help. I need to find a file inside device, but i have just a part of the file name . How can I find that inside the device programmaticaly ? Also my file will have the following mask file* , where * will replace the other character file name ?

    What methods should I used for that ? or even some linux commands to retrieve the path of the file ?

    Any help will be appreciated.

    Thank you.
  2. Sponsor
    DF Advertising
    Join Date
    Nov 2008
    Location
    DroidForums.net
     
     
     
     
  3. Developer
    jeffv2's Avatar
    Member #
    151962
    Join Date
    Dec 2010
    Location
    south jersey
    Posts
    1,240
    Liked
    3 times
    Phone
    galaxy nexus
    DroidForums.net Developer
    #2
    Tell us the file or part of the name

    Sent from my Droid using DroidForums App
    Check it out!
    Arcane rom
  4. Junior Droid
    asteroidg's Avatar
    Member #
    158279
    Join Date
    Jan 2011
    Posts
    8
    Phone
    Enter Current Phone Model Here
    #3
    Ok. The file name will be AndLib_AC0123456789.apk, I want to look trough all device to find the that file using just AndLib*.apk . Any suggestions or even methods will be appreciated!
  5. Super Moderator
    CJM's Avatar
    Member #
    117189
    Join Date
    Sep 2010
    Location
    Mississippi Gulf Coast
    Posts
    5,615
    Liked
    246 times
    Phone
    Galaxy Nexus, Motorola Droid
    Premium Member
    #4
    If the .apk has been installed, with a file explorer on your phone (astro, root explorer, etc.) look in data\app or system\app.
    If it hasnt been installed, and downloaded from the stock browser, look in the download or my downloads folders on your sd. Again with a file explorer from the phone.
    If it was downloaded from another browser, like xscope, it may be in that folder on you sd. Hope this helps.

    Follow us on Google Currents & be sure to subscribe. Here's how to stay Current.


  6. Junior Droid
    asteroidg's Avatar
    Member #
    158279
    Join Date
    Jan 2011
    Posts
    8
    Phone
    Enter Current Phone Model Here
    #5
    Thank you CJM.
    On my both phones(HTC-1.5, XPERIA-1.6) I just figure out that all the time when I am downloading a file it will be stored in /sdcard/download . Getting the file from a specific folder will be :

    File dir = new File("/data/app");
    File[] fileList = dir.listFiles();

    if (fileList != null)
    {
    for ( int i = 0;i<fileList.length;i++)
    {
    filename = fileList[i].getName();
    Log.d("FN-log","file name="+filename);

    if (-1 != filename.indexOf(appName.toString()))
    {
    break;
    }

    }
    }

    Any way I am still looking to have a search engine , method which will look inside the whole device for a file name or masked file name .
  7. Super Moderator
    CJM's Avatar
    Member #
    117189
    Join Date
    Sep 2010
    Location
    Mississippi Gulf Coast
    Posts
    5,615
    Liked
    246 times
    Phone
    Galaxy Nexus, Motorola Droid
    Premium Member
    #6
    Glad you figured it out.

    Follow us on Google Currents & be sure to subscribe. Here's how to stay Current.


  8. Premium Member
    brando56894's Avatar
    Member #
    45165
    Join Date
    Mar 2010
    Location
    New Jersey
    Posts
    1,217
    Phone
    HTC Incredible
    Premium Member
    #7
    you could also try the find shell command or port/copy over locate and updatedb.
    How To: Compiling a Custom Version of Clockwork Mod Recovery
    <-- Lockscreen

    ROM: Incredibly Re-Engineered v2.3
  9. Junior Droid
    asteroidg's Avatar
    Member #
    158279
    Join Date
    Jan 2011
    Posts
    8
    Phone
    Enter Current Phone Model Here
    #8
    I have tried this too but every time i am getting the issue access is denied.I uses the following code but no luck:

    try{
    Process process;
    process = Runtime.getRuntime().exec("su -c find / -name *.apk");
    BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
    }
    catch (InterruptedException e)
    {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }

Sponsors

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. Can you use a 2.2 Kernel on GB?? Find out inside...
    By es0tericcha0s in forum Android Roms
    Replies: 22
    Last Post: 12-28-2010, 12:42 PM
  2. ADB does not find device
    By PCRoger in forum Droid X Tech Support
    Replies: 5
    Last Post: 09-18-2010, 02:27 PM
  3. how do I find my Droid's device security code
    By jack t in forum Pending Submissions / Questions
    Replies: 2
    Last Post: 06-03-2010, 01:51 PM
  4. Rename a file so from inside the apk
    By destinydmm in forum Droid Development
    Replies: 0
    Last Post: 02-09-2010, 08:33 PM

Search tags for this page

android find file
,
android locate a file on the device
,
driod xperia how to find a file on it
,
find a file on a droid
,
find file on droid device
,
how to find filea on driod
,
how to find files inside android phone?
,
how to locate a file on android
,
how to look at files on my driod
,
how to look up downloads on droid
,
how to look up files on android phone
,
how to search a droid phone for a file
,
how to search for a file in android
,

how to search for a file on droid phone

,
i want to look at files on my android
Click on a term to search our site for related topics.