Hey guyz, my query is regarding the hidden C:\Program Files\WindowsApps folder which stores all the downloaded Windows Store Apps. Today as I had some issues with the Zune Videos app, I decided to uninstall it. After uninstall I usually manually check for left over files using the search utility. To my surprise I found that though windows had removed the videos app, related files were still lurking in the aforesaid foler along with files belonging to previously uninstalled apps. Now, the leftover files are taking up a lot of space around a GB of data. Is it safe to manually delete these folders and files belonging to uninstalled apps? Is there any utility that searches and removes such left over files?
Thnx!
Even if you uninstall preinstalled Microsoft apps ( and maybe other apps installed from store), they still remain in that folder, taking up a lot of space. I got the right permissions to enter the windows apps folder, but I cannot delete uninstalled apps, I need system permissions but it is hard to grant them, I read about using a boot linux distro I can do it. Anyone know how to delete those apps?
Inviato dal mio GT-I9300 con Tapatalk 2
OK, first of all, search before posting. This topic has been discussed to death.
Second, the reason for the old versions sticking around is because a new user account always has those apps pre-installed; if you delete them it breaks things.
Third, you can delete them easily by taking ownership (must be Admin to do this) and them editing the permissions. It's also possible to run a shell as TrustedInstaller, but that's a mess by comparison.
Sorry for noobishness, but what exactly are u referring to when u say a new user account? Is it a fresh windows install or creating a user from within windows? Also what things could break exactly?
Creating a user from within Windows... You may have heard of these things called multi-user operating systems? The NT family (including RT) supports multiple users. Your tablet sets up one user on initial configuration, but you can add more. Each one has its own username, password, home directory, etc. Each one also has its own Windows Store apps, but the binaries are all stored in the same place (C:\Program Files\WindowsApps).
Best case, the new user would either have a broken tile on their Start screen or would just not have access to one of the apps that is supposed to be present by default. Worst (likely) case, creating the new user would fail partway through, leading to a corrupted security configuration and registry. The real result is probably nearer the best case than the worst, but without testing - something I'm not going to do on my own hardware purely to satisfy curiosity - I can't say. It would be putting the system into an unexpected state, a condition outside what the developers likely ever planned for, and at that point the best you can hope for is a graceful failure that doesn't take anything else with it.
GoodDayToDie said:
Creating a user from within Windows... You may have heard of these things called multi-user operating systems? The NT family (including RT) supports multiple users. Your tablet sets up one user on initial configuration, but you can add more. Each one has its own username, password, home directory, etc. Each one also has its own Windows Store apps, but the binaries are all stored in the same place (C:\Program Files\WindowsApps).
Best case, the new user would either have a broken tile on their Start screen or would just not have access to one of the apps that is supposed to be present by default. Worst (likely) case, creating the new user would fail partway through, leading to a corrupted security configuration and registry. The real result is probably nearer the best case than the worst, but without testing - something I'm not going to do on my own hardware purely to satisfy curiosity - I can't say. It would be putting the system into an unexpected state, a condition outside what the developers likely ever planned for, and at that point the best you can hope for is a graceful failure that doesn't take anything else with it.
Click to expand...
Click to collapse
Please, how can i delete those apps ? i have admin permission but when i try to delete i get the message: System permissions requested...
Here's your answer!
I just did that, it does no work
Inviato dal mio GT-I9300 con Tapatalk 2
gaetanolip said:
Please, how can i delete those apps ? i have admin permission but when i try to delete i get the message: System permissions requested...
Click to expand...
Click to collapse
So after being told it could very well break things you still want to do it?
Is your HDD really that small that a GB is a noticeable loss when it comes to the piece of mind that your system will work correctly?
Here's one way using the commandline:
Press Win-X, run "Command Prompt Admin". Enter the colored text commands into the CMD console (copy-paste if you're a CLI newbie):
C:\Windows\system32>takeown /f "c:\Program Files\WindowsApps" /r /d y (take ownership of folder)
C:\Windows\system32>icacls "C:\Program Files\WindowsApps" /grant administrators:f /t (give yourself full access rights to folder)
Now you can delete stuff in the folder. Let's nuke a Zune folder. I hate those ad-ridden crap anyway.
C:\Windows\system32>cd "C:\Program Files\WindowsApps" (change directory to said folder)
C:\Program Files\WindowsApps>dir/a/p (list folder content, pick a subfolder to nuke)
C:\Program Files\WindowsApps>rd /s/q Microsoft.Z<Tab>
CLI trick: Press Tab for filename completion. If more than one file fits the match, successive Tabs will cycle through the names. This shortcut is a lifesaver for CLI peeps. Anyway, so we get Microsoft.ZuneMusic_blahblah. Press Enter to kill ZuneMusic folder. (Yes, it's a dangerous command. Disclaimer of responsibility goes here.)
Suffice it to say, set a restore point beforehand.
After-action report: OK so after nuking the ZuneMusic folder, I made a new "Test" user. On the Start Screen (which I never use) I get IE, Store, File Explorer, and Desktop. This mirrored what I had on my main acct, so seems pretty normal. I then went and install the free MS Solitaire from Win Store. Works. I'll try nuking the rest of the Bing/Zune/Xbox crap and see what happens. (Yes, I backed up.)
AAR 2: OK I went and delete a bunch more stuff, including MS Solitaire folder I just installed. Went back out to the Start Screen and clicked on Solitaire tile. It went into a blank screen and bounced back out to the Start Screen. Right-click, Uninstall, and tile gone. No problemo. Went into Store again and install MS Mahjong. Works again.
Seems pretty cut-and-dried.
Ah cool, thanks for testing!
GoodDayToDie said:
Ah cool, thanks for testing!
Click to expand...
Click to collapse
hi,
syntax error for me
Microsoft Windows [Versione 6.2.9200]
(c) 2012 Microsoft Corporation. Tutti i diritti riservati.
C:\windows\system32>takeown /f "c:\Program Files\WindowsApps" /r /d y
ERRORE: Sintassi non valida. Il valore 'y' non è consentito per l'opzione '/d'.
Digitare "TAKEOWN /?" per informazioni sull'utilizzo.
C:\windows\system32>
translation : sintax error , y is not allowed for option /d
please help me i have a very small ssd...
It's a localization error. /r recurses on all subdirectories, and /d y (y for yes) bypasses the prompt to act on each subdir. My guess that you'd want to use /d s (for sì). Alternatively, you can leave out the /d y, and just confirm for each subdir.
To get parameter description for takeown or any command, enter at the prompt command /? > C:\command.txt, so for takeown, enter takeown /? > C:\takeown.txt. Then peruse the text file with Notepad.
If you have limited space want to minimize Win8 footprint, there are more substantive means to do so. One is to manually set a smaller pagefile with a WMIC command (subject to localization differences):
Set pagefile: wmic pagefileset where name="C:\\pagefile.sys" set initialsize=1024,maximumsize=1024
Check pagefile: wmic pagefileset
Reboot for it to take effect. The above sets pagefile to a fixed 1GB size; you can adjust to taste. You can of course adjust it via the usual GUI route.
Second is to reduce or remove the hibernate file. For a desktop, where power isn't an issue and you don't reboot often, my suggestion is to disable hibernate. When hib is disabled, fast boot is off, and booting will take slightly longer.
Disable hibernate: powercfg -h off
For laptops, you can reduce hibernate file size by up to 50%.
Set hibernate size to 50% of RAM (50% = min): powercfg -h -size 50
Personally, I also removed all the "reserved" partitions, and handle my own backup/restore with 3rd-party tools. For a tablet with SSD, this can recoup substantial space. But it's more involved, and best done during a fresh install.
Thanks very much I 'll try your tips and I 'll tell you.
I just reduced hibernate file , I can't touch recovery partition because I have a tablet that does not boot from external usb, you understand. Therefore I need a big pagefile, I have only 2 gb ram ...
Inviato dal mio GT-I9300 con Tapatalk 2
Great, it worked!
I want to add, after the first two steps, you can delete-modify every single folder via explorer . No need to use command line
Thanks
Inviato dal mio GT-I9300 con Tapatalk 2
dadad
e.mote said:
Here's one way using the commandline:
Press Win-X, run "Command Prompt Admin". Enter the colored text commands into the CMD console (copy-paste if you're a CLI newbie):
C:\Windows\system32>takeown /f "c:\Program Files\WindowsApps" /r /d y (take ownership of folder)
C:\Windows\system32>icacls "C:\Program Files\WindowsApps" /grant administrators:f /t (give yourself full access rights to folder)
Now you can delete stuff in the folder. Let's nuke a Zune folder. I hate those ad-ridden crap anyway.
C:\Windows\system32>cd "C:\Program Files\WindowsApps" (change directory to said folder)
C:\Program Files\WindowsApps>dir/a/p (list folder content, pick a subfolder to nuke)
C:\Program Files\WindowsApps>rd /s/q Microsoft.Z<Tab>
CLI trick: Press Tab for filename completion. If more than one file fits the match, successive Tabs will cycle through the names. This shortcut is a lifesaver for CLI peeps. Anyway, so we get Microsoft.ZuneMusic_blahblah. Press Enter to kill ZuneMusic folder. (Yes, it's a dangerous command. Disclaimer of responsibility goes here.)
Suffice it to say, set a restore point beforehand.
Click to expand...
Click to collapse
---
i type the two first commands but it still says access denied. what should i do?
Related
Hey everyone,
I just whipped up a quick Java based app that you can back up and restore your apps that you installed (the ones in the /data/app and /data/app-private dirs) It also backs up the settings for those apps.
I'll be adding in saving settings for apps that are in system/app later, but I thought this one was ready for a release.
You must have the /tools dir of your SDK in your path var in order for this to work.
Please verify that adb is detecting the device by running "adb devices" and make sure this there.
Un-archive the the zip and it will have a AppBack-x.x.class file in it
Usage is for backup run "java AppBack backup"
And for restore is "java AppBack restore"
This will create a dir "appback" with two dirs in it, "backup" contains the apk's and "settings" contains the app data.
If there's something you'd like to see, just post and I'll do as much as humanly possible to add it in
Note: Error handling is nasty, and future versions will be nicer (shocker isn't it )
(also, when you run it first you might get a operation not permitted error, just run it again and it *should* resolve itself, I'll fix it in the next release.)
I'm writing this right about when I should be sleeping, so I probably forgot something lol, but yeah, if you encounter an error, please report it.
Thanks alot!
Aakash Patel
Oh and btw, you might have to rename the class file to "AppBack.class"...
Nice, this should be handy, will definitly check out on my next flash. Does it handle setting the correct user owner/permissions on the folders in the data directories on a restore?
This is great, but maybe in the future let user choose what apps to backup and their settings.
Oh haha I forgot to mention that important part, you have to have root! >_<
so uh.. where does it create the appback directory, and how exactly are you supposed to run it... from the device or from a console or what.. i think i ran it but im not sure and im looking all over for a appback directory
{
"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"
}
Background:
It all started with me often finding myself sending small files to my device, and quickly got sick of the constant enabling/disabling of USBMS on my old phone, which is quite slow with re-mounting the SD card(ZTE Blade).
I also quickly got sick of not being able to quickly transfer files from my PC to my tablets internal storage.
There are a few graphical interfaces for adb out there, but none was really what I wanted...
So I decided to attempt to code something myself, and here we are!
Info:
A graphical UI for "adb push" to quickly transfer files from your PC to any location on your Android device.
.... Thats what I planned when i started, and what the first 2 versions did...
Now it hosts a powerful File Explorer thats capable of doing everyday tasks such as copy, paste, rename, create folders, delete files and folders, as well as transfering files on its own.
Features:
The main application is capable of sending and receiving files, and installing APKs.
It also serves as the connection-manager as can connect to devices using either your USB Sync cable, or by using WLAN (req. an app on your device to enable wireless adb).
Finally, it hosts a few other functions such as reboot to recovery, reboot to bootloader and a plain reboot.
The Filebrowser is very similar to any other filebrowser you use everyday on your PC.
It can copy/cut and paste files and folders within the device, rename file and folders, create new folders, delete files and folders.
Highlights would be:
Browse the content of your device like you browse your PC's harddrives
Drag and drop files between your PC and your Android device
Move, copy, delete and rename files and folders
Limitations:
The main program does not detect case sensitive, which can end up with funny results if you push a file to "/removable/" instead of "/Removable/" for example.
ADB is only capable of sending 1 file at a time, but is capable of sending whole directories incl. subdirs.
In a future update, I will add the ability to send multiple files.
Getting started:
Everything should be self explanatory. Most of the buttons have tooltips that tells you what they do.
Basically you make sure USB Debugging is turned ON on your device, plug it into your PC and start Quick ADB Pusher.
If you are connecting using a USB Cable, the application should find it automatically.
If you're connecting through wifi, you will need to type the IP address in the dedicated field. Port only needs to be provided if you are using any other port than the standard 5555. The IP address will be saved, and you can select it from the drop-down list the next time you start the application.
Requirements:
An Android device.
Windows
.NET 3.5
USB Debugging turned ON.
Additional Recommendations:
Root
Busybox
Vulnerable Kernel or Custom ROM
Q&A
Q: My device is rooted, but the program says it cant get root access
A: You are probably on stock rom or kernel. Most shipped roms have root-access from adb blocked.
To check this: Open default.prop located in the root of your device ("/"). If ro.secure is set to 1, thats your issue. Note: Default.prop gets overwritten everytime you restart the device, so changing this file will do nothing.
Theres is an app available that can fix/bypass this: http://forum.xda-developers.com/showthread.php?t=1687590
Q: The cache didnt delete itself when I closed the app!
A: You have two choices here: Either delete the cache/ folder located in the same location as the adb pusher exe, or you can just open and close the program.
If the cache still wont delete itself, report it as a bug.
Q: I cant connect to my device over wifi!
A: Make sure you have an app on your device that enables wireless ADB and that its turned ON. I personally use adbWireless found on the Play Store.
Double-check you are attempting to connect to the correct IP and port.
Q: Whats the "Information" window good for?
A: Its actually a left-over debug window, but can provide you with useful information should a transfer fail. If nothing else, you can use it if and when you report a bug.
Note that the Info window only shows what the main program is doing. ADB Explorer works independently, and will not report anything to the Info window.
Q: Why do I have to click a button to switch between push, pull and install?
A: The program need to knows which adb command to run (adb push or adb pull), and having a button for it was the easiest way for me .
The install option is there because you might not always want to install an .apk, but rather store it on your SD card or something. I know I do.
Q: Why cant I send a whole folder to my device from the main program?
A: Old implementation, use the built-in ADB Explorer instead, which allows you to send whole folders.
Q: Whats the point in the main program, when the Explorer can do everything but better?
A: At the moment it still controls the actual transfers as well as the connections to your device(s).
The main program is, however, more or less untouched since v0.3, while the Explorer is constantly being updated. Therefore, the Explorer hosts more and better features.
I am concidering removing the main form, as its rather obsolete by now.
Q: I Have a question!
A: Feel free to ask in this thread, and I'll answer your question as best I can.
Q: Can I donate?
A: No, I dont feel this program is worth "paying for" and it wouldnt feel right to receive money for it in any form.
Hit 'thanks' and vote the thread 5stars instead
Q: I Found a bug, how do I report it?
A: Report it to me on this forum, either in the thread or through PM, and I'll make sure to look into it.
Just make sure to provide as much info you can.
And remember: I cant fix anything if I dont know about it! So dont hesitate reporting bugs.
Changelog:
v0.5 current version
First of all... v0.4.1 had 6570 views on the attachement alone. Not bad... :victory:
Added an awesome splashscreen! As those who have used this program before should know - the program takes a while to load. The splashscreen is visible during this load, so you know the program is actually starting.
The wifi-field has been redesigned. It now saves your IP adresses so you dont have to retype them every time.
Added an "X" button next to the wifi-field. This button clears the wifi-cache and removes all entries in the list.
Added my name with a link to this thread, Ive seen my program hosted at a few sites with no credit whatsoever. I dont mind anyone hosting it elsewhere, in fact Im happy it gets spread, but PLEASE at least give me credit for it.
Slight redesign
Added tooltips to both the main application and the Filebrowser
Filebrowser:
Renamed "ADB Filebrowser" to "ADB Explorer". It can do so much more than just view the files on the device, so this name is more fitting. I should think of a new name for the entire application as well... "Quick ADB Pusher" isnt even half the truth anymore
Added cache feature! Everytime you enter a directory youve already been in, the cache kicks in rather than asking the device for the content. Each device has its own cache (note: a wifi-connected device will have its own cache based on the IP, so if you connect to the same device using cable or another IP, the cache needs to be rebuilt).
The cache will update as follows:
When entering a new directory not currently present in the cache.
When you hit the refresh button.
When you rename a file/folder.
When you create a new folder.
When you paste a file/folder from the clipboard.
When you delete a file/folder.
When you transfer a file/folder to the device.
The cache will NOT update when you send a file from the device to your PC
The cache will get deleted upon application exit.
You can now cancel the contentlisting and go back by hitting "../", Backspace shortcut-key or the Back button. Added because some directories takes ages to load on various devices, and its not so fun rolling your thumbs when all you want to do is go back to the previous dir
Added "drag-drop" to the filebrowser - you can now dragdrop files and folders directly to the browser to send it(or install, if .apk) to your device. The cache will refresh upon completion. You can also drop files and folders FROM the browser to your PC!*
* this might not sound so special, but it was a ***** to implement. Dragging stuff to the browser - ~50 lines of code. Dragging stuff FROM the browser - a little over 200 lines of code... C# sure has its limitations...
Added "Grab" to the right-click menu. This will send the selected file/folder from your device to your PC.
In short, the filebrowser can do what the main application can, so you dont have to close the browser to send/recieve a file/folder. A loading thingy will appear over the browser while a filetransfer is in progress.
Added "Properties" to the right-click menu. This shows some info such as the size of the file, and even the total size of a folder (incl. sub dirs). If you select a folder with a lot of content/folders, it might take a while to calculate the size. Other things it show is where its mounted and what permissions the file/folder has. NOTE: Requires Busybox, and root for files and folders only accessible by root (duh!)
Added 3 warnings upon opening the browser: One to inform you if your device isnt rooted, one to warn you busybox is missing and one to warn you if your device is rooted, but ADB was unable to acquire it. None of these warnings will show if adb acquires root and busybox is present.
Added a textarea showing the used space on the device, based on the mounted partition (such as /data, /sdcard, etc). So dont be scared if the number jumps around while youre browsing - it just means youve entered a different partition. Click to switch between used and free space. Requires Busybox
The browser now remembers your last location and will not start from "/" everytime you open it. Memory is lost upon main program exit and when you select a different device.
Added "View file" (prev. unfunctional "Open" menu item) to the right-click menu. This allows you to view smaller files (up to 10MB) without permanentally save them on your PC. I have blocked larger files because the time it takes to transfer those files isnt worth it for just "a quick look". My devices transfers a 10MB files between 2 and 5 seconds(depending on device) - which I think is ok, so I set the limit there.
Tweaked and tuned to make the browser act somewhat normal for devices without root/busybox. Devices without root/busybox will miss out on quite a lot though And before anyone asks - No, I do not plan on making this program able to root your devices. There are plenty of tools for that already.
Fixed the shortcutkeys that only worked when they wanted to. In addition, several more shortcuts have been added.
List of currently supported shortcuts:
ctrl+x: Cut file/folder
ctrl+c: Copy file/folder
ctrl+v: Paste file/folder
ctrl+s: Grab the selected file/folder
shift+delete: Delete the seleceted file/folder
shift+n: Create a new folder
F1: View file
F2: Rename file/folder
You can also use the arrowkeys to navigate, similar as in explorer. cut/copy/paste only works within the ADB Explorer.
Added Forward and Back buttons. Works the same way ordinary back/forward buttons do. Also changed icon for Refresh
Added a Toolbar, containing more buttons such as "view file", "download", "upload", "delete"...
Added 2 eastereggs , one is easy to find. The other is well hidden, and actually serves a purpose Well actually, the latter isnt really an easteregg, but it should be hard enough for you mortals to find
Known issues:
You friends might rage and throw their IPhones at you when they see this
------
HTC Sync REALLY doesnt like ADB, so close that crap before starting this app, or better yet - uninstall it!
It seems HTC Sync is trying to start its own adb server, and is very persistant in doing so.
This results in Quick ADB Pusher and HTC Sync having a fight for their life on who is going to start the server.
------
If you install an .apk, then try to send something else, the program will try to install that as well. This is because I was retarded and forgot to add one check.
Solution: Close the filebrowser, untick "install apk". Will be fixed in the next version, I promise! :angel:
Version History:
v0.4.1 - 6570 views on the attachement alone. Not bad...
Fixed filebrowser not working on some devices, I hope. Please test this for me as the browser has always worked fine for me on all my devices.
Changed apk install method to use AndroidLib's method. It now tells you if the installation was successful or not.
... Some minor things I cant remember.
Note, the "Open" option in the filebrowser is just a placeholder for now, its not a bug that it doesnt work, it isnt ment to work.
v0.4
Fixed bug where files and folders containing "_(" threw a syntax error.
Added file browser for device (see Seperate notes).
Added wireless ADB support.
Added Pull-file mode.
Re-designed the UI.
Moved the info-view to 3rd tab. Im moving away from it more and more.
A lot of the text and button-text will now change depending on your current choices. Ex. the Send-button now switches between Send, Pull and Install.
A truckload of code rewriting and optimizations.
Added an additional check for Root remounting, which should fix rare cases where remounting fails (If your device cant be remounted as root, please report it along with your device, rom etc)
Added "Install APK" You can now install APKs directly through the program.
Added reboot options in the Advanced tab
Added device info in the Advanced tab (The temp seems to be reported in C * 10, so I report it as C / 10, let me know if it doesnt look right for your device, and dont forget to tell me what device/rom you're using)
Filebrowser Features:
Browse and select files.
Context menu (right-click menu).
Copy or move(cut) files/folders within the device.
rename files/folders on the device.
delete files/folders on the device. Warning: Deleting the wrong files might brick your device! Double-check that you really want to delete the file before doing so!
create new folders on the device.
icons for certain formats (more to be added).
progressbar for directory loading progress.
'clipboard' icon to remind you what you currently have selected for copy/cut.
Notes:
The filebrowser is in its early stage. I have bugtested it as much as I can and it works flawless with my 3 devices.
The speed of listing directoiess/files greatly differs with device. My TF101 lists the contents about twice as fast as my ZTE Blade, theres not all that much I can do about it, as I dont have the time right now.
When pasting a file in a location where a file with the same name already exists, the program will currently simply overwrite the file. I havnt had time to add a check for it yet (ETA: Next version).
---To be added:
Direct interacting/editing of files, such as text files etc.
cache-feature, to reduce the frequency of grabbing the dir. contents from the device (which will help speed up changing paths).
A "file exists" check when pasting, allowing you to chose to overwrite or rename the old file.
v0.3
Fixed program freeze when no device was connected.
Added device selection, so it should work with multiple devices connected. please test this for me
Rewrote most of the program to make use of AndroidLib.dll
Removed the console(debug) tab, as it served little to no use now
Added an 'Advanced' tab for future use
Cleaned up a lot of garbage code
Fixed system not mounting as R/W
Other minor changes and fixes
v0.2
First public release
v0.1
very first version I wrote, which was buggy and often froze and god knows all...
Trust me, it was terrible. It worked and did what it set out to do but... It was terrible...
The latest Version has been tested and bugfixed on the following devices:
ZTE Blade with Swedish Spring 5, connected through USB Cable
ASUS Transformer TF101 with Team EOS Nightly build 28, connected through WIFI
HTC One S with stock 4.0.3, no root, no busybox. USB Cable
HTC One S with stock 4.0.4, root, no busybox. USB Cable
HTC One S with stock 4.0.4, root, busybox. USB Cable.
-------------------
Suggestions for improvements, feedback etc are more than welcome
Thanks to:
regaw_leinad - for writing the very handy AndroidLib found here
Dont forget to hit 'thanks' if you like my application. Every thanks I get brings a smile to my face
Download:
If the attachment doesnt work, try this mirror (select version and hit ctrl+s, or file -> download)
i think making a batch file was easier
Hey, cool app. There does however seem to be a problem with XDA's attachment feature, and it only downloads about 1k of the zip, then says complete. Also, if you plan on extending this a little more, check out my .NET Android Library named... well AndroidLib. It will help you out a bunch with the coding of the features you want to add.
regaw_leinad said:
Hey, cool app. There does however seem to be a problem with XDA's attachment feature, and it only downloads about 1k of the zip, then says complete. Also, if you plan on extending this a little more, check out my .NET Android Library named... well AndroidLib. It will help you out a bunch with the coding of the features you want to add.
Click to expand...
Click to collapse
Thanks for the heads up.
I placed it on google docs, hopefully it works better
Linky
If it doesnt, perhaps you could give me a tip as to where to upload it. I used to have my own server so never really used any other file-sharing method
regaw_leinad said:
Also, if you plan on extending this a little more, check out my .NET Android Library named... well AndroidLib. It will help you out a bunch with the coding of the features you want to add.
Click to expand...
Click to collapse
O nice, Ill definitely check that out Thanks.
Goatshocker said:
Thanks for the heads up.
I placed it on google docs, hopefully it works better
Linky
If it doesnt, perhaps you could give me a tip as to where to upload it. I used to have my own server so never really used any other file-sharing method
O nice, Ill definitely check that out Thanks.
Click to expand...
Click to collapse
Yup, the new link works great! Unfortunately, when I don't already have an adb server running and hit the 'Check ADB Status' button, the form freezes and the process needs to be killed to close the program. Works fine when adb.exe is already running though.
---------- Post added at 12:26 AM ---------- Previous post was at 12:17 AM ----------
Killing adb.exe while it's frozen fixes the issue I pointed out, probably means there is an error in your
Code:
Process
code
EDIT:
Stalls on process.WaitForExit() when debugging
regaw_leinad said:
Yup, the new link works great! Unfortunately, when I don't already have an adb server running and hit the 'Check ADB Status' button, the form freezes and the process needs to be killed to close the program. Works fine when adb.exe is already running though.
---------- Post added at 12:26 AM ---------- Previous post was at 12:17 AM ----------
Killing adb.exe while it's frozen fixes the issue I pointed out, probably means there is an error in your
Code:
Process
code
EDIT:
Stalls on process.WaitForExit() when debugging
Click to expand...
Click to collapse
Thanks for the report,it seems to happen when theres no device connected. Silly me have only even tried the app with a device connected hehe.
I'll try to fix it later today
Goatshocker said:
Thanks for the report,it seems to happen when theres no device connected. Silly me have only even tried the app with a device connected hehe.
I'll try to fix it later today
Click to expand...
Click to collapse
ah, you're calling
Code:
adb get-state
that gets the state of the device connected.
My .NET Android library handles everything adb wise, it even uses it's own adb binary, so the user doesn't have to have the sdk for it to work. let me know if you're going to reference it with your app, and I'll put your project in AndroidLib's post of "Projects using AndroidLib"
regaw_leinad said:
ah, you're calling
Code:
adb get-state
that gets the state of the device connected.
My .NET Android library handles everything adb wise, it even uses it's own adb binary, so the user doesn't have to have the sdk for it to work. let me know if you're going to reference it with your app, and I'll put your project in AndroidLib's post of "Projects using AndroidLib"
Click to expand...
Click to collapse
Yep, I assumed that would work since it works fine if you do it directly in cmd. But guess not adb start-server didnt work either...
I think I'll leave the bug for now and start looking into your lib instead.
Really nice app
Do you plan to develop a Linux version ?
Great idea, thanks =)
How does it achieve rw access, since device-dependent?
For example, on some devices, in ADB shell, you use
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
But, in some, you use mtdblock3 instead of mtdblock0.
Since there's no setting on which mtdblock to use, how does the program know which one is correct?
Theonewithideas said:
How does it achieve rw access, since device-dependent?
For example, on some devices, in ADB shell, you use
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
But, in some, you use mtdblock3 instead of mtdblock0.
Since there's no setting on which mtdblock to use, how does the program know which one is correct?
Click to expand...
Click to collapse
adb remount does all the job as you are ultimately using adb..
the command which you specified is used to mount on device shell which you enter by adb shell
madman_amit said:
adb remount does all the job as you are ultimately using adb..
the command which you specified is used to mount on device shell which you enter by adb shell
Click to expand...
Click to collapse
Oh, so that's what it does! lol
Thanks.
Actually, when trying it out, it says, after starting daemon "remount failed, action not permitted"
Nevermind, will check the program, it seems easier...
Looks cool! I shall give this a try later and see how it does with my HTC Rezound.
Thank you for your work!
Wow, responses
Thanks for the feedback guys.
Unfortunely Ive kinda killed my sync cable for my TF (tried to convert it to a usb host adapter^^), and currently dont have any other android device to play with.
So development has kinda stalled right now. Ive got rid of the freeze-when-no-device-connected, but developed another issue instead. Not anything major, but very annoying. The app freezes while it checks for a device >_>, its only for a few seconds, but annoying nevertheless.
As for linux version... Im afraid thats way above my coding skills, and I dont have a linux PC to test on anymore (I killed the laptop which was running linux when I tried to build a touchscreen on it. Yes! I break a lot of things)
Awesome, just what I needed!
Could you please add an option to connect the phone using network?, with the "adb connect" command, I can use a bat file before starting the app but because I have several devices connected to the network the phone´s ip change in time, and having it built in the app would be great
Awesome work, just tried it out now and it's pretty awesome.
I think an adb connect option would be awesome, for those who have adb wireless app on there phone then it'll be really easy to transfer files and it'll be pretty sweet.
Anyway keep up the good work
Hey, just an fyi,
Code:
adb remount
will NOT work if the device connected does not have the option ro.secure=0 in the default.prop of the ramdisk. You shouldn't assume it does, because not all "ROM" developers know how to change it. My library does check for this, but in case you don't want to use it, be sure you can mount the filesystem /system as rw that way, or using the mount binary on the phone directly.
regaw_leinad said:
Hey, just an fyi,
Code:
adb remount
will NOT work if the device connected does not have the option ro.secure=0 in the default.prop of the ramdisk. You shouldn't assume it does, because not all "ROM" developers know how to change it. My library does check for this, but in case you don't want to use it, be sure you can mount the filesystem /system as rw that way, or using the mount binary on the phone directly.
Click to expand...
Click to collapse
Hey thanks for the info. I had no idea about that, remount have always worked on all my devices on all roms Ive tried.
I'll keep that in mind when Ive fixed my sync cable
Could you give an example of a device/rom combo remount does not work on?
Goatshocker said:
Hey thanks for the info. I had no idea about that, remount have always worked on all my devices on all roms Ive tried.
I'll keep that in mind when Ive fixed my sync cable
Could you give an example of a device/rom combo remount does not work on?
Click to expand...
Click to collapse
I can't think of a specific example, but if the developer does compile a boot.img with ro.secure=1, adb remount will not work but lots of 'devs' these days just grab the boot.img from people who actually know what they're doing, so you should be ok, just in rare cases, this will not work.
Here is a little utility that may appeal to some.
Transferring files over the USB connection is annoying.
At the very least you have to plug in a connection, at the most you have an inactive Nook.
My philosophy has always been that the desktop is the gold standard and portable devices are ephemeral.
Synchronizing between the two is the goal of adbsync.
It will allow synchronization in either direction over ADB (presumably WiFi, but it would work over USB too).
Some examples:
Code:
[color=red]Update Nook[/color]
adbsync C:\Books "sdcard/My Files/Books" /a /v
[color=red]Sync both directions[/color]
adbsync C:\Notes sdcard/Notes /a /h /v
[color=red]Sync both directions but don't overwrite the PC, use another dir[/color]
adbsync C:\Notes sdcard/Notes C:\Fixme /a /h /v
[color=red]Sync both directions including subdirectories[/color]
adbsync C:\Stuff sdcard/Stuff /a /h /s /v
You must have established a connection already to the Nook using adb connect 192.168.XXX.XXX
Download from the signature.
An anomaly has surfaced. Ok, maybe I mean bug. It's a matter of perspective.
When you sync a file, then do a busybox stat on it:
Code:
# busybox stat sdcard/Music/index4b.htm
...
Modify: 2012-07-11 22:55:11.000000000
Then you reboot the Nook (or remount the sdcard) and do a busybox stat on it:
Code:
# busybox stat sdcard/Music/index4b.htm
...
Modify: 2012-07-11 22:55:10.000000000
The file getting one second older causes it to need to be resynced.
The problem
Linux keeps filetimes in one second resolution. It caches them for mounted systems.
When a vfat partition is mounted the filetimes are taken from the partition at the MS-DOS 2 second resolution.
This can cause the filetimes to be truncated to an even number of seconds.
The solution
adbsync now uses as default a 2 second resolution to allow syncing of vfat paritions without further ado.
When syncing ext2, ext3, etc partitions you may use the /1 flag to use 1 second resolution.
Note that the default 2 second resolution will work fine in this situation too.
The new adbsync is in the signature.
There's a new version available (in the signature).
It does a few things better.
It will update subdirectories (using the /s flag) as long as they exist already.
It will signal the conflict if Bogus is a file on the Android but a dir on the Host.
It gives more broken-down statistics.
Thank you so much for creating this utility!!
Renate NST said:
Here is a little utility that may appeal to some.
Click to expand...
Click to collapse
Thank you so much for creating this adbsync utility. I am hoping (and will let you know soon) that it will help me perform large sync tasks (thousands of files, ranking from a few kb up to about 100 mb), with dozens of directories --- which I regularly make minor updates to (unpredictable as to what), and then need to sync these changes to or from various computers where mirrors exist (where I connect my Galaxy Nexus (LTE), and to a large USB Flash/Thumb drive).
I have been through an absolute nightmarish struggle to sync non-multimedia (not music/video) files for several weeks now, as there are no utilities that will give my MTP only (no UMS) ROM partition a drive letter (there is no SDcard, just a sym-link to a folder --- see this thread --- and my last few posts there).
(I have not been able to find much info beyond the typical "adb help all" regarding the adb command "adb sync", and certainly no useful scripts that make it user-friendly.)
Testing is Successful Thus Far (Yeah!!)
Hi Renate,
I am very sorry to bother you again, but I just wanted to let you know that my little test went very well. I think I am going to wind up making use of this tool you wrote perhaps regularly now (for a while) --- thanks again.
Here was the initial "listing" of the test directories I sync'd:
Code:
C:\Android\android-sdk\platform-tools>adbsync D:\WIRELESS\FullPathHere sdcard/SimilarPathHere /d /s /v /2
...
...
Dirs match: 86
Files match: 13
H Host file only: 190
A Android file only: 10
A> Android file newer: 524
Where as this can be a nice time-saving tool for me (to sync lots of directories and files without navigating them all), the only remaining downside is that I am somewhat limited in the available comparisons I can make here - which I think may be resulting in more push/pulls than is truly necessary. In other words, in some cases I may not want to copies ANY files that same size, path, and filename name, even though they may have a different last modified/created dates. In that scenario, I would ONLY want to syn those that are merely absent altogether (and ignore the file created/last modified dates), which would of course be a less inclusive kind of comparison/sync.
Could you perhaps add this feature in to this tool, or else give me some hints so that I can create my own script/tool to also do this?
Thanks so much, I am very impressed and grateful!,
Paul
adb sync seems very limited in application. I've never really tried it.
Well, besides your request for the capability to only sync files that don't exist,
there is the other scenario to only sync files that already exist.
I'll look into how to do this cleanly.
I do have an option (I'm not sure that it's on the uploaded version) to create or ignore directories that don't exist.
Awesome!! (thanks again
Hi Renate,
Thank you for responding
Renate NST said:
I'll look into how to do this cleanly.
Click to expand...
Click to collapse
... thank you! That sounds great. BTW: Did you use the source code for this adb mod in order to write the code for this version?
I do have an option (I'm not sure that it's on the uploaded version) to create or ignore directories that don't exist.
Click to expand...
Click to collapse
...again, I am eternally grateful. If you don't want to post it publicly, you might consider just PM-ing me?
Best Regards,
Paul
Well, I had already done half of half of what you wanted.
The /s flag searches subdirectories.
The /c flag searches and creates subdirectories that don't exist on the android.
adbsync /a /s /c will create new subdirectories on the android.
I haven't made the host part of it work yet.
That is, with adbsync /h /s /c it will not create subdirectories on the host (yet).
Download in the signature.
Any chance to get it for Linux too?
Mmm, there are various GUI file managers that work with ADB.
The whole point of ADB is it connects to your Nook on port 5555
On the other side it takes requests from client programs on your host on port 5037.
When you do an ADB shell you are running adb on the host twice, once as a server and once as a client.
The Nook is running the adbd daemon.
The ADB server on the hosts supports multiple clients.
That's why you can run a shell, a logcat, a pull and my adbsync all at the same time.
Currently my code is too tied to Windows stuff to really port to Linux easily.
Thank you for this application. I absolutely hate MTP transfer mode on newer devices, especially when I have to sync files, but Grsync can't detect MTP. This really help.
Yes, MTP sucks, rsync don't work on it too, I will try to made a bash script for adb to have a software like yours adbsync.
Sent from my GALAXY Cooper
error using adbsync
hi,
using adbsync for a small test i got the erroro message
"Root for android does not exist".
as i know my device is already rooted?
any idea whats wrong?
pbelcl said:
"Root for android does not exist".
Click to expand...
Click to collapse
Hmm, maybe I should have written that error message more specifically as:
"Root directory specified for the android in the second argument does not exist."
Code:
adbsync /a /s /c /v C:\Books sdcard/Books
sdcard/Books must already exist.
On some (non-Nook) devices /sdcard is actually a link to /mnt/sdcard
adbsync will complain that the root for android is not a directory, so do this instead:
Code:
adbsync /a /s /c /v C:\Books mnt/sdcard/Books
If you insist on a (superfluous) leading slash or spaces in a directory, put it in quotes:
Code:
adbsync /a /s /c /v C:\Books "/sdcard/Stupid stuff/Books"
Renate NST said:
Hmm, maybe I should have written that error message more specifically as:
"Root directory specified for the android in the second argument does not exist."
Click to expand...
Click to collapse
Yes that helped, destination folder was missing
So i made a copyjob that syncs various folders from PC to Android Phone.
but sometimes during copying a whole folder structure with subfolders in the middle of copyjob i get an error:
Code:
=>Can't copy to android
some files ar copied and some files not, very strange ?
any hints what's the reason ??
"Can't copy to Android" might be a timeout on transfer.
Are they really big files? Do you have a really slow SD card?
I might have to increase the timeout.
In any case, if you get a "Can't copy" you can just repeat the same command again.
If you use the /l flag it will list all files in either host or device.
By looking at the leftmost field you can see what adbsync thinks of the two.
To see flag usage just type "adbsync".
Renate NST said:
"Can't copy to Android" might be a timeout on transfer.
Are they really big files? Do you have a really slow SD card?
Click to expand...
Click to collapse
You are right, in this case i try to copy some mpg4 video files, are about 200 MB big.
maybe it is possible to select timeout with a parameter for future versions ?
Renate NST said:
In any case, if you get a "Can't copy" you can just repeat the same command again.
Click to expand...
Click to collapse
yes i tried and it worked for the next files
by the way a question:
is it possible to get some logfile what happened during adbsync, when it runs unattanded?
Tried to use ADBSYNC on another PC but i get the error "No ADB server".
This problem occures only at the first run of adbsync!
after one time adb.exe was called, adbsync works perfect.
maybe i have to start adb.exe BEVORE i can run ADBSYNC ??
Awesome! Very handy!
This is awesome! Thanks
Any chance you could add the ability to exclude certain extensions? I end up with my Thumbs.db in image folders.. as well as other files I don't want to sync...?
Renate NST said:
I might have to increase the timeout.
Click to expand...
Click to collapse
is there any possibility to get a trial version with increased timeout?
now i have to start the sync procedure 5-7 times to get all files synced, so it is not very useful for me ;.(
Had serious troubles deleting Windows.old folder. The Windows 10 on-board tools didn't remove it. Also afterwards running DOS-commands
Code:
attrib -r -s c:\windows.old /S /D
rd c:\windows.old /S /Q
which I ran as Administrator didn't work: Always hundreds of messages "Access denied" got.
Finally found the solution to get successfully deleted Windows.old folder. All one needs are two tools, available for free in the Internet ( A .REG-file and an .EXE-file ).
HOW-TO:
1. Unpack the included Unlocker1.9.0-portable .ZIP-archive to any HDD/USB-stick location of your choice
2. Install the .REG-file Add_Take_Ownership_to_context_menu, i.e. click on it
3. Navigate to folder Windows.old, right-click on it and run "Take ownership"
4. Open Unlocker
5. Drag Windows.old folder on it
6. Select Delete as action to perform
After some time (hours?) you should get message "Success. Object deleted".
FYI:
I packaged the 2 tools into a .ZIP-file. If you are interested in, then you can download it from here
Thought I should share it.
Thanks been wondering how to get rid of it. It's been taking up to much space
Sent from my N9518 using Tapatalk
without install anything you can delete folder and no hours-waiting
just use cleanmgr.exe
alt+r and type cleanmgr
choice the drive where older windows are located (usually c:\)
then click on system file cleaning (maybe you can read something like this 'cause my system language is italian)
in "file to delete" list just check "older windows versions"
hit ok and that's it
tyler200298 said:
without install anything you can delete folder and no hours-waiting
just use cleanmgr.exe
alt+r and type cleanmgr
choice the drive where older windows are located (usually c:\)
then click on system file cleaning (maybe you can read something like this 'cause my system language is italian)
in "file to delete" list just check "older windows versions"
hit ok and that's it
Click to expand...
Click to collapse
I guess that's easier
Sent from my N9518 using Tapatalk
heet1 said:
I guess that's easier
Sent from my N9518 using Tapatalk
Click to expand...
Click to collapse
I totally agree with tyler, It is easier using the disk clean-up utility. I just have a little correction. Use the Windows key + R key to open the disk clean up utility not alt + r. If you have any problem, quote me
Gadtech said:
I totally agree with tyler, It is easier using the disk clean-up utility. I just have a little correction. Use the Windows key + R key to open the disk clean up utility not alt + r. If you have any problem, quote me
Click to expand...
Click to collapse
ops, thanks for correction
jwoegerbauer said:
Had serious troubles deleting Windows.old folder. The Windows 10 on-board tools didn't remove it. Also afterwards running DOS-commands
Code:
attrib -r -s c:\windows.old /S /D
rd c:\windows.old /S /Q
which I ran as Administrator didn't work: Always hundreds of messages "Access denied" got.
Finally found the solution to get successfully deleted Windows.old folder. All one needs are two tools, available for free in the Internet ( A .REG-file and an .EXE-file ).
HOW-TO:
1. Unpack the included Unlocker1.9.0-portable .ZIP-archive to any HDD/USB-stick location of your choice
2. Install the .REG-file Add_Take_Ownership_to_context_menu, i.e. click on it
3. Navigate to folder Windows.old, right-click on it and run "Take ownership"
4. Open Unlocker
5. Drag Windows.old folder on it
6. Select Delete as action to perform
After some time (hours?) you should get message "Success. Object deleted".
FYI:
I packaged the 2 tools into a .ZIP-file. If you are interested in, then you can download it from here
Thought I should share it.
Click to expand...
Click to collapse
Or just use the disk cleanup tool that's built in with Windows. Click clean system files and check ☑ delete previous installation of Windows (windows.old folder)
Yaakov Brea said:
Or just use the disk cleanup tool that's built in with Windows. Click clean system files and check ☑ delete previous installation of Windows (windows.old folder)
Click to expand...
Click to collapse
I was just about to comment this. I wouldn't recommend deleting Windows.old until AFTER running Disk Cleanup, clicking on Clean System Files and deleting previous installation of Windows.
tyler200298 said:
ops, thanks for correction
Click to expand...
Click to collapse
Yeah, that also works too
I successfully got rid of it.... (May be harder then both methods though). In win10, there is a reset feature in settings. Just do this reset and tell the system to save nothing. Now I know that means starting over but you get the cleanest install of win10 possible )something like 10gb) without extra programs taking up space. Also I figure if your reading this, you should be affluent at installing drivers and such. If you don't have the drivers for your computer, they are usually available from the website of the manufacturer. I keep driver and program download backups...
Sent from my SM-G935V using XDA-Developers mobile app
Part 1 (thanks to a new character limit...)
By now many of you know that the small file on the NST/G which contains web certificates (/system/etc/security/cacerts.bks) is slowly becoming out-of-date. The first important certificate to expire was for Amazon and that crippled the Kindle app until member @tshoulihane worked out a way to update the expired certificate. In 2020, one of the certificates needed to negotiate syncing of books with FBReader expired and I finally took the plunge and figured out how to update the certificate for that. Although @tshoulihane had provided directions in the original post, I was too dense to follow them correctly. Now, as promised, I am providing what I hope is an overly-explicit set of instructions (my specialty) so that anyone can do this, even when I am dead (!).
This guide is for Windows (10, in my case). If you're not using Windows you may be much happier but you'll have to figure this out for yourself. If you are using Windows, you know that we will have to wait for some of that happiness in the next life ;-)
Assembling the tools
jdk-6u45 (download-32 bit, download-64 bit). Oracle now requires a sign-up, etc., to get at these old files, so I have archived them.
bcprov-jdk15on-146.jar (download). This old file is required to make all the magic happen.
Setting up the tools
Install jdk-6u45, using defaults--unless you have some specific reason for changing things. Don't worry if you have other JDK versions installed. They can coexist. Once the JDK is installed, use Windows File Explorer to locate the installation, something like Program Files/Java/jdk1.6.0_45 (that could be Program Files (x86) if you installed the 32-bit version). Find the sub-folder "lib". If there isn't one, create it. Inside that folder create another folder, "ext" (if it doesn't already exist). Place in that folder the jar file you downloaded. So, just to be clear, you should end up with:
(64-bit) Program Files/Java/jdk1.6.0_45/lib/ext/bcprov-jdk15on-146.jar
(32-bit) Program Files (x86)/Java/jdk1.6.0_45/lib/ext/bcprov-jdk15on-146.jar
Looking at cacerts.bks (optional)
If you want to see what the "innards" of your cacerts.bks file looks like copy out /system/etc/security/cacerts.bks from your device to your PC (use some readily accessible directory like "Documents" or "Downloads"--someplace you have rights).
Open a Windows command prompt window. Execute the following:
Code:
cd C:\Program Files\Java\jdk1.6.0_45\bin
[for 32-bit: cd C:\Program Files (x86)\Java\jdk1.6.0_45\bin]
Windows 10 allows you to paste text into the command prompt window. I suggest you copy the following command to a text editor, adjust it to your situation, and paste into the command prompt window. Then hit Enter. The text is perilous to type and you can get very frustrated by small errors.
Code:
keytool.exe -keystore C:\Users\nmyshkin\Documents\cacerts.bks -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "C:\Program Files\Java\jdk1.6.0_45\lib\ext\bcprov-jdk15on-146.jar" -storepass changeit -v -list > C:\Users\nmyshkin\Documents\calist.txt
Note that a path which contains spaces requires the use of quotation marks or you will get an error. You would need to replace "nmyshkin\Documents" with whatever path is correct for you.
The resulting text file (calist.txt) contains a list of all of the certificates and information about them, including their expiration dates.
Housekeeping
Some time ago I came across a Honeycomb ROM (last stop before ICS and cacerts which update on the fly) and extracted its cacerts.bks file, reasoning that it would be more up-to-date than our version. This proved to be true (the Amazon certificate, for example, has not yet expired), and there were also many more certificates--not a bad thing. There were also a lot of dead certificates. So for a sort of baseline, I have attached a zipped copy of that file with all the dead stuff removed. It also has a functioning Amazon certificate and the update for FBReader book sync. You're welcome.
The good stuff follows in the next post...
Part 2
How do you remove dead certificates?
Note: ALWAYS keep a backup copy of your cacerts.bks file. If you mess up, you need to be able to go back. Also, before returning an updated cacerts.bks file to your device, you should have made a complete device backup. A faulty cacerts.bks file will cause a bootloop. The only recovery is a forced shutdown (not easy in itself) and a restoration of the nandroid backup with NookManager or similar.
Let's pretend that you have a dead certificate and a check of the calist.txt file created as described above reveals that its "alias" is 27. Certificates sometimes have ridiculously complicated names so in the cacerts.bks file they are often given numerical aliases. Here's how to get rid of one (presumably before you replace it):
Open a command prompt window and execute the following:
Code:
cd C:\Program Files\Java\jdk1.6.0_45\bin
[for 32-bit: cd C:\Program Files (x86)\Java\jdk1.6.0_45\bin]
Copy the text below and adjust the paths for your situation, then copy and paste the result into the command prompt window. Press Enter.
Code:
keytool.exe -keystore C:\Users\nmyshkin\Documents\cacerts.bks -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "C:\Program Files\Java\jdk1.6.0_45\lib\ext\bcprov-jdk15on-146.jar" -storepass changeit -v -delete -alias 27
You would need to replace "nmyshkin\Documents", the alias number, and potentially "Program Files" (if you are using 32 bit) to customize the command.
Importing/updating a certificate
Well, this is the "real deal". Someday that Amazon certificate is going to expire again and render the Kindle app useless (assuming Amazon doesn't abandon it first). Or something else may crop up that you'd like to fix (like the FBReader issue I mentioned earlier). To some extent, this may also address website access issues, but most--if not all--of those are more broadly SSL related and that is another kettle of fish altogether.
Importing a certificate is no more difficult than any of the other operations already described (once you have the command written out!). The difficulty is in obtaining the certificate to import! Here is where these instructions get a little squishy because they are initially based on information obtained from your PC's browser (and even its version). I happen to use an up-to-date version of Firefox so that's how I am approaching this. If you use a different browser, you will have to figure out this part on your own, but Googling will doubtless help.
Let's say the Amazon certificate has expired (again...). My first best guess is that the same certificate(s) used on Amazon.com are used for the Kindle app. So I head on over to Amazon.com with Firefox. When I arrive I note that there is a little "lock" symbol just before the "https:...." in the url line. Mousing over this symbol I see "Verfied by: DigiCert Inc." So it's some kind of DigiCert certificate. Clicking on the lock symbol I see site information for Amazon including "Connection Secure" which can be expanded to show "Verified by DigiCert Inc." and at the bottom of that little window is "More information". Clicking there gives me a lot more stuff, but what I want is just the "Security" tab where I can see "View Certificate". Aha! Clicking on that reveals that there are at least two certificates, DigiCert Global CA G2 and DigiCert Global Root G2. I may need only one, but it's safer to have both. Still, I need actual copies of the certificates. In an older version of Firefox you could click on the lock and get to a place where you could export copies of the certificates. No more. That was too easy. Now it's like this:
1. Navigate to the site (Amazon.com) and discover which certificates are used, as described above
2. Open the browser menu to access "Options"
3. Click on "Privacy and Security" in the left-hand menu
4. Scroll down to "Certificates"
5. This takes you to a window in which you want the last option, "Authorities"
5. Scroll to find the certificate(s) discovered by the steps described above.
6. Click on the certificate and then on "Export". Accept the default file type (X.509 Certificate (PEM) (*.crt;*.pem)) and the ".crt" extension. Save.
7. Change the file extension on the saved certificate to ".cer".
OK! Do this for whatever certificate(s) you need. Now it's time to get them into the cacerts.bks file. Make sure the saved certificates are in some directory on your PC for which you have rights (like "Documents" or "Downloads").
Open a command prompt window and execute the following:
Code:
cd C:\Program Files\Java\jdk1.6.0_45\bin
[for 32-bit: cd C:\Program Files (x86)\Java\jdk1.6.0_45\bin]
Copy the text below and adjust the paths for your situation, then copy and paste the result into the command prompt window. Press Enter.
Code:
keytool.exe -storetype BKS -keystore "C:\Users\nmyshkin\Documents\cacerts.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "C:\Program Files\Java\jdk1.6.0_45\lib\ext\bcprov-jdk15on-146.jar" -storepass changeit -importcert -alias Amazon -file "C:\Users\nmyshkin\Documents\DigiCertGlobalRootG2.cer"
You would need to replace "nmyshkin\Documents", potentially "Program Files", the alias string or number as well as the certificate file name to customize. The "alias" is a number in our cacerts.bks file, but you can use a string instead. Otherwise, you need to choose a number that is not already used or use the same number(s) for the expired certificate(s) that you previously removed.
You will see a series of things scroll through the window, stopping at a confirmation dialog. You need to enter "yes" to accept the certificate.
Repeat if there are additional certificates to import/update.
The Proof in the Pudding
IF you have done these steps correctly, you should be good to go. You need to move the revised cacerts.bks file back to your NST/G (/system/etc/security/cacerts.bks). Be sure the file permissions are set to rw-r--r--, then reboot. If you get stuck in a bootloop you goofed. Try to interrupt the boot sequence with the power button. Eventually you will succeed and can restore a backup using something like NookManager. Try again
Hi, thank you for all your help as always nmyshkin, my how do i connect it to the nook?
I do all the steps, but I am lost on how to replace the system directory in the nook with the cacert.bks file so that the kindle app could log-in throught the NTGS.
vicus21 said:
Hi, thank you for all your help as always nmyshkin, my how do i connect it to the nook?
I do all the steps, but I am lost on how to replace the system directory in the nook with the cacert.bks file so that the kindle app could log-in throught the NTGS.
Click to expand...
Click to collapse
If you rooted with the updated NookManager, the cacerts.bks file is already updated. No need to do anything else.
As for the Kindle app, there are a few things you should know. When you try to log in you will get an error message. But if you check your email you will see that Amazon has sent you a one-time-password (OTP). Try that.
Here's where it gets a little complicated. If you have two-factor-verification turned on at Amazon, the OTP may fail. At least one XDA member has reported that if he added the OTP to his regular password, he was able to log in.
My most recent experience went something like this:
1. Try to log in. Get OTP via email.
2. Try OTP. It fails.
3. Check Amazon account...hmm..I don't have two-factor-verification (TFV) turned on. What gives?
4. Turn on TFV.
5. Turn off TFV.
6. Try to log in. Get OTP via email.
7. Try OTP. It works!
I don't have TFV turned on (I don't own a smart phone). But Amazon didn't seem to recognize that until I turned it on and then turned if off.
It would be nice if the other member is correct and you just append the OTP to your regular password to log in. Let us know!