[Q] make /data backup as img on computer - One (M7) Q&A, Help & Troubleshooting

hey folks I've got a huge problem and I hope someone can help me or forward me to someone who might know!
So I had some very important data on my HTC One on the sdcard folder (/data/sdcard/Android is the specific folder) and I did a little ROM flashing on monday. So far everything went quite brilliant but today I recognised the data was lost so I googled for 3 hours and tried to do an IMG Backup of the whole /data path with the terminal on my mac. It went well so far with the commands
Code:
./adb shell
dd if=/dev/block/mmcblk0p35 of=/sdcard/databackup.img
But the problem is that this command does a full backup of /data which is far bigger than the free 7GB on /data/sdcard where the backup will be saved on. That means it throws errors after half an error of backing up and canceling the process by saving the largest possible file on the sdcard.
Does someone maybe know one of these points:
1) how to specify the path which folder should be backed up
2) backup via mtp
3) transfer the data directly to the computer without saving anything on data/sdcard
I really don't know if this is the right category to post in but I trust in you guys and I think that this is my last chance to maybe save the lost files

I'll just help myself and other users which may have the same problem some time
http://forum.xda-developers.com/gal...emory-data-recovery-yes-t1994705/post34185439
That helped me a lot and I've taken some parts of it. Here is a short version:
This is a little how2 get the raw out of your smartphone partition. As an example I take my htc one m7
1) download Google SDK
2) make sure all drivers of your smartphone are installed (including adb)
3) download cygwin (install to c:/cygwin)
4) download netcat (extract only the nc.exe to c:/cygwin/bin)
5) make sure usb debugging is enabled on your device
6) create a folder for the raw to cygwin (e.g. c:/cygwin/One)
1st step => make the raw file
Install cygwin. in the packages window you need to search for "pv" and "util-linux" in the repo windows. If you don't you will have trouble.
Before you start operating you should know that if you have a display lock you should disable it for the time of the backup process.
Now start up 2 windows of cygwin. The first command in both windows must be:
Code:
$ export PATH="/cygdrive/[B]c/ADB/[/B]sdk/platform-tools":$PATH
the fat marked part is various and depends where you have unzipped the adb so you need to change it for your usage.
Next step is that you need to make a txt file on your device to see the partition table and decide which partition you need to choose. To make that textfile you simply type into one of the cygwin windows:
Code:
adb shell
then:
Code:
su
then:
Code:
find /dev/block/platform/ -name 'mmc*' -exec fdisk -l {} \; > /sdcard/list_of_dev_partitions.txt
then exit shell:
Code:
exit
Now search on the root of your sdcard a file named
Code:
list_of_dev_partitions
. You found it? great! Open it and search for the partitions address you want to backup. In my case it was the whole /data partition with the address /dev/block/platform/msm_sdcc.1/mmcblk0p37
So the next step was to open the tunnel for a disk dump by typing
Code:
adb forward tcp:5555 tcp:5555
then
Code:
adb shell
then
Code:
su
then
Code:
/system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/[B]block/mmcblk0p37[/B]
And again you need to replace the fat marked part with you partition path or otherwise it won't work! For my HTC One M7 it looks like this /system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/platform/msm_sdcc.1/mmcblk0p37
Samsung or LG phones have another path. Always keep that in mind.
Now switch to the second cygwin windows and type
Code:
adb forward tcp:5555 tcp:5555
then
Code:
cd /[B]One[/B]
then
Code:
nc 127.0.0.1 5555 | pv -i 0.5 > [B]mmcblk0p12[/B].raw
fat typings => use your personal data!!!
If you did everything right then your second window of cygwin should display something like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If it says 0 bytes then your partition path is not correct. You may have a typing failure. Check everything! If it works => congrats now go and drink some beer with friends. 27GB take about 2,5 hours to backup!
2nd step => make it workable
When the backup process is done then do following steps on Windows:
1) click start
2) right click on computer
3) click Manage
4) select any storage and click on disk management
5) "add virtual partition"
6) as location enter the path of your raw (select "show all files" )
7) right click on new partition -> initialise
8) select partition table button & hit OK
9) right click on on the partition and make a new volume
10) leave the volume size, select a untaken drive letter, "do not format this volume" -> hit okay
11) open explorer, right click on new volume, quick format it in FAT32
3rd step => recovery!
Now your backup handles like a "broken" SDCard in your computer. For the data recovery I recommend test disk for recovery because you can choose many file formats to recover. You can also try with Piriform Recuva but I had the best results with test disk. That tool is available for many OS :good:

GearX said:
hey folks I've got a huge problem and I hope someone can help me or forward me to someone who might know!
So I had some very important data on my HTC One on the sdcard folder (/data/sdcard/Android is the specific folder) and I did a little ROM flashing on monday. So far everything went quite brilliant but today I recognised the data was lost so I googled for 3 hours and tried to do an IMG Backup of the whole /data path with the terminal on my mac. It went well so far with the commands
Code:
./adb shell
dd if=/dev/block/mmcblk0p35 of=/sdcard/databackup.img
But the problem is that this command does a full backup of /data which is far bigger than the free 7GB on /data/sdcard where the backup will be saved on. That means it throws errors after half an error of backing up and canceling the process by saving the largest possible file on the sdcard.
Does someone maybe know one of these points:
1) how to specify the path which folder should be backed up
2) backup via mtp
3) transfer the data directly to the computer without saving anything on data/sdcard
I really don't know if this is the right category to post in but I trust in you guys and I think that this is my last chance to maybe save the lost files
Click to expand...
Click to collapse
What about using an OTG and mounting a larger SD Card to backup to?

