Get apk infromation using c#

apk file (android application package file) : equivalent to executable (exe) files on windows
aapt.exe : A command line tool which comes with android sdk in order to fetch information of an apk file (It obviously has other usages)
An apk file has a name just same as any other file, but it has a internal name (which will be shown when you install apk file on android os as name of application) 
with aapt.exe I can get internal name of an apk using following command :  
aapt d badging "<apk path>"
I have copied aapt.exe where executable file of my c# application is and I want  :
Enter above command for each apk in selected directory (using GetAllFiles method)
I want to get internal names of apk files and I've tried a lot of ways and I've searched a lot. finally this is what I've got : 
Process proc = new Process();
proc.StartInfo.FileName = "cmd.exe";
proc.StartInfo.RedirectStandardInput = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.StandardOutputEncoding = System.Text.Encoding.UTF8;
proc.Start();
using (StreamWriter sw = proc.StandardInput)
foreach (string path in Directories.GetAllFiles(@"E:\apk", "apk"))
sw.WriteLine("aapt d badging " + "\"" + path + "\"");
//following line doesn't work because sStandardInput is open
Debug.WriteLine(proc.StandardOutput.ReadToEnd());
// There will be a really huge amount of text (at least 20 line per sw.Writeline) and
//it impacts performance so following line is not really what I'm looking for
Debug.WriteLine(proc.StandardOutput.ReadToEnd());
GetAllFiles is
a function that I've created to fetch all apk file full path. It gets two argument. First argument is path and second one is extension of file you want its full path to be fetched.
This is not final code.
As I've commented it out first Debug.WriteLine doesn't
work and second one is not a good idea. how should I get output from proc?
I have tried running process by argument and its awful :)

