Cross-device link error - EVO 4G General

I've searched and can't seem to find a way to solve the issue.
I'm trying to install a metamorph to make the engadget widget transparent and I need to movie the apk from /data/app to /system/app (according to this post: http://forum.xda-developers.com/showpost.php?p=6319426&postcount=102)
In doing so I've received the cross-device link error.
I've tried these sets of commands:
(note: I am typing the below commands from memory, I got them by searching and I typed them word for word even if the commands below may be incorrect)
Code:
mount -o rw,remount /dev/block/mtdblock5 /data
mount -o rw,remount /dev/block/mtdblock3 /system
mv /data/app/name.of.apk /system/app
HTML:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mv /data/app/name.of.apk /system/app
I've even tried using root explorer and while it shows a progress bar and says it's moving the apk, nothing happens.
I've tried rebooting the phone and the issue still persists.
Can anyone help? Thanks!

Go into /data/data and /data/dalvik-cache and delete all files affiliated with that apk and reboot, the move a copy of the apk file to /system/app, fix permissions and reboot.

let me know if this works.. i'm curious. i had to resort to
Code:
cat /data/app/name.of.app.apk > /system/app
to get it to work. i read somewhere that mv doesn't sit well on android 2.1. cat worked fine, but maybe i didn't realize if mv required the data & dalvik-cache to be wiped.

snandlal said:
Go into /data/data and /data/dalvik-cache and delete all files affiliated with that apk and reboot, the move a copy of the apk file to /system/app, fix permissions and reboot.
Click to expand...
Click to collapse
I tried, but that didn't resolve the issue.
shift_ said:
let me know if this works.. i'm curious. i had to resort to
Code:
cat /data/app/name.of.app.apk > /system/app
to get it to work. i read somewhere that mv doesn't sit well on android 2.1. cat worked fine, but maybe i didn't realize if mv required the data & dalvik-cache to be wiped.
Click to expand...
Click to collapse
That didnt' work either.
To the both of you, thanks for the help so far. I appreciate it.
:-/

Try putting the apk file directly on the c: drive, go into adb shell, do command: mount /system, then command: exit, the command: adb push c:\name of app.apk /system/app

That works for sure, but I'm still left wondering why I can't move a file from one directory to another on the device.

lolz mclollerson said:
That works for sure, but I'm still left wondering why I can't move a file from one directory to another on the device.
Click to expand...
Click to collapse
hmm.. that worked, but mv and cat didn't? that's really weird.

I am also receiving this message. I am trying to:
mount -o remount,rw /dev1/block1/mtdblock4 /system
# mv /sdcard/bootanimation.zip /system/customize/resource
failed on 'bootanimation.zip' - Cross-device link
any ideas??

Related

cross device link ERROR!!!!