techjohnny said:
What about using an OTG and mounting a larger SD Card to backup to?
Click to expand...
Click to collapse
OTG?
Gesendet von meinem HTC One mit Tapatalk

Related

Howto Fix install issues specifiacally apps that fail with error code -18

NOTE: Root is required
When an application fails to install - even side loads - an error message is logged.
First thing to check is the logcat -> it will point to a secure file issue.
for error -18 it is
smdl2tmp1.asec
this file, and all other *.asec files are in the /mnt/secure/ directory.
If this file cannot be removed by the installing application a failure message results.
to manually remove this file you need a terminal application
android terminal emulator works just fine.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Step 1.
launch the terminal application of choice
Step 2.
SU
Step 3.
At the # command prompt type
cd /mnt/secure/asec/
Step 4.
type
ls
This will locate the file causing the issue.
Step 5.
type
rm smdl2tmp1.asec
Step 6.
close the terminal application
Step 7.
enjoy the fruits of your labor by installing the application that initially failed.
Thanks, manikin13!
Do you know any other error codes?
joe75 said:
Thanks, manikin13!
Do you know any other error codes?
Click to expand...
Click to collapse
I believe this fix works on most install error codes.
Interesting. Been getting the Error code 18 when attempting to install VitalPlayer. (Vegan Beta1) Folowed your steps to the letter (miss DOS at times) but that folder appears empty. Actually there is no asec folder on either sdcard or sdcard2. Did I miss something? thanks
skeeterpro said:
Interesting. Been getting the Error code 18 when attempting to install VitalPlayer. (Vegan Beta1) Folowed your steps to the letter (miss DOS at times) but that folder appears empty. Actually there is no asec folder on either sdcard or sdcard2. Did I miss something? thanks
Click to expand...
Click to collapse
Are you using a terminal app on the tablet?
this folder does not show up without using a terminal app on the tablet.
once in the terminal app
cd to /mnt/secure/ to see the files. There is no asec folder. The file extension is asec as in *.asec
You bet. Android terminal emulator from the market. At /mnt (via FileManager) there are folders named secure and asec. Both are empty. Notice that when I cd to even mnt/secure I get same message "not found" Verrrrrrrry interesting!
skeeterpro said:
You bet. Android terminal emulator from the market. At /mnt (via FileManager) there are folders named secure and asec. Both are empty. Notice that when I cd to even mnt/secure I get same message "not found" Verrrrrrrry interesting!
Click to expand...
Click to collapse
I saw the samething that nothing shows up in any file manager. only in the terminal ls do the files show up.
you should definitely get a not found for mnt/secure as the actual path is
/mnt/secure/asec/
the initial / is the root of the OS. (linux or unix)
so you are looking for a dir under root called mnt -> /mnt
so if you are having difficulty finding the full path break it down into each step, and do a ls to find the next step
ie
cd /
ls
cd mnt
ls
cd secure
ls
cd asec
ls
etc
hope that helps
Permission denied in Terminal
How do I get terminal permissions?
JackedNY said:
How do I get terminal permissions?
Click to expand...
Click to collapse
Typically typing su at the $ prompt should bring up the superuser prompt (allow / deny) as seen on screen 3. If not you should be able to go into the superuser app, and specifically add terminal.
once you allow the su request the prompt should change to the
# symbol
That did it. Only difference this time was I added the ls step you suggested (ls same as dir in DOS?) Got to where I needed to be and deleted the *.asec. Thanks.
skeeterpro said:
That did it. Only difference this time was I added the ls step you suggested (ls same as dir in DOS?) Got to where I needed to be and deleted the *.asec. Thanks.
Click to expand...
Click to collapse
Exactly
Dos = Dir
Linux, Unix, OsX, Android = ls (small letters)
Awesome little tut
Was having the same issue - but not receiving an error when attempting to install - walked straight through - had to stop in the dir and see the filename to rm but worked like a champ - thanks!
Thanks for this great walk through. I followed it and was able to correct the problem I was having with some installs. I knew intellectually that Android was similar to Linux, but I did not realize how close it is. It is good to see that my Linux knowledge, I know enough to get me into and sometimes out of trouble (Linux Abuser) , can be applied somewhere else.
Thanks again!
linesma said:
Thanks for this great walk through. I followed it and was able to correct the problem I was having with some installs. I knew intellectually that Android was similar to Linux, but I did not realize how close it is. It is good to see that my Linux knowledge, I know enough to get me into and sometimes out of trouble (Linux Abuser) , can be applied somewhere else.
Thanks again!
Click to expand...
Click to collapse
Android is actually very close to OsX in the respect that it is gui first, with the BSD base doing the heavy lifting.
Android is linux in the background with a gui first to allow the ordinary user some familiarity. The reason linux on the phone is not popular and linux on the desktop is not mainstream is because the command line gets equal or higher billing.
Google was smart with Android (basically a linux port with java framework) by promoting it as a gui just like iOS even though to truely see all the potential you need to get to the command line.

[TUTORIAL] Keeping root after upgrade from v10x to v20x

