Copying folder to another in zip packages - Galaxy Y GT-S5360 and Duos 6102 Q&A, Help & Troubl

Hi,
I want to create an updater-script file that copies /sdcard/data to /data,
How can i do this? dd and cp commands say 'cannot find /sdcard/data/*: no such file or directory'
I don't want to integrate files in the zip package
Is there a way or a command to do that?
I searched on the web, but seems i cannot a working solution, maybe you can anwser

Well your query is wrong.updater-script is for flashable zips and in your case you don't want to integrate the files in the zip right?
Try using this command via terminal :
#cp ~/sdcard/data/*your data /data

what are you trying to do?? o_0
files in sdcards have ownership system:sdcard_rw and permissions something like ----rwx-r-x
to copy files with cp to /data.. you need to be root on terminal/adb shell
the copy will change ownership to root:root while keeping permissions intact...
with such odd permissions and ownership for files in /data .. you are looking at a bootloop..
you'd have to fix permissions for each and every thing incase you really need to copy it
can you tell what are you trying to copy.. and what's in /sdcard/data :|

Hi, sorry for my late reply
I will try that command and post result, :good:

It worked, thanks

Related

[Q] can't preserve ownership... ADB Error

Hey folks,
just a quick question. I tried to backup my /efs folder with ADB since I am planning to mess around a little. I have my phone rooted, latest busybox installed and usb debugging enabled. I succesfully connected the device and granted SU permissions. Then I typed
busybox cp -a /efs /sdcard/
as stated in the guides. However it tells me the following error for all files in the efs directory and doesn't copy one file:
cp: can't preserve ownership of '/sdcard/efs/.android': Operation not permitted
Any ideas on what I am doing wrong?
That's true, you can't preserve that kind of ownership when moving stuff to sd. Just change the -a to -r and you'll be fine. You'll just have to redefine the ownerships if you ever copy the files back, to what they are now.
Sent from my GT-I9000 using Tapatalk
Well thanks, that did the trick! However, someone should then change that in the guides for us Newbies. Besides that I might need to get back to you for redefining the ownerships of the /efs folder once I need to restore it ;-)

[Q] How to mount R/W in...

