[Q] [HELP] Expand hex string - Hero CDMA Q&A, Help & Troubleshooting

Hello. Im trying to expand a hex string in an .exe file using HxD Editor. The problem is that the parts of the string are on different locations. For example if my string is "JHGFRF" and the hex code is "46 59 86 32 45 87 56", the first part of the string "JH = 46 59" is on Offset(h): 00001570 and the next part "GF = 86 32" is at Offset(h): 00003570 and so on every part of the string is at different locations and i want to expand that string to "YDHGYHQYSHDYGFJT" for example, but i didn't know in which place exactly to add the new hex codes, coz they are all at different places.
Dont know if that makes any sense, but the source code is written in Visual Basic 6
I am kinda noob in hex editing and i hope you understand my explanation.
Thanks in advance!

Related

Solution for Kaiser Camera Counter change

Just found out something which was not in the forums and thought to share it with all (found only one reference, but for different device - it had different location for the counter).
In case you want to change the counter of the file numbers that the camera will record with (i.e. IMAGE001.JPG, but you want IMAGE045.jpg), you need to edit your registry with a registry editor:
Go to HKCU\Software\HTC\Camera\5.04\Preferences edit the key "Values" as per the attached screenshot - the next number for the picture (in HEX format - use windows calc in advanced mode to convert the number to HEX) should be typed at position 68 HEX.
Next time you take a picture it will use the number you placed there.
Nice one, I've been looking out for a solution to this issue! I'd like to add that if you want to set the counter beyond 255, you also have to edit position 69 HEX. This way, "FF 00" on positions 68 and 69 translates to "255", whereas "00 01" translates to "256", "01 01" translates to "257", etc.
To change the video counter, you have to change position 70 HEX. Keep in mind that this is not the position right after 69; after 69 comes 6A, 6B, etc., before you arrive at position 70. This probably is obvious to most of you, but it is a mistake easily made.
OK, this is exactly what I've been looking for also, but as a person who understands little or nothing about hex I would appreciate some guidance as to what to input, and precisely
where.
I would like to reset my camera's counter to 300, so that the files go 300.jpg. 301.jpg etc etc. If one of you could help me out, I'd appreciate it.
I just would rather not screw it up
Thanks.
As mvc mentioned, you can use the Windows calculator to convert the desired (decimal) value to the corresponding hexidecimal value. In your case, "300" would translate to "12C" (which equals to "01 2C"), meaning you have to change position 68 HEX to "2C" and position 69 HEX to "01".
If you need a program capable of editing the registry, I recommend the freeware utility Task Manager (the program which is used in the above screenshot):
http://www.freewarepocketpc.net/ppc-download-task-manager.html
Good luck!

website for converting hex codes to bitwise codes?

Anye one know of a good place to go to convert hex color codes to bitwise codes. I cant figure this crap out and its need to do changes in smali files. s the site i was given before is no longer up for some reason
What are you talking about bitwise code? There are bitwise operators which can manipulate one or two bit patterns... Do you mean a hexadecimal to binary converter?
You can use google by typing a search such as
HTML:
0x9F00AA in binary
The 0x before the hex number is important.

[Q][Dev] Module static fields and handleLoadPackage

Hello,
I've found myself in a situation I can't solve myself, so I hope I can find some help here
In my module, I've got a static field "VERSION_CODE".
In one of my hooks I register a BroadcastReceiver for AfterBootCompleted in which I set the field's value (I use the system Context object).
Then, in handleLoadPackage, when I try to read the field "VERSION_CODE", it has it's default value.
I don't understand this. Are there separate JVMs or something? How do I make that field absolutely global?
If it's a final field (constant) of primitive type (int, boolean, etc.) you won't be able to change it since compiler doesn't use variable but inlines value directly everywhere it's used.
C3C076 said:
If it's a final field (constant) of primitive type (int, boolean, etc.) you won't be able to change it since compiler doesn't use variable but inlines value directly everywhere it's used.
Click to expand...
Click to collapse
It isn't declared final.

[Q] Adding custom text to retrived data from database

Hi,
im a beginner i have small problem i have small application build where i can add stuff to the database and read it thats working fine for me but now for example i want to be it like example the output from the database is test test but i want it like Name : test Adress : test how can i fix this.
Thank you
Splitting Text
Not sure if I've understood correctly, but are you getting a String back from the database like this: "test test"?
If so you can use the String split() command to break your String into segments. For example:
Code:
String returned = //Get String from the database
String[] split = returned.split(" ");
String name = "Name: " + split[0]; //This contains your first word
String address = "Address: " + split[1]; //This contains your second word
How are you connecting to your database? Depending on how you connect, it is possible to return just a name, or just an address, rather than all columns in a row.
For example, using HQL (Hibernate Query Language) you could write something like:
Code:
SELECT address FROM person p WHERE p.name = "Harry"
This would return all the addresses of people called Harry from the table person

Trying to save a hex stream string as separate numerical values

Hi,
I am designing a BLE scanner that is required to receive and display the advertised packets of data (as well as other functions). So far this has been successful and the hex stream is being displayed using the following function:
// Device scan callback.
private ScanCallback leScanCallback = new ScanCallback() {
@override
public void onScanResult(int callbackType, ScanResult result) {
// gets data from the BLE scan for broadcasting packets
ScanRecord Scanned = result.getScanRecord();
String address = btAdapter.getAddress();
//Gets advertised packets in a byte array
byte[] packetData = Scanned.getBytes();
//conversion to a hex stream from the byte array
for (byte hex : packetData) {
x.append(String.format("%02X", hex));
}
However, i have been asked to represent the hex stream as separate numerical values for each byte using ASCI! I attempted this with just the byte array, but the outcome of the byte array was not the 62 bit hex stream I was expecting. but instead 8 random symbols.
I have also tried the parseint() function in many different ways. Each of which compiles successfully, But proceeds to crash my app when i try to start a scan!
Any help on how best to achieve my requirements would be much appreciated.

Categories

Resources