Backing up Oculus APK files. - T-Mobile Samsung Galaxy S7 Edge Guides, News, & Di

I noticed that after re-partitioning my sdcard and adopting it as internal storage, that Oculus apps stopped updating for me. I just thought I would share the method I used to work around the issue.
The following commands are run via ADB:
First, and you only need to do it once, we'll make a folder to house backed up apk files:
Code:
mkdir /sdcard/oculus_downloaded_apks
Second: we loop infinitely watching for new apk files to show up in the oculus_downloaded_apks folder within download and copy them to our backup folder:
Code:
while :; do find /sdcard/download/oculus_downloaded_apks/ -name "*.apk" -exec cp {} /sdcard/oculus_downloaded_apks/ \; -exec echo {} \; ; done
The above will appear to just sit there, if it doesn't kick you back to the adb line, don't worry it's working.
Third: download the apps you need to update via the oculus app. If they were failing to update before, they still will, but there will now be an apk file for the app stored in /sdcard/oculus_downloaded_apks that you can install manually.
Hope this helps someone.

Related

Few EXt2 questions

Is it possible to veiw the files in the EXt2 partition from our G1 terminal? If so, can we also delete files? If so, someone explain how, thanks.
asuming is mounted on /system/sd
just
cd /system/sd
ls -la /system/sd
to list the files
is their a way to erase those files
There are commands for deleting files on Android. Look up the Linux Command prompt commands for performing those functions.
If you've rooted your phone and don't know the commands already, you haven't been paying attention to the instructions.
ls = directory listing
cp = copy
mv = move/rename
rm = remove
Those are the very basics. Remember that Unix-like operating systems are case-sensitive and file.txt is different from File.txt or file.TXT.
If you're using wildcards to delete everything, take a precaution and use the dot-slash. It could save you a lot of trouble by ensuring you're only deleting files in the current working directory. To remove all text files in a directory, for example, you'd type rm ./*.txt
god, i hate how rude people are. I grew up with DOS, so dir, and del come more naturally to me than linux commands. So just ease up on the ppl that don't know linux. I didn't know linux til i started to IRC and wanted to run an eggdrop bot. Not like everyone has irc'd or compiled, or whatever. Heck, it has been so long now, I could not write an irc script or egg addon, and I think i was the first to develop some scripts in IRC 20 years ago. So all I can say is chill.
Shaggy
??huh??
whats the beef all about?
you can google the command and linux and probably have a ton of sites that list and explain the usage and stuff like that for *nix commands unix is a very old OS linus torvalds just woke up 1 day at age 15 or sumthin and said im gonna make a unix kernal that runs on my intel based pc and then instead of selling it and making a fortune I'll give it away and still make a fortune.
LINUS is the greatest man of our time, when the other OS was charging BIG $ to run Apache web servers in the .com boom (even more so now) linux was FREE and gave better throughput on the same hardware
Now if you want a pretty box booklet and packaging as you have become accustomed they have them to, some just feel better if they pay for it, free must not be as good as the one that costs right?
why did I bother just rambling, please ignore the babbling lunatic in the corner he is harmless
bhang
beartard said:
If you've rooted your phone and don't know the commands already, you haven't been paying attention to the instructions.
ls = directory listing
cp = copy
mv = move/rename
rm = remove
Those are the very basics. Remember that Unix-like operating systems are case-sensitive and file.txt is different from File.txt or file.TXT.
If you're using wildcards to delete everything, take a precaution and use the dot-slash. It could save you a lot of trouble by ensuring you're only deleting files in the current working directory. To remove all text files in a directory, for example, you'd type rm ./*.txt
Click to expand...
Click to collapse
if you dontknow how to be polite to the noobz then dont say anything at all. let someone else answer their questions.
Hi Beartard,
Thanks for the info.
This site has such a wealth of information, that it can be overwhelming to many members.
Can you tell me how to copy my apps-private from my ext2 partition to my sd card partition so I can back them up?
Thanks
beartard said:
If you've rooted your phone and don't know the commands already, you haven't been paying attention to the instructions.
ls = directory listing
cp = copy
mv = move/rename
rm = remove
Those are the very basics. Remember that Unix-like operating systems are case-sensitive and file.txt is different from File.txt or file.TXT.
If you're using wildcards to delete everything, take a precaution and use the dot-slash. It could save you a lot of trouble by ensuring you're only deleting files in the current working directory. To remove all text files in a directory, for example, you'd type rm ./*.txt
Click to expand...
Click to collapse
uh you wan't to copy your "app-private" folder as a backup in to yoru sdcard correct? well try this
busybox cp -a /system/sd/app-private /sdcard/app-private
if it don't allows you to copy do this command to re mount the system as read-write
mount -oremount,rw /dev/block/mtdblock3 /system
Hi Nitro .
I tried it both ways and it says operation not permitted.
-------------------
Update:
But wait, I connected my phone to the computer and the app-private is copied to the sdcard.
Your procedure worked!
I erased the folder that was copied to test it again.
Then I used just this set of commands and it worked again:
busybox cp -a /system/sd/app-private /sdcard/app-private
So you still get the same error, but it works.
Thanks alot Nitro!!!
Nitro212 said:
uh you wan't to copy your "app-private" folder as a backup in to yoru sdcard correct? well try this
busybox cp -a /system/sd/app-private /sdcard/app-private
if it don't allows you to copy do this command to re mount the system as read-write
mount -oremount,rw /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
u tried it as root? what error u got?
well glad it worked.
Hi,
The error says:
"cannot preserve ownership of ... cannot preserve permissions of ... operation not permitted"
for every file it tries to transfer.
But then when you look in your sdcard the app-private is there.
So it is a false error.
Thanks again.
Nitro212 said:
uh you wan't to copy your "app-private" folder as a backup in to yoru sdcard correct? well try this
busybox cp -a /system/sd/app-private /sdcard/app-private
if it don't allows you to copy do this command to re mount the system as read-write
mount -oremount,rw /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
It's not working for me...
My error is this:
cp: cannot stat '/system/sd/app-private': No such file or directory
Hi,
Use terminal emulator jf 1.41 or better
type su enter
then the busybox commands
Connect your phone to your computer and look on your memory card.
app-private is there
Proxin said:
It's not working for me...
My error is this:
cp: cannot stat '/system/sd/app-private': No such file or directory
Click to expand...
Click to collapse
bestwebs said:
Hi,
Use terminal emulator jf 1.41 or better
type su enter
then the busybox commands
Connect your phone to your computer and look on your memory card.
app-private is there
Click to expand...
Click to collapse
hey guys need some help here i have the same problem, (as far as the error saying 'no such file or dir') and i tried your suggestion about typing su first then the busybox commands.
i have the most current terminal emulator, unfortunately i still continue to get the same error every time i try to run the busybox commands. it just simply say 'no such file or directory"
you guys have any suggestions for me to try ?
any help would be great.
the error i get is "cannot preserve permissions of" i think that error is not something harmful im n o *nix expert but is just saying it wont save the permision of that folder i think...
Code:
# mkdir /sdcard/bk
mkdir /sdcard/bk
# busybox cp -rf /data/app-private/ /sdcard/bk
busybox cp -rf /data/app-private/ /sdcard/bk
cp: cannot preserve permissions of '/sdcard/bk/app-private': Operation not permi
tted
# ls /sdcard/bk
ls /sdcard/bk
app-private
thats what i did.. worked for me.. moved the app-private in to a folder named bk inside the sdcard
Hi,
We are assuming that you have already moved your apps and caches to the memory in a ext2 partition, correct?
Otherwise this will not work.
I 1st followed all the instructions in this post:
http://forum.xda-developers.com/showthread.php?t=468959
All this has to be done 1st including the 2 step 13's
onikus said:
hey guys need some help here i have the same problem, (as far as the error saying 'no such file or dir') and i tried your suggestion about typing su first then the busybox commands.
i have the most current terminal emulator, unfortunately i still continue to get the same error every time i try to run the busybox commands. it just simply say 'no such file or directory"
you guys have any suggestions for me to try ?
any help would be great.
Click to expand...
Click to collapse
nitro all i can say is thank you very much, i was looking through a 15 yr old unix book looking up commands, and it's just been so damn long ago i couldn't put it together.
thanks a ton. i'm sure you saved me at least a few hours.
@bestwebs ya i have done everything else including moving things to the ext2 partition i was just stuck on a few comands here and there.
but again thanks to both of you, and i'm all setup up now.
Hi,
Nitro is a real blast!
Glad it's working.

