Skip to content
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

Prompt for cache refresh #8

Open
SavSanta opened this issue Feb 1, 2024 · 5 comments
Open

Prompt for cache refresh #8

SavSanta opened this issue Feb 1, 2024 · 5 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@SavSanta
Copy link

SavSanta commented Feb 1, 2024

I have 1 day (well literally 8 minutes now) before the app has to be updated from 2.23.23.78 to whatever is here now that made Issue #6 . As Im a big procrastinator lol. I tried to see how this utility works on my old phone with Android 8.0 ahead of dealing with possible Issue #6 issues

I interestingly enough had a more easy time than I did on my Android 10 device where I didnt run into Issue #4 . So the problem for #4 which I submitted a PR doesnt happen until after a certain Android version (probably 9.0)

But I did run into an new issue.... "[INSTALL_FAILED_VERSION_DOWNGRADE] " as described in Issue #2 .

In my case app was uninstalled successfully uninstalled . The older OS didnt update/refresh the nstalled software package cache/manifests somewhere on the phone which somehow causes that error to show up. Restarting the device and manually installed removed it. Perhaps might need a modification to read the errorcode/success value and prompt for that as restarting or if possible manually refreshing the cache should be considered.

Everything else went as expected

@SavSanta
Copy link
Author

SavSanta commented Feb 1, 2024

Output describing the situation above

\=========================================================================                                         
\= This script will extract the WhatsApp Key file and DB on Android 4.0+ =                                         
\= You DO NOT need root for this to work but you DO need Java installed. =                                         
\= If your WhatsApp version is greater than 2.11.431 (most likely), then =                                         
\= a legacy version will be installed temporarily in order to get backup =                                         
\= permissions. You will NOT lose ANY data and your current version will =                                         
\= be restored at the end of the extraction process so try not to panic. =                                         
\= Script by: TripCode (Greets to all who visit: XDA Developers Forums). =                                         
\= Thanks to: dragomerlin for ABE and to Abinash Bishoyi for being cool. =                                         
\=         ###          Version: v5.1 (22/02/2022)          ###          =                                         
\=========================================================================                                         
                                                                                                                  
                                                                                                                  
Please connect your Android device with USB Debugging enabled:                                                    
                                                                                                                  
cannot connect to daemon at tcp:5037: Connection refused                                                          
* daemon not running; starting now at tcp:5037                                                                    
* daemon started successfully                                                                                     
                                                                                                                  
Downloading legacy WhatsApp 2.11.431 to local folder                                                              
                                                                                                                  
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                   
                                 Dload  Upload   Total   Spent    Left  Speed                                     
100 17.4M  100 17.4M    0     0  7671k      0  0:00:02  0:00:02 --:--:-- 7672k                                    
                                                                                                                  
WhatsApp 2.23.23.78 installed                                                                                     
                                                                                                                  
Backing up WhatsApp 2.23.23.78                                                                                    
/data/app/com.whatsapp-vPvkDixlHOeWZYS91dxTrA==/base.ap...pulled, 0 skipped. 14.0 MB/s (55290033 bytes in 3.764s) 
Backup complete                                                                                                   
                                                                                                                  
Removing WhatsApp 2.23.23.78 skipping data                                                                        
Success                                                                                                           
Removal complete                                                                                                  
                                                                                                                  
Installing legacy WhatsApp 2.11.431                                                                               
Performing Streamed Install                                                                                       
adb: failed to install tmp/LegacyWhatsApp.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]   
```                      
`

[ At this point I reboot the phone and install it manually]

```Install complete                                                                                                  
                                                                                                                                                                                    
Paused. Open Whatsapp. Ok the Permissions Request. Press Enter to continue                                        
                                                                                                                  
WARNING: adb backup is deprecated and may be removed in a future release                                          
Now unlock your device and confirm the backup operation...                                                        
                                                                                                                  
Please enter your backup password (leave blank for none) and press Enter:                                         
                                                                                                                  
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true                                     
apps/com.whatsapp/f/key                                                                                           
apps/com.whatsapp/f/encrypted_backup.key                                                                          
apps/com.whatsapp/db/msgstore.db                                                                                  
apps/com.whatsapp/db/wa.db                                                                                        
apps/com.whatsapp/db/axolotl.db                                                                                   
apps/com.whatsapp/db/chatsettings.db                                                                              
tar: apps/com.whatsapp/Avatars: Not found in archive                                                              
tar: Exiting with failure status due to previous errors                                                           
                                                                                                                  
Saving whatsapp.cryptkey ...                                                                                      
                                                                                                                  
Saving encrypted_backup.key ...                                                                                   
Saving msgstore.db ...                                                                                            
Saving wa.db ...                                                                                                  
Saving axolotl.db ...                                                                                             
Saving chatsettings.db ...                                                                                        
cp: cannot stat 'tmp/apps/com.whatsapp/Avatars': No such file or directory                                        
Saving Avatars...                                                                                                 
                                                                                                                  
Pushing cipher key to: /sdcard/WhatsApp/Databases/.nomedia                                                        
tmp/apps/com.whatsapp/f/key: 1 file pushed, 0 skipped. 0.9 MB/s (158 bytes in 0.000s)                             
                                                                                                                  
Restoring WhatsApp 2.23.23.78                                                                                     
Performing Streamed Install                                                                                       
Success                                                                                                           
Restore complete                                                                                                  
                                                                                                                  
Cleaning up temporary files ...                                                                                   
Done                                                                                                              
                                                                                                                  
Operation complete                                                                                                
                                                                                                                  
Please press Enter to quit...      ```

@SavSanta
Copy link
Author

SavSanta commented Feb 1, 2024

No further testing possible on this phone. Accidentally erased my data doing a second complete uninstall without the -k flag. Whoops. Big sad

@drzraf
Copy link

drzraf commented Jun 11, 2024

Happened to me. Same error, same resolution: a phone reboot.
But a user is likely to interrupt the script what is not fool proof because running it again:
It'll store 2.11.431 as the "previous" version, and attempt to restore it from whatsapp after the operation is complete which is further confusing and error proof. That's a scenario the script should handle in an safe and idempotent way.

@KnugiHK KnugiHK added enhancement New feature or request bug Something isn't working labels Sep 9, 2024
@KnugiHK KnugiHK self-assigned this Sep 9, 2024
@KnugiHK
Copy link
Owner

KnugiHK commented Sep 15, 2024

Should we ask the users to restart their phone regardless, or only if they experience the issue?

@SavSanta
Copy link
Author

SavSanta commented Sep 15, 2024

I would prob aim for only if they experience the issue. Though, that would require that the script can read values generated from ADB from the terminal.

I'm not sure if that is possible from the BAT Script. It prob is possible from the *Nix and Powershell tho

Your call broski

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants