[GUIDE] Logcat Error Reading - Android General

Requirements:
*Catlog/Logcat app
How to read errors:
*Force close first the app you want to logcat
*Open Catlog and set the log level to error
Find/Search the AndroidRuntime then the app will show this:
E - FATAL EXCEPTION: main
E - Process: com blah blah <- The app that has error
E - java.lang.RuntimeException: NoSuchFieldError blah blah <- The error of the app
E - at blah blah(java:###) <- the smali or xml where the error occurs
(java:###) <- the .line in the smali where the error is placed
Errors I encounted as of when I started theming::cyclops::cyclops:
NoSuchMethodError - means there is a missing .method in the smali
NoSuchFieldError - means there is a missing .field in the smali
AbstractMethodError - means there is a missing Abstract method in the smali
Content.res - means wrong ID(0x7xxxxxxxx)
Unable to start activity - means the smali address it wrong or the code you declare is wrong
Note:
Not yet finished, Still thinking of the errors I encountered :v
Comment below the errors you encountered that is not stated in the guide
I will include logcat reading in porting system apps
#WeAreTeamPussy
credits :
Material Modding Team
XDA
Underground
MAAaD
MAAaDR
Maximum Team
Android Matrix Team

Related

[Q] Compiling CM7: Error parsing XML: syntax error

Hello,
I am trying to build my own CyanogenMod.
My motivation: As a french freemobile customer, i ld like to have EAP-SIM enabled. I have tried everything i could find on internet but couldn't succeed.
So here I am, trying to build CM7 and i have this:
Code:
packages/apps/Settings/res/values-zh-rTW/arrays.xml.orig:201: error: Resource entry backgroundWidget already has bag item ^index_1.
packages/apps/Settings/res/values-zh-rTW/arrays.xml:205: Originally defined here.
packages/apps/Settings/res/values-el/arrays.xml.rej:1: error: Error parsing XML: syntax error
packages/apps/Settings/res/values-nl/arrays.xml.rej:1: error: Error parsing XML: syntax error
make: *** [out/target/common/obj/APPS/Settings_intermediates/src/R.stamp] Error 1
make: *** Waiting for unfinished jobs....
I am using openjava, so i switched to sun-java thanks to update-alternatives (Debian/linux user) and i had something about using -Xlint:deprecated wich is java related.
I can t figure out how to use this "-Xlint" thing.
Thanks in advance.
I ve my answer.
The patch eap-sim-aka adds "SIM" ans "AKA" auth options in the menu. It has to add those options for all languages available so that you can do the selection in wifi menu.
The problem is that the files packages/apps/Settings/res/value-el/arrays.xml and value-nl/arrays.xml are missing the basic auth option entries: Lines 103 and 130 approximately, PEAP TLS and TTLS are missing whereas other languages are fine.
So the patch will add 2 lines (SIM and AKA) in the middle of nowhere breaking balises, etc...
I didn t figure out how to disable support for other language, so i fixed the nl and el language.
A cyanogenmod Dev should fix this in the git.
EAP SIM support in CM 7.2
Hello,
For the same reason as you, I try to build CM 7.2 with eap-sim support.
Did you manage to get it running ?
After solving a couple of issues, I did build the system but I doesn't work. The phone hangs on the cyanogenmmod logo at startup.
While installing the official cm-7.2.0-hallon.zip works fine...
Here are the steps I followed :
1. I did setup my environment (also forcing java version to 1.6) and download cyanogenmod from source repository for gingerbread.
2. I used 'get_rommanager' in android/system/vendor/cyanogen (instead of the not existing 'get-prebuilts' script which is - I guess - for jellybean...).
3. I did 'source build/envsetup.sh'.
4. Then 'breakfast hallon' (for xperia neo phones...).
5. 'extract-files.sh' in device/semc/hallon did retrieve all proprietary blobs but 3 : tiwlan.ini, tiwlan_firmware.bin and tiwlan_firmware_ap.bin.
The first two were, on the phone, in system/etc instead of system/etc/wifi. I copied them in vendor/semc/hallon/proprietary/etc/wifi.
The third one was actually called softap_firmware.bin... I copied and renamed it as vendor/semc/hallon/proprietary/etc/wifi/softap/tiwlan_firmware_ap.bin.
6. I had a missing lib32xxxx (I can't remenber exactly which one...) and added it with apt-get.
7. I added PRODUCT_PACKAGES += libpcsclite in device/semc/hallon/device_hallon.mk (because of a missing makefile rule when compiling).
8. I then applied the following 4 patches for EAP SIM support :
patch -p1 -i eap-sim-aka_0.4.1.patch
patch -p1 -i smartcard-api.patch
patch -p1 -i uicc.patch
patch -p1 -i pcsc_system_service_v098.patch
9. I removed the resulting "array.xml.orig" and "array.xml.rej" files from all "packages/apps/Settings/res" subdirectories (also because of error messages while compiling).
10. Finally, I modified AndroidProducts.mk in vendor/cyanogen/products to keep only the entry corresponding to my phone :
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/cyanogen_hallon.mk
While compiling, I got lots of warnings (?). At the end, I also had several times the following message :
Sanitizing environment...
Unpacking /home/tourlet/android/system/out/target/product/hallon/cyanogen_hallon-ota-eng.tourlet.zip...
Please install pngcrush, optipng, or pngout
...
Please install pngcrush, optipng, or pngout
Zipping package...
Signing package...
Cleaning up...
Package complete: /home/xxx/android/system/out/target/product/hallon/cm-7-20130305-UNOFFICIAL-hallon.zip
7022f728f18fc1bed559c83c6ec2a309 cm-7-20130305-UNOFFICIAL-hallon.zip
Can somebody please help me through this built ?
I also hope the above details will be of some interest / help for other people trying to get eap sim support on their phone...
Kind regards.

[Tool][Windows]CMX: Port CM11 Themes to X/HKTheme engine in one click

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Thread Index:
Post 1 - Information. PLEASE READ!
Post 2 - Usage and porting info.
Post 3 - Features status. To request features use the tab at the top of the thread.
Post 4 - Ported themes and links.
Click to expand...
Click to collapse
When posting I only ask of 3 simple requirements.
1) Please search or read first. If the question has been asked/answered i will not reply.
2) Post any log extracts and pictures within the "hide" tags to keep the thread clutter free.
3) Do not quote posts in full. If you have to, use the hide tags
What is CMX?
This is a batch script that runs on Windows to port CM11 themes to work with XTheme/HKTheme engine.
Unless porting png's solely, this is designed to take most of the leg work out of porting themes across, so expect some errors when working with the xml's. It is difficult to encompass all the different CM11 themes and quirks they bring with them without downloading and testing each and every theme available.
Ive tried to make the script as unobtrusive and self sufficient as possible with minimal user input in automatic mode.
If you include xml's, some manual labour may be necessary depending on the theme so expect to get your hands dirty. From the themes I've tested with xml's included, 50% have ported straight through and 50% have failed and required some extra attention.
When the script runs through the asset configuring phase (png's/xml's) it will open up a window for each package folder one at a time. One folder must finish processing before the other begins.
Requirements:
Java development kit (jdk) -Link. Installed and in your environment path -Link
CM11 theme to port Take your pick.
The ability to solve apktool log errors. I will help, but I will not spoonfeed!!.
Time Taken:
Setting up 10 minutes (inc. Java install)
Porting (depending on theme)
png's only- 2 minutes.
Difficulty- 2/10. Common error- 9 patch faults.
inc. xml's- 5 minutes.
Difficulty- Dependant on theme. Common error- xml faults.
Basically my script will work as follows when ran and "Automatic" is selected:
Set up required folders.
Automatically detect the apk in "CMThemeIn" folder and set it as the project or prompt the user to insert an apk.
Decompile set theme.
Create all the redirection.xml's required.
Cycle through the
Code:
assetsoverlays*InsertPackageNameHere*resdrawable
folders, and move them to the corresponding folder in the XTheme folder.
Gather xmls from res "drawable" and values" and insert appropriate redirections for that package name.
Ask the user to input a package name in AndroidManifest.xml.
Ask the user to input a theme, app, author and original themer name in strings.xml.
Compile, sign, zipalign and then place the output in "XThemeFinished" folder" ready for installing.
Currently the ports are best served with AOSP but there is an option to add redirections for TouchWiz and Semc (JellyBean 4.2 framework-res.apk).
The script offers you the option to include xml's or not.
Depending on the android version you are using certain xml's may not work or cause conflicts resulting in SOD's, force closes and bootloops.
To recover from a bootloop read the FAQ below.
Currently I wont be porting boot animations and fonts. Although I may add an option to port boot animations etc to a flashable zip.
Finally, the ported themes will NEVER look like the CM counterpart due to the Xposed limitation of themeing "styles.xml". This is not a restriction of the CMX tool, theme .apk or the theme engine
To find out more about the structure and for a better understanding go here and read more:
http://forum.xda-developers.com/showthread.php?t=2334637
Click to expand...
Click to collapse
FAQ
Q). It says Java not found, how do I add the Java path?
A). Check "What is CMX?" for a guide.
Q). The script fails in auto, what's wrong?
A). Read the log.txt and assets,txt in tools and look for any errors, if you cannot understand them then post your log either as a .txt file or as a snippet wrapped in hide tags as shown above.
Q). Whats the difference between CM10 and CM11 themes?
A). All the drawable resources for CM11 themes now reside in "assetsoverlays" and not "resdrawables" as they previously did. Also they no longer use redirection xml's.
Due to this change, XTheme and HKTheme engines do not support CM11 themes...until now.
Q). Why doesn't the theme look like the CM11 counterpart?
A). This is due to styles.xml not being supported and xml restrictions if not included.
Q). I've got a bootloop, how can I fix it?
A). Go and follow the instructions here: http://tinyurl.com/nm4eups
Q). Why does it take longer when porting than it used to?
A). I have muted the opening of seperate windows. Each folder in the CM11Themeassets directory is processed one at a time to prevent errors. This must be done correctly or this will have detrimental effects to the xml's being created and
cause compiling errors.
Q). What are the duties of the folders?
A).
"tools": Contains all the resources needed to help porting.
"CMThemeIn": This is the folder you place your desired CM theme to be ported.
"CMThemeOut": When apktool decompiles the apk from "CMThemeIn", this is the source/reference for porting.
"XTheme": Contains the resources from "CMThemeOut" that have been configured and modified to be X/HKTheme compatible.
"XThemeFinished: This folder is used to store the newly created, X/HKTheme compatible apk.
Q). How do I remove "ON" and "OFF" from the switches?
A). See this post: Link.
Q). I get "invalid resource directory name" in the error log, how do I fix it?
A). Something has broken the script process and caused the creation of unnecessary folders. Goto "XThemeXThemeBase.apkres" and remove the folders detailed in the log.
Example: "XThemeXThemeBase.apkresdrawable-SomeRandomName" delete "SomeRandomName" folder
Click to expand...
Click to collapse
Credits:
@brut.all, @iBotPeaches and @JesusFreke for apktool and smali/baksmali respectively.
@nhnt11 for his xml generator.jar.
@existz and @xIC-MACIx for letting me test on their themes.
@rovo89, @ruqqq and @hdbk1986 for Xposed, Xtheme and HKTheme respectively.
@pierx for TouchWiz 4.2 framework-res redirections.
All the beta-testers.
Click to expand...
Click to collapse
XDA:DevDB Information
CMX, Tool/Utility for all devices (see above for details)
Contributors
dully79
Version Information
Status: Beta
Current Beta Version: v3
Beta Release Date: 2014-09-15
Created 2014-08-29
Last Updated 2014-09-27
Using the script and porting.
Instuctions:
Download the zip.
Downloads can be found in the "Download" tab above.
Or if your browsing via mobile you can use this mirror: CMX beta v3
Unzip the "CMX" folder to a directory containing no spaces or rename the folder.
Any spaces within the containing folder will result in the jar files not being able to run.
BAD= C:/Users/My name/desktop/CMX beta T1000
GOOD= C:/Users/My_name/desktop/CMX_beta_T1000
I've also included Jarsigner.exe in the download. Move it to your "Java\bin" folder if you do not have it installed, otherwise you can delete it.
Start ".RunMe.bat".
Your now presented with 2 main options with regards to porting.
Automatic.
Manual.
I've covered automatic above in "What is CMX" so i'll explain manual.
Basically all the options in the manual menu (other than options 0 and 1) are what the automatic mode cycles through in the same order. This can be useful if you receive any errors and want to carry on from where automatic failed.
The options are self explanatory but I'll give basic details:
Choose apk. Can be used to override the automatic built in selection. Useful if you have a number of apks in the "CMThemeIn" folder, although it is recommended to just keep one apk to prevent possible bugs.
Decompile apk. Decompiles the chosen apk for assets extraction.
Create main redirections.xml. Creates the main redirection xml containing all the package redirections.THIS MUST RUN BEFORE 4+5.
Configure CM11 xml's. Configures and ports CM11 xml's to work with X/HKTheme.
Configure CM11 png's.Create package (app) redirections.xml's and copies all the images to the appropriate folders in XThemeBase.apk inc. theme icon and wallpaper.
Set package and strings.xml name. Asks the user to declare the new package name in AndroidManifest.xml. Ideally use the same as the theme but with an "X" prefixing. e.g "com.mac.theme.gem" becomes "Xcom.mac.theme.gem". Also asks the user to to set the new app, theme, porter and original author name.
Compile. Compiles XThemeBase.apk into the ported theme apk.
Sign and zipalign. Signs and zipaligns the newly compiled apk ready for installation. The key used is market compatible generated by me.
Return to main menu. Returns to the initial screen.
When porting a theme try to name it so it is easy to differentiate from the original.
Example.
Original package and app name:
com.mac.theme.gem
Gem Flat
Ported with png's only:
X.com.mac.theme.gem
X Gem Flat
Ported with xml's:
X.com.mac.theme.gem.inc
X Gem Flat inc
How to port the custom launcher icons?
To use the new custom icon porter option, you will find it under option 2 (Manual) and 9. Two pre-requisites must be met:
You must have decompiled the apk in CMThemeIn prior to choosing this option.
Set the AndroidManifest name or strings. If you have not, or closed the tool since porting the main theme, you can define them using option 2 (Manual) and 6.
If the theme you are porting doesnt support a certain density, you can use this jar tool to create them:
https://github.com/redwarp/9-Patch-Resizer/releases
ONLY CREATE DENSITIES LOWER THAN THE INPUT!.
Porting themes? Then read this:
If you are going to port a theme and share it, you MUST obtain permission from it's creator/author.
Not only is this good community manners it is XDA forum rules.:highfive:
XDA Rules
12. Using the work of others.
If you are developing something that is based on the work of another Member, you MUST first seek their permission and you must give credit to the member whose work you used. If a dispute occurs about who developed / created a piece of work, first try to settle the matter by private message and NOT in open forum. If this fails, you may then contact a Moderator and provide clear evidence that the work was created by you.
Click to expand...
Click to collapse
Feature status and changelog
Feature status:
Auto porting of xml's- xml's need the correct redirection prefix adding to the resource direction inside the file. This can be done manually if required (NOT RECOMMENDED). Complete.
Redirections for OEM ROM's e.g. TouchWiz, Semc etc. Complete.
Porting of app themed icons- This is something i will add in to port to a separate apk. Complete.
Porting of boot animations, fonts, ringtones etc. Possibly to a flashable zip.
styles.xml- Broken inside Xposed.
Changelog:
29/08/14
First beta release.
31/08/14 beta v1.1
Lots of code cleaning and bug fixes inc. message suppressing.
The script now searches for installed framework-res.apk, if none is found it will install the provided apk automatically.
If you input a CMTheme.apk that isnt a true CM11 Theme (doesn't use assets\overlays) you will receive a warning in the console and the decompiled folder will be removed.
"tools" folder contains:
framework-res.apk from CM11 for Mako.
aapt from android sdk build tools 4.4#
My updated version of the XTheme sample.apk A.K.A XThemeBase.apk
15/09/14 beta v3
Added xml porting support.
Updated XThemeBase.apk to include drawable and xml folder.
Lot's of code cleaning and bug fixes.
Removed opening of multiple windows. This results in a longer but cleaner process.
Added Jarsigner.exe to download.
Some other stuff.
23/09/14 beta v4
Removed jarsigner.
Removed framework-res.apk to reduce zip size (added to CMX folder in post #4 if required).
Added framework-res.apk redirections (4.2 Jelly Bean) for Sony and Samsung (thanks @pierx) devices.
Added the ability to port custom icons and wallpaper.If supported by the ported theme to a standalone Apex/Nova theme.apk. Manual option 9.
Fixed bug where invalid resource directories where created in XTheme.
Cleaned and re-wrote some code inc. an extra log for xml and png porting. This can be found in tools\ called assets.txt
24/09/14 beta v4.1
Added custom AndroidManifest and strings.xml to icon.apk porter. Uses values defined for main theme port. Can be redefined by selecting option 2 (Manual) and 6.
Ported CM11 Themes
The themes are split into 2 categories:
Drawables port.
Full port.
The reason for being split is because devices on older android versions (<4.3) might bootloop if using a fully ported 4.4 theme with a conflicting xml.
To cancel any bootloops you can disable Xposed via the flashable zip provided in rovo's Xposed thread, or by using adb shell delete in recovery. See faq above.
Layout:
[Supoorted densities] Name of theme- Created by author
Original thread- Link
Density key:
H=hdpi. X=xhdpi. XX=xxhdpi
Drawables only themes:
[X~XXHDPI] Gem Flat free v2.6.1- Created by @xIC-MACIx
Original thread-http://tinyurl.com/o3ofx5h
---------------------------------------------------------------------------------------
[XXHDPI] Android L-Mint v1.7- Created by @existz
Original thread-http://tinyurl.com/p2ulk26
Full port themes:
[X~XXHDPI] Gem Flat free v2.6.1- Created by @xIC-MACIx
Original thread-http://tinyurl.com/o3ofx5h
---------------------------------------------------------------------------------------
[XXHDPI] Android L-Mint v1.7- Created by @existz
Original thread-http://tinyurl.com/p2ulk26
---------------------------------------------------------------------------------------
[XXHDPI] Flats free v4/6 @rayford85
Original thread-http://tinyurl.com/mxf5jgb BEWARE.There is a bug when opening settings !
PLEASE NOTE: These ports are intended as a preview to what the tool can do. I will not be maintaining them or fixing bugs.
Downloads:
Click the Icon or the link.
Everything CMX related inside.
http://tinyurl.com/lv7cpqx
If you want to post ported themes in this thread then feel free and i will link to your post from here.
Please obtain the authors permission to port and distribute.
Many thanks to the authors of the themes for allowing me to port them.
If you download their theme you should go to the link above and thank them.:good:
First!!!!!!!.. Is it possible to make this an app for android? That would be great
Juansegovia20 said:
First!!!!!!!.. Is it possible to make this an app for android? That would be great
Click to expand...
Click to collapse
You win a prize for premature jubilation.
It probably is possible. If the script was converted from batch to .sh to run on your device, you could package it into an apk... But I won't be doing it. Creating this took me long enough. Plus I don't have the skills.
Ideally there would be an update to X/HKTheme or a new module developed. In the mean time this is the next best option.
dully79 said:
You win a prize for premature jubilation.
It probably is possible. If the script was converted from batch to .sh to run on your device, you could package it into an apk... But I won't be doing it. Creating this took me long enough. Plus I don't have the skills.
Ideally there would be an update to X/HKTheme or a new module developed. In the mean time this is the next best option.
Click to expand...
Click to collapse
I was just asking about the app because some of us don't have the knowledge do do all of this... but thanks, i hope someone here will accept requests to port the themes
Juansegovia20 said:
I was just asking about the app because some of us don't have the knowledge do do all of this... but thanks, i hope sometime here will accept requests to port the themes
Click to expand...
Click to collapse
There is no knowledge required.
All you need is:
Java installed on your Windows system.
A CM11 theme of your choice placed in "CMThemeIn"
Run the script, select option 1 (Automatic) and follow the prompts (4 of).
Install the resulting signed file in "XThemeFinished".
It takes 2 minutes literally. Everything is automated to make it as noob friendly as possible.:good:
If you have Windows give it a try and you'll be surprised how easy it is.
dully79 said:
There is no knowledge required.
All you need is:
Java installed on your Windows system.
A CM11 theme of your choice placed in "CMThemeIn"
Run the script, select option 1 (Automatic) and follow the prompts (4 of).
Install the resulting signed file in "XThemeFinished".
It takes 2 minutes literally. Everything is automated to make it as noob friendly as possible.:good:
If you have Windows give it a try and you'll be surprised how easy it is.
Click to expand...
Click to collapse
Awesome, thanks, i tried yesterday but i was confused, with this new instruction things look way easier,lol, I'll report back if i successfully managed to port a theme, thank you Sir!!
dully79 said:
and follow the prompts (4 of)
Click to expand...
Click to collapse
can u please explain this ?
theme is loaded and recognized, then i select 1 for automatic, then ?
i cannot seem to get anything as a result in the XTheme folder
eurochild said:
can u please explain this ?
theme is loaded and recognized, then i select 1 for automatic, then ?
i cannot seem to get anything as a result in the XTheme folder
Click to expand...
Click to collapse
There are only 4 prompts contained in the automatic option
Set AndroidManifest.xml "package name".
Set strings.xml "app name".
Set strings.xml "theme name".
Set strings.xml "copyright name". This is the original author.
What does the log say?
dully79 said:
There are only 4 prompts contained in the automatic option
Set AndroidManifest.xml "package name".
Set strings.xml "app name".
Set strings.xml "theme name".
Set strings.xml "copyright name". This is the original author.
What does the log say?
Click to expand...
Click to collapse
i dont get these prompts when on automatic mode
log
--------------------------------------------------------------------------
|30-Aug-14 -- 16:33:48.84|
--------------------------------------------------------------------------
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode, sharing)
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
The system cannot find the path specified.
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
eurochild said:
i dont get these prompts when on automatic mode
log
--------------------------------------------------------------------------
|30-Aug-14 -- 16:33:48.84|
--------------------------------------------------------------------------
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode, sharing)
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
The system cannot find the path specified.
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
Click to expand...
Click to collapse
Its not accessing apktool in the "tools" folder.
Try removing the "-" from CMX- and try again.
Can u create an app to Port themes?
READ!
IVIanuu said:
Can u create an app to Port themes?
Click to expand...
Click to collapse
Seriously?!
The thread only has 11 posts and 2 of them are regarding your question.
Please read or search before posting.
http://forum.xda-developers.com/announcement.php?f=1507:
1. Search before posting.
Use one of our search functions before posting or creating a new thread. Whether you have a question or just something new to share, it's very likely that someone has already asked that question or shared that news.
Click to expand...
Click to collapse
Juansegovia20 said:
First!!!!!!!.. Is it possible to make this an app for android? That would be great
Click to expand...
Click to collapse
dully79 said:
You win a prize for premature jubilation.
It probably is possible. If the script was converted from batch to .sh to run on your device, you could package it into an apk... But I won't be doing it. Creating this took me long enough. Plus I don't have the skills.
Ideally there would be an update to X/HKTheme or a new module developed. In the mean time this is the next best option.
Click to expand...
Click to collapse
post #14 @dully79 i'm on my mission right now
Thanks
dully79 said:
Its not accessing apktool in the "tools" folder.
Try removing the "-" from CMX- and try again.
Click to expand...
Click to collapse
same issue here even after removing the "-"
Rename the folder from "CMX- Betav1" to "CMX", the space will be throwing it out.
Everything works great.
Nicely done
Regards
everything goes well up until signing, zipaligning and recompilation.
Log:
Code:
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Panna\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\Panna\AppData\Local\Temp\APKTOOL5025674521367376442.tmp, -0, arsc, -I, C:\Users\Panna\apktool\framework\1.apk, -S, D:\dRO\CMX\XTheme\XThemeBase.apk\res, -M, D:\dRO\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\Panna\AppData\Local\Temp\APKTOOL5025674521367376442.tmp, -0, arsc, -I, C:\Users\Panna\apktool\framework\1.apk, -S, D:\dRO\CMX\XTheme\XThemeBase.apk\res, -M, D:\dRO\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\Panna\AppData\Local\Temp\APKTOOL5025674521367376442.tmp, -0, arsc, -I, C:\Users\Panna\apktool\framework\1.apk, -S, D:\dRO\CMX\XTheme\XThemeBase.apk\res, -M, D:\dRO\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more