Apps-to-SD in Recovery Terminal Tutorial(includes cache and dalvik-cache)

Alright, I've been posting this all over trying to help people figure out how to do this and figured it's time to make a dedicated thread. If at any point you get an error DON'T PROCEED. See if I referenced the error you're getting and, if so, do what I suggested. If not, post your error here and I'll try to get back to you ASAP.
NOTE: This can now also be done through my appstoSD app posted on this forum!!!! It will do everything for you.
This tutorial assumes you have:
A: A micro-sd card with 2 partitions, the first must be FAT32 and the second must be ext2.
B: Your phone must have one of the apps-to-sd ROM's installed.
C: Busybox installed into the /system/xbin directory. For steps on this please reference Darkrift's thread.
Before we start, let's make sure your phone is set up to handle this. Open up the terminal emulator app(available in the market) and type:
Code:
su
busybox df -h
If /system/sd doesn't appear, something is wrong. Either your sd card isn't partitioned correctly or your phone has a ROM that doesn't have apps to sd enabled. If /system/sd does show up then you're set and can start the tutorial
NOTE: Moving the cache is highly unstable and works for some people but not for most. I don't recommend trying unless you have a good idea of how to get your phone back to a usable state if it starts boot looping.
Now, for the first step you need to copy all the apps over to the sd card. To do this type(still in the terminal emulator)(The third and fourth lines are for cache to sd only):
Code:
busybox cp -a /data/app /system/sd/
busybox cp -a /data/app-private /system/sd/
busybox cp -a /data/dalvik-cache /system/sd/
busybox cp -a /data/data /system/sd/
exit
exit
Once the terminal emulator app closes, power off your phone. Then, turn it on in recovery mode by holding down the home button and then pressing the power button. Continue holding the home button until the "T-Mobile G1" icon goes away and a menu comes up. Then press Alt-x to go to recovery terminal. Press enter and a prompt should come up with a "#". Now type(If you only want your apps on your sd card and not the caches, skip steps 6-9)
Code:
mount data
rm -rf /data/app
ln -s /system/sd/app /data/app
rm -rf /data/app-private
ln -s /system/sd/app-private /data/app-private
rm -rf /data/data
ln -s /system/sd/data /data/data
rm -rf /data/dalvik-cache
ln -s /system/sd/dalvik-cache /data/dalvik-cache
reboot
And... you're all set! Your phone might take a while at the android screen since it has to populate the apps tray. If it lasts >5-10 minutes then something likely went wrong. Make sure you did all the steps correctly and if you did try the steps in the recovery terminal section of this tutorial again. If it still doesn't work, post here and we'll try to get it sorted out. That aside, enjoy having your apps on SD card and the permanent 72-73MB available!
EDIT: forgot the app-private directory. Thanks, LucidREM!!!
Maximus is the man.
[email protected] said:
Now, for the first step you need to copy all the apps over to the sd card. To do this type(still in the terminal emulator)(The second and third lines are for cache to sd only):
Code:
busybox cp -a /data/app /system/sd/
busybox cp -a /data/dalvik-cache /system/sd/
busybox cp -a /data/data /system/sd/
exit
exit
Once the terminal emulator app closes, power off your phone. Then, turn it on in recovery mode by holding down the home button and then pressing the power button. Continue holding the home button until the "T-Mobile G1" icon goes away and a menu comes up. Then press Alt-x to go to recovery terminal. Press enter and a prompt should come up with a "#". Now type(If you only want your apps on your sd card and not the caches, skip steps 4-7)
Code:
mount data
rm -rf /data/app
ln -s /system/sd/app /data/app
rm -rf /data/data
ln -s /system/sd/data /data/data
rm -rf /data/dalvik-cache
ln -s /system/sd/dalvik-cache /data/dalvik-cache
reboot
Click to expand...
Click to collapse
i see a missing step here .. what about /data/app-private
LucidREM said:
i see a missing step here .. what about /data/app-private
Click to expand...
Click to collapse
RIGHT! I keep forgetting that one cause that folder pisses me off and I move all the apps there to the normal app folder lol. Will fix in 5, 4, 3...
EDIT: 2,1,0
cp: cannot stat '/data/davlik-cache': no such file or directory
whats up?
NEVERMIND. i need to go back to spelling class.
I'm sure its been asked and answered but I'll ask again! I understand it can take quite a few minutes to boot but is this every time you reboot or just the first time?
Thanks
DynaMight said:
I'm sure its been asked and answered but I'll ask again! I understand it can take quite a few minutes to boot but is this every time you reboot or just the first time?
Thanks
Click to expand...
Click to collapse
just the first time. its moving all the apps and cache from phone to sd card during that first reboot.
won't that slow down the phone even more?
the first time takes much longer. Subsequent reboots are of normal duration, comparable to the standard build.
Smokuevo said:
won't that slow down the phone even more?
Click to expand...
Click to collapse
if you use a class six sdcard, the apps will load faster. i believe that class 6 flash media is faster than the phones flash.
stogchris81 said:
if you use a class six sdcard, the apps will load faster. i believe that class 6 flash media is faster than the phones flash.
Click to expand...
Click to collapse
Pushing (writing) a 2MB file through adp push seems a bit faster to the SDCARD compared to the internal memory.
-> rough average for SDCARD : 1200 KB/s
-> rough average for system storage : 1000 KB/s
Regarding pulling (reading), internal seems faster :
-> rough average for SDCARD : 1247 KB/s
-> rough average for system storage : 1250 KB/s
These tests are everything but serious.. This is using the famous SanDisk 8GB Mobile Ultra (class 6).
To conclude I'd say that speed is almost the same, sometimes a bit faster for SDCARD.
i have one question
i tried to read through the thread but it was waay to large and long
if u do install apps to the sd card
when u install a newer rom on it does that mean the apps are automatically installed once again? i would like to do this because haykuro's roms are released once a week and i dont like reinstalling apps over and over again...
bigballa said:
i have one question
i tried to read through the thread but it was waay to large and long
if u do install apps to the sd card
when u install a newer rom on it does that mean the apps are automatically installed once again? i would like to do this because haykuro's roms are released once a week and i dont like reinstalling apps over and over again...
Click to expand...
Click to collapse
Unfortunately the answer is "sorta". The apps will still be on your sd card in the same places you put them. BUT all the symlinks will be gone so it'll look like they all dissapeared. You'll have to repeat the recovery terminal part of the tutorial, but all the stuff before it will be unnecessary.
i keep getting /system/sd/app is not a directory but when i run mkdir /system/sd/app it says that the file already exists.
the one time i got adb to work i did the steps through it to get apps to sd but the i had to wipe my phone. do i have to do the steps in the first post or recreate the symlinks?
wizern23 said:
i keep getting /system/sd/app is not a directory but when i run mkdir /system/sd/app it says that the file already exists.
the one time i got adb to work i did the steps through it to get apps to sd but the i had to wipe my phone. do i have to do the steps in the first post or recreate the symlinks?
Click to expand...
Click to collapse
In terminal emulator do this:
Code:
su
cd /system/sd
ls -l[CODE]
And put what it says on the line with "app" in it here. If it says "app ->" and has something after the arrow(my guess would be /data/app) then you put the symlink the wrong way. Make sure you do ln -s /system/sd/app /data/app, not the other way around. Let me know what your results are
[email protected] said:
In terminal emulator do this:
Code:
su
cd /system/sd
ls -l[CODE]
And put what it says on the line with "app" in it here. If it says "app ->" and has something after the arrow(my guess would be /data/app) then you put the symlink the wrong way. Make sure you do ln -s /system/sd/app /data/app, not the other way around. Let me know what your results are[/QUOTE]
huh? can you repeat that because i didnt understand what you were saying
im at the first step anyway. and thats when it says /system/sd/app is not a directory. my other question is is do i have to use
rm -rf /data/app
rm -rf /data/dalvik-cache
rm -rf /data/app-private
to re-establish the symlinks or did the steps through adb i used get erased when i wiped it.
Click to expand...
Click to collapse
[email protected] said:
In terminal emulator do this:
Code:
su
cd /system/sd
ls -l[CODE]
And put what it says on the line with "app" in it here. If it says "app ->" and has something after the arrow(my guess would be /data/app) then you put the symlink the wrong way. Make sure you do ln -s /system/sd/app /data/app, not the other way around. Let me know what your results are[/QUOTE]
i had the same problem. it said /system/sd/app is not a directory even though it already existed. when i used your code above this was my result:
drwx----- root root 2009-04-12 20:11 lost+found
-rw-r--r-- system system 29303 2009-04-11 11:56 app
Click to expand...
Click to collapse
wizern23 said:
huh? can you repeat that because i didnt understand what you were saying
im at the first step anyway. and thats when it says /system/sd/app is not a directory. my other question is is do i have to use
rm -rf /data/app
rm -rf /data/dalvik-cache
rm -rf /data/app-private
to re-establish the symlinks or did the steps through adb i used get erased when i wiped it.
Click to expand...
Click to collapse
Umm I wouldn't proceed cause if /system/sd/app isn't a directory then you're gonna have lots of problems. I need to know what it says after you type
Code:
su
cd /system/sd/
ln -s
Specifically, there'll be a line of output that has the word "app" towards/at the end. I need to know what's in that line. If the line doesn't start with a 'd' then app isn't a directory and something happened and you need to remove /system/sd/app by typing this in the terminal emulator:
Code:
su
busybox rm -rf /system/sd/app
and then restart the process from the beginning.
it says that /system/sd/app is not a directory but when i do mkdir /system/sd/app it says the file already exists.
the line with app in it says
-rw-r--r-- system system 29303 2009-04-14 17:27 app.
okay removing that made it work.
[edit] Thank you so much. it finally worked. i now have 73mb free on the phone.
glad I could help. On a side note Apps to SD app is now live