Hi n3verLieMe,
This forum is for developers discuisng developing issues involve Access. Since you are developing on Android platform, for sepcifc issue about Android, I suggest that you get more effectve response from Android developing forum.
Also if you have issue about developing with C#, you can discuss it via forum below:
Msdn
forums - Visual C# - Microsoft
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • I have a MacBook Pro and just added an airport express to listen to my iTunes on my stereo. How do I get Firefox to use my AX when I use Grooveshark or Pandora?

    i have a MacBook Pro and just added an airport express to listen to my iTunes on my stereo. How do I get Firefox to use my AX when I use Grooveshark or Pandora?

    If the purchases are all from the same account then you can share the content by authorizing each device.
    If you have separate accounts then you have to be authorized to use the content purchased from another account.
    MJ

  • I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    The template is a document in itself, it is not applied to an existing document whether it is a Pages document or a Word document converted to a Pages document.
    You would need to either copy and paste content, using existing styles, or apply the styles to the converted Word document.
    You can Import the Styles from an existing document and those imported Styles can be used to override the current document's styles:
    Menu > Format > Import Styles
    The process is simplified if the styles use the same names, otherwise you will need to delete the style you don't want and replace it with the one that you do want when asked, then the substitution is pretty straightforward.
    Peter

  • How to get multiple values using HttpSession.getAttribute(java.lang.String)

    Hey Guys
    I'm trying to find a way to get multiple values using the following method
    HttpSession.getAttribute(java.lang.String)
    Here's the scenerio. Its a already written application and now i'm trying to make some changes. earlier in the jsp page a combo box was used and value was retrieved in the servlet using the getAttribute method of Session. Now I'm using a html multiple selection list and have to retrieve all the values selected in the list in the servlet. Can anyone please suggest me how to do that. HTTPRequest class has a method getParameterValues which will let me do that but i have to do is using HTTPSession.
    Thanks for your time to read this

    I'm not sure what you are trying to do. You can only use session.getAttribute to retrieve something that has already been stored in the session with a previous setAttribute. If you need to store multiple values under one attribute name using setAttribute, you can store an array, or an ArrayList or whatever type of Collection you want. The request.getParameterValues method is the only way you can retrieve form parameters than can have multiple values. If the servlet hasn't already processed these parameters and put them into the session for you, you have to use request.getParameterValues.

  • I created a new apple id for my iphone and ipad which work great and allow me to access Icloud. on my macbook air can't get it to use my new apple id for icloud. Help?

    I created a new apple id for my iphone and ipad which work great and allow me to access Icloud. on my macbook air  I can't get it to use my new apple id for icloud. It keeps going back to my old apple id and doesn't afford me to alter it. I use system preferences-icloud and it just wants to verify the old apple id but doesn't afford me the opportunity to delete teh account or edit it like the iphone5 and ipad. Help?

    Welcome to the Apple Community.
    You need to use the sign out option on the left side.

  • I cannot get to or use my home pc for a while and am staying with a friend for the foreseeable and am using their pc to write this. How do I access my itunes account on their pc. Thanks Karen

    I cannot get to or use my home pc for some time and am staying at a firends and using their pc to write this. I need to access my itunes account and music on their pc. How do I do this. Thanks

    An easy route would be to use the iTunes Match service such that all your Songs are available anywhere over the internet via iCloud.  Once complete you can create an account on your friends PC, download iTunes and sign-in to the iTunes Store with your Apple Id, start iTunes Match and it will provide access to all your Songs.
    Not quite so good, is simply to follow the steps on your friends PC as above, however, instead of iTunes Match simply access the 'purchased' songs area from the iTunes Store home page that will give you access to all your purchases without iTunes Match.
    IMPORTANT:  Apple only like to see a single Apple Id associated with one device - so if your friend already has an active Apple Id account on the PC, it would be wise to use an alternate machine.  Apple has a 90 day lock out associated with switching Apple Ids on a common device.

  • How to get multiple records using fn-bea:execute-sql()

    Hi,
    I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
    Regards,
    Nagaraju
    Edited by: user10373980 on Sep 29, 2008 6:11 AM

    Hi,
    Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
    For example:
    fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
    Id Name
    01 XXX
    02 YYY
    03 ZZZ
    I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
    <student>
    <Name>XXX</Name>
    </student>
    I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
    Please suggest.
    regards,
    Venkat

  • How do I get imovie to use Photoshop Elements 12 as external editor?

    How do I get imovie to use Photoshop Elements 12 as external editor? I am making a movie slide show with music from my Caribbean vacation photos and adding text captions to photos in PS Elements 12. I can also add some effects to photos like edge blur although I like iphotos effects better but iphoto doesn't seem to do text. The finished PS Elements photo doesn't seem to want to be shared by iphoto which is what imovie uses...
    I am still learning to use PS Elements 12 for Mac (had PSE 7 for WinVista but wasn't proficient) and Mac and it's programs are new to me. I switch between my old Dell which is still amped for graphics and the new Mac mini. I started to use Movie Maker to do my vacation project but read that imovie was better but so far it doesn't seem to have as broad of file useage when it comes to imovie and photo files.
    Hmmmmm??? What to do?

    You simply need to create your stills with Photoshop Elements, save them in a suitable format (.jpg, .png, .tiff are all acceptable) then drag and drop them into your iMovie timeline.  You don't have to use iPhoto.
    Geoff.

  • Is there a way where you can get Siri to use a specific email account to send messages?

    I have multiple mail accounts (three) on my phone - work, personal (gmail), and one that's affiliated with a volunteer group. I set them up in that order. When I last sent new message using Siri, it defaulted to use my gmail account. I can't seem to figure out the command to get Siri to use a specific account. Does anyone know how to do this?

    I don't know enough about Siri yet, but I would imagine that it links to the email account listed as "Default Account" toward the bottom of the Mail Settings options (Settings -> Mail, Contacts, Calendars -> Default Account).
    If true, to link Siri with a different account, you would have to switch the default email account.
    Give it a try and let me know if that works?
    H

  • I just bought the new ipod touch, but when I try to sync it I get told to use the cloud and download from there.  How do I sync it to my itunes so that I get all my songs without going through cloud? Otherwise if this isn't possible I am taking this back!

    I just bought the new ipod touch, but when I try to sync it I get told to use the cloud and download from there.  How do I sync it to my itunes so that I get all my songs without going through cloud? Otherwise if this isn't possible I am taking this back!

    Thanks for no help... but for anyone else, turn off itunes match on the ipod

  • How to get iccid by using imei?i had lost my iphone and i want to find it back.

    how to get iccid by using imei?i had lost my iphone and i want to find it back.

    Ocean20 wrote:
    Not sure about ICCID but you can get your IMEI by going to the computer you normally sync to and open iTunes there click on edit then preferences then on the devices tab and then hover mouse over your backup and the IMEI and other info on your phone will appear
    Interesting. Yet another of the many Easter eggs dispersed throughout the system.

  • How to get the workcentres used in the routing out of 2 alternate routings

    Dear All,
    I would like to know how to get the workcentres used in the routing out of 2 alternate routings.
    I referred PLKO got the Task List Type (PLNTY), Group(PLNNR), Group Counter(PLNAL), Plant(werks).
    I passed this in to PLPO, The problem in PLPO is we don’t have the distinguishing field Group Counter(PLNAL), so I am getting all the ARBID including both alternates.
    How to get the ARBID with respect to Groupcounter 1 alone.
    If a get the ARBID , I can get the ARBPL from CRHD.

    HI,
    Use PLAS Table also.  you have to use PLKO> PLAS> PLPO.
    Pass PLNNR & PLNAL in PLAS and get PLNNR & PLNKN.
    Then pass these into PLPO.
    work centers from CRHD
    Regards,
    Krishna Mohan
    Edited by: Krishna Mohan N on Jan 31, 2008 12:28 PM

  • Getting document no. using document id  from dms

    Dear Experts,
          I want to get Document No. using  Document ID of particuler document from DMS. Is there any Function Module which returns Document No. from Document ID. So how to get this.
    << Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>
    With Regards !
    Shekh Ibrahim
    Edited by: Rob Burbank on Jan 17, 2011 4:23 PM

    Hi again,
    maybe the report DMS_KPRO_READ2 can be useful for this requirement. Other useful tables could be DMS_PH_CD1, DMS_DOC2LOIO or DMS_PHIO2FILE.
    Best regards,
    Christoph

  • How to get the "where used" of a portal object.

    Hi folks!
    I'm coding a program to get the list of the portal objects where a specific portal object (an iView  for example) is used. I found the method getWhereUsedList from IPcdContext but I'm getting some errors.
    Is this the best/correct way to get a "where used list"?
    Does anyone have an example of how to use this method correctly?
    Thanks in advance.
    Geraldo.

    Hi Tanja, thank you very much for your attention.
    Following your tips I figured out that the error was occurring during the casting and not during the getWhereUsedList method call. Now, I'm casting to Object. I'd like to cast to a more proper class. During my tests I got an error that showed me that the cast should be to a PcdGlSearchResult class. I couldn't find any javadoc for this class and when I changed the cast to this class I started to get a execution class load  error. Please let me know if you have any advice regarding the casting.
    private void getWhereUsed1(IPortalComponentRequest request, String id, StringBuffer sb) {
    InitialContext iCtx = null;
    Object objectId = null;
    String tString = null;
    Hashtable env = null;
    IPcdContext result = null;
                         env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
    env.put(Context.SECURITY_PRINCIPAL, request.getUser());
    env.put(Constants.REQUESTED_ASPECT, IPcdAttribute.PERSISTENCY_ASPECT);
    try {
    iCtx = new InitialContext(env);
    result = (IPcdContext) iCtx.lookup(id);
    for (NamingEnumeration ne = result.getWhereUsedList(""); ne.hasMoreElements();) {
    objectId = (Object) ne.nextElement();
    tString = objectId.toString();
    sb.append(tString + CR);
    } catch (Exception e) {
    StackTraceElement[] elements = e.getStackTrace();
    for (int i = 0; i < elements.length; i++)
    sb.append(elements<i> + CR);

  • Cannot open PDF attachments in email, get administrator logon using Acrobat X?

    Cannot open PDF attachments in email, get administrator logon using Acrobat X?

    I have no problem opening PDF attachments that arrive in my Outlook 2003 Inbox; they open fine with Adobe Reader 9. It may be an issue with your email client.
    But if you think that Adobe Reader 8 will fix it, you can download it from http://download.adobe.com/pub/adobe/reader/win/8.x/8.1.3/enu/AdbeRdr813_en_US.exe - make sure that you uninstall Reader 9 first (and Acrobat.com & Adobe AIR).

Maybe you are looking for

  • How to print a report on crystal report server using webservice call

    Hi, I'm looking for web service api calls that help print a report on the crystal report server. Can someone post a snippet of how this is done. Thanks,

  • Firefox closes "Save As" window on some web sites when downloading

    On some web sites, such as Scribd or PC World, Firefox will quickly force shut the "Save As" window when downloading. It happens so quickly that I barely have time to see the "Save As" window. The same web site on IE will not cause this to happen. I

  • PDF Forms filled out don't display on Ipad2

    I use Dropbox to organize many of my files.  Some of those files are PDF forms that have been filled out.  They display correctly on my PC and my android phone.  However, they show up as blank forms on my Ipad2.  Why?  I have tried GoodReader, Dropbo

  • J2EE Thin Client for BEA

    I need to run reports from WebLogic. I downloaded Oracle9i Reports - J2EE Thin Client (J2EE Thin Client for BEA). I am stuck on step 10 of Readme: 10. Shut down the existing Weblogic server and restart it using startExamplesServer.cmd on the command

  • Messenging for the iPad 2

    Since it seems that Apple has no intention of creating a mobile version of iChat, with the creation of FaceTime and their SMS/MMS app for the iPhone (could have two apps in one with a mobile version of iChat), how come Apple has not released their SM