artehe / Netimobiledevice

A C#/dotnet implementation for working with iOS devices (iPhone, iPad, iPod).
https://github.com/artehe/Netimobiledevice
MIT License
14 stars 7 forks source link

iPhone - Storage variant discussion #19

Closed Elanchezhiyan-P closed 6 months ago

Elanchezhiyan-P commented 6 months ago

Discussed in https://github.com/artehe/Netimobiledevice/discussions/18

Originally posted by **PElanchezhiyan** December 26, 2023 Hi @artehe , I have added the new function to get the storage details from the connected iPhone. The function name is _GetStorageDetails_ in [Diagnostic services](Netimobiledevice/Lockdown/Services/DiagnosticsService.cs). Here, I'm able to get the below items from the given services. 1. AmountDataAvailable 2. AmountDataReserved 3. AmountRestoreAvailable 4. TotalDataAvailable 5. TotalDataCapacity 6. TotalDiskCapacity 7. TotalSystemAvailable 8. TotalSystemCapacity From the above list, I can use only the TotalDiskCapacity (6th one) as it mentions the total storage value of the connected iPhone device in bytes. I have used the below function to get the byte values in GB. ![carbon](https://github.com/artehe/Netimobiledevice/assets/29861348/3ab47a50-7998-443a-b652-86e94f5ceab5) When I use the above function, we are not able to get the exact value of the connected iPhone. Because, I use **_128GB_** variant and its byte values are _128000000000 bytes_. Below are the list of questions that needs clarification. 1. Why did the iPhone storage value is calculated in terms of 1000 bytes instead of 1024? 2. How do i calculate the total amount of data that are to be backed up before backup job starts?