can u write to system folder?

Sorry if this has been answerd, tried searching but didnt find it. (I am driving and looking at same time...ya i know)
Im trying something and i need to put a file in the system folder on the phone. I tried cut/copy and past from my sd card to it and says failed in linda file mgr. I tried in terminal and it gave me cross device link error, if i even put commands in correctly. Linux is new to me, lol.
I am on 1.5 h build for referance
Thanks in advance
You might have to do it in ADB.
adb remount
adb shell
[your command]
besides that, you cannot mv across file systems either. mv is essentially a renaming tool, if you want to move something use cp and rm.
billc.cn said:
besides that, you cannot mv across file systems either. mv is essentially a renaming tool, if you want to move something use cp and rm.
Click to expand...
Click to collapse
I presume you have little *nix background... 'mv' essentially performs both cp and rm functions in one fell swoop. I use it on my desktop and laptop daily. It will copy before it deletes as well, so if you are interrupted, the source files wont be gone with a corrupt destination.
Get Terminal Emulator
this is easily accomplished via terminal emulator, if u have a recent haykur0 build it should include busybox what u would do in the termial type
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
busybox cp /sdcard/namofyour.file /system/nameofyour.file
thanks guys. got same error when used shell. got it done using:
adb push file.name /system

Fixing app re-install/update issues

