master-hax / pixel-backup-gang

backup tools for OG pixel & pixel XL
42 stars 6 forks source link

Doubts I've! Thanks in Advance :D #5

Closed Arora-Sir closed 1 month ago

Arora-Sir commented 2 months ago

Doubts!

I have a few questions regarding the project. Your assistance in answering these or updating the repository's README file would be greatly appreciated:

  1. Can you please suggest a video/link to root the device?

    • Is unlimited storage available if we root a Pixel 1 device?
  2. Main Question: Can we charge a Pixel Device and connect to a hard disk at the same time?

    • If possible, could you please suggest a link to Amazon/Flipkart for purchasing the connecting device you are using?

Thank you for your support!

master-hax commented 2 months ago
1. **Can you please suggest a video/link to root the device?**

   * Is unlimited storage available if we root a Pixel 1 device?

use the guide from Magisk here. you will need adb and fastboot tools from the Android SDK. note that there's no vbmeta partition on the OG pixels.

yes, unlimited storage still works after rooting.

2. **Main Question: Can we charge a Pixel Device and connect to a hard disk at the same time?**

   * If possible, could you please suggest a link to Amazon/Flipkart for purchasing the connecting device you are using?

yes, see my demo image. any USB C hub/dock that supports USB 3.0 & power delivery (PD) will be sufficient. you might also find an ethernet port useful.

sorry, i don't feel comfortable recommending a specific brand or model. you should be able to get a decent one for ~$25.

Arora-Sir commented 1 month ago

Pixel Backup Gang Issue Documentation

Overview

I have been following the setup instructions for the pixel-backup-gang project step-by-step but continue to encounter issues that prevent me from successfully mounting an external drive to my Google Pixel. I've spent several hours trying to troubleshoot the problem without success. Below is a detailed account of the steps I've taken and the results at each stage. Any insights or suggestions would be greatly appreciated.

Steps Executed

Here is the sequence of commands I used, intending to mount the external drive and make it accessible for backing up via Google Photos.


:/ $ cd ~
:/data/user/0/com.termoneplus/app_HOME $
ls
Makefile
README.md
assets
find_device.sh
install.sh
mount_ext4.sh
pixel-backup-gang
pixel-backup-gang-latest.tar.gz
pixel-backup-gang.zip
scripts
show_devices.sh
start_global_shell.sh
unmount.sh
:/data/user/0/com.termoneplus/app_HOME $
cd pixel-backup-gang
:/data/user/0/com.termoneplus/app_HOME/pixel-backup-gang $ su
:/data/data/com.termoneplus/app_HOME/pixel-backup-gang # ./start_global_shell.sh
:/ # ./show_devices.sh
/bin/sh: ./show_devices.sh: inaccessible or not found
127|:/ # exit
127|:/data/data/com.termoneplus/app_HOME/pixel-backup-gang # ./show_devices.sh
+ blkid
/dev/block/zram0: UUID="e7f22a3d-6ebc-412c-a38f-b6c0f12366f3" TYPE="swap"
/dev/block/sda25: SEC_TYPE="msdos" UUID="00BC-614E" TYPE="vfat"
/dev/block/sda26: SEC_TYPE="msdos" UUID="00BC-614E" TYPE="vfat"
/dev/block/sda31: LABEL="vendor" UUID="2b96c597-1e2f-5ee1-9851-c4a9fa9de36e" TYPE="ext4"
/dev/block/sda32: LABEL="vendor" UUID="2b96c597-1e2f-5ee1-9851-c4a9fa9de36e" TYPE="ext4"
/dev/block/sda33: LABEL="/" UUID="4729639d-b5f2-5cc1-a120-9ac5f788683c" TYPE="ext4"
/dev/block/sda34: LABEL="/" UUID="4729639d-b5f2-5cc1-a120-9ac5f788683c" TYPE="ext4"
/dev/block/sda35: UUID="4b636f2d-6dd0-4620-b16c-17898a697008" TYPE="ext4"
/dev/block/sdd3: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/sdg1: LABEL="disk" UUID="90F1-7D36" TYPE="exfat"
:/data/data/com.termoneplus/app_HOME/pixel-mount_ext4.sh /dev/block/sdg1           <
/system/bin/sh: /mount_ext4.sh: inaccessible or not found
127|:/data/data/com.termoneplus/app_HOME/p/mount_ext4.sh /dev/block/sdg1          <
+ readlink /proc/self/ns/mnt
+ readlink /proc/1/ns/mnt
+ '[' 'mnt:[4026534261]' '!=' 'mnt:[4026531840]' ']'
+ echo 'not running in global mount namespace, try elevating first'
not running in global mount namespace, try elevating first
+ exit 1
1|:/data/data/com.termoneplus/app_HOME/pixel-backup-gang #
1|:/data/data/com.termoneplus/app_HOME/pixel-backup-gang #
n19htmare commented 1 month ago

