[Q] Copying .apk Files Directly to microSDHC Card - General Questions and Answers

Hello,
I'm a long-time Linux user (since 1997) who is just stating to get into this newfangled Android thing. I've ordered a Nook Color from eBay, and in anticipation of its arrival next week, have been downloading deeper-blue's Honeycomb images, dd-ing them to microSDHC cards, and poking around just to get a feel for how the filesystem is organized. Now, let's say I've got a Honeycomb v03 image on a microSDHC card that's plugged into my computer, and accessible as /dev/mmcblk0. I have some .apk files that I've downloaded, and would like to put them on the microSDHC card so they're ready to start using once my NC arrives. All of the instructions I've seen talk about installing stuff with adb, but is there any reason that I couldn't just mount /dev/mmcblk0p2 (the system partition) on an empty directory on my Linux box, copy the .apk files to the app directory, adjust the permissions with chmod (seems like some things need setuid/setgid), unmount, and be good to go? Ditto for NuroSlam's modified su command... can I just copy that to the xbin directory? Most of the instructions I've found use adb push, or even cat to manipulate files on the Android device, which seems weird to me... any reason I can't just use trusty old cp?
Thanks,
Nate

Most of what you wrote is over my head, but I have never used adb to install an apk from my SD card. Just put the file on the card, find it with any of the free file explorers from the market, then click on it. Android will show the permissions and ask if you want to install. Just remember to allow 3rd party apps in the settings.
Evo running UD 2.5

Thanks for the quick reply. I guess it's a bit unusual to be a Linux expert but an Android newbie. I just want to make sure that all of my Linux skills still apply to this variant of the operating system, especially since the Android guys seem to have a completely different way of going about things than I'm used to.
Nate

Related

[Q] Moving apps to sd without app2sd

Ive been trying to mod the stock rom on my MyTouch 3g Slide so that it automatically uses a folder on the sd card as the data folder for apps using the inherent "everything is a file" rule from linux.
I do have SU permissions on the ADB.
My theory is this:
If I replace the folder "data" with a link to the folder on the sd card, then I should be able to have as many apps as I want, I would just need to get a bigger sd card eventually.
Another benefit of this is it will actually be superior to App2SD as ALL apps will not only be able to be on the SD but they will all work properly (so pandora will let me still use the widget)
I am however not that well versed in linux or in modding a folder to be a link and just look like a folder. Anyone want to help?
I also know that, at first, I would need to ADB pull all the files from the required folders and push them back onto the SD folder. I did it once now if only I could get the link working.
edit: I have noticed that certain changes to the filesystem in the stock rom rewrite themselves on reboot. (ex: I tried to change the permissions on the built in shell to root but when I rebooted it changed them back, worked until then though)
edit: another thing I could do is have multiple sd cards with entirely different roms on them and just switch SDs when I want to change roms. But that's a project for another time.
Xperia X10 is still running 1.6.
Apps2SD is a 2.1 minimum so, somebody started to work on exactly what you want.
http://forum.xda-developers.com/showthread.php?t=800555

[Q] Best way to run binaries in emulator on SD Card

So the other day I decided it might be fun to work on porting git for Android. This was surprisingly easy, however, I can't really test it on my tablet because it is still under warranty and I don't think it is worth it. I would like to test it in a emulator, the emulator I am using (4.2.x) seems to have su privileges built in, however, I can't seem to execute from the sdcard. I have tried copying it in an app to the /data/data directory but it has device space issues (I think this is because the actual install partition is actually smaller that the SD card).
Is there a way I can remount (not sure if that is what I want) the drive to allow execute access?
I apologize in advance if this is a duplicate.

[Q] Super Mount app Question - how to?