Now that we have root access I was trying to figure out the cause of the "old apps keep reappearing after an update and restart bug."
From the looks of it it seems the /data/boot-cache directory is corrupt. I tried my experiment with Google Sky Map and got the following:
Code:
$ adb shell
$ su
# cd /data/boot-cache
# ls -al *stardroid*
-rw------- system system 3988 2009-10-17 18:36 AndroidManifest.xml
# rm -rf *stardroid*
rm failed for -rf, No such file or directory
# rmdir *stardroid*
rmdir failed for [email protected]@com.google.android.stardroid.apk, Directory not empty
# fsck
fsck: not found
Same thing happens with all the other apps that misbehave when updated.
Do we have any way of running fsck or some other file system repair utility to fix these issues?
Code:
# rm -rf *stardroid*
rm failed for -rf, No such file or directory
# rmdir *stardroid*
rmdir failed for [email protected]@com.google.android.stardroid.apk, Directory not empty
Do we have any way of running fsck or some other file system repair utility to fix these issues?
Click to expand...
Click to collapse
Or you could just empty the directory before you tried to remove it, since whatever 'rm' binary is provided apparently doesn't understand "-rf" and treated it as a filename.
posguy99 said:
Or you could just empty the directory before you tried to remove it, since whatever 'rf' binary is provided apparently doesn't understand "-rf" and treated it as a filename.
Click to expand...
Click to collapse
Seems it doesn't know -rf but works with -r. Let me see if this now fixes the issues.
Keep up the good work man I had this problem multiple times I think it bothered me more than not receiving sms or vvm.
The fix
That is it, you use -r not -rf. So the fix is as follows (I use Astro for getting the following information):
1) Use Astro and backup all your apps to your SD card.
2) The Astro Application Manager/Backup tool will list in red all the apps that it thinks are newer on the SD card than the phone thinks are installed.
3) For each of those apps select them and note the app installed name (first line, called "Name"). Usually com.xxx.xxx, etc.
4) Get a root shell to your phone (follow instructions elsewhere.)
5) cd /data/boot-cache
6) For all the names you generated in step 3 type
Code:
rm -r *<name>*
e.g. taking Google Sky Map as an example this would be
Code:
rm -r *com.google.android.stardroid*
7) Reboot your phone.
8) All apps should now appear in their latest, correct, version.
Google claims this problem is specific to the Hero and SenseUI. Does this cache folder exist on a normal Android build?
is there a chance someone can make an app that would automate this process?
does the issue come back after awhile?
goku14238 said:
does the issue come back after awhile?
Click to expand...
Click to collapse
Anytime you update an app you will see the issue for that app.
This works great. I used it to fix my Handcent which messed up after I upgraded today.
+1 on this. You guys are really killing this phone.