Try running start_global_shell.sh before the other scrips.

Also run as su.

Arora-Sir commented 1 month ago

Try running start_global_shell.sh before the other scrips.

Also run as su.

Can you please show me step by step to write commands. Its been many hours since I've been working on this and unable to solve it.

(If I run 'su' in the starting of temrinal and then run "start_global_shell.sh", it gives me a blank home directory I guess of I press "ls" and there are no scripts available ! I'm unablt to understand this. Please help me! 🙏🏻

n19htmare commented 1 month ago

That's normal. You have to navigate to the folder using ls after running su.

Arora-Sir commented 1 month ago

That's normal. You have to navigate to the folder using ls after running su.

Still unable to get it sir :(


:/ $ cd ~
:/data/user/0/com.termoneplus/app_HOME $
su
:/data/data/com.termoneplus/app_HOME # ls
Makefile
README.md
assets
find_device.sh
install.sh
mount_ext4.sh
pixel-backup-gang
pixel-backup-gang-latest.tar.gz
pixel-backup-gang.zip
scripts
show_devices.sh
start_global_shell.sh
unmount.sh
:/data/data/com.termoneplus/app_HOME #
./start_global_shell.sh
:/ # ls
acct
apex
bin
bugreports
cache
charger
config
d
data
debug_ramdisk
default.prop
dev
dsp
etc
firmware
init
init.environ.rc
init.rc
init.usb.configfs.rc
init.usb.rc
init.zygote32.rc
init.zygote64_32.rc
lost+found
mnt
odm
oem
persist
postinstall
proc
product
product_services
res
sbin
sdcard
storage
sys
system
ueventd.rc
vendor
verity_key
:/ # cd sdcard
:/sdcard # ls
Android DCIM Download the_binding
:/sdcard # cd Download
kup-gang/master/install.sh)"            <
install.sh: downloading the latest release  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0     0    0     0    0     0      0      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0  1202    0     0    0     0      0    100  1202  100  1202    0     0    511      0  0:00:02  0:00:02 --:--:--  2896
install.sh: unpacking the release archive (requires root)
pixel-backup-gang/mount_ext4.sh
pixel-backup-gang/unmount.sh
pixel-backup-gang/find_device.sh
pixel-backup-gang/show_devices.sh
pixel-backup-gang/enable_tcp_debugging.sh
pixel-backup-gang/disable_tcp_debugging.shpixel-backup-gang/start_global_shell.sh
install.sh: make the release executable (requires root)
install.sh: pixel backup gang successfully installed to /storage/emulated/0/Download/pixel-backup-gang
d pixel-backup-gang                     <
:/sdcard/Download/pixel-backup-gang #
./show_devices.sh
/bin/sh: ./show_devices.sh: can't execute: Permission denied
126|:/sdcard/Download/pixel-backup-gang # ls
disable_tcp_debugging.sh
enable_tcp_debugging.sh
find_device.sh
mount_ext4.sh
show_devices.sh
start_global_shell.sh
unmount.sh
:/sdcard/Download/pixel-backup-gang #
Arora-Sir commented 1 month ago

@n19htmare commented on Aug 2, 2024, 4:57 PM GMT+5:30:

That's normal. You have to navigate to the folder using ls after running su.

I've purchased a hub just to do this, please help me step by step. that would be a great help. i've followed step by step procedure but was unable to get hard disk it in my photos.

master-hax commented 1 month ago

That's normal. You have to navigate to the folder using ls after running su.

sorry about that - there's a TODO comment to fix it

Arora-Sir commented 1 month ago

@master-hax @n19htmare

Could you please assist me? When I run ./Start_Global_shell.sh, I end up back in the root directory. Since there are no files, I need to navigate to the "Downloads" folder, but nothing happens even when I follow your steps.

Could you provide a list of all the commands I need to perform, step-by-step, without skipping any details? This includes:

I'm happy to provide any information you need to understand my issue. I'm new to this, so your detailed guidance would be greatly appreciated.

Thank you!

Oblivivious commented 1 month ago

If you're still having issues. I also struggled with setting it up. I made instructions over at #2. I'm not sure how clear they are, so feel free to ask questions and I'll try my best to answer them.

Arora-Sir commented 1 month ago

Hey @Oblivivious , Thanks for the reply.

It seems that I am encountering the same issue you described, but I'm stuck at the step where you've written ./mount_ext4.sh /dev/block/sdi1. The terminal says that my device is busy, as you can see from the commands I've typed below:

Welcome to Termux!

Docs:       https://termux.dev/docs
Donate:     https://termux.dev/donate
Community:  https://termux.dev/community

Working with packages:

 - Search:  pkg search <query>
 - Install: pkg install <package>
 - Upgrade: pkg upgrade

Subscribing to additional repositories:

 - Root:    pkg install root-repo
 - X11:     pkg install x11-repo

For fixing any repository issues,
try 'termux-change-repo' command.

Report issues at https://termux.dev/issues
~ $ pkg install tsu
No mirror or mirror group selected. You might want to select one by running 'termux-change-repo'
Checking availability of current mirror:
[*] https://packages-cf.termux.dev/apt/termux-main: ok
Hit:1 https://packages-cf.termux.dev/apt/termux-main stable InRelease
Hit:2 https://packages-cf.termux.dev/apt/termux-root root InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
24 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
tsu is already the newest version (8.6.0-1).
0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
~ $ pkg install blk-utils
No mirror or mirror group selected. You might want to select one by running 'termux-change-repo'
Checking availability of current mirror:
[*] https://packages-cf.termux.dev/apt/termux-main: ok
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
blk-utils is already the newest version (2.39.3-4).
0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
~ $ tsu
.../files/home # lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0 29.7G  0 disk
├─sda1    8:1    0  512K  0 part
├─sda2    8:2    0  512K  0 part
├─sda3    8:3    0  512K  0 part
├─sda4    8:4    0  512K  0 part
├─sda5    8:5    0    2M  0 part
├─sda6    8:6    0    2M  0 part
├─sda7    8:7    0  512K  0 part
├─sda8    8:8    0  512K  0 part
├─sda9    8:9    0  512K  0 part
├─sda10   8:10   0  512K  0 part
├─sda11   8:11   0  512K  0 part
├─sda12   8:12   0  512K  0 part
├─sda13   8:13   0  256K  0 part
├─sda14   8:14   0  256K  0 part
├─sda15   8:15   0  256K  0 part
├─sda16 259:0    0  256K  0 part
├─sda17 259:1    0    4M  0 part
├─sda18 259:2    0    4M  0 part
├─sda19 259:3    0   32M  0 part
├─sda20 259:4    0   32M  0 part
├─sda21 259:5    0   32M  0 part
├─sda22 259:6    0   32M  0 part
├─sda23 259:7    0  128K  0 part
├─sda24 259:8    0  128K  0 part
├─sda25 259:9    0   70M  0 part /firmware/radio
├─sda26 259:10   0   70M  0 part
├─sda27 259:11   0  256K  0 part
├─sda28 259:12   0  256K  0 part
├─sda29 259:13   0  256K  0 part
├─sda30 259:14   0  256K  0 part
├─sda31 259:15   0  300M  0 part
├─sda32 259:16   0  300M  0 part
├─sda33 259:17   0    2G  0 part /system
│                                /apex/com.android.resolv
│                                /apex/com.android.resolv@290000000
│                                /apex/com.android.media.swcodec
│                                /apex/com.android.media.swcodec@290000000
│                                /apex/com.android.media
│                                /apex/com.android.media@290000000
│                                /apex/com.android.conscrypt
│                                /apex/com.android.conscrypt@290000000
│                                /apex/com.android.runtime
│                                /apex/com.android.runtime@1
│                                /apex/com.android.tzdata
│                                /apex/com.android.tzdata@290000000
│                                /
├─sda34 259:18   0    2G  0 part
├─sda35 259:19   0 24.8G  0 part /data
│                                /data
└─sda36 259:20   0  4.7M  0 part
sdb       8:16   0    4M  0 disk
└─sdb1    8:17   0    4M  0 part
sdc       8:32   0    4M  0 disk
└─sdc1    8:33   0    4M  0 part
sdd       8:48   0   48M  0 disk
├─sdd1    8:49   0    1M  0 part
├─sdd2    8:50   0    8K  0 part
├─sdd3    8:51   0   32M  0 part /persist
├─sdd4    8:52   0  128K  0 part
├─sdd5    8:53   0    4K  0 part
├─sdd6    8:54   0    4K  0 part
├─sdd7    8:55   0    1M  0 part
├─sdd8    8:56   0    4K  0 part
├─sdd9    8:57   0    2M  0 part
├─sdd10   8:58   0    2M  0 part
├─sdd11   8:59   0    1M  0 part
├─sdd12   8:60   0    4K  0 part
└─sdd13   8:61   0  8.8M  0 part
sde       8:64   0   36M  0 disk
├─sde1    8:65   0  512K  0 part
├─sde2    8:66   0    6M  0 part
├─sde3    8:67   0    4M  0 part
├─sde4    8:68   0    2M  0 part
├─sde5    8:69   0   16M  0 part
└─sde6    8:70   0  7.5M  0 part
sdf       8:80   0    8M  0 disk
├─sdf1    8:81   0   16K  0 part
├─sdf2    8:82   0  256K  0 part
├─sdf3    8:83   0    2M  0 part
├─sdf4    8:84   0    4K  0 part
└─sdf5    8:85   0  5.7M  0 part
sdg       8:96   0  1.8T  0 disk
└─sdg1    8:97   0  1.8T  0 part
zram0   254:0    0  512M  0 disk
.../files/home # su
ackup-gang/master/install.sh)"              <
install.sh: downloading the latest release
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0   0     0    0     0    0     0      0      0   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 100  1202  100  1202    0     0    492      0 100  1202  100  1202    0     0    487      0  0:00:02  0:00:02 --:--:--  3012
install.sh: unpacking the release archive (requires root)
pixel-backup-gang/mount_ext4.sh
pixel-backup-gang/unmount.sh
pixel-backup-gang/find_device.sh
pixel-backup-gang/show_devices.sh
pixel-backup-gang/enable_tcp_debugging.sh
pixel-backup-gang/disable_tcp_debugging.sh
pixel-backup-gang/start_global_shell.sh
install.sh: make the release executable (requires root)
install.sh: pixel backup gang successfully installed to /data/data/com.termux/files/home/pixel-backup-gang
om.termux/files/home/pixel-backup-gang      <
:/data/data/com.termux/files/home/pixel-backup-gang # ./start_global_shell.sh
x/files/home/pixel-backup-gang              <
:/data/data/com.termux/files/home/pixel-backup-gang # ./mount_ext4.sh /dev/block/sdg1
+ readlink /proc/self/ns/mnt
+ readlink /proc/1/ns/mnt
+ '[' 'mnt:[4026531840]' '!=' 'mnt:[4026531840]' ']'
+ mkdir -p -v /mnt/my_drive
mkdir: created directory '/mnt/my_drive'
+ mount -t ext4 -o nosuid,nodev,noexec,noatime /dev/block/sdg1 /mnt/my_drive
mount: '/dev/block/sdg1'->'/mnt/my_drive': Device or resource busy
1|:/data/data/com.termux/files/home/pixel-backup-gang # mount | grep /dev/block/sdg1