[Q] I cant disasemble apk file

Hi everyone,
I was downloaded the darkne reborn game from play store with this site:
apps.evozi apk-downloader website (sorry I cant post the link, because I have no 10 post yet)
There is no problem, but when I wanted recompile with apk manager, I couldn't.
This is the log file (I removed the links because with link I can't make this post)
Code:
--------------------------------------------------------------------------
|2015.01.04. -- 22:03:31,27|
--------------------------------------------------------------------------
--2015-01-04 22:03:31-- (Removed link)
Resolving dl.dropbox.com... 107.21.218.30
Connecting to dl.dropbox.com|107.21.218.30|:80... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: (Removed link) [following]
--2015-01-04 22:03:31-- (Removed link)
Resolving dl.dropboxusercontent.com... 54.204.27.17, 54.225.161.64, 54.225.247.210, ...
Connecting to (Removed link)|54.204.27.17|:80... connected.
HTTP request sent, awaiting response... 302 FOUND
Cookie coming from (Removed link) attempted to set domain to dropbox.com
Cookie coming from (Removed link) attempted to set domain to dropbox.com
Location: (Removed link) [following]
--2015-01-04 22:03:31-- (Removed link)
Connecting to dl.dropboxusercontent.com|54.204.27.17|:443... connected.
ERROR: cannot verify (Removed link) certificate, issued by `/C=US/O=DigiCert Inc/OU=(Removed link)/CN=DigiCert SHA2 High Assurance Server CA':
Unable to locally verify the issuer's authority.
To connect to (Removed link) insecurely, use `--no-check-certificate'.
Unable to establish SSL connection.
A subdirectory or file projects already exists.
A subdirectory or file place-apk-here-for-modding already exists.
A subdirectory or file place-ogg-here already exists.
A subdirectory or file place-apk-here-to-batch-optimize already exists.
A subdirectory or file place-apk-here-for-signing already exists.
A subdirectory or file projects already exists.
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
'adb' is not recognized as an internal or external command,
operable program or batch file.
Could Not Find C:\Users\Peter\Desktop\manager\place-apk-here-for-modding\../place-apk-here-for-modding/signedcom.gamevil.darknessreborn2.android.google.global.normal.apk
Could Not Find C:\Users\Peter\Desktop\manager\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedcom.gamevil.darknessreborn2.android.google.global.normal.apk
I: Baksmaling...
Exception in thread "main" org.jf.dexlib.Util.ExceptionWithContext: 14
at org.jf.dexlib.Util.ExceptionWithContext.withContext(Unknown Source)
at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(Unknown Source)
at org.jf.dexlib.CodeItem.readItem(Unknown Source)
at org.jf.dexlib.Item.readFrom(Unknown Source)
at org.jf.dexlib.OffsettedSection.readItems(Unknown Source)
at org.jf.dexlib.Section.readFrom(Unknown Source)
at org.jf.dexlib.DexFile.<init>(Unknown Source)
at org.jf.dexlib.DexFile.<init>(Unknown Source)
at brut.androlib.src.SmaliDecoder.decode(Unknown Source)
at brut.androlib.src.SmaliDecoder.decode(Unknown Source)
at brut.androlib.Androlib.decodeSourcesSmali(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 14
at org.jf.dexlib.Util.NumberUtils.decodeShort(Unknown Source)
at org.jf.dexlib.Code.Format.Instruction21t.<init>(Unknown Source)
at org.jf.dexlib.Code.Format.Instruction21t.<init>(Unknown Source)
at org.jf.dexlib.Code.Format.Instruction21t$Factory.makeInstruction(Unknown Source)
... 13 more
Error occured at code address 24
code_item @0xe60
The first problem: Why write the log that "could not find"? I place the apk file to the folder, and I selected it with code 22.
Why write the log file, that (Unknown Source). This file is directly from play store.
camaropeti said:
Hi everyone,
I was downloaded the darkne reborn game from play store with this site:
apps.evozi apk-downloader website (sorry I cant post the link, because I have no 10 post yet)
There is no problem, but when I wanted recompile with apk manager, I couldn't.
This is the log file (I removed the links because with link I can't make this post)
Code:
--------------------------------------------------------------------------
|2015.01.04. -- 22:03:31,27|
--------------------------------------------------------------------------
--2015-01-04 22:03:31-- (Removed link)
Resolving dl.dropbox.com... 107.21.218.30
Connecting to dl.dropbox.com|107.21.218.30|:80... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: (Removed link) [following]
--2015-01-04 22:03:31-- (Removed link)
Resolving dl.dropboxusercontent.com... 54.204.27.17, 54.225.161.64, 54.225.247.210, ...
Connecting to (Removed link)|54.204.27.17|:80... connected.
HTTP request sent, awaiting response... 302 FOUND
Cookie coming from (Removed link) attempted to set domain to dropbox.com
Cookie coming from (Removed link) attempted to set domain to dropbox.com
Location: (Removed link) [following]
--2015-01-04 22:03:31-- (Removed link)
Connecting to dl.dropboxusercontent.com|54.204.27.17|:443... connected.
ERROR: cannot verify (Removed link) certificate, issued by `/C=US/O=DigiCert Inc/OU=(Removed link)/CN=DigiCert SHA2 High Assurance Server CA':
Unable to locally verify the issuer's authority.
To connect to (Removed link) insecurely, use `--no-check-certificate'.
Unable to establish SSL connection.
A subdirectory or file projects already exists.
A subdirectory or file place-apk-here-for-modding already exists.
A subdirectory or file place-ogg-here already exists.
A subdirectory or file place-apk-here-to-batch-optimize already exists.
A subdirectory or file place-apk-here-for-signing already exists.
A subdirectory or file projects already exists.
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
'adb' is not recognized as an internal or external command,
operable program or batch file.
Could Not Find C:\Users\Peter\Desktop\manager\place-apk-here-for-modding\../place-apk-here-for-modding/signedcom.gamevil.darknessreborn2.android.google.global.normal.apk
Could Not Find C:\Users\Peter\Desktop\manager\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedcom.gamevil.darknessreborn2.android.google.global.normal.apk
I: Baksmaling...
Exception in thread "main" org.jf.dexlib.Util.ExceptionWithContext: 14
at org.jf.dexlib.Util.ExceptionWithContext.withContext(Unknown Source)
at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(Unknown Source)
at org.jf.dexlib.CodeItem.readItem(Unknown Source)
at org.jf.dexlib.Item.readFrom(Unknown Source)
at org.jf.dexlib.OffsettedSection.readItems(Unknown Source)
at org.jf.dexlib.Section.readFrom(Unknown Source)
at org.jf.dexlib.DexFile.<init>(Unknown Source)
at org.jf.dexlib.DexFile.<init>(Unknown Source)
at brut.androlib.src.SmaliDecoder.decode(Unknown Source)
at brut.androlib.src.SmaliDecoder.decode(Unknown Source)
at brut.androlib.Androlib.decodeSourcesSmali(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 14
at org.jf.dexlib.Util.NumberUtils.decodeShort(Unknown Source)
at org.jf.dexlib.Code.Format.Instruction21t.<init>(Unknown Source)
at org.jf.dexlib.Code.Format.Instruction21t.<init>(Unknown Source)
at org.jf.dexlib.Code.Format.Instruction21t$Factory.makeInstruction(Unknown Source)
... 13 more
Error occured at code address 24
code_item @0xe60
The first problem: Why write the log that "could not find"? I place the apk file to the folder, and I selected it with code 22.
Why write the log file, that (Unknown Source). This file is directly from play store.
Click to expand...
Click to collapse
Well first off you still need to install the stock android frameworks. Second many games are set to be unmodable so they wont recompile and if they do then they break so it cant be used.
zelendel said:
Well first off you still need to install the stock android frameworks. Second many games are set to be unmodable so they wont recompile and if they do then they break so it cant be used.
Click to expand...
Click to collapse
Thanks the answer. Can you give me some instruction how can I install the android framework? I tink not this will be the problem, because I downloaded a modded version of this game, and that file I can make this procedure.
I need the smali files to "easily" modifying the game. Unfortunately this is a very complex game with many files in the assets/bin/data folder.
What do you think if I try search things (like gold, damage, attack, speed) with notepad++, and what files I found I modify with IDA 6.5 pro, and hex editor? It will work?
camaropeti said:
Thanks the answer. Can you give me some instruction how can I install the android framework? I tink not this will be the problem, because I downloaded a modded version of this game, and that file I can make this procedure.
I need the smali files to "easily" modifying the game. Unfortunately this is a very complex game with many files in the assets/bin/data folder.
What do you think if I try search things (like gold, damage, attack, speed) with notepad++, and what files I found I modify with IDA 6.5 pro, and hex editor? It will work?
Click to expand...
Click to collapse
You can grab the base framework files from the Google developer site. As for the mods you want. I couldn't tell you. I don't use games on my device. I have game systems for that.
Also of any of those are things you have to pay for that you want to get around then you will find no more help here.

best way to decompile android

hello
i lost my android project source and all things which i have is my apk file which is obfuscated by proguard
i tried many decompiling options :
1- dex2jar with jd gui : this gives me source with lots of errors(all variable names are paramView which a have to edit my self) and after fixing all errors it results in a blank activity (setcontentview is called correctly but i dont know why it is blank (black))
2- JADX : this is excellent and gives me fewest errors and i run it with no problem
3- procyon : few errors and blank (black)activity after running !
------------
so best choice is JADX but source is obfuscated and because JADX converts dex to java directly i can not use any .jar deobfascating utility to deobfuscate code
so main question is this : how can i deobfuscate java sourcre(mass auto rename all field (var,method,class) to a meanigful name) ? (i can do it by eclipse refactor but it is slow and i have to do it one by one,it is great if i can refactor all automaticly )
any help is appreciated
thanks

Logcat of crashing camera

I've attached a log. Interestingly when searching for "camera" I can see the following errors (amongst other things...):
- can not get key (cameracharcteristics)
- device error
- dsm_camera_user has error
Anyone with the technical knowledge what these camera errors mean!?

Categories

Resources