How to fix the footer and signature error when flashing partial images files? - embedded-linux

I have a question, after I have whole built the AOSP source code, it generates couple image files, such as ramdisk.img, recovery.img, system.img, res-package.img,etc .
Right now, I am considering partial flashing my Android Box without formatting all of the system, for keeping some previous data remains.
Therefore, I just tried to use the command “adb sideload filename.img”, which filename might be ramdisk,recovery, etc.
Then, after I did so, the android system shows the message :
“footer is wrong”
“signature verification failed”
“Installation aborted”
There, what should I correct my command, to make the process correct?
as the figure shows enter image description here
And, my methods to do so is trying to refresh a new system feature, but keep the previous data, such as APPs, or user data, remain, does anybody have other good suggestions? Thank you in advance.

it depends on the flash type and file-system you are using, and it is not possible to partially flash in the partition, but you can update the partition.

Related

An error in adding the application icon even though it was added in the same sizes

I tried to add an icon to an app but it gives me an error every time I try
Although I added it to the required size, but I did not understand it
Is there a program like the iPhone that allows complete measurements and replaces the entire file?
picture for clarification

Debugging on an end-user PC?

A user that works in my company has an Error 13 Type mismatch in the moment that she wants to input some data in a grid.
The thing is that when she has that problem, my application only shows the error screen and nothing more (I mean it doesn't say where the error occurs).
I want to know if there is a way that I can "see" the problem in a debug application because I don't have the source code of my application in this computer and I don't know if the problem is because of a Windows configuration issue or why this error pops up provided that when she uses another terminal, different to the one that she normally uses, she can do her job without problems (they have the same settings in the two pcs).
I have the source code in my terminal but as say above, in my terminal the error doesn't pop up so I need to see it in her terminal.
How can I do this?

Why does building in Xcode overwrite my SQLite database?

First of all, I'm not using Core Data, I'm using SQLite only.
I save the data in the table and then query them by opening the app and looking at the data using SQLiteStudio. I even create a LOG to check that the data is saved, and yes, it is saved.
But when I STOP and run the simulator again to consult, there is no more data!
Is Xcode overwriting the database every time? Or is something else happening that is outside my limited knowledge?
Without knowing more about how your application is setup, how you've got your app configured to build, or how it operates on the SQLite DB file in question I'll only be able to offer some pointers in things you can go check out about your code and build configuration that may be the source of your phantom deletions. Of course, if you have other info to provide, I'd be happy to edit my answer!
Case 1: 'Create DB' always running?
One thing that may be tripping your app up is what happens leading up to the decision to create a new SQLite DB file or look/open an existing file. If the code creating an empty DB is always running, then each time your app starts, your old DB file is getting overwritten with a blank DB.
Case 2: Using a 'starter' or 'template' empty database?
Sometimes developers may provide a blank database that contains the initial database schema (the general tables and structure) as well as some default or sample data. If your app does this, perhaps the logic leading up to the decision to apply that default database is accidentally always being triggered? If so, use of NSUserDefaults to record a boolean indicating the DB was successfully created may be an avenue to use to skip past the 'Load my starter DB' code. Alternatively, you could check for the existence of your DB file, or see if the contents of a specific table are different from the template data, etc.
Case 3: Different Behavior between 'Build & Run' vs. 'Run Without Building'
There's a not-so-well-known option in the Product > Perform Action menu labelled 'Run without Building' that will essentially kickoff another Debug session using the version of the application you just finished running in the Simulator or on Device. When you use this option do you see any different behavior with your database or is it still blank?
Case 4: Different Behavior when run directly in Simulator outside of an Xcode debugging session?
Part of the 'Run' operation is a build phase which may trigger the 'Copy Resources' phase even if your app hasn't changed since the last execution (as you suggest is the case in your question). If you are providing a stock 'default' or 'template' DB file and your app is simply opening and editing that 'template' during the first execution of your app, then Xcode may be replacing it with a clean copy on the subsequent 'Run' operations where 'Copy Resources' is happening. A way to test this avenue:
Build and Run your app to the simulator using Xcode like normal.
Perform some operations that would result in the creation or editing of data in your app's database.
Click the stop button in Xcode to return to the Simulator home screen.
Double-click the home button on the simulator (or if there is no home button, press CMD+SHIFT+H twice to bring up the multitasking bar and force-quit out of your application.
Check and see if your DB file has data in it.
If no data, then there is an issue persisting your changes into the database and we need to get that problem solved first. Otherwise:
Relaunch your app directly from iOS Simulator and perform different operations that would result in more or different changes to the database.
Click on the home button to return to the iOS Home Screen.
Force-quit your appellation as was done in Step 4.
Check and see if your DB file data has changed (but still has data) or has blanked out.
Finally, make sure you are following Apple's guidance about where to store user-data, if you are inadvertently storing something in an incorrect file path doesn't typically result in blanking of data, it may be prohibiting writing of data which could be interpreted as your data getting overwritten especially if you are interrogating it while it still is residing in an in-memory process. There's some really useful guidance about file paths in the Table 1-1: (http://developer.apple.com/library/ios/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/FileSystemOverview/FileSystemOverview.html)
Locating your Simulator App on your Mac's Hard Drive
To be thorough (and you may already know about this!), iOS Simulator applications are stored on your Mac's hard drive just like other files on your machine. Their organization mimics that of a physical iOS device. To get to your App and its data:
Open a new Finder window.
Press CMD+SHIFT+G or choose 'Go to Folder' from the 'Go' menu.
Paste the following into the 'Go to Folder' box then click 'Go': ~/Library/Application Support/iPhone Simulator/
Select the folder that matches the iOS version of the simulator you built to.
Click on Appications.
You'll then be presented with zero or more folders, each folder that appears will have a string of digits separated by hyphens. Navigate through this list until you find the one containing your app. You can then browse, and copy data out of this folder to somewhere to be examined by other tools on your Mac.

Issue in integrating ZXing to iphone App

I am trying to develop QRCode reader application in iPhone.
I am trying to use ZXing SDK. i have successfully run the sample application given by ZXing. But i ma trying to develope new application as per instructions in Readme given by Zxing. but when i am trying to add ZxingWidget in build phases. it going add but it shows like below
I think it will getting problem to me. When i am trying to run application it will give erros like Lexical or Prepocessor issue File not found.
Is am doing any thing wrong when am added to files to application.
Actaully first of all i added ZxingWidget.xcodeproj to my application by drag and drop. But it wont give any alert window would you like copy like similar when we adding images or files to xcode. and next i added cpp and iphone folders to xcode application. and later i added the frameworks as per read me.
Please any one help me in this issue.
Thanks in advance
Pretty hard to help without the real error message. In the Issue Navigator, you can Right Click > Reveal in Log to see the complete error that you can copy and paste.
That said, it sounds a bit like it can't find the headers (though I'm just guessing without the real error message.) If so, double check steps 4 and 5 of the readme.
if you run on real device, the problem will be solved.
I don't know the reason.
But I guess It's related to Build Products Path.

Webcore NSBeep()! when copy from uiwebview

I'm developing an epub reader with monocle (https://github.com/joseph/Monocle) which is launched in a uiwebview. My problem is that when I try to copy some text, like what we would do in any other uiwebview, it doesn't seems to do anything... well, I get Webcore NSBeep()! in output view.
any idea or approach?
Webcore NSBeep()! is a error notification, because when you try to copy text from UIWebview the text is not copied into your clipboard and the error notified using a beep (IMHO which is not wise way of notifying errorr by any platform, it would have been any visual indication)
And please note : NSBeep() is part of the ApplicationKit framework which doesn't exist on the iPhone.
I had the same strange issue, irritatingly enough everything worked for quite some time. Then with some changes, this error happened. Reverting the code did not help. After a whole day searching and thinking, I still don't know what caused this, but I know that it wasn't my code!
My theory is that either my git repository was somehow messed up or it was because I edited my project with a beta version of the IDE+SDK. Either way, you should probably look into recreating your webview in InterfaceBuilder. Or recreate your project (or at least partially to confirm that it might be a bug in the project itself). I think/hope that the error will go away then.

Resources