1|:/data/data/com.termux/files/home/pixel-backup-gang #
1|:/data/data/com.termux/files/home/pixel-backup-gang #
1|:/data/data/com.termux/files/home/pixel-backup-gang # umount /dev/block/sdg1
umount: /dev/block/sdg1: Invalid argument
1|:/data/data/com.termux/files/home/pixel-backup-gang # lsof | grep /dev/block/sdg1
1|:/data/data/com.termux/files/home/pixel-backup-gang # fuser -v /dev/block/sdg1
/bin/sh: fuser: inaccessible or not found
127|:/data/data/com.termux/files/home/pixel-backup-gang # ./mount_ext4.sh /dev/block/sdg1
+ readlink /proc/self/ns/mnt
+ readlink /proc/1/ns/mnt
+ '[' 'mnt:[4026531840]' '!=' 'mnt:[4026531840]' ']'
+ mkdir -p -v /mnt/my_drive
+ mount -t ext4 -o nosuid,nodev,noexec,noatime /dev/block/sdg1 /mnt/my_drive
mount: '/dev/block/sdg1'->'/mnt/my_drive': Device or resource busy
1|:/data/data/com.termux/files/home/pixel-backt -o remount /dev/block/sdg1 /mnt/my_drive  <
mount: '/mnt/my_drive' not in /proc/mounts
1|:/data/data/com.termux/files/home/pixel-backt -t exfat /dev/block/sdg1 /mnt/my_drive    <
mount: '/dev/block/sdg1'->'/mnt/my_drive': No such device
1|:/data/data/com.termux/files/home/pixel-backup-gang # mkfs.ext4 /dev/block/sdg1
mke2fs 1.44.4 (18-Aug-2018)
/dev/block/sdg1 contains a vfat file system
Proceed anyway? (y,N) y
/dev/block/sdg1 is mounted; will not make a filesystem here!
1|:/data/data/com.termux/files/home/pixel-backup-gang # ./mount_ext4.sh /dev/block/sdg1
+ readlink /proc/self/ns/mnt
+ readlink /proc/1/ns/mnt
+ '[' 'mnt:[4026531840]' '!=' 'mnt:[4026531840]' ']'
+ mkdir -p -v /mnt/my_drive
+ mount -t ext4 -o nosuid,nodev,noexec,noatime /dev/block/sdg1 /mnt/my_drive
mount: '/dev/block/sdg1'->'/mnt/my_drive': Device or resource busy
1|:/data/data/com.termux/files/home/pixel-backup-gang #