↓ A new root method! ↓
There is now a new root method, that does not require downgrade!
http://forum.xda-developers.com/showthread.php?t=2180688
↑ Read this thread first! ↑
Prerequisites
A rooted LG O4X HD with a v10 firmware. (SuperSU preferred - personally tested)
Device adb drivers installed (so that a phone is detected as an ADB device when in B&R Recovery mode), adb itself is included in the archive
You need an installed Busybox! (/system/bin preferred, or need to edit bat file)
Warning: Do NOT do factory reset between step 1 and step 3! Otherwise /data/rootkit will be deleted, and you will have to start over.
Important note for linux users: bat files are for Windows. If you are using linux, i assume that it will be easy for you to open bat files and do commands by hand.
Step 0
Backup all your settings, and data from internal storage (!), cause factory reset (wipe) will be required.
You can try using LG's backup tool or Titanium Backup or anything else.
Also I'd strongly recommend removing SIM card and SD card from the phone.
Step 1
Make sure USB debugging is enabled (Settings -> Dev Options -> Debugging)
Connect your phone to your PC.
Execute file step0.bat and ensure that you grant su priv to ADB shell (2000).
Now execute file step1.bat - it:
- creates folder /data/rootkit
- copies busybox from /system/bin to /data/rootkit
- copies su from /system/xbin to /data/rootkit
- copies Superuser.apk from /system/app to /data/rootkit
- ensures owner and group of 0 for those files
- chmods files to required attributes (06755 for su, 0644 for apk, 0777 for busybox)
Result should be something like this: Note: In v2 i modified step1, so it tries to copy busybusybox from bin and xbin - one of them will fail, thats normal.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Step 2
Upgrade your firmware to v20a. For example: http://forum.xda-developers.com/showthread.php?t=2069723
DO NOT DO FACTORY RESET! OR YOU WILL DELETE /data/rootkit FOLDER! DO STEP 3 FIRST!
Step 3
After successful upgrade shut down your phone.
Now, with USB connected (!!), hold volume up and power, and keep holding it at least until you hear windows "new device" sound.
You must see something like this:
Now execute file step3.bat - it:
- remounts system as writeable
- copies su to /system/xbin/
- copies superuser to /system/app/
- sets permissions on those files
Step 4
Now you can hold power button to reboot or just run step4.bat to reboot instantly.
Make sure that root is working, before doing factory reset!
Now you are STRONGLY recommended to do factory reset - or many things will mess up, such as lock screen settings or storage.
AGAIN warning, that factory reset WILL wipe internal storage, look at step 0
If you did all things correct, root will be kept (because it is on ro system partition now)
Step 5
Enjoy.
Note
If you are already at v20a and you want root, you can:
1) Wait for official release, with really unlocked BL - then it will be possible to install CWM -> get root
2) Wait until I make some interaction with B&R daemon in recovery
3) Wait for someone to find easier method
4) If you dont want to wait, you can go back to v10x (warning: all data will be wiped!), root phone, and do the procedure.
Any comments, notes, criticism or anything else very welcome!
Edit: In version 2 it tries to copy busybox from /system/bin and /system/xbin, thanks to AlderCass for pointing out
Nice work friend :good:
I don't have adb on my pc, is there a way to simply download the drivers? I ask because my current pc doesn't have the internet
Sent from my LG-P880 using Tapatalk 2
@non4 said:
I don't have adb on my pc, is there a way to simply download the drivers? I ask because my current pc doesn't have the internet
Sent from my LG-P880 using Tapatalk 2
Click to expand...
Click to collapse
adb is included in the archive... i will see what i can do about drivers.
try to connect phone to your PC with debugging on and do "adb devices" from the folder with unpacked adb
if it sees your device - then good
@SkyDev
great findings, nice to see ideas expand to something useful.
did you also went all way and tried to install a changed/modified boot.img and add it to the LNX partition in /dev/block/mmcblk0p2 or /dev/block/platform/sdhci-tegra.3/by-name/LNX , it might just be our bootloader do work as unlocked and we can write unsigned boot / recovery img
edit;
i believe you can easily test it from recovery and su in here. even if you get security error on "boot", i think recovery can still be booted and you can recover the backup of the mmcblk0p2 partition (men always do backups)
Utterly fantastic work, and I'm sure this discovery will be the first huge step in truly unlocking this device. Congratulations!
Sent from my LG-P880 using xda app-developers app
skydev said:
adb is included in the archive... i will see what i can do about drivers.
try to connect phone to your PC with debugging on and do "adb devices" from the folder with unpacked adb
if it sees your device - then good
Click to expand...
Click to collapse
Isn't adb a pain to install? At least it was back in the day when I rooted my desire z with froyo thanks for the good work I will try get this to work on my own
Sent from my LG-P880 using Tapatalk 2
Dexter_nlb said:
@SkyDev
great findings, nice to see ideas expand to something useful.
did you also went all way and tried to install a changed/modified boot.img and add it to the LNX partition in /dev/block/mmcblk0p2 or /dev/block/platform/sdhci-tegra.3/by-name/LNX , it might just be our bootloader do work as unlocked and we can write unsigned boot / recovery img
edit;
i believe you can easily test it from recovery and su in here. even if you get security error on "boot", i think recovery can still be booted and you can recover the backup of the mmcblk0p2 partition (men always do backups)
Click to expand...
Click to collapse
Well, when now root is easily obtainable, you can do it
I think you are more experienced in all those things, i am low-levelly playing with phones only for 3-4 days so far.
I just dont want to trash stuff to the extent that reflash would be required.
Anyway i worked on the method almost 10 hours instead of sleeping at night, so now i think i going to go take some "Deep sleep" /10:46/
Anyway, i am noting again: if anyone also has disassembly skills, then you really should try to disassemble and analyze brd (backup and recovery daemon) - it runs at recovery with root rights, listens for commands on udp port, and probably can be used for "perfect root" (root without reflashing, and maybe even any LG device)
for people having issues using adb, you can download "terminal" from play , and do the same steps except do not start from a windows shell with adb
you just open the terminal.
secondly all files needed, should be tar'd instead, so the busbox more easily can unpack all files with proper rights instantly to the dest folder.
ie.
# cd /data ; tar xf /data/local/tmp/rootkit.tar
assuming rootkit folder is extracted and all files already was properly set with rights in linux when tar'ing the folder.
so conclusion
you do 3 steps to do this.
1. download rootkit.tar
2. open terminal on phone
3. cd to /data and extract(tar xf) rootkit.tar from where you put it when downloaded
this is all without adb used.
but you need adb in the end to run the bat file
Dexter_nlb said:
for people having issues using adb, you can download "terminal" from play , and do the same steps except do not start from a windows shell with adb
you just open the terminal.
secondly all files needed, should be tar'd instead, so the busbox more easily can unpack all files with proper rights instantly to the dest folder.
ie.
# cd /data ; tar xf /data/local/tmp/rootkit.tar
assuming rootkit folder is extracted and all files already was properly set with rights in linux when tar'ing the folder.
so conclusion
you do 3 steps to do this.
1. download rootkit.tar
2. open terminal on phone
3. cd to /data and extract(tar xf) rootkit.tar from where you put it when downloaded
this is all without adb used.
but you need adb in the end to run the bat file
Click to expand...
Click to collapse
Well, adb will be required anyway, and i want to keep freedom of choosing the su binary and Superuser.apk file.
The only requirement: su must grant root if called from recovery (when Superuser.apk is not accessible)
Also, why mess with terminal? You can easily misspell command, and they are long and important (because executed as root)
But idea with tar is good, maybe it will be required to do it this way, from B&R way.
I'm trying this method now and I noticed that a command in step1 fails on my system.
I changed:
adb shell su -c cp /system/bin/busybox /data/rootkit/
to
adb shell su -c cp /system/xbin/busybox /data/rootkit/
postacik said:
I'm trying this method now and I noticed that a command in step1 fails on my system.
I changed:
adb shell su -c cp /system/bin/busybox /data/rootkit/
to
adb shell su -c cp /system/xbin/busybox /data/rootkit/
Click to expand...
Click to collapse
Prerequisites
A rooted LG O4X HD with a v10 firmware. (SuperSU preferred - personally tested)
Device adb drivers installed (so that a phone is detected as an ADB device when in B&R Recovery mode), adb itself is included in the archive
You need an installed Busybox! (/system/bin preferred, or need to edit bat file)
Warning: Do NOT do factory reset between step 1 and step 3! Otherwise /data/rootkit will be deleted, and you will have to start over.
Important note for linux users: bat files are for Windows. If you are using linux, i assume that it will be easy for you to open bat files and do commands by hand.
Click to expand...
Click to collapse
Already mentioned in first post.
lukas77 said:
Already mentioned in first post.
Click to expand...
Click to collapse
I stated that I changed the line to work "on my system".
So everybody trying this will pay attention to that...
sry for this newbie ques,
but how to install adb drivers in our device..
jitesh22 said:
sry for this newbie ques,
but how to install adb drivers in our device..
Click to expand...
Click to collapse
There are many posts on these forums on how to do this - search for them, as this thread does not deal with that.
Everything works perfect, and now i have root on my JB .
Works like a charm! Thanks so much skydev! :laugh:
I upgraded to v20a with these instructions and now I have a rooted v20a.
Thank you very much skydev.
A picture for proof: http://g1303.hizliresim.com/17/7/ktz5m.png
I think we will be able to root when new versions arrive as long as we keep the /data/rootkit folder.
Edit: I upgraded to v20a with my LG PC Suite Version Hacker ( http://forum.xda-developers.com/showthread.php?t=2134192 ) and did no factory reset after the upgrade. Everything seems to work fine upto now.
quick and dirrrrrty
thats how i like it^^
well done
AW: [TUTORIAL] Keeping root after upgrade from v10x to v20x
Worked fine. There we're no problems. Did the kdz flashing via virtual machine with windows and the rooting part on mac os x since your scripts can be easily adapted. Also i dont have to care about adb or fastboot drivers.
Gesendet von meinem LG-P880 mit Tapatalk 2

[Script][win] Add Send To android device command over WiFi port in win OS - 31/8/13

Hello xda mates,,
Who wants to have this command in Send to group??
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Yeah it makes the life easy,, so no need to search for usb cable just to send some files into android external or internal sdcard..
The principle here is to send files over WiFi port using send to command in windows machine OS..
How to achieve that:
First you need to download the script that I prepared, extract it and follow these steps:
1. Put "adb_Send-to" folder anywhere in your hard drive.
2. Open "ip-address-here.txt" and type your android device WiFi IP address there and save changes.
3. Copy the file "My Android Device.cmd"
4. Go to the following directory:
Code:
%APPDATA%\Microsoft\Windows\SendTo
and paste SHORTCUT of "My Android Device.cmd" there.
5. Open your android device WiFi port and enable ADB WiFi (download from Google Play)
Now on your computer just right click on any file and choose "Send to" to send your file to extSdCard over WiFi..!!!
N.B: If you don't know which ADB WiFi to download from Google Play, I recommend you this one:
Extra:
You can customize the icon and name of the shortcut to your taste..
Tips:
Tip #1
Make IP settings static not DHCP in android device. By doing this you will not need to enter new IP address each time you want to connect over WiFi using this script.
How to do that?
Go to your WiFi networks --> long press your current WiFi connection --> modify network config --> IP settings (static), now put a static IP address that resembles your router gateway except for the last digits and put your gateway (See this picture as an example).
Tip #2
If you would like to send your file into a specific folder in your device, create a folder in the targeted memory sdcard first; let's say you created a folder in internal sdcard called MyStuffs
So what you need to do is to open the script "My Android Device.cmd" and edit this line by Notepad++:
Code:
adb push %1 /storage/sdcard0/
to:
Code:
adb push %1 /storage/sdcard0/[B][COLOR="Blue"]MyStuffs/[/COLOR][/B]
Click to expand...
Click to collapse
and save changes..
You can do the same for external sdcard. Create a folder in external sdcard called for example MyStuffs2 and edit this line in the script by Notepad++:
Code:
adb push %1 /storage/extSdCard/
to:
Code:
adb push %1 /storage/extSdCard/[B][COLOR="Blue"]MyStuffs2/[/COLOR][/B]
Click to expand...
Click to collapse
and save changes..
Tip #3
If you run of some adb problems, check this post here by @kmokhtar79 or this post here for more details. For android 4.2.2 adb troubleshoot, please see this post here.
- Combined Script v1.1 | Download | @ 31/8/2013 - The most recent
Old release:
- Combine Script (Send to Internal or External SdCard), mounting commands included | Download |
- Send to external sdcard script | Download |
- Send to internal sdcard script. | Download |
Change-log:
v1.1 combined script:
- The latest adb engine extracted from android SDK (date 20130729).
- Decrease timeout to exit to 2 seconds after successful sending.
- Increase timeout to exit to 8 seconds after having error for easy reading error debugging.
- Silent daemon connection.
- Added new script lines to get connected device id brand and model.
v1.0 combined script:
- Combined script for external and internal SdCard sending.
- Added mounting commands for both memories; no problem in sending to external sdcard now.
Internal script:
- Switched to internal after having problem with external sdcard sending.
External script:
- The first project idea.
Have a nice day,,
Thanks majdini, I owe you a lot for sharing your android knowledge.
Edit: I got following error while trying to copy a file
Already installed ADB WiFi Widget and gave root permission to.
Code:
already connected to 192.168.1.102:5555
failed to copy 'G:\Kamran\Mobile stuff\App\DCikonZ_1.2.6.1.apk' to '/mnt/extSdCa
rd//DCikonZ_1.2.6.1.apk': Permission denied
already connected to 192.168.1.102:5555
kmokhtar79 said:
Thanks majdini, I owe you a lot for sharing your android knowledge.
Edit: I got following error while trying to copy a file
Already installed ADB WiFi Widget and gave root permission to.
Code:
already connected to 192.168.1.102:5555
failed to copy 'G:\Kamran\Mobile stuff\App\DCikonZ_1.2.6.1.apk' to '/mnt/extSdCa
rd//DCikonZ_1.2.6.1.apk': Permission denied
already connected to 192.168.1.102:5555
Click to expand...
Click to collapse
OK,, for me I think it is mounting problem
in android device, open RootExplorer and navigate to '/mnt/extSdCard/ and mount it as R/W and try again (I think mostly this is your problem!)
if still you have the same problem, open my script and change the file destination to internal memory
Code:
adb push %1 /mnt/extSdCard/
change it to:
Code:
adb push %1 /sdcard/
and try again
tip: remember to use a static IP as per your connection, so you will not need to change IP every time
majdinj said:
Code:
adb push %1 /mnt/extSdCard/
change it to:
Code:
adb push %1 /sdcard/
Click to expand...
Click to collapse
:good:
This did the trick to me, thanks again.
kmokhtar79 said:
:good:
This did the trick to me, thanks again.
Click to expand...
Click to collapse
Nice... :good:
OK,,, let's try to force pushing to external sdcard, now try this one,,
in the script change this line again:
Code:
adb push %1 /mnt/extSdCard/
to:
Code:
adb push %1 /storage/extSdCard/
Why?
the first one is actually a symlink for the second one!!!
Nope! It didn't work again, though my external card is mounted r/w already.
majdinj said:
OK,, for me I think it is mounting problem
in android device, open RootExplorer and navigate to '/mnt/extSdCard/ and mount it as R/W and try again (I think mostly this is your problem!)
if still you have the same problem, open my script and change the file destination to internal memory
Code:
adb push %1 /mnt/extSdCard/
change it to:
Code:
adb push %1 /sdcard/
and try again
tip: remember to use a static IP as per your connection, so you will not need to change IP every time
Click to expand...
Click to collapse
thanks for this script. For me it works fine with /storage/extSdCard/
kmokhtar79 said:
Nope! It didn't work again, though my external card is mounted r/w already.
Click to expand...
Click to collapse
It seems some extSdCard behave like that..!! try to unmount extSdCard then mount it again and try to push file into it..
if still,, then keep this code in the meantime till I figure out the solution of such extSdCard
Code:
adb push %1 /sdcard/
I can send only to internal memory. However I just noticed something; while I am transferring a file to internal card, in command prompt it says:
"Sent to exdSdCard", (I am using Philz kernel)
kmokhtar79 said:
I can send only to internal memory. However I just noticed something; while I am transferring a file to internal card but in command prompt it says:
"Sent to exdSdCard", (I am using Philz kernel)
Click to expand...
Click to collapse
No this is actually an echo of my command,,, I will update OP for more clean script for both internal and external memory
OP updated to include separated script for internal and external sdcard
for internal works fine,
but still "permission denied" for external
sent from my G-Note
Although I couldn't manage to send my file to external card but no problem for me. I am pretty satisfied by this script, transfer rate is fast enough and very convenient. Thanks again majdini :good:
kmokhtar79 said:
Although I couldn't manage to send my file to external card but no problem for me. I am pretty satisfied by this script, transfer rate is fast enough and very convenient. Thanks again majdini :good:
Click to expand...
Click to collapse
yes for me too,
I flash always with beerbong's ZipInstaller and it works only from my internal sd,
so I'm happy with ur script :thumbup:
thanks a lot
sent from my G-Note
Thank you all for support,, I am digging on your issue regarding extSdCard,, it seems there are people who suffers from the same issue while other don't!!
I still believe it is adb mounting problem
plug your device to usb cable (usb debugging mode should be ticked before)
go to adb_send-to folder and on any empty place hold shift and click right mouse button --> open command window here, and type the following commands:
Code:
adb remount
adb root
adb shell "su" "" "mount -o remount,rw /storage/extSdCard"
adb remount
adb kill-server
adb kill-server
now try external sd script,, hopefully this will do it
jup,
now it´s working :good:
but one question,
have I after every reboot of the pc to type these sentence again?
and could I switch to internal again by editing your command file again?
hara74 said:
jup,
now it´s working :good:
but one question,
have I after every reboot of the pc to type these sentence again?
and could I switch to internal again by editing your command file again?
Click to expand...
Click to collapse
Good to hear that at last
You need to run those commands only if you got mounting problem.. So it is not a must in each reboot..
For switching between external and internal sdcard,, yup you can,, I will write a combined script to give you the authority to choose whether to send to external or internal sdcard,, of course I will include the commands above to ensure external sdcard mounting,,
Until then happy pushing.. mm I mean sending :laugh:
majdinj said:
Good to hear that at last
You need to run those commands only if you got mounting problem.. So it is not a must in each reboot..
For switching between external and internal sdcard,, yup you can,, I will write a combined script to give you the authority to choose whether to send to external or internal sdcard,, of course I will include the commands above to ensure external sdcard mounting,,
Until then happy pushing.. mm I mean sending :laugh:
Click to expand...
Click to collapse
yeah,
push it baby
sounds great your idea with the combined script :good:
I´m really happy with that script, bcs everytime I changed a little thing in my themes, I had either copy over the file via cable, or search with a explorer like solid explorer or so,
now I can just right klick on the file and hop hop it´s on the right place on phone :laugh:
How can we fix Android Device IP?
So that I can use the script as it is all the time.
TIA
ardicli2000 said:
How can we fix Android Device IP?
So that I can use the script as it is all the time.
TIA
Click to expand...
Click to collapse
make IP settings static not DHCP
Go to your WiFi networks --> long press your current WiFi connection --> modify network config --> IP settings (static), now put a static IP address that resemble your router gateway except last digits and put your gateway.. see attachment pic as an example
by doing this you will not need to enter new IP address each time you want to connect over WiFi using this script

[HOW-TO] [PICTURES] ADB Working On the Google Chromecast

Hey everyone,
I got the Android Debugging Bridge (ADB) working on the Google Chromecast.
A video is currently uploading. A how-to will follow shortly after.
Videos have been uploaded!
Thanks!
Part 1:
http://www.youtube.com/watch?v=vYICywxdUfM
Part 2:
http://www.youtube.com/watch?v=mjedUnv7tkM
Logcat made in Part 2:
http://pastebin.com/WZtHzrak
[Prerequisites]
A Rooted Chromecast (I recommend tvall's image..Here).
PuTTY or another Telnet Client
Android SDK
Active internet connection
Chromecast's IP Address
[How To]
Full Gallery here: http://imgur.com/a/ORiL0#0
Assuming you already have a rooted Chromecast and it is ON;
Open your preferred Telnet client, I prefer PuTTY.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Type in your Chromecast's IP Address and choose telnet as the connection type (I won't tell you how to get this, hint: check your router).
Click open and you should now see a black terminal window.
Type:
Code:
mount -o rw,remount /
and press enter
Then type:
Code:
setprop service.adb.tcp.port 5555
and press enter
Next type:
Code:
busybox vi default.prop
Press the letter 'i' on the keyboard for 'insert'
Use the arrow keys on your keyboard to navigate.
Change:
Code:
ro.secure=1
to
Code:
ro.secure=0
Change:
Code:
ro.debuggable=0
to
Code:
ro.debuggable=1
Press the 'ESC' key on your keyboard so VI goes back to accepting commands
Type ':wq' without the quotes and with the colon....Press enter.
You should now be back at the / # prompt..
Type
Code:
busybox wget http://goo.gl/TnbG99 -O adbd
and press enter
Type
Code:
chmod 777 adbd
and press enter
Type
Code:
./adbd &
It may not say anything and drop back to the prompt, this is normal
Type
Code:
ps | grep 'adbd'
and press enter to make sure adbd is running
Open a command prompt and cd to the SDK's platform-tools folder
Your path will be different than mine.
Type
Code:
adb devices
and press enter
It will probably not list any devices; this is normal. We just need to tell adb what device to connect to over wifi.
Type
Code:
adb connect X.X.X.X
where X.X.X.X is the IP Address of your Chromecast
Press Enter
Should say
Code:
Connected to X.X.X.X:5555
where X.X.X.X is the IP of your chromecast.
Type:
Code:
adb devices
and press enter
It should list your chromecast by its IP Address.
Type:
Code:
adb shell
and press enter
You should be greeted with a # prompt.
Congratulations! You now have ADB access to your chromecast.
Please note that this DOES NOT survive across reboots.
Reserved
Update:
[08/15/13 2:40PM CST] Videos Posted
[08/16/13 2:05PM CST] How-To Posted with Pictures
Awesome!
Just to clarify, this really doesn't do much yet.
As of right now you can't make persistent changes to the filesystem, because they revert after a reboot.
Heck you can't even remount the /system partition as RW at this point. Not sure why, but not too worried about it at the moment
/system is squashfs, a compressed readonly fs. Not difficult to modify, but requires reflashing the while partition (like gtvhackers image)
Sent from my Evo V 4G using Tapatalk 2
tvall said:
/system is squashfs, a compressed readonly fs. Not difficult to modify, but requires reflashing the while partition (like gtvhackers image)
Sent from my Evo V 4G using Tapatalk 2
Click to expand...
Click to collapse
Awesome. I'm assuming it just unpacks the system after every reboot, I mean since the system seems to revert to not having any added items unless its in the image tahat was flashed?
death2all110 said:
Awesome. I'm assuming it just unpacks the system after every reboot, I mean since the system seems to revert to not having any added items unless its in the image tahat was flashed?
Click to expand...
Click to collapse
You can't modify the filesystem without reflashing it. Squashfs is read only.
Sent from my Evo V 4G using Tapatalk 2
tvall said:
You can't modify the filesystem without reflashing it. Squashfs is read only.
Sent from my Evo V 4G using Tapatalk 2
Click to expand...
Click to collapse
Right. Sorry. Long day.
Anyway, is there a way to modify the boot image?
OP Updated
Thx m8
great!
adb push works well,
I suppose you could make persistent changes to /cache (this partition is mounted rw!)
Greetings:
When I attempt to download "busybox" from "Goo", it comes back with: server returned error: HTTP/1.1 404 not found !!
Any input/help is much appreciated.
Thank you.
samteeee said:
Greetings:
When I attempt to download "busybox" from "Goo", it comes back with: server returned error: HTTP/1.1 404 not found !!
Any input/help is much appreciated.
Thank you.
Click to expand...
Click to collapse
@samteeee Try it now. url should be fixed.
Hi,
i have a question, it's possible to have adb with chromecast if this one is not root?
Thanks,
labiba said:
i have a question, it's possible to have adb with chromecast if this one is not root?
Click to expand...
Click to collapse
Sorry, no.
Hello,
i don't now if i'm in the good forum to ask for help.
I have a GTV100 de netgear that i routed. after a problem of the remote i did a hard reset and after my device don't work.
in the beginin i have the trace in the uart that all go fine, But now i have the message :
NAND: Read mkbootimg header error!
FATAL ERROR! There is no bootable image on this machine!
tbdzz---- Img_Ld_And_Start error! Spinning now!
[109]I(SM): SM starts, enters warmup state!
[112]I(SM): begin to run tasks
there is any solution to write another bootable image?
thanks for your help
ChromeCast mapping memory
Hello,
I have a chromecast and i want to show its mapping memory.
the objectif is to verify when the chromecast play a video if its buffer is secure or not ?
and how can where the kernel do the allocation for memory?
can you help me please ?
thanks :good:
When I attempt to download "busybox" from "Goo", it comes back with: server returned error: HTTP/1.1 404 not found !!
Any input/help is much appreciated.

General [SOLVED] Can't copy Titanium Backup files to PC!!!

How can i copy TitaniumBackup folder to PC?
With my others Galaxy phones i always could copy through MTP but with my G998B/DS i can't.
I've used all the methods i found on the internet, such as:
Copy through MTP;
Compress TitaniumBackup's folder into a .zip file;
And through the ADB command
Code:
adb pull "/sdcard/TitaniumBackup" "D:\BACKUP"
Through MTP and compressing the folder i only get the .PROPERTIES files and through ADB i get this error message:
adb: error: failed to copy '/sdcard/TitaniumBackup/com.google.android.apps.photos-20210403-172138.tar.gz' to 'D:\BACKUP\TitaniumBackup\com.google.android.apps.photos-20210403-172138.tar.gz': remote open failed: Permission denied
If anyone can help me I would appreciate it.
SOLUTION: I entered in TWRP and i've been able to copy the folder.​
anyone know how to resolve this? i don't have TWRP so i can't use that work around.
fizmixa said:
anyone know how to resolve this? i don't have TWRP so i can't use that work around.
Click to expand...
Click to collapse
Do you get the same error as below?
MasterHack10 said:
adb: error: failed to copy '/sdcard/TitaniumBackup/com.google.android.apps.photos-20210403-172138.tar.gz' to 'D:\BACKUP\TitaniumBackup\com.google.android.apps.photos-20210403-172138.tar.gz': remote open failed: Permission denied
Click to expand...
Click to collapse
Maybe the "Permission denied" error is triggered by windows itself since you try to copy into the root of drive D. Maybe running your terminal (e.g. PowerShell) as admin will resolve your issue.
Else, @fizmixa , you could still manually boot (but not flash) twrp using fastboot, if your device isn't a Samsung device (I don't know if you can achieve this with Samsung).
Same here...Still couldn't find a solution.
I had the same problem. Looks like it's permission related. I fixed the problem by booting into TWRP -> Advanced -> File Manager, navigating to /sdcard/TitaniumBackup, clicking the blue folder with the tick and then selecting the chmod755 option.
@fizmixa, try and download Terminal Emulator for Android from the Play store and run:
Code:
chmod 755 /sdcard/TitaniumBackup/
It is about owner permission. Tar.gz files has a different owner from .properties. I don't have TWRP recovery because I use Android Emulator. How can I solve this problem?
Same issue here. Is this an Android 11 issue?
I'm struggling with the same issue .. No TWRP with me yet. So any clue how to get these files out of the device ?
JazonX said:
I'm struggling with the same issue .. No TWRP with me yet. So any clue how to get these files out of the device ?
Click to expand...
Click to collapse
They're protected due to security changes in newer versions of Android. I had the same issue on my last device, unable to pull /sdcard/android or /sdcard/TitaniumBackup using ADB for example.
You can try the SmartSwitch Windows app to take a backup of your phone?
Just a word of warning, I used SmartSwitch yesterday and although the backup was successful the call log backup zip was corrupt and couldn't be restored.
skymera said:
They're protected due to security changes in newer versions of Android. I had the same issue on my last device, unable to pull /sdcard/android or /sdcard/TitaniumBackup using ADB for example.
You can try the SmartSwitch Windows app to take a backup of your phone?
Just a word of warning, I used SmartSwitch yesterday and although the backup was successful the call log backup zip was corrupt and couldn't be restored.
Click to expand...
Click to collapse
Hey, I just managed to sort it out.
Go to Titanium Backup, Preferences, Backup location - and click the below selected option;
Select the external backup storage option, and allow access to it.
It was weird how this caused the PC copying / internal copying to fail .. This sorted the problem for good.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
JazonX said:
Hey, I just managed to sort it out.
Go to Titanium Backup, Preferences, Backup location - and click the below selected option;
Select the external backup storage option, and allow access to it.
It was weird how this caused the PC copying / internal copying to fail .. This sorted the problem for good.
Click to expand...
Click to collapse
I'm not rooting my S21U but this is good to know for the future, tks.
I'm also having this problem with Android 11 on Pixel 5a, adb: error: failed to copy ...: remote open failed: Permission denied
There isn't a TWRP for this device yet so I can't try that solution. I tried JazonX's idea but it hasn't helped. The problem seems to be that the tar.gz files are owned by media_rw user instead of u0_a252 like the other files. I tried using 'adb shell', "su -" and then "chmod 755 /sdcard/TitaniumBackup/" but it doesn't actually change any of the permissions. Also tried commands such as "chown u0_a252 *.tar.gz" but it doesn't actually change anything. I tried to write to TB support too but no response yet. Any other ideas?
Aha! I found a solution! use "adb shell" then "su -" then navigate to "cd /data/media/0/TitaniumBackup". Now commands like "chown u0_a252 *" actually work and I was able to get full backup of /sdcard/TitaniumBackup with "adb pull". Crazy Android file system!
scarlion said:
Aha! I found a solution! use "adb shell" then "su -" then navigate to "cd /data/media/0/TitaniumBackup". Now commands like "chown u0_a252 *" actually work and I was able to get full backup of /sdcard/TitaniumBackup with "adb pull". Crazy Android file system!
Click to expand...
Click to collapse
Wow! It worked for me! Thanks very much
scarlion said:
Aha! I found a solution! use "adb shell" then "su -" then navigate to "cd /data/media/0/TitaniumBackup". Now commands like "chown u0_a252 *" actually work and I was able to get full backup of /sdcard/TitaniumBackup with "adb pull". Crazy Android file system!
Click to expand...
Click to collapse
Did you do this via windows command prompt or within a terminal program on the android device?
As I can't seem to get it to work on Windows CMD
Code:
C:\platform-tools>adb shell
redfin:/ $ su -
redfin:/ # cd /storage/emulated/0/TitaniumBackup
1|redfin:/storage/emulated/0/TitaniumBackup # chown u0_a252 *
redfin:/storage/emulated/0/TitaniumBackup # adb pull "/storage/emulated/0/TitaniumBackup" "D:\Temp"
: adb: inaccessible or not found
127|redfin:/storage/emulated/0/TitaniumBackup # adb pull /storage/emulated/0/TitaniumBackup
: adb: inaccessible or not found
127|redfin:/storage/emulated/0/TitaniumBackup #
pennywaltz said:
Code:
redfin:/storage/emulated/0/TitaniumBackup # adb pull "/storage/emulated/0/TitaniumBackup" "D:\Temp"
: adb: inaccessible or not found
127|redfin:/storage/emulated/0/TitaniumBackup # adb pull /storage/emulated/0/TitaniumBackup
: adb: inaccessible or not found
127|redfin:/storage/emulated/0/TitaniumBackup #
Click to expand...
Click to collapse
I think you have to exit the "adb shell" for further adb commands to work, as "adb" is in your C:\platform-tools directory
scarlion said:
I think you have to exit the "adb shell" for further adb commands to work, as "adb" is in your C:\platform-tools directory
Click to expand...
Click to collapse
I'm having the same problem on my Pixel 5 ("redfin"). It has nothing to do with adb. Without adb running at all, I can go to a terminal emulator on the device and run the following commands ...
Code:
redfin:/ $ su -
redfin:/ # cd /sdcard/TitaniumBackup
redfin:/sdcard/TitaniumBackup # chown u0_a362 *
No error is reported. However, after doing this, all the files previously owned by rw_media are still owned by rw_media. In other words, for those files, the chown command is effectively a no-op, even after an su to root.
Google strikes again with its "We think we're much smarter than you, and we're going to 'protect' you from yourself, whether you like it or not!" attitude.
HippoMan said:
Google strikes again with its "We think we're much smarter than you, and we're going to 'protect' you from yourself, whether you like it or not!" attitude.
Click to expand...
Click to collapse
I know right, it's pretty annoying... but even with root, I think you have to specifically modify the data from the /data/media/0 directory instead, i.e.:
redfin:/ $ su -
redfin:/ # cd /data/media/0/TitaniumBackup
redfin:/data/media/0/TitaniumBackup # chown u0_a362 *
Does that work?
scarlion said:
I know right, it's pretty annoying... but even with root, I think you have to specifically modify the data from the /data/media/0 directory instead, i.e.:
redfin:/ $ su -
redfin:/ # cd /data/media/0/TitaniumBackup
redfin:/data/media/0/TitaniumBackup # chown u0_a362 *
Does that work?
Click to expand...
Click to collapse
Yep, that worked for me! Thanks! It seems they have put some stupid userland file system which mirrors files from /data:
/dev/fuse on /storage/emulated type fuse (rw,lazytime,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other)

Categories

Resources