[SDK]View the released Android App crash log - Testing

By adding the crash report SDK in the project, developers can view the released APP crash log, which will help to locate problems and improve the quality of the products.
Features:
Little code implementation, does not affect your APP installation package size.
Choose 4G, 3G, WIFI these broad networks to report log, avoid network congestion.
Rich error information, help developers positioning the problem. For example: StackTrace, Memory, Storage, Thread and Process etc..
Usage:
Get SDK source code, and copy the "src/org/crashlog/crashreport" folder to your Project.
Initialize CrashReport in your subclass extended from Application, refer to "src/org/crashlog/sample/MyApplication.java".
Add below permissions to AndroidManifest.xml.
PHP:
android.permission.INTERNET
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.READ_EXTERNAL_STORAGE
android.permission.ACCESS_NETWORK_STATE
If ProGuard enabled, need to add the following options in the "proguard-project.txt".
PHP:
-renamesourcefileattribute ProGuard
-keepattributes SourceFile,LineNumberTable
Get source:http://github.com/liu-yanjun/crash-log-report
Demo:http://www.crashlog.org

New Features on Crashlog.org:
Bugfixes
Decode obfuscated stack traces automatically.

Related

Adding a APN to a 4.3 Rom

Hello,
I have been trying to add an APN to apns-conf.xml, which I have done.
When I add it to a 4.3 rom zip file it doesn't work..
I hope one of you older and more knowledgeable people will be able to tell me what I'm doing wrong?
Thanks in advance.
"Network Customization Platform
Android stores network configurations as a resource that gets compiled into binary at form at build time. The XML representation of this resource is located at*//android/frameworks/base/core/res/res/xml/apns.xml. This file does not include any configured APNs. You should not modify this file, but instead configure APNs by product at build time (see Build-time APN Configuration below).
Each network configuration is stored in an XML element following this syntax:
Build-time APN configuration
To set the APN configuration for a particular product target, add an*apns-conf.xml*file to the product configuration (do not modify the default platform APNs). This allows multiple products, all with different APNs, to be built off the same code base.
To configure APNs at the product level, add a line to the product configuration file like the example below (vendor//products/myphone-us.mk):
PRODUCT_COPY_FILES := vendor/acme/etc/apns-conf-us.xml:system/etc/apns-conf.xml APN configuration at run time
At runtime, the Android reads APNs from the following file:
system/etc/apns-conf.xml
Android supports the following run-time network configuration methods to choose the appropriate APN from the list of configured APNs:
: At boot time, Android determines the correct network configuration based on the MCC and MNC from the SIM card and automatically configure all network settings.: The platform will also support runtime (user) manual selection of network settings by name, for example, "Company Name US," and will support manual network configuration entry.: The network configurations are standard Android resources. You can upgrade a resource at runtime by installing a new system resource APK package. It will be possible to develop a network configuration service which listens to a specific binary SMS port for binary SMS messages containing the network configurations. NOTE: The implementation will likely be network operator dependent due to inconsistent SMS ports, binary SMS formats, etc."
Not sure what all that means, but guessing it's not something I can add.
Anyone know how to add one?
I'm trying to add :
Name:Giffgaff
APN:giffgaff.com
username:giffgaff
passwordassword
mmsc:http://mmsc.mediamessaging.co.uk:8002
mms proxy:193.113.200.195
mms port:8080
mcc:234
mnc:10
Auth typeAP
Apn type:default,supl,mms

Replacing Facebook Messenger resources

I am trying to change the emojies inside of Facebook Messenger by the ones from EmojiOne.
In the first place, I decompiled through dex2jar the messenger APK and did quite a bit of search but no luck, it is obfuscated and pretty hard to read.
So my second guess was to replace each emoji in the resources. To do that, I used aapt to get one and try it:
HTML:
> aapt dump resources msg.apk | grep 1f60f
resource 0x7f020eca com.facebook.orca:drawable/messenger_emoji_1f60f_32: t=0x03 d=0x000017b3 (s=0x0008 r=0x00)
resource 0x7f020ecb com.facebook.orca:drawable/messenger_emoji_1f60f_64: t=0x03 d=0x000017b2 (s=0x0008 r=0x00)
resource 0x7f0c2086 com.facebook.orca:string/emoji_1f60f: t=0x03 d=0x00003439 (s=0x0008 r=0x00)
I tried this :
HTML:
public void handleInitPackageResources(XC_InitPackageResources.InitPackageResourcesParam resparam) throws Throwable {
if (!resparam.packageName.equals("com.facebook.orca"))
return;
XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, resparam.res);
resparam.res.setReplacement("com.facebook.orca", "drawable", "messenger_emoji_1f60f_32", modRes.fwd(R.drawable.emojione_emoji_1f60f_32));
resparam.res.setReplacement("com.facebook.orca", "drawable", "messenger_emoji_1f60f_64", modRes.fwd(R.drawable.emojione_emoji_1f60f_64));
}
and quite a few other things, but nothing seems to work. My drawable is working since I tried it in an Activity.
Even though I can get this working, would this be a proper solution to my original problem ?
Will I need to replace EACH emoji one by one in the two sizes ?
Thanks in advance
Bump please, no one?
Up for this thanks
This doesn't solve your problem, but I recently decompiled a proguarded apk too, and couldn't find the right resources easily. I found a method too do so though.
First, install xinstaller, then under misc enable debugging apps (allows debugging any app).
Next, connect your phone, make sure adb is on and connected, open Facebook and go to a conversation. Send some emoji too.
In Android studio, go into Android device monitor (ddms), tools -> Android -> Android device monitor. MAKE SURE YOU SET DDMS UP first
Now, find the button in the toolbar that says something like ui automator dump . This will take a layout dump of your displayed screen and give you a screenshot that you can use to click on various layout objects. You will be able to select the emoji and see what resource id is associated with it.
Or at least, it will give you a method to start looking for the resource id's. Combined with a tool like grep for windows, checking out public.xml for the ID's (they're in hex, but if you want to search in code for the ID, convert it to decimal). And you can pretty much find where the code and resource ID's are now !

[Plugin] Wrapper Cordova Plugin for RootBeer Library

A Basic wrapper plugin for scottab's rootbeer. You can detect root on any particular device and use it to restrict logic in cordova App.
Link: https://github.com/karandpr/cordova-plugin-android-rootbeer
Scott's library allows you to detect superuser/su , detect apps like lucky patcher , detect if ROM uses test-keys , detect bustybox binaries and detect r/w mode on /system and /data.
Installation :
Code:
cordova plugin add cordova-plugin-android-rootbeer
Code:
ionic cordova plugin add cordova-plugin-android-rootbeer
Usage.
Code:
window.cdvRootBeer.isRooted(successCallback, errorCallback);
Detailed readme is available on the github profile.
You can report issues here or on github ...
Cheers !

Help to deactivate Bluetooth in NAC, I offer 🍺🍺 BEERS!! 🍺🍺

Hi all.
I need to deactivate the Bluetooth connection in my Citroën C4. It uses a NAC infotainment system (same as Peugeot) but there is no option in the menu to do it.
I founded in previous infotainment there were some cheats codes (like BTSTARTER;0) to do it, but they don't work in NAC. There we have the hidden menu but it only shows information and is not possible to modify anything there.
Spoiler: Explanation
To access the hidden menu in NAC is necessary to press at least 6 seconds the multimedia button and then enter first the list (for example 1130) and then the code 1122.
Here is the list of available codes
1111 Spy log generation
1122 Master mask
1130 Information about amplifier, battery etc
1133 Information about radio / received / freq
1134 Information on satellites and services
1135 TomTom version
1136 Information about WiFi devices
1137 current user status, temp.
1138 Linux, USB, processor utilization
1139 GPU memory load
1140 connection status WiFi, tethering, Bluetooth, rndis, ipadreesen and macadressen and much more.
1141 Connected USB devices
1142 ATB connection
1143 no information without serial connection
1144 tone becomes quieter
1145 Provider status, SMS status
1146 Download status
But under the NAC there is a Linux system, so for sure it is possible to create a script or something similar that would be read from the USB.
In this thread they found the way to create a file that will be read by the system to perform some actions, so I guess it could be a starting point
Spoiler: Explanation
Here is explained how to create a file to be read by the car:
Crunchy_Nuts said:
So the complete content of the usb file is
Code:
#USB Demo file
[general]
id=9cfd0bf57a94a3beb6c990e9c9c78247a8bc78fd3310aa6f58a247f8dabe3b7f
# Activate engineering mode
# engineering_mode=0 (Absent) engineering_mode=1 (Present)
engineering_mode=1
# Create one spy
# create_spy=0 (don't create spy) create_spy=1 (create spy)
create_spy=1
# Option to automatically sync spies with USB. Currently it exports spies to USB and delete the existing ones on NAND
sync_spies_with_usb=1
Create a file and rename it to ID (without any file extension!) and copy the code above into the file.
Copy the file in the root directory of the usb stick and plug it in to the nac.
After you insert it in the nac, it will copy the spylogs to usb.
And maybe you can do other things with the engineering mode.
Click to expand...
Click to collapse
The id comes from rootfs\usr\bin\sem_dm_server, but I would need help to find my own ID if necessary
I don't know if it would be possible to do it based on some of the previous ideas or somebody has another way to do it. I would really appreciate any ideas.
It is something very important for me, so I would be happy to invite some drinks (or a dinner!) if somebody could help me with it.
Cheers!

[Dexplore] Obfuscated code finder | Develop portable Xposed module for obfuscated apps

Library: Dexplore
[Develop Portable Xposed Module] - [For Any Obfuscated Apps]
About: Dexplore is a dex analyzing library for finding obfuscated classes and methods at runtime. There is also a command line tool for static analysis and app de-compilation.
Highlight: Now you can develop portable Xposed module for any obfuscated apps (eg: snapchat, youtube, whatsapp, facebook etc). You don't have to worry about updating the module every time they release new versions, Dexplore will take care of obfuscated classes based on your provided query.
Example: Disable 'msg seen' in messenger
A more detailed explanation and examples can be found at: Github Wiki
The library is available at maven central repository: Dexplore
Java:
repositories {
mavenCentral()
}
dependencies {
implementation 'io.github.neonorbit:dexplore:1.4.5'
}
Command Line tool: Download
Java:
java -jar Dexplore-1.4.5.jar --help
Changelogs:
Release v1.4.5:
- [LIB] Add support for in-memory dex
- [LIB] Add various helper methods
- [LIB] Fix bugs in annotation filter
- [CLI] Update decompiler library
- [CLI] New option: advanced search query
- [LIB+CLI] New condition: set package names
- [LIB+CLI] New condition: set number literals
- [LIB+CLI] New condition: set source filenames
- [LIB+CLI] New condition: set class simple names
Release v1.4.4:
- [LIB] Fix class loading issues
- [LIB] Fix de-serialization failure
- [LIB] Add constructor helper methods
Release v1.4.3:
- [LIB] Fix de-serialization failure
Release v1.4.2:
- [LIB] Minor improvements
- [CLI] Improvement: rewrite from scratch
- [CLI] New command: search [redesigned]
- [CLI] New command: decode [decompiler]
Release v1.4.0:
- [LIB] Make API thread-safe
- [LIB] Add support for batch operation
- [LIB] Add support for parallel execution
- [LIB] Add Filter conditions for annotaion
- [CLI] Fix @file expansion in arguments
Release v1.3.0:
- [LIB] Several enhancements
- [CLI] New option: specify classes (-c)
- [CLI] New option: generate source files (-s)
- [CLI] Improvement: show results in real-time
Release v1.2.0:
- [LIB] Add documentation
- [LIB] Improve search accuracy
- [LIB] Fix several known bugs
- [LIB] Improve performance
Release v1.0.1:
- [LIB] Support multiple preferred dexes
- [CLI] New option: print full details (-d)
Click to expand...
Click to collapse
Source Code: Github
API Overview: Javadoc
Implementation: Github Wiki
If you need any help with implementation, comment here.
For bugs and feature request, create an issue on the github repo.
Used by: ChatHeadEnabler
[reserved]
Xposed Implementation Sample:
- Find all the necessary classes/methods using Dexplore at runtime and save them to Preferences.
- Do your necessary hooking with Xposed.
- Next time simply load them from Preferences.
[Implement dexplore queries to re-fetch automatically whenever version code changes]
Example: Block 'msg seen status' in facebook messenger (check Github Wiki for documentation):
Java:
public class XposedModule implements IXposedHookLoadPackage {
@Override public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) {
if (!lpparam.packageName.equals("com.facebook.orca")) return;
// Create a class filter to find our target class
ClassFilter classFilter = new ClassFilter.Builder()
.setReferenceTypes(ReferenceTypes.builder().addString().build())
.setReferenceFilter(pool ->
pool.contains("Montage thread ")
).build();
// Create a method filter to find our target method from the class
MethodFilter methodFilter = new MethodFilter.Builder()
.setReferenceTypes(ReferenceTypes.builder().addString().build())
.setReferenceFilter(pool ->
pool.contains("has_seen")
).setParamSize(3)
.setModifiers(Modifier.PUBLIC)
.build();
// Load the base apk into Dexplore
Dexplore dexplore = DexFactory.load(lpparam.appInfo.sourceDir);
// Search method
MethodData result = dexplore.findMethod(DexFilter.MATCH_ALL, classFilter, methodFilter);
// Xposed hook: this will block Seen Status from being sent
XposedBridge.hookMethod(result.loadMethod(lpparam.classLoader), XC_MethodReplacement.returnConstant(null)));
}
Hello, After reading github wiki, I could successfully track class name changes dynamically. But when I read back the result from preference and try to deserialize by library method, it throws an IllegalArgumerntException.
ranej700 said:
Hello, After reading github wiki, I could successfully track class name changes dynamically. But when I read back the result from preference and try to deserialize by library method, it throws an IllegalArgumerntException.
Click to expand...
Click to collapse
How exactly did you try to de-serialize it? Could you provide the class name that you are trying to de-serialize?
NeonOrbit said:
How exactly did you try to de-serialize it? Could you provide the class name that you are trying to de-serialize?
Click to expand...
Click to collapse
I followed this Xposed Sample .
Deserialized with:
Java:
ClassData.deserialize(saved_result)
Class name was 3mt I think.
ranej700 said:
Class name was 3mt I think.
Click to expand...
Click to collapse
Got it, I'll release a new version soon.
Update: v1.4.3
Changelog:
- Fix de-serialization failure
NeonOrbit said:
Update: v1.4.3
Changelog:
- Fix de-serialization failure
Click to expand...
Click to collapse
That was quick, thanks.
One more request, I managed to find classes with simple search, but there are some classes that doesn't have anything specific to search with. I read advanced search section, but it's confusing for me. Can I message you personally? I need help with advanced search.
ranej700 said:
Can I message you personally? I need help with advanced search.
Click to expand...
Click to collapse
Sure, anytime.
Update: v1.4.4
Changelog:
- Fix class loading issues
- Fix de-serialization failure
- Add constructor helper methods
This library will be able to load dex files if they are extracted from apk and placed in a separate folder in /data/data/com.example.apk/files?
Blue cat said:
This library will be able to load dex files if they are extracted from apk and placed in a separate folder in /data/data/com.example.apk/files?
Click to expand...
Click to collapse
It supports apk, dex, odex, oat, zip files.
If your app can access the file, so should the library. Doesn't matter where it's placed.
Is it possible to search using string id? 0x7F1201EA or 2131886570
Blue cat said:
Is it possible to search using string id? 0x7F1201EA or 2131886570
Click to expand...
Click to collapse
It would be useless, since resource Ids are not static.
NeonOrbit said:
Example: Block 'msg seen status' in facebook messenger (check Github Wiki for documentation):
Java:
public class XposedModule implements IXposedHookLoadPackage {
@Override public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) {
if (!lpparam.packageName.equals("com.facebook.orca")) return;
// Create a class filter to find our target class
ClassFilter classFilter = new ClassFilter.Builder()
.setReferenceTypes(ReferenceTypes.builder().addString().build())
.setReferenceFilter(pool ->
pool.contains("Montage thread ")
).build();
// Create a method filter to find our target method from the class
MethodFilter methodFilter = new MethodFilter.Builder()
.setReferenceTypes(ReferenceTypes.builder().addString().build())
.setReferenceFilter(pool ->
pool.contains("has_seen")
).setParamSize(3)
.setModifiers(Modifier.PUBLIC)
.build();
// Load the base apk into Dexplore
Dexplore dexplore = DexFactory.load(lpparam.appInfo.sourceDir);
// Search method
MethodData result = dexplore.findMethod(DexFilter.MATCH_ALL, classFilter, methodFilter);
// Xposed hook: this will block Seen Status from being sent
XposedBridge.hookMethod(result.loadMethod(lpparam.classLoader), XC_MethodReplacement.returnConstant(null)));
}
Click to expand...
Click to collapse
I've been looking for a module to do exactly this, do you implement this into anything or is it just a code example currently? I don't know enough about module development to "make it work" myself. I thought about trying to add the code into Weiju2 but I think that is only Lua coding for now. Which of course I don't know
Galaxy-Geek#1 said:
I've been looking for a module to do exactly this, do you implement this into anything or is it just a code example currently? I don't know enough about module development to "make it work" myself. I thought about trying to add the code into Weiju2 but I think that is only Lua coding for now. Which of course I don't know
Click to expand...
Click to collapse
It's just a code example, it works partially. To implement it fully, someone will have to analyze the source code properly.
Absolute legend!
Do you mind adding support for caching ? For example some class that takes Context and app version as an argument and automatically caches the method for you, or it determines whether it should be searched again when the version changes.
I'm back with Messenger Pro development by the way !
Mino260806 said:
Do you mind adding support for caching ? For example some class that takes Context and app version as an argument and automatically caches the method for you, or it determines whether it should be searched again when the version changes.
Click to expand...
Click to collapse
I'm not sure whether it's a good idea for a library to accept Context as argument and perform low level operations like writting to Preferences.
However, it has 'serialize()' and 'deserialize()' methods, you can easily write a helper method to save result + app version in Preferences. Take a look at this Xposed Samples.
Mino260806 said:
I'm back with Messenger Pro development by the way !
Click to expand...
Click to collapse
Good luck :.)

Categories

Resources