FYI: I formatted the hard disk with the exFAT format, if that matters. There were only two options: exFAT and NTFS.

I've also thied these below steps to check:

  1. Mount -> mount | grep /dev/block/sdg1
  2. Unmount -> umount /dev/block/sdg1 and lsof | grep /dev/block/sdg1
  3. Retry Mount -> ./mount_ext4.sh /dev/block/sdg1
  4. Mounting with Different Options -> mount -o remount /dev/block/sdg1 /mnt/my_drive
  5. Checking compatibility -> mount -t exfat /dev/block/sdg1 /mnt/my_drive
  6. Reformat the Drive -> mkfs.ext4 /dev/block/sdg1

Still unable to understand why it is showing everytime the Drive or Resource is Busy :(

Oblivivious commented 1 month ago

The only thing I can think of is that the drive is not formatted to ext4. I used MiniTool Partition Wizard on windows to format the drive. You can use any other software. That's is just what I googled and what worked for me. I don't know what mkfs.ext4 does as I didn't use it.

Arora-Sir commented 1 month ago

The only thing I can think of is that the drive is not formatted to ext4. I used MiniTool Partition Wizard on windows to format the drive. You can use any other software. That's is just what I googled and what worked for me. I don't know what mkfs.ext4 does as I didn't use it.

Okay, so I've now formatted it to ext4. I initially thought it got corrupted, so I went through the entire process again. I used the software you mentioned, but now I'm unsure which software to use for transferring files to the external HDD. Some people are saying that using the wrong software for reading/writing to the drive may corrupt it. Can you please guide me which one you used in windows to transfer files to HDD.

Oblivivious commented 1 month ago

Personally, I use syncthing to transfer files from my phone of pc to the pixel phone. As windows doesn't ext4 (only Linux I think) you cant directly transfer any files from windows to the drive. Just try the setup process on your pixel again with this formatted drive.

Arora-Sir commented 1 month ago

@Oblivivious commented on Aug 14, 2024, 5:33 PM GMT+5:30:

Personally, I use syncthing to transfer files from my phone of pc to the pixel phone. As windows doesn't ext4 (only Linux I think) you cant directly transfer any files from windows to the drive. Just try the setup process on your pixel again with this formatted drive.

Sorry to bother you again and again. I've done login to this software your'e telling but still unable to understand how you are transferring files to it! Can you please explain the procedure step-by-step to get files there on HDD.

Oblivivious commented 1 month ago

YouTube videos might be better at explaining than I am. But in short: download syncthing on all devices. (You may need to download fdrois first and search for syncthing there).

If you have any questions, YouTube will be the most convenient. Clear to explain and video to follow.

Arora-Sir commented 1 month ago

@Oblivivious commented on Aug 14, 2024, 6:22 PM GMT+5:30:

YouTube videos might be better at explaining than I am. But in short: download syncthing on all devices. (You may need to download fdrois first and search for syncthing there).

  • First you have to add one another device, use the device id qr-code. (Look for a notification on the pixel and just accept there, if not then repeat the process but on the pixel instead)
  • Then on your main phone share the folders you want to share. (I recommend doing share only, it normally defaults to send and receive).
    Select the device you want to share to (pixel phone).
  • Once done, you should receive a notification on the pixel saying your other phone wants to share a folder.
  • When choosing the directory, find the_binding folder and create a new folder in there.
  • Change sync to receive only.
  • It should start syncing after all that is done.

If you have any questions, YouTube will be the most convenient. Clear to explain and video to follow.

Umm sees like I've used some app like "Resilio Sync" months back, but what my doubt is, okay the syncing is working fine but it is in phone's internal the_binding folder right? how will this transfer to HDD?

Arora-Sir commented 1 month ago

@Oblivivious commented on Aug 14, 2024, 6:22 PM GMT+5:30:

YouTube videos might be better at explaining than I am. But in short: download syncthing on all devices. (You may need to download fdrois first and search for syncthing there).

  • First you have to add one another device, use the device id qr-code. (Look for a notification on the pixel and just accept there, if not then repeat the process but on the pixel instead)
  • Then on your main phone share the folders you want to share. (I recommend doing share only, it normally defaults to send and receive).
    Select the device you want to share to (pixel phone).
  • Once done, you should receive a notification on the pixel saying your other phone wants to share a folder.
  • When choosing the directory, find the_binding folder and create a new folder in there.
  • Change sync to receive only.
  • It should start syncing after all that is done.

If you have any questions, YouTube will be the most convenient. Clear to explain and video to follow.

Your commands from the post were incredibly helpful in enabling this feature. I’m not entirely sure how it all came together, but it did!

The main issue was I was using the exfat format, and converting to the ext4 format, which was the key step in the whole process.

I also recommend trying the application 'Resilio Sync.' I think you'll appreciate it for its clean interface and straightforward setup.

Additionally, I’ve installed Ubuntu in a virtual machine, so I can easily access the external HDD and transfer files from PC whenever needed.

Thanks a lot for your help, brother!