Hello there, sorry for this noob question, but I am really eager to let my external SD card to work. I have checked out some of the methods like directory bind etc., although some of them do not work and even complicated for a noob like me; I saw this app called Super Mount in google play and also it was previously suggested as what i have read in the forum here in XDA regarding how to run your apps or games in your ext SD so you can save your phones' (in case my mine its tablet) internal memory, did some research, and so I have tried what I could but I cannot seem to make it work... here is the path that I have been using in the Super Mount....(the one listed below that is the example path in google play)
source path : /storage/extSdCard/Android/obb/jp.co.sega.vtc (my tablet)
mount path : /storage/emulated/0/Android/obb/jp.co.sega.vtc
vs.
source path : /storage/extSdCard/DioDict3B (the example on the supermounts screen shot in google play)
mount path : /storage/sdcard0/DioDict3B
So I was kind of trying to copy how the directory should be...and by the directory that I did, whenever I launch my game its not working....its virtua tennis by the way.....and it says i need to download the extrafile over the wifi connection, though it works fine if I install it in my internal SD and put the SD data in the OBB folder. So, I am assuming it has something to do with the mounting. I have successfuly installed Lidroid File Manager and its plug-in the Super Mount, I can mount and unmount successfuly via the plug-in, only that I cannot seem to make it work.
By the way, I have Folder Mount installed and I'm using it for some big games in the tablet. Would that affect the directory or something if I have it installed? I just noticed there's an "emulated" in the directory, would that do anything to make the lidroid not to work? I did not uninstalled it since I have games which I have already mounted via the Folder Mount and it might mess things up more, so just want to consult few experts here in the forum first. Thanks and more power
Galaxy Note 8 N5100 user.
h4ckneyed said:
Hello there, sorry for this noob question, but I am really eager to let my external SD card to work. I have checked out some of the methods like directory bind etc., although some of them do not work and even complicated for a noob like me; I saw this app called Super Mount in google play and also it was previously suggested as what i have read in the forum here in XDA regarding how to run your apps or games in your ext SD so you can save your phones' (in case my mine its tablet) internal memory, did some research, and so I have tried what I could but I cannot seem to make it work... here is the path that I have been using in the Super Mount....(the one listed below that is the example path in google play)
source path : /storage/extSdCard/Android/obb/jp.co.sega.vtc (my tablet)
mount path : /storage/emulated/0/Android/obb/jp.co.sega.vtc
vs.
source path : /storage/extSdCard/DioDict3B (the example on the supermounts screen shot in google play)
mount path : /storage/sdcard0/DioDict3B
So I was kind of trying to copy how the directory should be...and by the directory that I did, whenever I launch my game its not working....its virtua tennis by the way.....and it says i need to download the extrafile over the wifi connection, though it works fine if I install it in my internal SD and put the SD data in the OBB folder. So, I am assuming it has something to do with the mounting. I have successfuly installed Lidroid File Manager and its plug-in the Super Mount, I can mount and unmount successfuly via the plug-in, only that I cannot seem to make it work.
By the way, I have Folder Mount installed and I'm using it for some big games in the tablet. Would that affect the directory or something if I have it installed? I just noticed there's an "emulated" in the directory, would that do anything to make the lidroid not to work? I did not uninstalled it since I have games which I have already mounted via the Folder Mount and it might mess things up more, so just want to consult few experts here in the forum first. Thanks and more power
Galaxy Note 8 N5100 user.
Click to expand...
Click to collapse
I cant find this app anymore.

[APP][4.4]FIXED: Rsync failed to set time on file on KitKat with SD Card Fix in place

There have been lots of posts and articles and questions about the dreaded SD Card access changes in KitKat, and how the SD card can no longer be freely written.
And there is an excellent thread here http://forum.xda-developers.com/showthread.php?t=2684188 about a great app that can fix it.
However, whether you fix your permissions manually, or using this app, there is still a very subtle difference.
I've been using rsync for Android for several years. I have a central Linux server at my house, on which I keep all my files, and I periodically rsync FROM my server, TO my Android Device (in this case, a Galaxy Note 3 SM-900 4G running 4.4.2) to a structure on the external SD card. That way I can keep a local copy of my files with me at all times. I pretty much fill a 64GB SD card this way.
Under 4.3 and earlier, I used /storage/extSdCard (or /mnt/extSdCard ) as my mount point to access my external SD card, and everything worked fine.
However, under KitKat, rsync was having a very strange issue. Attempts to rsync a file would result in:
rsync - failed to set time on file
for any file that it tried to transfer. It seemed like it was transferring the file, but was unable to change the timestamp on the file.
The solution turns out to be visible if you run Android Terminal Emulator and look at the output of the mount command. Tracing through that, I discovered that there is also a less-obvious alternate mount point, which is:
/mnt/media_rw/extSdCard
And, indeed, using that as an rsync target solves the timestamp problem.
Felt this should be posted somewhere, hope this is the right place.
Thanks.
Glen
Nice find bro!!
Sent from my SM-G900W8 using XDA Premium 4 mobile app
Amazing. Thank you.
I'm having the same problem on Lollipop and I don't have that mount point. I tried both /mnt/extSdCard and /storage/sdcard1 and both still get the error. Any ideas?

[GUIDE] Photo Recovery from Internal Memory