Folder soft linking problem for WhatsApp media

Because of the lack of internal memory, I tried to move the WhatsApp media folder to sdcard 2nd partition (already being managed by link2sd) and created a soft-link from the original location. I killed WhatsApp and executed steps such as the below:
Code:
$ adb shell
[email protected]:/ $ su
[email protected]:/ # mkdir -p /data/sdext2/data/media/WhatsApp
[email protected]:/ # cd /data/media/WhatsApp
[email protected]:/data/media/WhatsApp # cp -r Media /data/sdext2/data/media/WhatsApp/
[email protected]:/data/media/WhatsApp # find /data/sdext2/data/media/WhatsApp/ | while read line; do chown media_rw:media_rw "$line"; done
[email protected]:/data/media/WhatsApp # rm -r Media
[email protected]:/data/media/WhatsApp # ln -s /data/sdext2/data/media/WhatsApp/Media Media
After the above steps, I started WhatsApp and I was able to access the previous media just fine, such as pictures and audio messages. However, any new media received was not getting saved. E.g., a new audio message will show as if it is downloaded, but if I try to play it, I get the error that it is not found. When I removed the soft link and copied back the Media directory, I was able to receive the media again. Anyone has a clue on what is going wrong with the linking?
Note: I am aware of FolderMount, but I would prefer this manual approach, if I can figure out what is missing. I am also aware of the bind mount alternative, but I wanted to use soft link for the sake of simplicity (no need to muck with init scripts). I can give either of these a try if there is no way to get it working using soft links.
I'm facing the same problem with FolderMount.
My cellular is a Huawei Y300-0100, with Slimkat 9.0 (KitKat), so the cellular is rooted.
Have anybody any solution?
I'm puzzled.

Categories

Resources