-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backup and restore working for Pro5 #1088
base: master
Are you sure you want to change the base?
Conversation
sorry for the late reply. i have yet to give this a spin. thanks for your work 👍 |
Thanks to you, I hope that it will not be too buggy for the other devices and OS ! let me know if I can do anything else! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review. As discussed on Telegram, here are some changes i would suggest. Maybe you could also look over it again to check if there's something you want to improve code-quality-wise. Else than that, we're almost good to go.
}); | ||
} | ||
|
||
// AW : Return the total used space for system+user data on Ubuntu os only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// AW : Return the total used space for system+user data on Ubuntu os only | |
// Return the total used space for system+user data on Ubuntu os only |
// AW : Return the total used space for system+user data on Ubuntu os only | ||
async function getDeviceUsedSpaceForBackup() { | ||
// Error to handle : No such file or directory | ||
// --output=used: No such file or directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
var res = await adb.shell("df -hBG / --output=used|tail -n1"); | ||
var res2 = await adb.shell("df -hBG /userdata --output=used|tail -n1"); | ||
res = parseFloat(res); | ||
res2 = parseFloat(res2); | ||
return res + res2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make this one statement
return res + res2; | ||
} | ||
|
||
// AW : Check if /data/user-data is present and mount it if not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// AW : Check if /data/user-data is present and mount it if not. | |
// Check if /data/user-data is present and mount it if not. |
}); // mount | ||
//reject("Partition not mounted "+e); | ||
}); //ls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove dead comments
var bckpNames = []; | ||
return new Promise((resolve, reject) => { | ||
fs.readdir(directoryPath, function(err, files) { | ||
//handling error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//handling error |
}); | ||
} | ||
|
||
// AW : Read Backup config file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// AW : Read Backup config file | |
// Read Backup config file |
return JSON.parse(rawdata); | ||
} | ||
|
||
// AW : Modifying the maxBuffer size to handle the output of the backup (all file path backuped on the device!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// AW : Modifying the maxBuffer size to handle the output of the backup (all file path backuped on the device!) | |
// Modifying the maxBuffer size to handle the output of the backup (all file path backuped on the device!) |
}); | ||
} | ||
|
||
// AW : Needed for backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// AW : Needed for backup | |
// Needed for backup |
return toolpath; | ||
} | ||
|
||
// AW : Generate a config file for the backup created |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// AW : Generate a config file for the backup created | |
// Generate a config file for the backup created |
We should also already account for the fact that the installer is going to support other OSs going forward. Until we change the format, i suggest we add a property |
@@ -166,6 +166,8 @@ body .vertical-centered-box .content { | |||
z-index: -1; | |||
} | |||
|
|||
.pull-animation, | |||
.push-animation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an intended duplication?
Latest modifications for backup and restore function