Hey guys, I've found a way to recover files from the INTERNAL Memory of the Samsung Galaxy S4.
A lot of people have said that it's not possible, but I'm here to prove them wrong.
You have to have rooted your phone before carrying out these steps. Don't post here asking for help rooting, there's plenty of other threads that can help you with that.
I hold zero liability in the event that you make a nice brick out of your phone. If you do not feel comfortable working with these commands, then please don't follow them.
You're going to need an SD Card that's at least the size of the internal memory on the phone. A smaller one would work, but keep in mind not all the files are going to be recovered.
If the SD Card is brand spanking new, you can skip step number 1.
Format the SDCard with a layer of 0's. This is done so that none of the old data will interfere with your recovery. This step is optional.
Root the Device
Install Terminal Emulator
Insert the SDCard
In Terminal Emulator run the command to gain super user privileges
Code:
su
Grant Terminal Emulator super user privileges
Run this command,
Code:
dd if=/dev/block/mmcblk0p29 of=/storage/extSdCard/raw.dd
Wait. Leave your phone plugged into an AC Adapter, and go grab a can of pop. This command will take a looong time. Couple hours to a day.
Once the command is finished running, shutdown your phone.
Remove the SDCard, and connect it to a computer
Download TestDisk
Open PhotoRec
Select the SDCard and press enter
Use the first option of "Unknown"
Then press "Other"
Select the Directory to backup the files to
Profit
'
How it works:
By dd'ing the internal memory to a file on the SDCard, you're doing a raw copy of the data.
Once the data is copied onto the SDCard, PhotoRec will scan the SDCard for deleted data, doing so will scan the raw file for photos. Not just photos, all files can be recovered using this method.
This method works on all rootable phones, provided you can figure out where the dev block for the internal memory is.
Hope you guys get your files recovered. I know I did
Or just install a file recovery app from play store on a rooted phone and follow app instructions...
Worked a charm for me. lol
jamieridler said:
Or just install a file recovery app from play store on a rooted phone and follow app instructions...
Worked a charm for me. lol
Click to expand...
Click to collapse
Any app you recommend in particular?
Bingley said:
Any app you recommend in particular?
Click to expand...
Click to collapse
Tbh I just downloaded the first app I came across that was free and had half decent reviews, can't remember what one, it was a little while ago, but there are loads of them in the store.
jamieridler said:
Or just install a file recovery app from play store on a rooted phone and follow app instructions...
Worked a charm for me. lol
Click to expand...
Click to collapse
A lot of those apps are for the external SD Card, only support the FAT filesystem, and not as robust as PhotoRec from TestDisk.
Newer devices(Such as the S4) have an ext3 filesystem I believe, and a few paid apps claim to offer support for it.
... Not to mention TestDisk is Open Source :angel:
zzarzzur said:
A lot of those apps are for the external SD Card, only support the FAT filesystem, and not as robust as PhotoRec from TestDisk.
Newer devices(Such as the S4) have an ext3 filesystem I believe, and a few paid apps claim to offer support for it.
... Not to mention TestDisk is Open Source :angel:
Click to expand...
Click to collapse
Although some might well be limited to FAT filesystem, some are not, its up to the user to check before downloading and installing. After that rather simple search and install, I managed to recover every img file on my phone, current and deleted, and back it all up to external memory, all with a free app, which offers img file recovery for free and any other file type of your choice for a small, one off, cost, if you needed it. I recovered almost 1gb of img files in under 10 minutes.
Am I correct in assuming your method copies the entire contents of the internal memory, or a portion of it, to an SD card before starting the search for deleted files? I'm just an amateur with little knowledge trying to figure out how your method works. Sorry don't mean to bash your method of doing it either, just commenting on this as your post suggest no one has ever been able to do this before and your method is the one and only way it can be done.
But if the device is factory reset, will you be able to get files? If i sell my device i don't want anyone sneaking on my photos.
problems
zzarzzur said:
Hey guys, I've found a way to recover files from the INTERNAL Memory of the Samsung Galaxy S4.
A lot of people have said that it's not possible, but I'm here to prove them wrong.
You have to have rooted your phone before carrying out these steps. Don't post here asking for help rooting, there's plenty of other threads that can help you with that.
I hold zero liability in the event that you make a nice brick out of your phone. If you do not feel comfortable working with these commands, then please don't follow them.
You're going to need an SD Card that's at least the size of the internal memory on the phone. A smaller one would work, but keep in mind not all the files are going to be recovered.
If the SD Card is brand spanking new, you can skip step number 1.
Format the SDCard with a layer of 0's. This is done so that none of the old data will interfere with your recovery. This step is optional.
Root the Device
Install Terminal Emulator
Insert the SDCard
In Terminal Emulator run the command to gain super user privileges
Code:
su
Grant Terminal Emulator super user privileges
Run this command,
Code:
dd if=/dev/block/mmcblk0p29 of=/storage/extSdCard/raw.dd
Wait. Leave your phone plugged into an AC Adapter, and go grab a can of pop. This command will take a looong time. Couple hours to a day.
Once the command is finished running, shutdown your phone.
Remove the SDCard, and connect it to a computer
Download TestDisk
Open PhotoRec
Select the SDCard and press enter
Use the first option of "Unknown"
Then press "Other"
Select the Directory to backup the files to
Profit
'
How it works:
By dd'ing the internal memory to a file on the SDCard, you're doing a raw copy of the data.
Once the data is copied onto the SDCard, PhotoRec will scan the SDCard for deleted data, doing so will scan the raw file for photos. Not just photos, all files can be recovered using this method.
This method works on all rootable phones, provided you can figure out where the dev block for the internal memory is.
Hope you guys get your files recovered. I know I did
Click to expand...
Click to collapse
So i've followed your guidelines to a 'T' with a brand new 64g (huge, i know) Sd card, but the command line responds with, "writer error: file to large". Any advice as to how to proceed?
Really appreciate your efforts on this issue, btw!

Categories

Resources