How to hack Unity game or .lib based game?? - Android Q&A, Help & Troubleshooting

Hey developer/tech enthusiasts i need Your help!
I am a small developer from Bangladesh and i want to learn many things!
I have very small knowledge about .dex file, i can work with it very Limited.
Main point is, i want to hack .so (Shared library file) of Android so that i will do better in future!
Patching dex is impossible for me now, but i know patching .so is easy than it!
So, how to work with it???
I have a windows pc running Core i5 1.9 Ghz Ram 4GB Hard drive 1TB windows version 10.
Please share your though/tutorial of how to hack .so/unity dll file!
Of course, provide me link of tools that i will need to patch them!
I will be greatly thankful to you.
Just help me out!
Regards
Nurujjaman Pollob

:*:Tools Required :*:
(*) Il2cpp Dumper GUI
https://www.andnixsh.com/2018/07/il2cppdumper-gui-104-with-apk-extension.html?m=1
Note :: There Is An Non-GUI Version Available On Github. I Prefer GUI Its Easy To Use.
(*) Dns Spy
https://github.com/0xd4d/dnSpy/releases
(*) Hxd Hex Editor
https://mh-nexus.de/en/hxd
** You Can Use Any Hex Editor You Want To.
(*) 7zip Or Winrar
https://www.7-zip.org/
(*) Notepad ++
https://notepad-plus-plus.org/downloads
(*) Apk Easy Tool
https://forum.xda-developers.com/an...tool-apk-easy-tool-v1-02-windows-gui-t3333960
### Lets Start Modding ###
Step 1: First Download Any Game Apk.
( Im Using Subway Surfers Which Is The Easiest Game To Mod )
These Are Some Sites To Download Apk
apkpure.com
apkmonk.com
apkmirror.com
Step 2: ( We Need Three Files ) Open The Apk File With 7zip/winrar Goto And Extract
1. /lib/armeabi-v7a/libil2cpp.so
2. /assets/bin/Data/Managed/Metadata/global-metadata.dat
3. /assets/bin/Data/Resources/unity_builtin_extra
Create a new folder copy these three files.( Make a additional copy of libil2cpp.so )
Step 3: Open Il2cpp Dumper
-> In The Executable File Select the libil2cpp.so and In global-metadata.dat Select global-metadata.dat
-> Open the unity_builtin_extra file with Notepad++
You Will See Something like this in first line 2018.2.21f1 that's the unity version. Just Enter 2018.2 ( it's version no ) In The "Input unity version" Leave Everything As It Is.
+++ And Start Dumping.
( It Will Create a Dummy dll folder ( Which contains C# code in dll Files ) , Dump.cs [ You Can Open And Search For Functions Using Notepad ++ But Dns Spy is Recommended ]
Script.py for IDA. )
Note :: The Assembly-CSharp.dll Does not contain the Actual C# source code It Has only the function name and offset.
Step 4: We Need One dll File named Assembly-CSharp.dll
-> Open That File With Dns Spy.
-> Search For Functions Like get_coins, get_keys ( Every Game Has Different function so take time to search for it )
and double click on it.
-> You Will See Something Similar [ offset = "0*10C70B8" ] Just copy the offset ( 10C70B8 ) It Has 7bytes.
-> Open The libil2cpp.so file in HXD Hex editor
-> Then Press ctrl+g And Paste The Offset You Have Copied.
Note :: Dont Add Extra Or Remove Anything 1char = 1byte
Note :: For Modifying If it has 8 bytes replace with 8bytes.If not then it will start at different end or start positions and causes the library to break.
MVN R0, #0xB0000000
BX LR - Arm Assembly Code
Note :: You Can Use - armconvertor.com -
to convert from arm opcodes to hex code
( if you have some knowledge in assembly language ).
-> It will give the Hex code - 0B 02 E0 E3 1E FF 2F E1
{** MVN - Move Not
bx - branch and exchange instruction set
lr - holds the return address
#0*B00000000 -> This is the value for
(coins,money,gems,keys)
if we convert it to decimal the value is 2952790016 this is the amount of coins for our game. ** }
-> Then Paste The Hex Code From Where Your Pointer Is.
If it has 16bytes replace with 16bytes.
-> Then Save It.
Step 5: Copy the modified - libil2cpp.so - to the original apk using winrar/7zip
-> Sign The Apk Using Apk Easy Tool.
( Signing is not required for Devices patched by lucky patcher ).
Note :: If there is arm8 or x86 folder inside lib/ folder in apk, delete these folders it is not required.
That's It Done...
Hope This Helps.
Have fun Modding. ??

app does not have libil2cpp
it has
libadcolony.so
libjs.so
libmain.so
libmono.so
libunity.so
which file to dump here
hlp

Arnold_9981 said:
app does not have libil2cpp
it has
libadcolony.so
libjs.so
libmain.so
libmono.so
libunity.so
which file to dump here
hlp
Click to expand...
Click to collapse
then, go for libunity.so

Many thanks for your tutorial Jsonkat
I'm trying to follow your steps but the offsets have 6 bits and not 7.
Following your step is possible to change anything into the game, right?
Could you please be so nice to explain better how to edit "libil2cpp.so"?

Related

Android's .so files

OK, So I've gotten to breaking down and recompiling those pesky .dex files, but I've run into a new problem.
This is a noob question, I'm sure, but .so files look like unformatted, binary files. How do I open then, edit them, etc? I need to read whats going on in my libs. :-(
Are these X11? I'm running ubuntu 10.04 x64 - so those could be difficult.
ie - unreliable 64 bit support.
$ sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
Click to expand...
Click to collapse
They're native library files, so platform specific machine code I imagine. Look for an ARM disassembler. I'm not familiar with linux internals, so don't know how you find the entry points, but it obviously will be widely documented. Is it impossible to obtain the source code? Assuming most are written in C/C++, reverse engineering from the machine code is not something I'd describe as a pleasant experience. If the source was well written assembly language & not too big, it can be almost enjoyable I guess. But then TBH walking through a randomly selected programmer's source, let alone object, files scares me, in a Tim Burton inspired bad trip kinda way. If you can find the source, it will be an order of magnitude less painful.
Try IDA Decompiler, it should disassemble all so files!
Most of the libs are open source in the aosp. Some are proprietary blobs with the only solution to them being reverse engineering.
.so disassembly
i know how to disassemble it
you will need orion's easy apk disassembler and apk manager
i've tested it once and it worked, but there´s a problem, i dont know how to re-assemble
1- rename the file .so to .apk like "libtestlib.so" to "libtestlib.apk"
2- put in the folder "place-apk-here-for-modding" of apk manager
3- open script.bat (or something like this) from Apk manager
4- use extract apk option
in the beggining my images inside the lib was corrupted so i used step 5 to fix
5- use option optimise images inside to fix images
6- go to project folder and copy classes.dex file to the root of easy apk disassembler's folder
7- open EasyApkDisassembler.EN.bat and use the "DISASSEMBLY a classes.dex with smali" option
8- give a name to the folder (like "libtestlib")
9- it will create a folder (like "out_libtestlib") with the disassembled files
Orion's easy apk disassembler http://forum.xda-developers.com/showthread.php?p=5826401
Apk multi tool (almost the same as apk manager) http://forum.xda-developers.com/showthread.php?t=1310151
I've tried to open libsurfaceflinger.so from my device with 7zip, and it worked too
thats it
@gkillershots
not working
i renamed .so to .apk and used extract option but getted error :
Processing archive: C:\APKMultiTools\place-apk-here-for-modding\libnative-lib.apk
Error: Can not open file as archive
"An Error Occurred, Please Check The Log (option 26)"

[Q] fm radio specs - is it HD digital ready?

Does anyone have information or know the capabilities of the FM radio IC built in the HTC EVO series, do they use the same chip for all models, and are we exploiting all of its capabilities, like HD radio, etc. I see someone already has a hack for the HTC fm player that allows it to tune without an antenna/headphones. Nice, but I want more! if you have any info, i'll take whatever! Thanks!
Great forum on how to reverse engineer the HTC radio.apk
Follow here: http://forum.xda-developers.com/showthread.php?t=725870
TUTORIAL: Reverse engineering HTC FM Radio for noobs (on EVO 4G)
Okay, I'm writing this because I want to help any other newbies trying to learn how to reverse engineer. The technical details involved in this are extremely daunting, so the purpose of this tutorial is to first explain in layman terms exactly what you're trying to accomplish and what to expect. Then we'll go over the details. That way you're not completely blind going into this. I'm fairly new to the scene, so I'm not as knowledgeable as everyone else. If you see any errors in my post, let me know so I can change. I'm going to assume you know a little bit of Java, can find your way around a computer, and know nothing about Android. The techniques used should work with other Android phones. For this tutorial I'm using Windows 7, Cygwin, and my stock (not rooted) EVO 4G mobile phone.
The FM tuner for the Evo is run by a Broadcom chip: BCM4329. This chip is pretty amazing in that it does wireless, bluetooth, and it has an FM receiver/transmitter. We're interested in the FM receiver / transmitter.
Now, all android phones are based on a Linux kernel. Basically they're Linux running computers. The Android operating system is then installed onto the linux system. Every app is then run off of Android.
Android is based on Java but it is not a Java system. It uses a virtual machine called Dalvik. Google did this to get around licensing issues with Sun Microsystems. So they pretty much invented their own machine language (called byte code) for the Java language. This makes things complicated for the reverse engineer because from what I've read, once Java is converted into this machine language or byte code, it can't be converted back.
So let's rehash.
If you were programming strictly in Java, you would see these extensions:
Java source code = .java
Compiled Java source code = Java byte code = .class
Compressed file to package your program = .jar (Java Archive)
But since you're programming in Android and Dalvik, you will see these:
Java source code = .java
Compiled Java source code = Dalvik byte code = .dex
Compressed file to package your program = .apk
(I haven't mentioned this, but HTC further Optimizes their .dex code)
Optimized Dalvik byte code = .odex
I'm writing all of these down because it's very easy to get confused with all of the extensions. (for me at least!). remember how I said once you go dex, you can't go back to java? That's where JesusFreke comes in. He's a senior member of XDA, and he created "baksmali" and "smali", two programs that can convert the Dalvik code back into a human readable format. These files have extensions of .smali
Decompiled Dalvik byte code = .smali
But what can you do with .smali files? That's where this other senior member, brut.all comes in: He developed apktool. apktool takes JesusFreke's work to the next level. This program in conjunction with NetBeans, actually lets you trace through any program using the .smali code taken from JesusFreke's programs!
apktool does this by converting those .smali files into "fake" .java files that can be used by the NetBeans (program that compiles and makes java programs) IDE. I say "fake" because apktool embeds the .smali code into java files as comments. However, once you attach a debugger to NetBeans, you'll see that the debugger will follow line by line every execution statement found in the smali code!
So...... you can take the program you want, plug it into Net Beans using a debugger (using the default ddms command provided by Android SDK), and you can trace everything you do in the program. I have it connected to my phone, so whenever I push a button while running my HTC FMRadio app or unplug my headphones,I see the corresponding response to the HTCFMRadio code I have loaded in NetBeans. I can now see in real-time how the program operates from my own interactions... JAM.
Technical Aspects: How to get from ground zero to tracing HTCFMRadio?
1.) Download Android SDK - Go to google development site and follow instructions: Make sure to download the latest Java JDK. Once that is installed, download NetBeans 6.8. Unfortunately, smali debugging does not work with the lastest versions of NetBeans.
Download the "Java SE" version for minimal space
http://netbeans.org/downloads/6.8/index.html
You can follow the rest of Google walkthrough and download Eclipse and ADT plugin, but it's not pertinent to this. You're going to be using adb and ddms from the android SDK extensively, so make sure the path for </android SDK/tools> is included in the PATH variable in your ENVIRONMENT SETTINGS. To get here, right click My computer, click properties, Advanced Settings, ENVIRONMENT SETTINGS.
2.) Search for 7z and download it. It is an awesome and free compression tool that will be extremely useful. It can be used to "unzip" .jar, .apk, and other compressed formats.
3.) Get the Radio app. You can do this by going to "shipped-roms" website, downloading the latest Supersonic image, and following the directions in the unlockr tutorial for HTC kitchens at the unlockr website... (once you have extracted the files from the image, you can look in the system/app and system/framework directories to get the files listed below) or:
you can pull the following files from your phone:
Using the command prompt type (and with phone plugged in, and with USB debugging enabled on phone):
adb pull /system/app/HtcFMRadio.odex
adb pull /system/app/HtcFMRadio.apk
adb pull /system/framework ./framework
This will put HtcFMRadio.odex and HtcFMRadio.apk in the current directory and create a framework directory with more files. A couple of the files in the framework are needed for the HtcFMRadio app, but for simplicity, we're just going to pull the whole directory.
Now that we have the files, we have to make a few changes to make the app installable and to be viewable by the debugger. To do this we have to decompile the .odex format into a human readable format we can edit. That brings us to:
3.) Download baksmali and smali from Project Hosting on Google Code (google search smali).
Usually an Android application is made up of one file, an apk file. Inside the apk file is an AndroidManifest.xml file, a classes.dex file (compiled Java code for the program), and other folders. The other folders contain either graphics or other .xml files that tell the program how it should look to the user. We don't have to worry about those for now. This is important because APKTOOL only opens programs set up this way. But wait up? We didn't download one .apk file, we downloaded an .apk file and an .odex file! What gives? Well, if you right click the apk file and open it (using 7z), you'll see that it's missing the classes.dex file. The dex file for the app is actually the HtcFMRadio.odex file we downloaded. So, to make this system app more like a nominal app, we have to find a way to convert the HtcFMRadio.odex to a classes.dex file. That's easy with baksmali and smali!
Once you download goto command prompt and type:
java -jar baksmali-<version>.jar -d framework -x HtcFMRadio.odex
(Remember to match baksmali-<version>.jar with the filename of baksmali you downloaded)
If done correctly, you should see a newly created \out directory
This creates an out\com\htc\fm directory with many .smali files.
Now let's reverse the process and put it back as a dex file. Type at command prompt:
java -jar smali-<version>.jar out -o classes.dex
If done correctly you'll see a newly created classes.dex.
now, right click on HtcFMRadio.apk (select 7z and open). Drag classes.dex into the file. Say yes to the prompt. Now you have a normal apk file APKTOOL can read!
4.) Download APKTOOL from Project Hosting on Google Code and the helper apps for your OS. (If you're extracting files for windows OS you should have apktool.bat and aapt.exe). Extract (again using 7z, don't you love this program?) apktool.jar (keep it as a jar file, don't extract the stuff inside of it), apktool.bat, and aapt.exe to the directory you're working on. To make things neat, you can also delete HtcFMRadio.odex (you don't need it anymore) and classes.dex (make sure you put it in the HtcFMRadio.apk file first!)
If this is the first time you're using apktool, then you have to install the htc framework so apktool can baksmali the Radio app. You only have to do this once:
apktool if ./framework/com.htc.resources.apk
Alright, at the command prompt:
apktool d -d HtcFMRadio.apk
This extracts the contents of HtcFMRadio.apk and places them in the HtcFMRadio directory. However, there are two major differences between this content and the content created in step 3. If you go into the smali directory you'll see that instead of .smali files, you'll see .java files. And if you go back and edit the AndroidManifest.xml file, you will also see that it's in text! Android applications convert their xml files to binary format. Now that APKTOOL has converted everything to an IDE friendly format, we can use NetBeans to edit everything. The first thing we're going to do is edit AndroidManifest.xml (using notepad) and add the following:
android:debuggable="true" to the Application tag.
IT should now look like this:
<application android:theme="@android:style/Theme.Black.NoTitleBar" android:label="@string/fm_app_name" android:icon="@drawable/fm_radio" android:taskAffinity="android.task.fmradio" android:description="@string/htc_corp" android:allowTaskReparenting="true" android:debuggable="true">
This permission lets the debugger watch the program while it's running on the phone.
We are going to run into two problems if we try to install this program. One is that Android doesn't let you install more than one copy of a system app. The second issue is that if we change the signature of our system app, then we'll have to change the signatures of our other system apps as well! Ahh.... So, to get around that, we're going to trick Android into thinking we have a completely new program. We're going to do that by renaming the com.htc.fm class to com.htc.modradio class. Next step:
5.) Cygwin (or Linux virtual machine)
The easiest way that I can think of to replace strings in multiple files is by using linux. You can most definitely do it in WIndows, but I dont know how. If you let me know how, I can put it in this tutorial.
(update: you can use Notepad++ to easily find/replace strings in multiple files for Windows. You still, however, want to download Cygwin if you're going to develop with Android-NDK.)
For now, just search for Cygwin (Cygwin is a program that lets you run Linux commands from a command prompt using your Windows directories), and install it. Make sure to have the Perl option selected. You'll need Perl to make the following commands work.
Once you get Cygwin up and running
cd <to your HtcFMRadio directory>
in my case it's
cd /cygdrive/c/Users/Jerry/Desktop/HtcFMRadio
now type the following commands in this order:
this command changes all occurances of htc/fm to htc/modradio in your xml and .java files.
find ./ -type f | xargs perl -pi -e 's/htc\/fm/htc\/modradio/g'
this command changes all occurances of htc.fm to htc.modradio
find ./ -type f | xargs perl -pi -e 's/htc.fm/htc.modradio/g'
If you don't follow this order, your source code will get messed up.
If using cygwin, a bunch of .bak files will be created. Using windows search, find all .bak files in your HtcFMRadio directory, then select them all and delete them (Make sure they are only files with .bak!)
Now just rename the fm directory to modradio. It is located in HtcFMRadio/smali/com/htc
Now go to your windows command prompt and type:
apktool b -d .\HtcFMRadio modradio.apk
Now sign and install modradio.apk on your phone.
adb install modradio.apk
If you have never signed before, then you need to use keytool and jarsigner. These two files are in your JDK directory, so make sure you include your JDK directory in the PATH variable of your ENVIRONMENT SETTINGS. (To get here, right click on My Computer, click Properties, Advanced Settings, Environment Variables. Once you make change, open up a new COMMAND prompt to see changes).
cd to the directory which has modradio.apk
now type:
keytool -genkeypair
Answer all questions, then use the same password for all password prompts.
Next type:
jarsigner -verbose modradio.apk mykey
Type in the password you created in the above step. Your apk should now be signed.
Next install:
adb install modradio.apk
Success!
6.) Testing the app on phone
Go to your phone and you'll now see a new FMRadio icon next to your first. Click on it and watch it open. It should now be able to play music. Keep it open.
7.) Using Netbeans
Go into HtcFMRadio and delete the build directory created by APKTOOL.
Now open up Net Beans and click on File, New Project, Select Java Project with Existing Sources, click on Next
Select HtcFMRadio directory for Project Folder, rename Project Name to whatever you want. Let's type in ModRadio. click on Next
Next to "Source Package Folders" click on "Add Folder" and select the smali directory.
Click Finish. For a quick tutorial by Brut.all, search APKTOOL in youtube and click on: Apktool Demo 2 - Smali improvements
Right click on Libraries. Click on "Add Jar / Folder". You want to add Android.Jar. Since I have Android 2.1 loaded I went to /platforms/android-7 located in my android SDK directory.
Your project is now ready for editting!
8.) Running the Debugger to trace through program.
Next go back to Windows command prompt and type ddms. This runs the Dalvik Debug Monitor. A window should open up. In the left hand side you should see com.htc.modradio. That's our app! To the right you're going to see 2 numbers, you're interested in the one to the right, 4 cells away from com.htc.modradio. This number is a port number, and you're going to use it to communicate with NetBeans. (In my case it is 8603)
Go back to NetBeans and click on Debug, Attach Debugger.
In the host field type: localhost
In the Port field: type in the second number you saw. (8603)
If everything is working you'll see a bug appear next to com.htc.modradio in the Dalvik Debug Monitor. Look at the bottom bar of NetBeans for feedback. If you get errors make sure the numbers match, or try port 8700 and make sure you select com.htc.modradio in the Dalvik Debug Monitor. Port 8700 is the default port used for whatever program you select in Dalvik Debug Monitor.
9.) Setting a breakpoint
I'm making this a seperate step because it is completely arbitrary. When creating a break point be sure to follow this rule:
You must select line with some instruction, you can't set breakpoint on lines starting with ".", ":" or "#".
Rather than looking for a spot to breakpoint, though, I'll tell you where to put one so you can quickly see how the debugger traces through the code. You aren't "REQUIRED" to do the next step, but if you want to trace you have to put a breakpoint somewhere.
In Net Beans click on the Project tab, click on Source Packages, com.htc.modradio, and then doubleclick on BroadcomFMTuner.java
We're going to insert a breakpoint. Scroll down to line 3226 and on your keyboard press: CTRL-SHIFT-F8, select line in dropdown box and hit ok. (To keep it simple, I usually look for "invoke" instructions to set breakpoints at)
Now go to your phone and click on the physical "back" button on your phone. This will clear the radio,(you should still be able to listen to music). Drag your status bar down. You should see a radio icon. Click on it again. The radio backgroudn will appear, but you wont' see any text or anything. Now go back to your netbeans application. You should now see debug options highlighted! Click on Step Over (F8) to step through!​
Great work on other HTC phones, not sure it applies here...
Sounds like HTC uses an all in one bluetooth/fm radio chipset... possibly broadcom, this fella has gotten somewhere!
follow here: http://forum.xda-developers.com/showthread.php?t=497977
APP:17FEB10:RDS FM Radio R&D: Get radio text, Alt Freqency, free TMC etc
Microsoft hasn't defined a tuner API for Windows Mobile platform (yet) and manufactures such as HTC do not publish their API for FM radio.
GFMAPI is an FM Radio interface that designed to be used on different models of Windows Mobile devices.
It makes all FM RDS based applications such as Radio players, Radio Alarm, TMC navigation works on different devices.
What's new?
Download EtenTest and GFMAPI 1.0.
Currently it works with M900 and M800, tested with PowerRadio and hyperGPS.
This is for Eten/Acer devices only.
End-User and application developers (Downloads)
User should try to use the GFMAPI in the application package because it may need to signed with privileged certificate and version of interface may be different.
App Developers can find FMAPI.h and a test application APITest in the GFMAPI for HTC devices 1.6. Source code is included to help your development.
The interface is defined in C language with sample code.
Thank for NetRipper made a .Net CF library for GFMAPI.
Note: the latest FMAPI.h is in GFMAK and the GFMAPI will be updated. They only has minor differences.
Supported Devices
* BRF6350 Chipset:
HTC Diamond, HTC Raphael (not CDMA), HTC Blackstone, HTC Polaris, HTC Topaz, SE Xperia X1
NOTE: if your X1 has new media panel that integrated with FM Radio function, you may have to disable this panel (I don't know how).
Download GFMAPI for HTC devices 1.6
* BCM432x Chipset:
HTC Rhodium, HTC Leo, HTC Mega
Supports radio functions if renaming FMSDKWrapper.dll to FMS_API.dll with the above driver. RDS data cannot be received.
We are working on this device. Related thread: FM Transmitter on HD2
* SI470X Chipset:
HTC Artemis: NOT supported.
Samsung Omnia: Samsung i9x0 Omnia
Samsung Omnia II: GFMAPI.dll for Omnia II and its Cab format This is an excellent work done by phjz.
Eten/Glofiish/Acer M800/M900/V900/X900/X650/S200: see "what's new". Please help me test it.
Device adaption developers
Generic FMAPI Adaption Kit will help you implement the driver for your device. Use APITest in the GFMAPI to test your driver.
Please read readme.txt in the package. Feel free to ask me if you need help.
If you have a device that is not supported by GFMAPI
I currently only have a HTC Raphael so I need your help to get your device supported.
First of all, you should Search in this Thread to check anybody posted it before.
Extract FM radio related files and upload to the forum.
Note: You cannot simply copy files from/to device. You need dump the ROM then extract files from the ROM. Search this forum to find how.
If you have good VC++ and IDA pro with ARM skills, please join us to discover FM Tuner API on those devices then make RDS application working on your device.
* HTC Rhodium/TP2, HTC Leo/HD2, HTC Mega/Touch2:
http://forum.xda-developers.com/show...&postcount=783
http://forum.xda-developers.com/show...&postcount=813
http://forum.xda-developers.com/show...&postcount=794
Rhodium Test
Current status: 6Fg8 identified that raw RDS data is in the Broadcomm BTTray process, not in the FmRadioSDK.DLL. Still not trace it down to function/module level.
* Artemis:
Artemis Test
Far far away from any progress and not many users.
BBCBBA uploaded FM radio related file for Gigabyte GSmart S1200. This device supports RDS by using deviceIoControl directly communicating with the driver. I can see it is possible to make a GFMAPI driver just need a lot of effort.
Applications based on GFMAPI
* FM TMC driver for navigation: Beember's HyperGPS.
* A powerful RDS FM Radio application: 6Fg8's Power Radio
This project focuses on RDS API now. TMC related topic has been moved to the TMC thread because it is too attractive and posts will flood the thread.
Origin research project
Many people ask questions related to FM radio in the forum have been solved by this project:
* Does FM Radio supports RDS text and traffic information?
* Does FM Radio supports more than 20 saved channels and give a friendly alias, such as "BB Radio 4" rather than 920.2MHz ?
* Does FM Radio supports automatically or manually change frequency when signal getting pool during traveling?
* Does FM Radio support RDS-TMC traffic information for navigation system?
The answer is yes. The Bluetooth/FM radio chip BRF6350 on your phone is very powerful but HTC FM radio only provides basic functionality.
Unfortunately HTC doesn't publish FM Service API to us.
So I disassembled FM player by using IDA pro and know usages of FMS api.
After a week sleepless night, I wrote my FM radio tool, xFMRadio, utilizes most functions provided by FMS API, provides RDS and other data for further research.
With help from this thread, we have exposed most secret of FM and RDS system on HTC devices and we can make useful applications now.
This application is written for research so that UI is not nice. It only works on BRF6350 based HTC devices.
Download xFM Radio v0.4
If doesn't have sound on your device, try xFM Radio v0.4B, which removed audio volume initialization.
Brief user guide for xFMRadio
Default settings: Audio Source: 1 (earphone), RDS =1, Verbose =1, AF = 1. ( but I don't know if automatic AF is working. have to verify during long distance traveling.)
Verbose: 0 -no log; 1 - status only; 2 - TMC raw data; 3 - all types of log
Row 1: Input argument. Set Frequency in KHz, AF list: alternative frequencies for the current station.
Row 2: Frequency, station name, Band: World/Japan - use this to listen police station etc
Row 3: Signal Strength, Stereo/Mono, UTC Date/Time (update once per min if supported)
Row 4: -100KHz, Previous Channel, Next Channel, +100Hz, Mute, Mono/Stereo
Row 5: Headset/Speaker, De-emphasis, Stereo blend
Row 6: Radio Text
Row 7: status such as Music/Speech, TP, TA, PTY, TMC etc
Check if the channel support TMC: ROW 7 should display [TMC]. You can see TMC data by setting the top left input box to 2, and click on Menu->Verbose.
The current xFMRadio v0.4 does not display RDS raw data anymore.
You can use Save log menu to save log data.
FMS API version is displayed in the About dialog. Mine is 1.2.
xFMRadio 1.4 Debug...​
it does not support HD radio.
Solved...
Fair enough... I was getting that impression anyhow, especially with the lack of responses. One could only dream that with all the digital aspects of modern comunication (bluetooth, cell, etc), that they would throw in HD digital FM along side it... but as I can see, this only fits in well with every other aspect of modern lackluster industrial corporate innovation. Peace out!

[TOOL][DEV][LINUX ONLY] Fast java src decompiler

Hello !!!
I'm not a real developper but I manage to make a little tool FOR DEVS to accelerate java src decompile
I don't know if it can be useful, but I wanted to share it ...
I don't really create something, all the tools already exist, you know them all :
JD-GUI : Java decompiler
Dex2jar : useful tool to transform .dex in readable .jar to get java src
Why did I made this ?
I searched how to get java src, useful to build apk or even compile sources, but only found manual way.
Ok decompiling one or 2 files is not a big deal ... but when you need to decompile a whole rom ......
What can this tool do ?
getting the java src from an apk and / or a .jar (framework.jar for eg) dex2jar and jd-gui already allow it
can decompile several files (.jar and or .apk)
rename each file to is native name
How to use it ?
This tool only works on Linux
Download attached zip or here
Unzip the file in home folder The folder must be in home and musn't be renamed or it won't work properly
launch the dex.sh (double click in graphic or use ./dex.sh commande in terminal)
Follow the instructions
.classes files need to be associated to JD-GUI use this programm. If you don't know if they already are or not, don't worry let the command do it ...
For more information, I included lines to make .jar files open by JD-GUI.
If you don't need / want these files to be associated after you use this tool type in terminal
PHP:
cd ~/.gnome2/nautilus-scripts
sudo rm open-in-jd-gui.sh
This tool is not perfect ... firstly I made it for me ....but finally wanted to share it ...
if you like it just tell me and use it ... if you don't .... ok just tell me why I would improve it ...
Huge thanks to :
JD-GUI Developpers : http://java.decompiler.free.fr/?q=jdgui
DEX2JAR Developpers : http://code.google.com/p/dex2jar/
tommytomatoe : for his wonderful Android Utility and for the command lines that helped me more than a lot !!! :good:
this is really useful
especially to decompile stock sony jar/apk to port some java classes from their frameworks
@Tof37
Bro, please reupload file, link is down
Thanks
EDIT:
sorry, i am dumb. THX a lot!

[HOW TO]Sign Your Apk For Google Play

Hey Guys,
I found it very hard to find this method on the net. I looked for around 12 hours (over a period of 2 days). But here it is!
This method is very helpful if you need to increase the length of your signature on your apk. As Google Play has a minimum length of validity for signatures.
This tutorial contains some knowledge from other websites and some from my own self. Please feel free to use my hard work below. But try to reference me if you can. Thanks!
First of all,
jarsigner and keytool are .exe files that help create your "signed" application for release to the market to prevent fraud.
1.
Make a folder somewhere called "keytools" and make a folder in that called "key"
2. Now move your apk file to the folder keytools.
(Not inside any other folders)
3. Check
"C:\Program Files\Java\jdk1.7.0_11\bin" for jarsigner and keytools..
... or whatever jdk version you have
If you DONT have it install the following: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
4. open cmd.exe,
5. cd your way to where you have your keytools folder...
I had to do.. cd desktop, and to keytools to get to C:\Users\Matt\Desktop\keytools\
In this directory is you apk file which we will manipulate.
Now add the directory C:\"Program Files"\Java\jdk1.7.0_11\bin\ or something like that to PATH in Environment Variables.
Directions on how to do this can be found here: http://www.computerhope.com/issues/ch000549.htm
type the following now (or something similar to my example)
keytool -genkey -alias xda.keystore -keyalg RSA -validity 20000 -keystore keys/xda.keystore
Then you will have be presented with:
Enter keystore password: (type in a password you will use)
Re-enter new password: (type in same password here)
What is your first and last name? Matt <LAST NAME HERE>
What is the name of your Organization unit? (You dont NEED to type anything)
What is the name of your city or locality? <What it says>
What is the name of your state or providence? <What it says>
what is the two-letter country code for this unit? AU
is CN=Matt C=AU.....etc. correct?
[no]: yes (type yes there)
Enter key password for <xda.keystore>
<RETURN if same as keystore password>: (push enter)
6.
To add the directory of jarsigner to the PATH variable just do the steps from here: http://www.computerhope.com/issues/ch000549.htm but with the path of jarsigner. Which should be something like this: echo "PATH=/cygdrive/c/Program\ Files/Java/jdk1.7.0.11/bin:\${PATH}" >> .bash_profile
Now, type the following now (or something similar to my example) NOTE: This is all in cmd.
jarsigner -verbose -keystore key/donate.keystore -signedjar Donate_signed.apk xda.apk xda.keystore
Enter Passphase for keystore: (your password you made earlier)
DO NOT TYPE --> adding: META-INF/MINFEST.MF ....
.......
.....
...Signing: classes.dex <--DO NOT TYPE
and you're all set! you signed your apk file or whatever you wanted to create!
Congratulations.
NOW STOP BEING FRUSTRATED LIKE I WAS FOR HOURS!
Or, if your using Eclipse just right-click your project and choose Android Tools > Export Signed Application Package.. and follow the export wizard.
@M4ttz
Thanks a lot mate!!!!!!!!!
mytheme_signed.apk is created! Let's go to Google Play
EDIT
Google told me that I need to zipalign my apk file.... If I zipalign Google says that my file isn't signed!!!!

[How to]Apk Studio, decompilation - recompilation

Apk Studio, decompilation - recompilation, How to
I tried several times to work with Apk Studio, but I could not find a guide to understand exactly how it works.
Finally, one day I understood.
That's why I thought that would be a useful guide to understand others, how simple it is.
-------------------------------------------------------------------------------------------
You need:
Java Runtime Environment
Apk Studio, which you can download here
-------------------------------------------------------------------------------------------
Let's start:
Unzip Apk Studio archive
Reserve the archive, do not delete.
Note: Where you unzip the archive on PC, there you will work. If you wont to change the address on your PC for work, then unzip again the archive to new address.
-------------------------------------------------------------------------------------------
- Create a new folder on Desktop named -> Project 1
- Copy in the new folder Project 1 the file framework-res.apk of the ROM you want to mod.
View attachment 3180767
- Open Apk Studio;
- choose File -> Settings in Apk Studio;
- to Binaries you have the path to binaries, do not touch there;
- click the Add button
View attachment 3180773
- to Tag write -> framework
- to Path click and search the path to Project 1\framework-res.apk, then Open and then Install,
- cick Save
View attachment 3180780
View attachment 3180785
Now framework-res.apk it is installed.
You can install more framework from other ROM, but do not forget to change the name Tag, for that you can recognize it.
-------------------------------------------------------------------------------------------
- add file DeskClock.apk in Project 1, the file is attached below;
View attachment 3180787
View attachment DeskClock.zip
- In folder Project 1 create another folder DeskClock JB or whatever name you want to call (not strictly necessary);
View attachment 3180795
- in Apk Studio open File -> Apk;
- to Project name -> add a name "1" (for example or how do you want), it will be create a folder with this name;
Note: spaces between words are not allowed to this name;
- to Apk Path choose the path to the file DeskClock.apk;
View attachment 3180800
- to Project Location choose the path to the folder DeskClock JB - just select the folder, and click Select Folder, do not open the folder DeskClock JB;
- to Framework - selects the framework installed;
View attachment 3180801
- click Create and waits;
- in Statusbar, Apk Studio will tell you when finished.
- it was made decompilation
-------------------------------------------------------------------------------------------
1. You can work on Apk Studio or you can put in bar and open files with Notepad++
2. You can close Apk Studio and reopen leter.
-------------------------------------------------------------------------------------------
1.
- the folder "1" has been created, as we called the project;
- plus a new folder was created with the name "original", that contains files that will serve to recompile;
View attachment 3180804
View attachment 3180808
- In Apk Studio looking to change the value to the path 1/res/layout/desk_clock_time_date.xml
View attachment 3180812
- find TextView android: textSize = "106.0sp" that should be changed to 100.0sp
View attachment 3180813
- I changed the value;
View attachment 3180814
Why I changed DeskClock.apk, you can see here
- choose File -> Save, and close the file;
- under View - click Build, the Statusbar tells you what makes Apk Studio and when it is finished;
- in the folder Project 1\DeskClock JB\1 was createed a new folder named "built"
View attachment 3180816
- the folder "built" contains the file rebuilt.apk
View attachment 3180818
- rename file rebuilt.apk to DeskClock.apk
That's all.
Done!
-------------------------------------------------------------------------------------------
2.
If you have close Apk Studio to use another program for changes, like Notepad ++ when open again Apk Studio you will see that the source is not there.
- we do a test
- close Apk Studio
- delete the new folder "built", only the folder "built" with content;
- open Apk Studio
- choose File -> Open Directory
- Look for path Project 1\DeskClock JB\1\apktool.yml
- select the file apktool.yml and choose Open;
- source reappears in APK Studio;
- select 1, name folder that contains the source;
View attachment 3180819
- click Built, under View;
- Recompiled folder "built" that you deleted, is recreated and contains rebuilt.apk
- rename the .apk file
That's all.
Done!
-------------------------------------------------------------------------------------------------------------------------------
Thanks to:
vaibhavpandeyvpz for Apk Studio
-------------------------------------------------------------------------------------------------------------------------------
Think Different
"Because the people who are crazy enough to think they can change the world, are the ones who do."
Steve Jobs
Hi!
Can you upload APK Studio 10.0.0.2? For a long time only the new version is available which is unusable.

Categories

Resources