I have looked and looked but im still having problems. im trying to use a mv /sdcard Camera.apk /system/app/ command to try to move a modded Camera.apk to the /system/app/ folder , but i keep getting a cross-device link. ive mounted it over again but still the same thing. Please help if this is even possible. thanks
Bump bump bump
I don't even know why I"m answering but ...
/system is not writable
unless you use something like this :
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Please people please use the search fonction.
dixxa said:
I don't even know why I"m answering but ...
/system is not writable
unless you use something like this :
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Please people please use the search fonction.
Click to expand...
Click to collapse
I have done that command several times both to /system and to /sdcard. But asoon as i do mv /sdcard/(file) /system/app/ it gives me that error!!!!!!
Any solutions to this?
move it using root explorer or some file manager that allows you to write in the system... thats what i do...
barger01 said:
I have looked and looked but im still having problems. im trying to use a mv /sdcard Camera.apk /system/app/ command to try to move a modded Camera.apk to the /system/app/ folder , but i keep getting a cross-device link. ive mounted it over again but still the same thing. Please help if this is even possible. thanks
Click to expand...
Click to collapse
It means that you can't create a hard link on one device (filesystem) that refers to a file on a different filesystem.
The mv command does NOT MOVE THE DATA!!! It moves the HARDLINK TO THE DATA.
Consider yourself fortunate that you have a SANE VERSION of the mv command that doesn't try anyway -- some old versions will actually TRY to do this, which will result in a hard link that points to NOTHING, and the original data being INACCESSIBLE.
If you want to move the file to a different filesystem, you need to use the "cp" command. Copy the file to create a SECOND COPY of it on a different filesystem, and then DELETE the OLD one with the "rm" command.
A simple move command:
Code:
#!/bin/bash
if ( cp "$1" "$2" ); then
rm -f "$1"
fi
You will note that the "cp" command returns true or false depending on the successful completion of the copy, therefore the original will only be removed IF the file copied successfully.
This script can be copied into some place referenced by the PATH variable and set executable.
lbcoder said:
It means that you can't create a hard link on one device (filesystem) that refers to a file on a different filesystem.
The mv command does NOT MOVE THE DATA!!! It moves the HARDLINK TO THE DATA.
Consider yourself fortunate that you have a SANE VERSION of the mv command that doesn't try anyway -- some old versions will actually TRY to do this, which will result in a hard link that points to NOTHING, and the original data being INACCESSIBLE.
If you want to move the file to a different filesystem, you need to use the "cp" command. Copy the file to create a SECOND COPY of it on a different filesystem, and then DELETE the OLD one with the "rm" command.
A simple move command:
Code:
#!/bin/bash
if ( cp "$1" "$2" ); then
rm -f "$1"
fi
You will note that the "cp" command returns true or false depending on the successful completion of the copy, therefore the original will only be removed IF the file copied successfully.
This script can be copied into some place referenced by the PATH variable and set executable.
Click to expand...
Click to collapse
Maybe I'm reviving a dead thread, but lbcoder really deserved appreciation. I was stuck at the exact same issue with mv on my Moto Defy, and you saved the day. Thanks!
I agree - thank you lbcoder!
Just use dd if=/.... of=/.....
sony66 said:
Just use dd if=/.... of=/.....
Click to expand...
Click to collapse
dd never desapoints !
Thanks!
lbcoder said:
The mv command does NOT MOVE THE DATA!!! It moves the HARDLINK TO THE DATA.
Click to expand...
Click to collapse
Thanks! Useful even for some of us not-so-n00bs on Linux -- I never knew that.
I tried to copy and not move and ended up with the same error
Code:
:/data/sdext3/WhatsApp/ModsBackup/com.whatsapp #
cp files databases shared_prefs /data/data/com
cp: Skipped dir '/data/data/com.whatsapp/files': Cross-device link
cp: Skipped dir '/data/data/com.whatsapp/databases': Cross-device link
cp: Skipped dir '/data/data/com.whatsapp/shared_prefs': Cross-device link
apparently the advice given by one of our members was the one I found on stack exchange with the same wording
here
solution is not cp instead of mv because
mv hard links and across devices it is not possible.
the BusyBox version of copy worked for me to copy across different devices
it sounds like even cp from android shell behaves much like mv
Code:
busybox cp -rvf files databases shared_prefs targetdir

Rooted Hero Fails adb remount, can't move files from SD

I rooted my hero last night and tried out a few different ROMs but eventually decided to revert to stock and make some manual changes. I used nandroid to restore to just after the root (1.56.651.2). I was able to remove some apps using adb, but the adb remount command fails (permission denied), and I'm unable to push a new bootscreen on to the phone. I also tried a Root File Manager and pre-kitchen as alternatives for the bootscreen, and neither one works. The Root Manager won't paste the files from SD into /system/media/ and pre-kitchen just reboots the phone.
Any suggestions?
Any chance this has something to do with downloading only up to SDK Platform 1.5? I'm at a total loss. I RUU'd my phone, did a clean root at startup using adb shell, and I still have the same problem. The adb remount command won't work, and I can't push anything into the system directory. For what it's worth, when I still had Root Manager installed I was able to toggle RO R/W in any directory with no problem, and I could move files around within the ROM... but I couldn't move anything into it from the SD. I'm new at this, so I have no idea what the problem might be. Anyone else had this problem or have any suggestions?
If anyone else runs into this problem, this solution worked for me:
adb shell
# su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 777 /system (Or any subdirectory you want to push to inside system)
# exit
adb push <local file> <device location>
Restore modified permissions when done.
Though I'm still not sure why this is necessary in place of adb remount.
I'm pretty sure the adb remount command will not work on the stock rom. You should be able to do it with just this command instead:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
dametzg said:
I'm pretty sure the adb remount command will not work on the stock rom. You should be able to do it with just this command instead:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
Thanks... didn't realize stock wouldn't accept adb remount. If I use the above line from within shell, that doesn't help me push anything on to the phone though... so I needed to enable global permission and then do the push. Oddly enough I tried the same approach last night using Root Manager, and the transfer from SD still failed, even after I applied 777 to the dir I was trying to modify. The current solution may be kind of tedious, but at least it works.
you really shouldn't do 777 on your filesystem, ANY app can then write to your system, overwrite things, or install malicious code. Just remount manually and you should be able to push anything you want, just remember that w/ the stock rom you also don't get a full busybox either.
I'm not positive, but I would think after you remount, you should be able to "adb push" to /system. I suppose it might be specific to that shell, but I would think not.
You just may have to do it once each time you boot your phone.
Edit - err nevermind... you're having permission errors.... um... change adbd on the phone to run as root? not sure how off the top of my head...

