How To Set Up an IDE to Develop to the Nook Touch on Windows - Nook Touch Android Development

Setting up a development environment is really not that hard. I am using Windows 7 with a 64-bit processor, although the procedure is not terribly different across sytems, just make sure you choose the right download for your architecture.
The entire process can be broken down into four major steps. Let's get started.
1) Get Java
You can get the Java Standard Edition Software Development Kit through this link: http://www.oracle.com/technetwork/java/javase/downloads/
At the time of writing this post, the latest version available is 7u3. Click the download button under where it says 'JDK' and you will be taken to a list of installers. Make sure you get an installer from the group who's header is "Java SE Development Kit 7u3"; the other one is just sample code.
Make doubly sure that you choose the right architecture (x86 vs x64) as the wrong one will give you an error message and you will have to go uninstall everything and start over.
After the download has finished, run the installer.
Note: It may give the option to install JavaFX and the Ask Toolbar. While they won't hinder your development in any way, there won't be any need for them within the scope of this guide so you might find it worthwhile to not install them.
2) Get Eclipse
Once you've installed the Java DK, go get a copy of the Eclipse IDE here:
http://www.eclipse.org/downloads/ You can see that the IDE comes in many different flavors. Eclipse Classic will work fine.
Extract the folder and place the 'eclipse' subdirectory in a safe place. Try running eclipse by traversing this directory and running eclipse.exe. If you see the Eclipse splashscreen, everything is OK. If you see an error message then something may have gone wrong when you installed Java. If it complains about missing or corrupted DLLs, you probably have installed the wrong version of Java for your system. If it complains about not being able to find Java (for example, stuff about javaw.exe) you may need to manually add Java's location to your Path environmental variable. There is lots of documentation on how to do throughout the internet and most can probably explain it better than me. (^; Another method to fix the problem is to go find out where all the Java binaries are (Normally something like "C:\Program Files\Java\jdk~~~~~~~\bin"), copy the directory path, and add
Code:
-vm
<FOLDERPATH>\javaw.exe
to the end of the 'eclipse.ini' file that resides alongside 'eclipse.exe'
Note: You may notice that the version of Eclipse you downloaded isn't installed, but instead just runs out of a folder. You may want to consider creating a binaries folder in your home directory to keep all of software of this style in one place.
3) Get Android Plugins for Eclipse
Now that you have Eclipse up an running, you need to set it up for Android development. Start Eclipse up and click the 'Help' menu. Click 'Install New Software...'
In the window that comes up, you should see a combo box labelled 'Work with:' . Paste in:
Code:
https://dl-ssl.google.com/android/eclipse/
then hit enter.
Check 'Developer Tools' and click next. Let Eclipse do it's thing then click 'Finish'.
4) Get the API
Now that you have Eclipse's Android integration plugins, you need to grab an Android API. In Eclipse, under the 'Window' menu, click 'Android SDK Manager.'
The window that opens will automatically go to the internet and grab all the API packages available to download. The Nook Touch currently runs Android 2.1, so find that package set and check it. Click the 'Install <x> Packages' button and let it run.
You are finished! Now to create an Android program. In Eclipse's main menu, navigate File > New > Other... and select 'Android Project' from the 'Android' folder in the window. If you want to modify the source of an existing program, choose the appropriate radio button and browse to the parent directory of the 'src' folder. After you have created your project, you are going to want to make sure it has the right dependencies. On the lefthand pane ('Package Explorer') right click your project folder (The top one) and hit 'Properties.' Under the 'Android' screen, make sure 'Android 2.1' is checked and not another version. Click OK and you should be set.
To generate an APK, under 'File' click 'Export.' In 'Android' click 'Export Android Application.' Choose the right project, click next. If this is the first time you've exported an Android application, you will need to create a keystore. Select the appropriate radio button, navigate to a safe location, and give it your keystore a password. Click 'next' and add all the information you see fit. You will be able to reuse this keystore in future programs. After you've created a keystore, proceed through the export wizard, give your APK a filename, click finish and the file will be generated.
The rest is up to you. (^:

Thanks klausef!
For a non-dev (OK, I used to program short apps in BASIC on my commodore 64 when I was 8 years old), how much can I hope to achieve by setting this up? Do I need to understand a programming language? If so, which? Do you have any suggestions for a noob like me?

Haha I am no Java expert myself but I've been hacking around with the NoRefresh thing and other apps people have coded. You can do more than you think just by rummaging around online documentation.

Related

ADB & SDK help

Does anybody have links to, or willing to share the programs needed (Android SDK, Drivers, etc.)? I have been trying to find all the programs, but keep running into dead ends. The Drivers file listed in JoeyKrim's "Basics of ADB" thread are no longer hosted, The ADB files in SDK are missing a lot of files, and I don't know which ones I need. In place of the files, is a Notepad Readme which I Copy/Pasted here:
Welcome to the Android SDK!
The Android SDK archive now only contains the tools. It no longer comes
populated with a specific Android platform or Google add-on. Instead you
use the SDK Manager to install or update SDK components such as platforms,
tools, add-ons, and documentation.
In order to start developing applications, you must install at least one
version of the Android platform using the SDK Manager.
This requires an Internet connection, so if you plan to use the SDK
offline, please make sure to download the necessary components while online.
To start the SDK Manager, please execute the program "SDK Setup.exe".
Any help would be appreciated...
if you've downloaded the SDK from devlopers.android.com (i think is the url) then load it up and download everything that offers, so that you can make some android emulators for local testing.
then get yourself an IDE for programming in, eclipse has a nice plugin for android development, i use it myself. its a bit dated as an ide, but its nice.
once you have that youre done.
you can either use the emulator to test your code or actually run it on your android device if its connected.
good luck.
That's where the problem comes in. When I try to install the Android SDK, it doesn't have anything available. It has a "Readme" File that says you need to manually download the necessary add-ons. I don't know what add-ons to download. Also, the driver files that joeykrim references in his "Basics of ADB" thread have been removed from the servers, so I don't have access to them.
When I Rooted my EVO, I used Jiqqaman's 3 click "Simple Root", which loads the Clockwork Recovery. I would like to learn how to do some of the things myself, since other than changing ROM's, there isn't much that can be done without the correct programs (Pushing/pulling apks from the phone, some of the diagnostics need to be done from a shell, etc.)
The Android SDK archive now only contains the tools. It no longer comes
populated with a specific Android platform or Google add-on. Instead you
use the SDK Manager to install or update SDK components such as platforms,
tools, add-ons, and documentation.
To start the SDK Manager, please execute the program "SDK Setup.exe".
Click to expand...
Click to collapse
did you even read the README file? its right there.
run the SDK setup.exe -> available packages, and go get what you need.
then look up getting android development working in eclipse.

Installing Drivers Not Working

I am using SDK to install drivers so I can take a picture of my Android screen.
Trying to use the following guide:
Follow these steps to install new SDK components in your environment:
1. Launch the Android SDK and AVD Manager as described in the section above.
2. Select Available Packages in the left panel. This will reveal all of the components that are currently available for download from the SDK repository.
3. Select the component(s) you'd like to install and click Install Selected. If you aren't sure which packages to select, read Which components do I need?.
4. Verify and accept the components you want and click Install Accepted. The components will now be installed into your existing Android SDK directories.
New platforms are automatically saved into the <sdk>/platforms/ directory of your SDK; new add-ons are saved in the <sdk>/add-ons/ directory; samples are saved in the <sdk>/samples/android-<level>/; and new documentation is saved in the existing <sdk>/docs/ directory (old docs are replaced).
_____________________________________________
I get to "Available Packages" then when trying to search or install drivers, it gives me the following message:
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error. You might want to force download through HTTP in the settings.
Any help? I just want to take a simple picture of my phone and the developers of this thing didn't have the foresight to just make it simple like iPhone?
Thanks.
nbakid2000 said:
I am using SDK to install drivers so I can take a picture of my Android screen.
Trying to use the following guide:
Follow these steps to install new SDK components in your environment:
1. Launch the Android SDK and AVD Manager as described in the section above.
2. Select Available Packages in the left panel. This will reveal all of the components that are currently available for download from the SDK repository.
3. Select the component(s) you'd like to install and click Install Selected. If you aren't sure which packages to select, read Which components do I need?.
4. Verify and accept the components you want and click Install Accepted. The components will now be installed into your existing Android SDK directories.
New platforms are automatically saved into the <sdk>/platforms/ directory of your SDK; new add-ons are saved in the <sdk>/add-ons/ directory; samples are saved in the <sdk>/samples/android-<level>/; and new documentation is saved in the existing <sdk>/docs/ directory (old docs are replaced).
_____________________________________________
I get to "Available Packages" then when trying to search or install drivers, it gives me the following message:
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error. You might want to force download through HTTP in the settings.
Any help? I just want to take a simple picture of my phone and the developers of this thing didn't have the foresight to just make it simple like iPhone?
Thanks.
Click to expand...
Click to collapse
ur posting this in the wrong section in the forums... go to the market and download a app that'll take a screenshot of your android device screen. i believe you need root for that though so make sure you have a rooted device. if not, check out the forums for the 3 step root process. so easy a caveman can do it. cheers.
I wasn't aware this was the wrong forum for this...especially since I'm attempting to install software that is specifically for the developers of Android.
My phone isn't rooted, either.
Although the app says you need root you actually don't.

[APP] [UPDATED 9/27/2011]V1.9 Working App to Backup Windows Phone 7 via ZUNE ANY TIME

I have written a .Net app for backing up windows phone 7 via the Zune updater tool. This backup can be used by Zune to restore the device when you use the "Update" option under settings.
This is a COMPLETE backup and COMPLETE restore IF USING ZUNE 4.7AND/OR the V1.9 Tool. Your phone will be EXACTLY the same after a restore as it was when you did the backup. Any updates, file changes, registry entries, or texts will not persist that were not on the phone at the time of the backup. Sorry for the bold but I have answered this question about a dozen times in PM's or on here.
Use this at YOUR discretion. There are scenarios in which you can't use the backup you made to restore. For instance on my Samsung Focus I had the stock ROM on it and couldn’t' restore my 7720 Mango backup. I had to upgrade the phone to at least 7712 Mango BEFORE the backup would restore. But I could go from 7720 to stock. When it failed I was getting a "Version Mismatch" error. Make sure you can at least get back to the REV level you backed up from before expecting this to work or you may be sorry. Finally, NEVER trust a backup that does not say it completed properly INCLUDING a SUCCESS message!!. I also HIGHLY recommend having a stock ROM on hand to flash back to the device if necessary.
HD2 owners: See Post 2 in this thread
**New features:
Manage backups/archives. Set Paths to zune and updatewp as well as the PKS file.
Archive capability of the older backups AND restore of active backup or archives.
Will Install Support Tools and PKS file if needed.
Version 1.8 will seem quite different if you are on Vista/7 with UAC and not running as a full admin. The reason is that you can't change registry entries in HKLM or move files in program files without those rights. If you werent running as a full admin before you may have trouble if you start now. Just answer the UAC prompts when a backup starts and ends to change the files/reg entries to 4.7 and back to 4.8 values/files. I tried to consider lots of conditions like what if it fails during the backup or crashes so if you launch the app after a crash it will detect that that the changed reg entries are in place and undo them to get you back to where you were prior to the last run. The UAC prompts are there to protect you so don't get mad at me when you see 2 each time you use this to backup. If you need ZuneWMDU.DLL from 4.7 check these posts attachments:
Click here for x86 (32 BIT) os's
or Click here for x64 (64 bit) os's
You can put it with the back tool or anywhere and the program will ask you where it is and you can tell it. You can even rename it to something else. For instance I have it in my Zune folder named Zunewmdu.dll.47. Just don't replace the original 4.8 Zunewmdu.dll file.
Firstly I have to credit this to reading and putting together pieces from several threads on XDA. I read so many to be honest I am no longer sure who all to credit. There was no specific single source I just saw several things and through trial and error put together the pieces that made this possible.
This APP is a wrapper around a tool microsoft produced to perform updates to your phone via command line. Specifically the executeable "updatewp.exe" that comes from the Windows Phone Support Tools. The missing piece that eluded me for a bit was the update package itself which I found here on XDA and will link to later.
Prerequisites that need to be Installed/downloaded:
Looks like at least Phone OS version 7008 is required for the backup to work.
Zune Software Installed (I'm sure most of us have this): http://www.zune.net/en-us/products/software/download/default.htm
Windows Phone Support Tools Installed - MS Links are dead ATM.
If you are missing these prerequisites the app will tell you and even open a web page on request to the DL links.
If an error occurs you should find the text in your clipboard for easy pasting here on the forums.
To explain the process:
updatewp.exe is meant to update your phone with PKS files theoretically obtained from the device manufacturer. It will also do other things including a command line restore of a backup.
This program launches updatewp.exe with two command line arguments. One is the PKS file name and path and the second is the enablebackup switch.
What happens is the phone performs the backup first, once it completes the process the code terminates updatewp.exe before it goes further. In theory if you are using an update not compatible for your phone it would actually just say that and quit. However terminating the updater keeps it from ever getting that far.
I have used this to make a complete backup AND restore it via the ZUNE Update options under settings for my phone so I know it works.
How to use the app:
Attached to this post is a zip file with two folders. x86 and x64. Please launch the appropriate EXE for your platform.
If you do not have zune or windows phone support tools it will tell you immediately and offer to open the download URL on your computer.
If you pass those tests you will need to input a path to the PKS file in the long textbox. There is a button just above it that will open a URL to the download for the one I used here on XDA. There is also a Browse button below the textbox for you to use to browse to and set the file path via GUI.
Once the path is set click on backup and watch it go. If you already have a backup made previously this will overwrite it or offer to archive it (v1.2 & up).
Good luck and post feedback, thoughts or issues please.
Changelog:
v1.9 - I pulled 1.8 and have added 1.9. This version corrects some more bugs in 1.8, one of which doesnt show the completed success message when performing a backup. The first time you launch it you will see a prompt stating this is the first time you have launched this version and you need to choose if you want to use the 4.7WMDU file switching method or just have the program try to use what you have installed. If you choose not to use the file switching method it will still check to make sure the zune and updatewp versions match but will only warn you they don't match, you can still try to proceed with the backup/restore. I have tested this in both modes doing backups and restores (this is why it took so long to get out).
v1.8 - I changed the way the program does things so that it will use the ZuneWMDU.DLL file from Zune 4.7 to perform FULL backups. You CAN'T use the tool without that file and I am not going to include it because I am not going to redistribute Microsofts property. If you are using Vista/7 with UAC you will be seeing some extra prompts because elevation is required to change reg entries and move files around to allow you to use this with the newest Zune 4.8 and still get a complete backup. To get the older ZuneWMDU.DLL file just get it from the install path of zune and then uprade to 4.8. The program will ask you for the path to the old DLL for future use/reference. Don't get pissed at me with all the UAC prompts either, they are required if you arent a full admin on the machine. I re-released 1.8 on 9/16 to fix a few minor bugs that kept it from working correctly under certain cirumstances.
v1.7 -PULLED because the backups Zune 4.8 Makes are utterly USELESS. 1.8 is in the works that will make use of the old updatewp and some old zune 4.7 files to perform COMPLETE backup and restores as it originally did.
v1.6 - Added the ability to set all of the paths (requested by folks using languages other than english). Added some management capabilities for the backups. To archive the active one immediately or move an archived backup to the active folder.
v1.5 - This only adds proper path support for windows XP. If you are using the 1.4 version and don't have XP then there is no need to upgrade.
v1.4 - Works with Mango Beta if you have updated Zune assuming you have also updated the 4.8 support tools. It will check the versions and inform you of any issues found. Also corrected the blank error message issue some users were seeing. 4.8 support tools, check the second D/L (non) link: http://forum.xda-developers.com/showthread.php?t=1148123
v1.3 - Changed the path used for backup location to the LOCALAPPDATA environment variable rather than USERPROFILE to be more compatible with XP. If you don't have the windows phone backup tools installed the software will offer to DL and install them silently for you. The PKS file is now packed in with the software. If you don't have a PKS file set it will offer to unpack it and use it by default. I didnt add ZUNE install to this because well, if you don't have that your not really using your phone are you?
v1.2 - Added archive capabilities. If you choose to backup your device and a backup is in place you are asked if you want to archive it. If you choose to keep it then a folder in your documents called "Windows Phone 7 Zune Backup Archive" is where it goes. Each backup will go in to a folder labeled by the date/time it was created. The format will be Month-Day-Year Hour-Minute-Second so you know exactly from WHEN the backup was from.
Added a Restore Button that will use the latest restore if that is all you have, or ask if you want to browse and choose from the archived backups to restore. Whichever you choose will become the "Active" backup to zune and then the restore will take place afterwards. The former active backup is automatically placed in the archive. When the restore is completed the SAME backup you chose is still the active one so using ZUNE to do the restore will yield the same result.
***IF you have multiple devices the archive portion will work fine, however I have yet to find a way to identify which ID is which device so when you choose to restore from an archive YOU will have to pick the correct one or it won't work.
v1.1 - Updated where the code looks for the windows phone tools to accomidate installs of zune to alternate locations.
In Development:
Determine the device ID of the connected phone so I can keep multi device backup archives straight when presenting which backups from an archive to restore. I don't have two devices so this will be a feature in beta until it is proven by your feedback.
Error Code Troubleshooting:
Firstly, if you want help in this thread PLEASE tell us what your Computer OS is including if its 32/64 bit. What OS revision your phone is at and What kind of phone along with details of the problem! Thanks!
I found this link to MS for different error codes and a solution grid of sorts that relates to ZUNE etc..:
http://support.microsoft.com/kb/2484484#80072EE7_801812DD_801811C5
This is a COMPLETE backup and COMPLETE restore IF USING ZUNE 4.7!!. Your phone will be EXACTLY the same after a restore as it was when you did the backup. Any updates, file changes, registry entries, or texts will not persist that were not on the phone at the time of the backup. Sorry for the bold but I have answered this question about a dozen times in PM's or on here.
ZUNE 4.8 seems to only backup whatever Zune does not synch and things like game states! I HIGHLY recommend reverting to 4.7 zune and phone tools if you want a COMPLETE backup. Zune 4.7 cant talk to Mango but it doesnt need to for a backup. A Complete backup made by 4.7 tools WILL restore with 4.8 tools.
Known Issues:
HD2 owners. There seems to be a problem using this method to backup the phone. The current theory is that the HD2 does not use the same boot loader as other WP7 devices and is not recognized correctly in that mode so it doesnt work. I would be interested in knowing how your updates are applied as the log I got from one user indicates the phone talked to the update program once it rebooted?!
Additional tips and observances:
*You CAN'T change the memory size and perform a restore, I already know this doesnt work so forget about adding memory and just restoring
*To my knowledge you can't backup from one device and restore to another as the backup files are signed/ID'd to the device that made the backup.
How to restore a backup via ZUNE if you don't want to use the restore feature:
Make sure your phone is hooked up to the computer first then from within the ZUNE software you should see a menu near the top right-hand side labeled "Settings". Click on that. On the settings screen look near the top left and you should see "Software" "Device" and "Account". Instead of device it may say "Phone".
Click on Device or Phone, whichever you see. The left edge has several options. Near the middle you should see "Update". Click that. You should see a progress bar for a few seconds and then most likely it will tell you that the phone is up to date. At the BOTTOM of all the text it spits out should be a button labeled "Restore" with the date of the backup.
BACKUP CREATION LOCATION:
Copy & paste the following in to the run dialog box:
Vista/Win7: %LOCALAPPDATA%\Microsoft\Windows Phone Update
Win XP: %USERPROFILE%\Local Settings\Application Data\Microsoft\Windows Phone Update
If you are running the backups with elevated privileges then you need to open a command prompt with those same privileges and paste in the above paths to find them as they may likely be in a different user account.
You will have to manuall drill down from their because the sub folder structure is named from the Phones ID.
Manual Command Line Method to Perform Backup:
All the same prerequisites apply. Zune and the windows phone support tools need to be installed.
It is easiest to have unzipped the PKS file in to folder the support tools are in. You can do this by opening the run dialog and typing: %PROGRAMFILES%\zune and hit enter or click ok. This will open explorer to that folder and you can move/copy the UNZIPPED PKS file there.
Open a command window with admin privileges. To do this in windows Vista/Win 7 with UAC enabled click on the "Start" Windows logo usually found in the bottom left corner.
In the search programs and files dialog type CMD and wait for the search to produce CMD.EXE at or near the top of the list. RIGHT click on cmd.exe and choose "Run as administrator". (hopefully you don't have to input admin credentials to do this)
At the command prompt type: cd %PROGRAMFILES%\zune (and hit enter). Your prompt should change to include the program files path and ZUNE for example "c:\progam files\zune"
Now assuming the support tools are installed correctly you can test by typing: updatewp (and hit enter) this should spam the screen with the command line options for updatewp and lets us know the rest will work.
The command to type is: updatewp.exe /iu A0CE706D-12B7-45AC-A5FC-AD04DFCA6E86.100.pks /enablebackup (and hit enter) You should be able to copy the command line as it is and right click on the DOS window at this point and choose "Paste" to save the trouble of typing that awefull string.
This is all the program I wrote does to start a backup other than kill the update process at the end since it can't happen.
I hope this works for you if the code does not!
Great!! thanks , will try .
The system cannot find the file specified
What precedes this section of the file path? and is it the same path on Windows 7?
/Library/Application Support/Windows Phone 7 Connector/Cache/Device Update/
Looks like your trying it on a Mac? Not gonna work
You can do it manually. Double check the updatewp.exe command line for a mac and if its the same as a PC then run it updatewp.exe PKSFILEPATH /enablebackup
hx4700 Killer said:
Looks like your trying it on a Mac? Not gonna work
Click to expand...
Click to collapse
I'm not. i'm on PC.
Where do i place the file from this page?
http://forum.xda-developers.com/showpost.php?p=11542700&postcount=6
I put it in the Zune folder and then my command line was:
updatewp.exe /iu "C:\Program Files\Zune\A0CE706D-12B7-45AC-A5FC-AD04DFCA6E86.100.pks" /enablebackup
open cmd.exe to the dos prompt and change to the ZUNE folder and then type or copy & paste in the above.
Perhaps I didnt specify this but you will need to unzip that file from the other post.
hx4700 Killer said:
I put it in the Zune folder and then my command line was:
updatewp.exe "C:\Program Files\Zune\A0CE706D-12B7-45AC-A5FC-AD04DFCA6E86.100.pks" /enablebackup
open cmd.exe to the dos prompt and change to the ZUNE folder and then type or copy & paste in the above.
Perhaps I didnt specify this but you will need to unzip that file from the other post.
Click to expand...
Click to collapse
Sorry, but I'm not quite sure what you mean :-/
I unzipped the "A0CE706D-12B7-45AC-A5FC-AD04DFCA6E86.100.pks" file
Then, I placed it in the zune folder: C:\Program Files\Zune\
Now I have cmd open, but I don't know what you mean by "change to the ZUNE folder and then type or copy & paste in the above."
What do I change about the Zune folder? and what am I typing into the cmd promt?
when I say change to the zune folder I mean change the current folder the command prompt is at by typing this:
cd c:\program files\zune and press enter
copy the following text in to the clipboard:
updatewp.exe /iu "C:\Program Files\Zune\A0CE706D-12B7-45AC-A5FC-AD04DFCA6E86.100.pks" /enablebackup
Then right click on the command box and choose paste and hit enter.
OR just type the above text in to the command box and hit enter.
Well, I got a little further, but I get this message in the cmd:
c:\Program Files\Zune>updatewp.exe "C:\Program Files\Zune\A0CE706D-12B7-45AC-A5FC-AD04DFCA6E86.100.pks" /enablebackup
'updatewp.exe' is not recognized as an internal or external command, operable program or batch file.
There was a prerequisite you needed that I listed. It is the windows phone support tools:
Windows Phone Support Tools:
x64 Windows: http://download.microsoft.com/downlo...Tool-amd64.msi
x86 Windows: http://download.microsoft.com/downlo...rtTool-x86.msi
updatewp.exe comes from that and is installed in to the zune folder when you install those tools.
Nice. Got the backup to work! Thanks for all the help. I'm going to hard reset and see if the backup works
quick question: does the backup process backup everything, including word documents?
The backup seems to backup anything on the phone.
For instance I used the reg hacks so I could see the phone in explorer. I put a couple of files in the video folder directory as a test and the phone could play them.
Further Zune ignored them and did not consider them as part of the sync process.
When I performed by backup and restore even those files were restored.
I can not speak to folders created that are not part of the normal hierarchy but I suspect that anything on the phone is backed up.
Adding:
I should stress again that this is the same backup that zune performs when you update your device with the update tool. This is just using one of the support tools that offers command line to trigger the backup when you have a legitimate update file. In this case however the program I wrote is terminating the update before it can begin once the backup is performed. So in other words I am just "tricking" the update program in to running and performig the backup.
Mallux,
I just figured out why you were getting that error.
The code checks for the existance of zune and then the support tools specifically by checking for the existance of the files.
The checks do the same thing so I cut & paste the zune check code in for the support tools and didnt change the path to check for updatewp.exe. So basically the code checked for zune twice and then went on.
I fixed the code and updated the DL link in the first post.
Im sure now that you have the support tools installed the code would work as written, or with the new DL link.
Hi and congrats for your work (if it works ? hehe, just kidding).
Maybe you would have better feedback in posting this to the dev and hacking section or the software one ?
Just a thought, since here are mostly apps for the phone itself.
Best regards
Andy
[APP] Working App to Backup Windows Phone 7 via ZUNE ANY TIME
I posted this in windows phone 7 apps and it was suggested that I post it here so don't hammer me for cross posting please.
I have written a .Net app for backing up windows phone 7 via the Zune updater tool. This backup can be used by Zune to restore the device when you use the "Update" option under settings.
Firstly I have to credit this to reading and putting together pieces from several threads on XDA. I read so many to be honest I am no longer sure who all to credit. There was no specific single source I just saw several things and through trial and error put together the pieces that made this possible.
This APP is a wrapper around a tool microsoft produced to perform updates to your phone via command line. Specifically the executeable "updatewp.exe" that comes from the Windows Phone Support Tools. The missing piece that eluded me for a bit was the update package itself which I found here on XDA and will link to later.
Prerequisites that need to installed/downloaded:
Zune Software Installed: http://www.zune.net/en-us/products/software/download/default.htm
Windows Phone Support Tools Installed:
x64 Windows: http://download.microsoft.com/downl...E4A-8179-9A3C5483E366/WPSupportTool-amd64.msi
x86: http://download.microsoft.com/downl...-4E4A-8179-9A3C5483E366/WPSupportTool-x86.msi
An update package from ANY phone, this one is for an HD2 that I used while working on a samsung focus. Download and Unzip:
http://forum.xda-developers.com/showpost.php?p=11542700&postcount=6
If you are missing these prerequisites the app will tell you and even open a web page on request to the DL links.
Please understand this is release 1.0 and as such may have issues depending on your platform and your computer etc.... I coded it for x86 and x64 Windows with the Microsoft .net Framework 2.0 minimum. I tried to consider several error scenarios but one never knows how an end user might use your program that wasnt anticipated and coded for.
If an error occurs you should find the text in your clipboard for easy pasting here on the forums.
To explain the process:
updatewp.exe is meant to update your phone with PKS files theoretically obtained from the device manufacturer. It will also do other things including a command line restore of a backup.
This program launches updatewp.exe with two command line arguments. One is the PKS file name and path and the second is the enablebackup switch.
What happens is the phone performs the backup first, once it completes the process the code terminates updatewp.exe before it goes further. In theory if you are using an update not compatible for your phone it would actually just say that and quit. However terminating the updater keeps it from ever getting that far.
I have used this to make a complete backup AND restore it via the ZUNE Update options under settings for my phone so I know it works.
One could most likely also archive backups by copying/moving from their storage point before creating a new one so as to have a backup that could be reverted to from a point in time further than the last one on record. If there is enough interest in such a feature and incentive I would consider adding it here.
Attached to this post is a zip file with two folders. x86 and x64. Please launch the appropriate EXE for your platform.
If you do not have zune or windows phone support tools it will tell you immediately and offer to open the download URL on your computer.
If you pass those tests you will need to input a path to the PKS file in the long textbox. There is a button just above it that will open a URL to the download for the one I used here on XDA. There is also a Browse button below the textbox for you to use to browse to and set the file path via GUI.
Once the path is set click on backup and watch it go. If you already have a backup made previously this will overwrite it.
I can not say if this will work with a debranded phone but I don't see why not. My focus is an out of the box stock AT&T phone with chevron unlock on it (which you shouldnt need) and a couple of non-marketplace apps.
Good luck and post feedback, thoughts or issues please.
***Adding Instructions on how to restore as its come up a few times:
Make sure your phone is hooked up to the computer first then from within the ZUNE software you should see a menu near the top right-hand side labeled "Settings". Click on that. On the settings screen look near the top left and you should see "Software" "Device" and "Account". Instead of device it may say "Phone".
Click on Device or Phone, whichever you see. The left edge has several options. Near the middle you should see "Update". Click that. You should see a progress bar for a few seconds and then most likely it will tell you that the phone is up to date. At the BOTTOM of all the text it spits out should be a button labeled "Restore" with the date of the backup.
You CAN'T change the memory size and perform a restore, I already know this doesnt work.
Ok first off all, I have to thanks for you for your hard work! The tool just worked like a charm. I just used the back-up tool and it succeeded made a backup of my Omnia 7. I'm just wondering a few things:
Is my phone identical the same if I use the backup tool? That means the register changes and installed apps??
I have used the zune update - Restore function and everything was the same. I have several xbox live games and after the restore I was still at the same place in my games. Further my phone is chevron unlocked and remained so after the restore.
Further, I did the reg hacks to see the phone in explorer when zune is closed and put a couple of small vid files in the video folder. Those files did not show up in Zune on my PC or in my collections but the phone could play them just fine. After the restore they were still there too. So from what I can tell the une backup tool backs up the phones memory as it is no matter what is there. I have not tested non-standard folders that are user created though but would assume they would work all the same.
Further a couple of observations:
During development I found I could unplug the phone at any time during the backup process and it would be just fine. No harm.
In Zune when the phone is hooked up I could see the "memory graph" and it had slices in it and hovering over them with the mouse would yield what each slice was... e.g. Videos, Music, pictures etc... I had a large area that said it was reserved for data "from another computer" or some such verbiage. After the restore that was gone and I had a little more memory back for my own use. The slices seemed to be gone too but had no effect on what zune synched etc... Perhaps a full resynch might change it but I havent done that.
**Adding:
Having re-read your post I am now wondering if you are asking if your phone is the same as after the backup as it was prior to the backup? It should be unchanged. The backup process is the same that would occur if you were performing a legitimate carrier update. The process says it transfers the update to the phone but does not execute it until after the backup. My code terminates the updatewp.exe program before that happens so ultimately you might have the 310k file still on your phone in some "updates" folder somewhere.

[Tutorial] install kitchen in linux en use it! tutorial thanks to theunlockr

Heey everyone here the quide for how to set up kitchen in linux virtualbox
Not made by me but made by the amazing guys from the unlockr Thanks!!!
Part 1
[I Before you begin]
1. This ONLY works for HTC Android devices at the moment, Also other devices!
[II. Download a Virtual Machine and Set It Up.]
1. Download VirtualBox for free from here (the one for Windows Hosts at the top). Then click next on the setup process until it installs.
2. Open VirtualBox and click on New.
3. Name the New Virtual Machine whatever you want (we named it Linux for simplicity’s sake).
4. For Operating System choose Linux, then choose Ubuntu for Version and click next.
5. Click Next again leaving the Memory Setting at what it is preselected at (should be 384mbs).
6. Click Next on the Boot Disk screen as well leaving boot hard disk and create new hard disk both selected.
7. Keep clicking Next until you get to the slider that asks how much space to set for the Linux. Move the slider to 8Gbs and click next.
8. Click next until it is done and shows you the original screen you started on but now with the Linux Machine Powered Off on the left.
[III. Install Linux Ubuntu on the Virtual Machine]
1. Download Ubuntu from here.
2. Once it is downloaded, in the VirtualBox program, click the Start button at the top.
3. Close out all the warnings that come up.
4. Then click on Devices > CD/DVD Devices > More CD/DVD Images… then select the .iso image for Ubuntu you downloaded.
6. Follow the prompts on the screen to install Ubuntu on your Virtual Machine.
7. Once it is installed and reboots, goto Applications > Accessories > Terminal and type this line with hitting enter at the end:
sudo apt-get install sun-java6-bin sun-java6-jre
It will ask you for a password, type in the password you created when you went through the Ubuntu installation process (it asked you for it before finishing the install).
Then it will ask you y/n. Hit y then enter. Then when it shows you the terms and conditions, hit right arrow on your keyboard and click enter to select ok. Then hit left arrow on your keyboard and enter to select Yes.
*NOTE – Your keyboard and mouse will not function on your regular computer once you use them in the Ubuntu virtual machine. To re-enable them, click the Ctrl button on the right side of your keyboard.
**IF YOU GET AN ERROR INSTALLING THE JAVA FILES,
Download the java files manually FROM INSIDE THE EMULATOR/LINUX using Firefox here:
Java6 Bin
Java6 Jre
Then open the Terminal App in Ubuntu and type this with hitting enter at the end of the line:
sudo dpkg -i sun-java6-jre_6.18-4_all.deb sun-java6-bin_6.18-4_i386.deb
And that should fix it.
[IV. Download and Setup The Android ROM Kitchen]
!THIS NEXT SECTION NEEDS TO BE DONE WITHIN THE UBUNTU VIRTUAL MACHINE!
1. Click on the Firefox logo at the top of your Ubuntu installation (in the Virtual Machine).
2. Type this into the url box:
theunlockr.com/2010/03/26/how-to-create-your-own-custom-rom-for-android-part-1-setting-up-the-kitchen (to navigate to this page from within the virtual machine).
3. Now download the latest version of the kitchen file  in the first post from the link below(again from inside the Ubuntu installation on the virtual machine. We are doing this because we want to save this file in our Ubuntu Virtual machine, NOT our regular computer).
Kitchen
4. Again on the Ubuntu machine, Find the .zip file you just downloaded, right click it and click open with Archive Manager and then click Extract at the top.
5. Once you click Extract, it will ask you where. Double click the folder that has the name you created when you installed Ubuntu (my username was theunlockr so my folder is called theunlockr. It is the first folder under recently used in the list on the left). Then click Extract at the bottom right.
[V. Run the Android ROM Kitchen]
1. To run the Android ROM kitchen, click on Applications at the top of Ubuntu > Accessories > Terminal then type the following and hit enter:
./menu
2. You will now be greeted by the simple text menu of the application. Enjoy!
VI. Create Your First Custom ROM
=================================================
Part 2
Before You Begin
1. We are assuming you have already setup the Android kitchen. If not, use our How To Setup The Kitchen procedure and then come back to this one when done.
2. We are also assuming you have already done our How To Root and How To Load a Custom ROM for your phone and have a custom recovery image.
2. This ONLY works for HTC Android devices at the moment, Also other devices
3. Open the Kitchen in your Ubuntu Virtual Machine we created in the Kitchen Setup procedure by typing ./menu in the Terminal window in Ubuntu. Leave it open.
4. All of this is done INSIDE THE UBUNTU VIRTUAL MACHINE (that includes when I say “save to your computer” anywhere in here, means save to you Ubuntu Virtual Machine)!
II. Find a ROM to Dissect
There are two kinds of ROMs you can dissect to create your own custom ROM; Stock ROMs and Custom/Cooked ROMs. DsiXDA, creator of the ROM kitchen we are using, has put together a list of places to get stock ROMs for different devices and a quick how to load them into the kitchen:
From a Cooked ROM (Easiest Method):
1. Copy the update.zip (or equivalent ZIP file) to the original_update folder in the kitchen
2. Type the number for the option “Setup Working Folder from ROM” and hit enter in the Kitchen to create your working folder. (So if its number is 1, type 1 then hit enter).
From a Shipped ROM:
1. Find the shipped ROM for your device, usually from htc.com or from searching xda-developers (check the Wiki or sticky posts under your device’s sub-forum).
The links below may help:
2a. If the shipped ROM is in a .ZIP format, then simply extract the system.img and boot.img.
2b. If the shipped ROM is in .EXE format, then do the following:
A. In Windows, run the shipped ROM’s .EXE file till it gets to the first dialog. Stop there but don’t close the window yet.
B. Go to Start->Run and type: %TEMP%
C. When the folder opens, search for Rom.zip. Then, open it with an unzip tool. If you get errors trying to open the ZIP file with WinZip or the default Windows unzip program, then use 7Zip (download from here) to extract it.
D. Extract only two files from Rom.zip: system.img and boot.img
3. Copy the two .IMG files to your kitchen’s img_files folder in your Ubuntu Virtual Machine.
4. In the Terminal window that you opened in Section I, type 1 and hit enter to create a working folder from the two .img files.
Now, that you have either the update.zip in the original_update folder of the kitchen OR the system.img and boot.img of a shipped ROM in the img_files folder of the kitchen, you are ready to play with the ROM to make it your own.
III. Tweaking the Imported ROM Using the Automated Options in the Kitchen
So this is a basic kitchen, but you can do things like, add Root support, add/remove apps from the ROM, enable saving apps to the sd card, enabling Wifi tethering, do some automatic optimizations, and a few other things automatically just by selecting the option and hitting enter. It even allows you to put in your own scripts for the ROM to run (but that’s for more advanced users who know how to create scripts of course).
1. After importing a ROM using section II, select the options you want to do to the ROM (by typing the number of the option you want into the terminal/kitchen window and hitting enter. They are all pretty self explanatory.)
2. Continue this until you have all the automated options you want in the new ROM.
IV. Adding/Removing Applications from the ROM
1. In your Ubuntu Virtual Machine, goto Places at the top. Then click on Home Folder, then the WORKING folder that was created in section II when you dissected the original ROM or img files. Then goto system > app. (Also check Data > App as .apks can be put in there as well).
2. In the app folder you will see all the .apk files for all the applications you have currently in the ROM. Simply delete the ones you do not want to remove them from the ROM.
3. To add applications, simply copy any .apk file for the applications you want to add into the app folder.
V. Repackage the ROM so it can be Flashed onto a Phone
1. Once you have done whatever changes you want, you just need to type 99 and hit enter in the kitchen/terminal for the kitchen to take the working folder you have been messing with and compile it into a flashable update.zip ROM.
2. Once it is done compiling the ROM, we can transfer it to our phone.
VIa. Setup Ubuntu to See Your Phone via USB
1. In the Virtual Box windows with Ubuntu in it, click on Devices at the top then click Install Guest Additions. (It should autostart, if it doesn’t, click on the CD that appeared on the desktop in Ubuntu and then click on Autostart.sh. It will ask you for your password you created when setting up Ubuntu, put that in and let it install).
2. Once the Guest Additions are installed, close the Virtual Box Ubuntu Window (choose to Power Down the Machine).
3. Now, open Virtual Box itself (not Ubuntu) and highlight the Ubuntu machine, then click on Settings at the top.
4. Click on USB and make sure Enable USB Controller and Enable USB 2.0 are both enabled.
5. Now plug in your Android phone (do NOT mount the SD card, just plug it in).
6. Now in the USB menu of Virtual Box, click the + symbol on the right and then select your Android Device (name may be different).
7. Once that is installed, unplug your phone.
8. Now, Start your Ubuntu Virtual Box.
9. Once Ubuntu boots up, plug in your Android phone (do not mount the memory card yet) and look for the USB symbol at the bottom (fourth icon from the left) and hover over it and wait for it to say USB Device detected and display your phone. Once that happens, mount the sd card by pulling down the notification bar on your phone and clicking mount.
10. Ubuntu should pop up your SD card on the desktop (if any prompts come up just select do nothing and click ok). We can now transfer files to the memory card of our phone.
VIb. Use RapidShare to Transfer the File from Ubuntu to Windows (if Section VIa was giving you trouble)
1. If you can’t get the USB to work in Ubuntu, then simply open a Firefox browser window, goto Rapidshare.com and upload the ROM to there.
2.Once it is done uploading, ON YOUR WINDOWS COMPUTER NOT UBUNTU, put in the link it gave you when you finished uploading it, to download it to your Windows computer so we can transfer it to your phone.
VII. Flash the ROM
5. Copy the .zip file to the root of your SD card (NOT in any folders, just on the SD card itself).
6. Unplug the phone and turn it off.
7. Turn it back on by holding down home and power (do not let go until the recovery screen comes up) to get to recovery mode (you must have a custom recovery screen to do this, if you don’t find out How To Root and Load a ROM procedure for your phone and do those first).
8. Now select Nandroid Backup to create a backup before we flash the new ROM.
9. Once the backup is done, select Wipe Data / Factory Reset in recovery mode.
10. Select flash zip from sd card and select the ROM you just put on the sd card.
11. Once it is done flashing, click reboot. Enjoy!
Enjoy! Will update this as we add more things for you to tweak Feel free to suggest some in the meantime.
Thanks to DsiXDA for his awesome kitchen!
Thanks to Theunlockr For the amazing Guide !!!
greetings safariking
Video tutorials:
Part 2:http://www.youtube.com/watch?feature=player_embedded&v=q-1ErGSW0ik
Part 1: http://www.youtube.com/watch?feature=player_embedded&v=94Az1kcQvc4
Thanks safariking!
Thanks
very good tutorial thanks
Hi there
Does Android Kitchen Only work in virtual Machine for Ubunty? I have a full installtion of Ubunty and when I type ./menu at the terminal "no such file or directory" followed the installation video but I ain't getting nowhere
Cheers
atomicsoul said:
Hi there
Does Android Kitchen Only work in virtual Machine for Ubunty? I have a full installtion of Ubunty and when I type ./menu at the terminal "no such file or directory" followed the installation video but I ain't getting nowhere
Cheers
Click to expand...
Click to collapse
no.
kitchen can be used on all Linux/Unix OS.
中国人正在尝试提高!
(translation:Chinese people are trying to improve themselves!)
Very nice job. We thank you for your time and effort for writing all of that
Thanks
Sent from my GT-S5660 using xda premium
Just a note: linux isnt required
You can use windows, but does require to install cygwin (linux like terminal)
Sent from my GT-S5660 using xda premium

Windows imageres.dll being a PiTa: Modding

I've edited my imageres.dll file and have it all nice nice, but when I try to paste it into system 32 (tried safe mode) It will not let me overwrite that file.
I've tried Safe mode, Taking Control, Granting full control permissions of file, system32 folder, windows folder, and C folder (both taking control, and granting full permissions to: User (me) and Administrator (also me) Yes, i'm on windows 7 64bit but there is no Win 7 Forum here, however the imageres.dll is mentioned here, and I'm assuming the file is more-or-less the same. Besides taking ownership in C for Win 8 being bad? I did this to both System32 file and Syswow64 file- its now apparent to me that both are in USE and thats why I can't overwrite/modify them =/ So how do I use my modded one? (startup sound etc.)
Following this:
Code:
How to Take Ownership in Windows 7
1. Locate the file or folder on which you want to take ownership in windows explorer
2. Right click on file or folder and select “Properties” from Context Menu
3. Click on Security tab
4. Click on “Advance”
5. Now click on Owner tab in Advance Security Settings for User windows
6. Click on Edit Button and select user from given Change Owner to list if user or group is not in given list then click on other users or groups. Enter name of user/group and click ok.
7. Now select User/group and click apply and ok. (Check “Replace owner on sub containers and objects” if you have files and folder within selected folder)
8. Click ok when Windows Security Prompt is displayed
9. Now Owner name must have changed.
10. Now click Ok to exist from Properties windows
Once you have taken the ownership of file or folder next part comes is Granting Permissions to that file/folder or object.
How to Grant Permissions in Windows 7
1. Locate the file or folder on which you want to take ownership in windows explorer
2. Right click on file or folder and select “Properties” from Context Menu
3. Click on Edit button in Properties windows Click ok to confirm UAC elevation request.
4. Select user/group from permission windows or click add to add other user or group.
5. Now under Permission section check the rights which you want to grant i.e check “Full Control” under the “Allow” column to assign full access rights control permissions to Administrators group.
6. Click Ok for changes to take effect and click ok final ok to exit from Properties window.
Now you can access files of folder in windows 7 with full permissions and take full control.
also tried cmd prompt
Code:
takeown /F "C:\Windows\System32\imageres.dll"
with Sucess message (probably the same as my right click takeown reg file context thing)
I'm the only person/login/user on my PC. Ugh this is a pain in the butt. No matter what I've googled/tried hasn't worked. I don't have a linux CD/USB boot *(dunno if I do? but don't think I do) to repair/replace file, I may have Win 7 repair on my CD, maybe not.
EDIT: replacing the startup sound in imageres.dll in System32 and SysWOW64 folders still leaves me with default windows startup sound =( Only other file was imageres.dll in winsxs folder- copied, edited the copy, deleted the original with Fileassassin (it was locked, wouldn't edit, blah blah) STILL uses old windows start up sound, WHyyyyyy? theres MUI files with info for imageres.dll but IDK what's left where this sound exists =/ or where its coming from.
there used to be this program made for replacing system files
i don't remember its name, though
http://www.askvg.com/right-click-re...utility-to-replace-system-files-in-windows-7/
No manual methods worked for me, but just came across this and it worked, WOOT!
http://winaero.com/download.php?view.10
Starting with Windows 8, the administrator is no longer the same as root. Microsoft has very, VERY severely limited the administrator's abilities with many aspects of the system. This was done in an ill-conceived notion that they could curb piracy of Windows Store apps (like there's anything worth stealing in there, including games). People have already found a way to pirate Windows Store apps, so it was all just a way to irritate admins and hobbyists in the end.
@dragon_76: Care to explain what you mean by that? For one thing, Administrator on NT has never been "the same" as root (on POSIX); there's always been the local SYSTEM SID (which does some of the things which root would handle, such as being the process that drivers and initial user-space processes run as) and while I'm not entirely sure when the TrustedInstaller SID was added (may have been there since NT3.1 for all I know), it's been a part of Windows since well before Win8. For another thing, unlike root on a POSIX system, Administrator does not (and never has) automatically have access to everything; it's a SID like any other, and ACLs can be put in place to control its access.
Now, two powers that Administrator (and members of the Administrators group) do have are as follows:
1) Take ownership of any securable object (this allows completely overwriting the ACLs).
2) Impersonate any other SID (although some, like TrustedInstaller, are possibly trickier to impersonate in Win8 than they used to be; I need to investigate that).
If what you're complaining about is the fact that \Program Files\WindowsApps\ is now owned by TrustedInstaller and harder to mess with than you'd like, um... sorry? It's not *that* hard to take ownership (or set it back) from TrustedInstaller; you can do it as Admin, in fact.
*Ahem*
Back to *actually* being on-topic, older versions of Windows* had a background service that would undo any modifications to system files by replacing them with un-tampered copies from a backup location. Starting with Vista, such a service supposedly no longer exists, but it would be easy to implement something like it using VSS. So, you should verify that the file isn't being reverted. The simplest check is the modify timestamp and (if it's different on your file than on the stock one) the size. Somewhat more advanced is to use a hash function, such as MD5 or something from the SHA family, on the on-disc file and see whether it matches the version you put there.
Beyond that, you can easily replace system files if you do it while the OS isn't booted. Linux can do it, although that has risks. Better is to use WinPE (the Pre-installation Environment that bootable Windows disks and recovery tools load) and replace it from there.
Incidentally, you can use the command line tool icacls (which may even be present in WinPE by default) to both change ownership and set permissions on files and folders.
* Pre-Vista, which was the first version to switch to using TrustedInstaller to protect system files rather than letting Admin write to them by default. That's the last major change I'm aware of in the powers of the Administrator account on Windows, incidentally...

Categories

Resources