Hi I have a little question to make, and I haven't find anything about it...
My cellphone has root and i'm able to mount R/W in a most folders with root explorer, but I can't mount R/W in "cust" folder. Inside is a folder called "entel" and there are the modified boot animations and stuff.
There is the Swype.apk too, but it hasn't any dictionaries and I'm not able to install them too (I don't know why)... So when I try to change the apk for another one, i can't mount R/W.
And when i try to install normally i can't.
Is there a way to mount r/w in that folder or change the swype?
Why you don't just copy the files you need on another folder on sdcard and try to manipulated there?
Also this folder sould be in /cust_backup/custom_data. Did you tried from there?
I try to manipulate them in another place but then I can't replace the new files...
And i don't know why... but the folder is "cust", i know there is another one ".cust_backup" but inside is only the image folder with amss.mbn, boot.img, cust.img, emmcboot.mbn and recovery.img.
My cust folder includes a lot of subfolders, first one called "entel", then another subfolder "cl" and then i have folder called "app" (inside is only the Swype.apk"), lib, logo, media, nv, ons, prop, wallpaper and xml.
I Can't mount R/W in any of the cust folders, but I can do it in ".cust_backup"
:S
I don't know If you can mount this folder as rw.
Try to open command prompt on pc(and give the command adb shell) or a terminal emulator(in this case give the command su to take root rights)
and then give the command
cat/proc/mounts
to see which partitions have and where they mounted
Then, if the custom partition exist give the command
mount -o rw,remount /dev/block/
followed with the mmc...(something that I dont rember) number of partition
e.g mount -o rw,remount /dev/block/mmwhateveris12
to mount it.
It didn't worked...
What if change something in the apk to make the system think that isn't swype?

Can't move TWRP backup files to PC

So, before I do a firmware update (In this case 4.2.2 to 4.3 OTA) I do a Titanium backup and a TWRP backup and copy both sets of backup files to my PC; it obviously makes no sense to only have backups on the device you are backing up. I upgraded to TWRP 2.6.0.0, did a full backup, and as usual I went to copy my backup files over to my Windows 7 computer using Windows Explorer and I can only get a couple of the files to move over. No warning, no error, no nuttin. This has always worked before......Did something change, and if so, how do I fix it?
I see from another post that TWRP changed the permissions of the backup files in the latest version of the program, and in my case the location as well. The workaround is to a) change the permissions on all those backup files, which I could see the nightmare problems that could cause later on when doing a restore and/or the security issues or b) doing an adb pull.
SOLVED.
The adb pull did the trick. All files were transferred over to my PC.
I had several issues getting adb to work:
1) I had an old version of the SDK installed on my PC which was causing a devices not recognized problem or something similar.
2) I didn't notice the message about verifying the RSA on my phone, which once verified, fixed the phone "offline" problem.
3) The screen lock on my phone was coming on after its timeout and locking me out from seeing the phone.
reverted to twrp 2.5.0.0
Same problem here with Google Nexus i9250 / twrp 2.6.0.0 / win7 64bit. Tried to copy backup of (BOOT/SYSTEM/DATA) via MTP or ftp from Nexus to PC. Only the first two files (boot.emmc.win/-md5) were copied. After downgrading to twrp 2.5.0.0 everthing was fine.
I had the same problem. It is caused by strange suid permissions set by TWRP. Solved it using chmod 0664 /data/media/0/TWRP/... (as root)
I was not able to adb pull before changing the files' permissions.
More details here:
http://forum.xda-developers.com/showpost.php?p=44120545&postcount=14
(Google found that HTC One thread first, so I didn't search any further)
Type this in Terminal Emulator:
su
busybox chown - R 1023.1023 /data/media/*
That should solve all permissions problems.
I had no trouble at all by doing the following:
Access the sdcard from /data/media/0
Copy data.ext4.win and system.ext4.win to a temporary location.
(The "Set UID" and "Set GID" permissions were automatically removed. If not, you can change them from here.)
Copy the files to PC using MTP.
The remaining backup files from the TWRP directory can be copied normally.
Done
Note: You can instead just change the permissions on these two files inside the TWRP directory, but I did the temporary location copy just to be safe.
Mercado_Negro said:
Type this in Terminal Emulator:
su
busybox chown - R 1013.1023 /data/media/*
That should solve all permissions problems.
Click to expand...
Click to collapse
coming up with chown: unknown user -
is that a space between 1023 and /data?
daryllh said:
coming up with chown: unknown user -
is that a space between 1023 and /data?
Click to expand...
Click to collapse
I'm sorry, I made a mistake there. The correct command is:
su
busybox chown -R 1023.1023 /data/media/*
I wrote 1013.1023 and it's 1023.1023
Mercado_Negro said:
I'm sorry, I made a mistake there. The correct command is:
su
busybox chown -R 1023.1023 /data/media/*
I wrote 1013.1023 and it's 1023.1023
Click to expand...
Click to collapse
After I did this command, my pc can't detect the back up
handols said:
After I did this command, my pc can't detect the back up
Click to expand...
Click to collapse
Did you plug/unplug your device after running this command? There shouldn't be any problems. Furthermore, now you should be able to copy your TWRP and TiBu backups successfully to your computer. It's a pretty straight forward process.
Im on twrp 2.5.0.0 with Android 4.3. I cant copy the BACKUP folder directly to my PC with the default windows explorer because the backup isnt stored in /sdcard/TWRP. How can I fix this? I used to be able to do this without adb push/pull...
Mercado_Negro said:
I'm sorry, I made a mistake there. The correct command is:
su
busybox chown -R 1023.1023 /data/media/*
I wrote 1013.1023 and it's 1023.1023
Click to expand...
Click to collapse
Thanks for this. I'm able to backup TWRP folder to PC now :highfive:
Since my original post 3 months ago I updated all my programs to 4.3 friendly versions as each was released (superuser 1.0.2.1, Windows drivers, TWRP 2.6.3.0, etc.) and now I don't need to do adb pulls any more and I can just copy and paste files from my phone to my pc and all files are copied over without missing any of them. Now I see the updated programs are already starting to show up for Android 4.4; here we go again.
Now see 0 / legacy emulated
Mercado_Negro said:
I'm sorry, I made a mistake there. The correct command is:
su
busybox chown -R 1023.1023 /data/media/*
I wrote 1013.1023 and it's 1023.1023
Click to expand...
Click to collapse
Hi just wondering, Is there a way to cancel this command (just add a +R maybe) I did it on my phone and I think it may be the cause that I have a Legacy emulated 0 path problem Ive searched around and cant seem to find a solution. Thanks
NightCrawler504 said:
Hi just wondering, Is there a way to cancel this command (just add a +R maybe) I did it on my phone and I think it may be the cause that I have a Legacy emulated 0 path problem Ive searched around and cant seem to find a solution. Thanks
Click to expand...
Click to collapse
What's the problem? That's a valid path.
Legacy emulated 0
Mercado_Negro said:
What's the problem? That's a valid path.
Click to expand...
Click to collapse
I have an external sd (sdcard1) = /storage/sdcard1 so gr8 but then I have emulated (??) Storage/emulated/legacy and Storage/emulated/0 and sdcard0 storage/sdcard0 they were complety different folders been reading around seems to be a problem with cm when I go from 4.2 and over my phone is a e970 att, cant delete the emulated folder... already erased all my data previously, any help will do,I'm almost sure it had nothing to do with the chown command but had to give a try.
NightCrawler504 said:
I have an external sd (sdcard1) = /storage/sdcard1 so gr8 but then I have emulated (??) Storage/emulated/legacy and Storage/emulated/0 and sdcard0 storage/sdcard0 they were complety different folders been reading around seems to be a problem with cm when I go from 4.2 and over my phone is a e970 att, cant delete the emulated folder... already erased all my data previously, any help will do,I'm almost sure it had nothing to do with the chown command but had to give a try.
Click to expand...
Click to collapse
No, it doesn't have anything to do with this command since it's just a way to set different permissions.

[Guide] How to modify yourself system.img partition

Hi
in this thread i want to explain to everyone who want to modify (debloat, add app) to your system.img partition
First is necesary to:
-backup original system.img from your phone (make a copy to your hddpc, dvd, usb stick, disketes ... etc ... lool .. joking)
-injecting root to your system.img
this steps are explained here: http://forum.xda-developers.com/g4/general/lg-g4-100-root-success-directives-root-t3180586
NOW: before copy and write the new rootedsystem.img image to your phone if you want to debloat or adding new app do this in your linux machine:
- mount again your new generated rootedsystem.img image
Code:
mount -o loop,rw -t ext4 rootedsystem.img operatingtable/
now browse mounted folder (operatingtable) and delete what you want from app or app-priv folder
if you want to delete startup phone sound delete from /media/audio/ui poweron.ogg and poweroff.ogg
in same mather you can add new app to app or app-priv folder but is necesary to chmod folders and files like this:
for new directories: chmod 0755 operatingtable/app/app-directory
for new files: chmod 0644 operatingtable/app/app-directory/app.apk
when you finish do this
Code:
umount operatingtable
and now you can copy and write to your phone rootedsystem.img image
as explained here: http://forum.xda-developers.com/g4/general/lg-g4-100-root-success-directives-root-t3180586
PS: Of course this debloating could do directly from your phone after gained root with files managers ... but i think this method is easier.
PS2: If you debloated some apps (gapps ) ... Is necesary to restore factory settings because some updated apps are in /data/app folder ... or you can delete from there to.
Enjoy.
Is there a way to browse and edit an unrooted image? Does it have to be rooted to mount, browse and edit files? I'm asking because I am trying to edit build.prop only and I'm getting an error that says I'm not the owner. I copied the first command you posted, but I wasn't able to open the img. I had to drag the file into the terminal after the "ext4" to open the file, but I don't know what to do from there.
Sorry I"m a noob on linux
Hi, hope you're still active with this thread. I have a copy of system.img and I want to change a certain .apk inside /app. It is already mounted but when i try to chmod it says something like "changing permission is not permitted". Do you know how to fix this? Thanks!
aoprea said:
Hi
in this thread i want to explain to everyone who want to modify (debloat, add app) to your system.img partition
First is necesary to:
-backup original system.img from your phone (make a copy to your hddpc, dvd, usb stick, disketes ... etc ... lool .. joking)
-injecting root to your system.img
this steps are explained here: http://forum.xda-developers.com/g4/general/lg-g4-100-root-success-directives-root-t3180586
NOW: before copy and write the new rootedsystem.img image to your phone if you want to debloat or adding new app do this in your linux machine:
- mount again your new generated rootedsystem.img image
Code:
mount -o loop,rw -t ext4 rootedsystem.img operatingtable/
now browse mounted folder (operatingtable) and delete what you want from app or app-priv folder
if you want to delete startup phone sound delete from /media/audio/ui poweron.ogg and poweroff.ogg
in same mather you can add new app to app or app-priv folder but is necesary to chmod folders and files like this:
for new directories: chmod 0755 operatingtable/app/app-directory
for new files: chmod 0644 operatingtable/app/app-directory/app.apk
when you finish do this
Code:
umount operatingtable
and now you can copy and write to your phone rootedsystem.img image
as explained here: http://forum.xda-developers.com/g4/general/lg-g4-100-root-success-directives-root-t3180586
PS: Of course this debloating could do directly from your phone after gained root with files managers ... but i think this method is easier.
PS2: If you debloated some apps (gapps ) ... Is necesary to restore factory settings because some updated apps are in /data/app folder ... or you can delete from there to.
Enjoy.
Click to expand...
Click to collapse
Can i do this thing with xiaomi mi 5.

fix file permissions

When i try to edit files in the root directory of the switch on android, i cannot edit because of permissions.
I ran chmod in TWRP from terminal multiple times but cannot fix the permissions issue.
anyone know how to fix it? I am trying to edit some files in system/usr/keylayouts.
Try 'sudo su' and then do chmod.
Or install MiXPlorer, give it root access and give it the perms with it's GUI (it's under the info sign when u select the file u want to alter)

Categories

Resources