how do i delete the factory apps

i am rooted, downloaded a file manager..which file did they store the factory apps in
system/app is where the apps are delete the odex file too if you decide to delete any apps. make sure you dont delete anything that the phone needs to run. if you dont know what to delete then dont delete anything!!! if you decide to delete anything from system/app you also need to delete another folder that has to do with the app in data/data. for example say you wanna delete bluetooth go to system/app and delete bluetooth.apk and the bluetooth.odex files then go to data/data and delete com.android.bluetooth folder. thats an example dont do that as you will no longer have bluetooth lol but same thing for whatever app you delete except the folder in data/data will be different
Whats wrong with factory apps?
lou0611 said:
Whats wrong with factory apps?
Click to expand...
Click to collapse
That's like when you get a new HP Laptop and they throw all this bloat-ware that you don't need.
Why use the ''TeleNav GPS'' when the Google Navigation is free?
And are you really going to use that Slacker or GoGo app? Not likely.
Root, install Titanium backup, installed busybuzz or whatever (Hit the Problems? button in TB), BACKUP all your apps, then delete whatever you dont want
i got rid of Telenavi, GoGo, MobiTV and i think one other.....i never would use them so there was no reason to keep them.
You can also do this via adb shell like this:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/app
After you've mounted the correct partition you can pull up a complete list of apps with this command:
ls /system/app
Then, remove apps with this command. The apps name are case sensitive to make sure you type the app name as its displayed:
rm VoiceSearch.apk
Dont even need to mount.
Use VoiceSearch.* instead of apk to get rid of the .odex file also.
bubonik said:
Dont even need to mount.
Use VoiceSearch.* instead of apk to get rid of the .odex file also.
Click to expand...
Click to collapse
Good suggestion. Never thought of that, kill two birds with one stone.
bubonik said:
Dont even need to mount.
Use VoiceSearch.* instead of apk to get rid of the .odex file also.
Click to expand...
Click to collapse
What do you mean by this?
phragg said:
What do you mean by this?
Click to expand...
Click to collapse
if you use "rm VoiceSearch.*" * is seen as a wild card so it deletes every file named VoiceSearch with any extension so it will delete VoiceSearch.apk and VoiceSearch.odex
This might have something to do with why I can't mount my drives on any computer:
When I tried to mount via adb, this was my output:
$ mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount: Operation not permitted
Any suggestions?
cashless said:
This might have something to do with why I can't mount my drives on any computer:
When I tried to mount via adb, this was my output:
$ mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount: Operation not permitted
Any suggestions?
Click to expand...
Click to collapse
Are you rooted? You need to be rooted in order to get access to those file systems. If you are rooted, then type 'su' (don't include the quotes), then you'll get a #. Now start entering the commands.
Also make sure that when you enter the commands (via adb) your screen is not locked, so that you can allow the SU app to grant superuser status.

[Q] 1st update froyo

should i flash it. i dont have root
WOW! i cant believe no one has replied to you.
if you take a look at the first post with the topic
[ROM] Official AOSP 2.2 OTA
but you mentioned you dont have root. so try installing alogcat from the marketplace and capture the whole deal. then you can email directly from the app.
logcat isnt going to do much, it prefetches the files, need to pull the update.zip from adb
ok, so i havnt gotten the notice yet.
but need a bit of help prepping for when i do.
i have the android sdk installed on my desktop, and can create a virtual device etc...
but when i open the cmd prompt and try to run adb devices it says it is populating a list but i see no results or no file created.
so i tried just running adb logcat and it stops at waiting for device.
any pointers. im running win7x64 ultimate
well, i screwed it up. i removed the usb drivers and set it to debugging mode and got it working.
so i am able to run adb shell etc...
once i get the notice ill be ready to do an adb pull
adb shell
su
cd /cache/
ls
adb pull /cache/<package_name>.zip .
sepiid said:
well, i screwed it up. i removed the usb drivers and set it to debugging mode and got it working.
so i am able to run adb shell etc...
once i get the notice ill be ready to do an adb pull
adb shell
su
cd /cache/
ls
adb pull /cache/<package_name>.zip .
Click to expand...
Click to collapse
but how do you know the new radio and spl update name?
you should get that by running su then "cd /cache/ ; ls"
right now i have
download-1.apk
downloadfile.apk
recovery
lost+found
so after it is precached i run that "cd cache/ ; ls" i should have another file or two in there
that would be the file you run adb pull /cache/*.*
a tad bit of help, as a test i am trying to do
adb pull cache/downloadfile.apk d:\
but i get
remote object 'cache/downloadfile.apk' does not exist
i also tried adb pull /cache/downloadfile.apk d:\
and get the same.
edit:
tried doing a adb push
D:\android-sdk-windows\tools>adb push d:\test.txt /cache
failed to copy 'd:\test.txt' to '/cache/test.txt': Permission denied
so i dont have permission to put anything there, which means i likely dont have permission to pull from there
D:\android-sdk-windows\tools>adb pull /cache/downloadfile.apk d:\
remote object '/cache/downloadfile.apk' does not exist
so i opened another cmd prompt and and did an adb shell
su
and i am su
so while the other window was open and i was su i tried the same commands again and got the same results.
edit2:
D:\android-sdk-windows\tools>adb shell ls /cache
opendir failed, Permission denied
so it is definately a su/permissions issue.
Are you rooted? If not use Universal Androot.
*anticipation*
sepiid said:
a tad bit of help, as a test i am trying to do
adb pull cache/downloadfile.apk d:\
but i get
remote object 'cache/downloadfile.apk' does not exist
i also tried adb pull /cache/downloadfile.apk d:\
and get the same.
edit:
tried doing a adb push
D:\android-sdk-windows\tools>adb push d:\test.txt /cache
failed to copy 'd:\test.txt' to '/cache/test.txt': Permission denied
so i dont have permission to put anything there, which means i likely dont have permission to pull from there
D:\android-sdk-windows\tools>adb pull /cache/downloadfile.apk d:\
remote object '/cache/downloadfile.apk' does not exist
so i opened another cmd prompt and and did an adb shell
su
and i am su
so while the other window was open and i was su i tried the same commands again and got the same results.
edit2:
D:\android-sdk-windows\tools>adb shell ls /cache
opendir failed, Permission denied
so it is definately a su/permissions issue.
Click to expand...
Click to collapse
Here do this:
First if you have root, open up terminal or cmd prompt if you are on windows:
adb shell
su
mount -o rw,remount yaffs2 /cache
chmod 777 /cache
that will change the permissions allowing for read and write.
Now exit out of shell and just adb pull /cache/
That will pull everything out of the cache partition.
BAM!!! perfect!
i new it was permissions related. just couldnt figure out the "mount -o rw,remount yaffs2 /cache" part. might i ask you to break that down for me? at least the yaffs2 part.
thanks!
so once the update hits i am ready to grab the files.
callmeradical said:
Here do this:
First if you have root, open up terminal or cmd prompt if you are on windows:
adb shell
su
mount -o rw,remount yaffs2 /cache
chmod 777 /cache
that will change the permissions allowing for read and write.
Now exit out of shell and just adb pull /cache/
That will pull everything out of the cache partition.
Click to expand...
Click to collapse
So the YAFFS2 part of the code I put up there is designating the file system in which we are reading/writing.
YAFFS2 is the most popular and widely used format for flash memory.
please allow me.
yaffs2 is a filesystem type. /cache is of course the directory. -o is for option.
rw: read/write
remount: remount /cache again with new option.
sepiid said:
BAM!!! perfect!
i new it was permissions related. just couldnt figure out the "mount -o rw,remount yaffs2 /cache" part. might i ask you to break that down for me? at least the yaffs2 part.
thanks!
so once the update hits i am ready to grab the files.
Click to expand...
Click to collapse
Oh yeah and BTW, you can change the permissions back if you want after your done, otherwise I believe you can just reboot the phone and it fixes it, not entirely sure, I was trying to rewrite my default.prop to get adb remount to work with stock 1.6 rooted, but I am getting and access denied issue.
perfect was about to ask what the -o was but i tried mount --help and mount -h both resulted in nothing. then you reply sharpt71
thanks again all.
i am now ready to pull the update and upload once i get the update. hopefully soon!
Rather than the remounting and chmoding so you can adb pull.
You could probably get away with
Code:
su
cp /cache/<whatever> /sdcard
Then mount the SD card or put it in a card reader.
SilverSurfR said:
Rather than the remounting and chmoding so you can adb pull.
You could probably get away with
Code:
su
cp /cache/<whatever> /sdcard
Then mount the SD card or put it in a card reader.
Click to expand...
Click to collapse
You probably could I just know that this is a sure fire way to grab everything in cache directly to the machine, otherwise if you aren't next to a machine you could probably do a copy like you said.
My 2nd update failed, do you guys think the files are still in my cache?

How to remove the demo games?

I went to /system/app and found most applications, but the only thing that I really want to find are the demo games, and for some reason I can't find them! I even went to /data/app and found the apk packages there, I deleted them but the games are still installed.
Any ideas?
Are they in /cust?
if i have not remembered wrongly, the demo games r in /system/app/..
what specific game(s) do u want to remove? i can give u the location tonight after work (as i stored the paths in my home pc..)
FYI. Mine are all in /cust/pccw/hk/app.
simplistian said:
FYI. Mine are all in /cust/pccw/hk/app.
Click to expand...
Click to collapse
is it possible\safe to delete them?
if u meant those "Ironman", "Prince of Persia", etc., then its okay to delete them..
i did..
My phone didnt have any demo games and i found it weird couse in all the reviews i saw them in the menu screen...
my memory didnt fail me.. the 4 games that i removed were all in /system/app/
BubbleBash2.apk (Launcher: Bubble Bash 2)
IronMan2.apk (Launcher: Iron Man 2)
PrinceofPersiaZero.apk (Prince of Persia)
UNO.apk (Launcher: UNO)
btw, im with the hong kong B135 version..
@flipmodegr
yeah, it seems that ROM for Wind is cleaner..
nice to hear that its normal for the greek phones
yes, Wind Gr gives a stock android rom (not even hauwei has added anything) so its clean like water
Thanks everyone I found them in /cust/roadhound/au/app but for some reason I can't mount the location as R/W using Root Explorer.. my phone IS rooted.. I don't know why it does not let me mount it as R/W.. therefore I can't delete them!!
Any ideas on this?
Thanks
Tcm9669 said:
Thanks everyone I found them in /cust/roadhound/au/app but for some reason I can't mount the location as R/W using Root Explorer.. my phone IS rooted.. I don't know why it does not let me mount it as R/W.. therefore I can't delete them!!
Any ideas on this?
Thanks
Click to expand...
Click to collapse
Try using adb or you could try in terminal emulator:
Mount R/W
Code:
mount -o remount,rw /dev/block/mmcblk0p12 /system
Mount R/O
Code:
mount -o remount,ro /dev/block/mmcblk0p12 /system
I can mount /system as R/W.. I just cant mount that directory in R/W .. it just opens as R/O even if I mount /system as R/W
Tcm9669 said:
I can mount /system as R/W.. I just cant mount that directory in R/W .. it just opens as R/O even if I mount /system as R/W
Click to expand...
Click to collapse
Oops sorry. See Below.
Try using adb or you could try in terminal emulator:
Mount R/W
Code:
mount -o remount,rw /dev/block/mmcblk0p1 /cust_backup
Mount R/O
Code:
mount -o remount,ro /dev/block/mmcblk0p1 /cust_backup
And the apps are in cust_backup/image/cust_data/roadhound/au/app. The /cust directory is just a link to the cust_backup direcctory. Which is why you cant mount it RW
Tried in Terminal Emulator, said
mount: Operation not permitted
Click to expand...
Click to collapse
then tried with sudo and said
sudo: permission denied
Click to expand...
Click to collapse
Tcm9669 said:
Tried in Terminal Emulator, said then tried with sudo and said
Click to expand...
Click to collapse
Root is su
Ahh, I tried
sudo <<command here>>
su worked! Thanks finally removed them ... WOHO!
Thank you very much mate.. oz oz oz, oi oi oi!
I want to remove those demos too, is it possible with stock non-rooted system?
No.. you need to root it. It's quite easy to do.

Categories

Resources