In linux there is a utmp file in /var/run, where is that file in android? If it does not exist, how "whoami" program know the device username? What file does it read? *Note: I try it with Termux.
Related
Hi, I'm fairly new at developing android. Im having the hardest time making a virtual sdcard. can someone please give a some tips or a walkthrough. i've read all the how to's n googles dev forum.
ive gotten to the point where im in cmd.exe on windows
i opened the mksdcard.exe
the when i go to type in mksdcard 64M sdcard.iso
it says its not recogized as an internal or external command, operable program or batch file.
CAN ANYONE PLZ tell me whats going wrong. im so anxious to start deving for android!!
It sounds like the directory containing the Android command line tools isn't in your path, so the mksdcard program isn't being found. You'll need to edit your PATH environment variable and add the "tools" directory location to it. The "tools" directory is in the Android SDK directory on your computer, at the same level as the "platforms", "docs", "add-ons", and other such directories.
More details can be found on this under the "Download and Install the SDK" section of the Android developers website at http://developer.android.com/sdk/installing.html
In Windows Phone 8 Runtime component (C++/CX) we can use fopen or CreateFile2 to create/open a file. For example
Code:
fopen("hello.txt", "w");
You see, I don't explicitly specify any path. And I can't figure out where this hello.txt resides? It can't be in Installed Location, and it isn't in Local Folder. Where is it?
Well, you could try the following:
_fileno() to get the integer file descriptor from the FILE*
_get_osfhandle() to get the Win32 HANDLE from the fd
GetFileInformationByHandleEx() to get the file name from the HANDLE.
I *think* those are even all supported on WP8, though I haven't checked except for the last one.
APIs like GetFullPathName() would make it easy, but may not be supported. CreateFile2 would let you skip the first two APIs in that list, if it works.
I inspected the WP8 .vhd file, and saw that my file was created in the Install folder. It looks like native code does not conform to the rule (Install folder is read-only location)
Whaaaaaat?!? That's... um. Serious. I'll look into it.
onmyway133 said:
I inspected the WP8 .vhd file, and saw that my file was created in the Install folder. It looks like native code does not conform to the rule (Install folder is read-only location)
Click to expand...
Click to collapse
Are you sure it does not create it on the root of the isolated storage space? That's rather unexpected to have the file in a read-only folder...
The install location is read/write to the app.
What
the
hell?
I can send test code if anybody wants, but it's easy enough to check yourself. You don't even need native code to do it, the .NET APIs work well enough.
I am somewhat confused.
mcosmin222 said:
Are you sure it does not create it on the root of the isolated storage space? That's rather unexpected to have the file in a read-only folder...
Click to expand...
Click to collapse
You can create a simple project to test this. In the C++ WP Runtime Component project, just use fopen or CreateFile2
Then use Hyper-V manager and Disk Management to easily inspect the WP .vhd file (I'm using Emulator)
You can use some things like IsoStoreSpy to see that the newly created file does not reside in the Local Folder (in WP8, they rename Isolated Storage to Local Folder)
I wrote a small app to test it; I can share the source if you want. It's really simple. I used the native APIs to create the file and write to it, then used the managed APIs to confirm it was there and read it, then used the native APIs to delete it, and the managed ones to confirm it was gone. Very simple. I then used the managed APIs to create the file myself (await Package.Current.InstalledLocation.CreateFileAsync("hello.txt")) and it worked.
Have you tried to create a xap file in the Install folder and reboot?
My 8X is freezing after creating a xap...
@spikedviper: No, I haven't tried anything like that. I don't seem to have write access from my app to the folder where pre-installed / OEM XAPs reside.
I did try editing the manifest; I was able to edit it with no problems but changing the capabilities didn't *do* anything, so I'm pretty sure it's still only parsed at install time.
hm...so what is the default path if no path specified?
looks like it stores it here: ms-appdata:///Local/ anyway check out "Data for Windows Phone" at msdn
I'm running Android Studio 1.3 (I think it was the latest version) in a 4GB RAM pc, I've searched about how to make Android Studio take less memory so that I can run it better in my low spec pc, so far I've found the following questions in the website StackOverflow:
***android-studio-is-very-slow***
and
***android-studio-takes-too-much-memory***
In those question people suggested to low the memory value in the `Xmx` attribute from `750m` to `256m` in the studio.exe vmoptions file the folder `/Applications/Android\ Studio.app/Contents/bin/studio.vmoptions` I looked in the offcial documentation here: and there it says that is not recomended to edit those files, they advice to create a custom file, but I don't know how to do this.
Questions:
1) Should I create a whatever.exe vmoptions file in that folder with the change? and what should I do with the original file? and how android studio would know to read from my custom file instead of the original file.
2) In the official documentation says that edit that file but it says that that file is in this path `%USERPROFILE%\.{FOLDER_NAME}\studio.exe.vmoptions and/or %USERPROFILE%\.{FOLDER_NAME}\studio64.exe.vmoptions` but I can't find the file in that path, instead i founded in this path `/Applications/Android\ Studio.app/Contents/bin/studio.vmoptions`.
What I did before asking:
Before asking i tried to edit this file `/Applications/Android\ Studio.app/Contents/bin/studio.vmoptions` but it says that this file is already opened by another program or that it can't be saved.
I did this with android studio closed and I pretty sure that this file it's not opened by another program.
This question is not really N6 specific. It could be for any rooted Android device... It's just that I have an N6 and I don't know where else on XDA to ask it
N6 running great, rooted, final stock ROM they issued...
Mine has a hidden file (a Barnes and Noble Nook book) that is only discoverable using a root file explorer. Which I have, and I found the file I want to drag to my desktop. So far so good.
BUT
How do I drag that file over to my desktop? Android File Transfer (I'm on a Mac), doesn't see all of the file structure and definitely not hidden files, (unless I can change something in configuration). I've tried middle manning it by moving it to Drive or attaching it to an email and mailing it to myself, but each time I try, "Root Browser" crashes.
So in short, I need root to find this file. I have root and I found the file. All I need to do is to take a copy of the file (it's a data file not a system file). But I don't know how to.
-Peter
There are a number of ways, but you may end up disappointed in the end. Your book is likely protected by DRM, so even if you copy the file, you can't open it.
Here is one of the many ways to copy:
Install a terminal app on your phone. I use JuiceSSH, but there are many others.
You'll need the path to your file. It might be something like /sdcard/barnesnoble/book.pdf.
If the file requires root to read, first write su <enter>
Then use cp to copy:
cp <from path> <to path> <enter>
For to path, use /sdcard/
Once copied, it should be visible on your computer.
hi.
i found on my old pc file name "recovery.img". i would like to open that file on my pc. how to do this can you help me?
virtualbox doesnt open that file, power iso/deamon tools say file could be damage.
i dont have my old phone btw.
pis
alibaba
alibabaxyz said:
hi.
i found on my old pc file name "recovery.img". i would like to open that file on my pc. how to do this can you help me?
virtualbox doesnt open that file, power iso/deamon tools say file could be damage.
i dont have my old phone btw.
pis
alibaba
Click to expand...
Click to collapse
If it's from an android device,
It's a copy of the recovery partition and contains no user data.
It's basically the program that would create a data backup.
It's really only usable on the device it was created for.
alibabaxyz said:
hi.
i found on my old pc file name "recovery.img". i would like to open that file on my pc. how to do this can you help me?
virtualbox doesnt open that file, power iso/deamon tools say file could be damage.
i dont have my old phone btw.
pis
alibaba
Click to expand...
Click to collapse
Additionally, If your img is from an android 9 or lower device, you can use imjtool in a linux or MacOS environment to unpack that .img file. Here are can find the instructions on how to use it. You can the look for files pertaining to fstab and get a clue there or on a default.prop. Just don't edit something you're not sure of or you may fry your emmc.