core.jar $BOOTCLASSPATH$ missing - Sony Xperia XZ Questions & Answers

Hi ...
i am try to de-odex my stock rom... when i try auto deodexer, 2 file get error:
SemcContactsProvider.odex and Dialer.odex (both in "/system/priv-app")
I try to manual deodexing
I check my BOOTCLASSPATH:
Code:
adb shell
cat $BOOTCLASSPATH$
and run this commend:
Code:
java -jar baksmali.jar -x -c :core-oj.jar:core-libart.jar:conscrypt.jar:okhttp.jar:core-junit.jar:bouncycastle.jar:ext.jar:framework.jar:telephony-common.jar:voip-common.jar:ims-common.jar:apache-xml.jar:org.apache.http.legacy.boot.jar:tcmiface.jar:telephony-ext.jar:WfdCommon.jar:oem-services.jar:qcmediaplayer.jar Dialer.odex -o Dialer
get error: Cannot locate boot class path file /system/framework/core.jar
But not such file in Sony Stock ROM !!!
How can i deodex the stock nougat? tnx

Okey I solved
close the topic tnx

Related

[q] how to deox any firmware manually? [q]

How to deox any firmware manually?
download htc kitchen.
put your ROM in the original update folder.
run menu file
select option "Deodex ROM"
If you want deodex a running phone you need a rooted phone and:
1-Download xUltimate
xUltimate v2.3.3
Extract xUltimate to a folder
2-Install JDK
Download JDK
3-Connect phone to PC, open main.exe in xUltimate folder
Select option 5.
Process will take along time.
After that, copy 2 folder done_app and done_frame to SDcard
Remember Disconnect USB on phone after copy
4-go to xUltimate folder press combo key: ctrl + shift + mouse right to jar folder. Select open command window here
A CMD is open copy an paste all commands below
Code:
adb shell
Code:
su
Code:
stop
Code:
mount -o rw,remount -t rfs /dev/block/stl12 /system
Code:
rm /system/app/*.odex
Code:
rm /system/framework/*.odex
Code:
cp /sdcard/done_app/* /system/app/
Code:
cp /sdcard/done_frame/* /system/framework/
if cp command doesnt work you need addition command before use cp
Code:
ln -s /system/xbin/busybox /system/xbin/cp
And start your phone after done
Code:
start
zcop said:
If you want deodex a running phone you need a rooted phone and:
1-Download xUltimate
xUltimate v2.3.3
Extract xUltimate to a folder
2-Install JDK
Download JDK
3-Connect phone to PC, open main.exe in xUltimate folder
Select option 5.
Process will take along time.
After that, copy 2 folder done_app and done_frame to SDcard
Remember Disconnect USB on phone after copy
4-go to xUltimate folder press combo key: ctrl + shift + mouse right to jar folder. Select open command window here
A CMD is open copy an paste all commands below
Code:
adb shell
Code:
su
Code:
stop
Code:
mount -o rw,remount -t rfs /dev/block/stl12 /system
Code:
rm /system/app/*.odex
Code:
rm /system/framework/*.odex
Code:
cp /sdcard/done_app/* /system/app/
Code:
cp /sdcard/done_frame/* /system/framework/
if cp command doesnt work you need addition command before use cp
Code:
ln -s /system/xbin/busybox /system/xbin/cp
And start your phone after done
Code:
start
Click to expand...
Click to collapse
Step 4 isnt working,, I have disconnected the usb still there is no "open command window here" comming,,, i am on windows xp.....

[Q] [DEV HELP] Baksmali won't load certain classes when using -x option

Hi all,
I am attempting to manually deodex a couple files using smali/baksmali. I've been able to successfully deodex all but 5 apps of a stock ROM. When I try to baksmali any of the 5 apps with this command (I got the bootclasspath from my init.rc):
Code:
baksmali -a 10 -c ../deps/core.jar:../deps/bouncycastle.jar:../deps/ext.jar:../deps/framework.jar:../deps/android.policy.jar:../deps/services.jar:../deps/core-junit.jar:../deps/com.motorola.android.frameworks.jar:../deps/com.motorola.android.widget.jar -x filename.odex
I get:
Code:
Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ClassPath$ClassNotFoundException: Could not find interface Landroid/app/ActionBar$OnNavigationListener;
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadAllImplementedInterfaces(ClassPath.java:865)
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:690)
at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:280)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:163)
at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath(ClassPath.java:131)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:111)
at org.jf.baksmali.main.main(main.java:293)
Error while loading class Lcom/google/android/maps/driveabout/app/Q; from file ././Maps.zip
Error while loading ClassPath class Lcom/google/android/maps/driveabout/app/Q;
So it seems I just have to add com.google.android.maps.jar to the bootclasspath and it should work, right?
Code:
baksmali -a 10 -c ../deps/core.jar:../deps/bouncycastle.jar:../deps/ext.jar:../deps/framework.jar:../deps/android.policy.jar:../deps/services.jar:../deps/core-junit.jar:../deps/com.motorola.android.frameworks.jar:../deps/com.motorola.android.widget.jar:../deps/com.google.android.maps.jar -x filename.apk
But I get the same exception above. To make sure I added the right jar, I did "baksmali -a 10 com.google.android.maps.jar" and searched for com.google.android.maps.driveabout.app.Q.smali and found nothing. Eventually I discovered that the Maps application holds that class, so...
Code:
baksmali -a 10 -c ../deps/core.jar:../deps/bouncycastle.jar:../deps/ext.jar:../deps/framework.jar:../deps/android.policy.jar:../deps/services.jar:../deps/core-junit.jar:../deps/com.motorola.android.frameworks.jar:../deps/com.motorola.android.widget.jar:Maps.odex -x filename.odex
(since Maps.odex is one of the files that wouldn't deodex) but I STILL got the same error, except the 2nd-to-last line changed to "Error while loading class Lcom/google/android/maps/driveabout/app/Q; from file Maps.odex."
So now I am very confused. I seem to have done it correctly... according to the error, the dependency com.google.android.maps.driveabout.app.Q was missing, so I found out what .odex file held it and then appended it to the bootclasspath and tried again... but to no avail . My phone is a Motorola Atrix 2 running GB 2.3.6. Here is the odexed build that I am attempting to deodex.
Does anyone know what I could be doing wrong? Or if using the -I (ignore) argument would work?
Thanks for any help you can provide.

[Tutorial] How to Deodex Lollipop System Files - One by One

Hey guys,
I write this tutorial to help guys deodex individual apps and not all apps or not to do batch deodex.
There are few good tools to Batch Deodex Roms but I found one by one tutorial which was not properly framed...
Though the credits goes to the creator of the tool.
I dont take any credits for that tool and here I just write up a tutorail on how to do it.
Step by Step Tutorial:
- First of all download this zip file of the tools required for the process - Link
- Now, extract the files of the zip to any folder.
- Head over to the directory you extracted the tools. It will contain many files such as baksmali, smali, 7zip etc..
- Now press Shift+Right Click and select Open Command Window Here.
- Now just copy the apk and the .odex.art.xz and odex.xz files in that directory.
- Now in command prompt type the following commands.
Note: Replace * With the name of the apk. (If you dont get it see the Post #2 for eg)
Code:
7za x *.odex.xz
Code:
oat2dex.bat *.odex
Code:
oat2dex.bat *.odex temp.dex
Code:
java -jar baksmali-2.0.3.jar -a 21 -x temp.dex -o deodex
Code:
java -jar smali-2.0.3.jar -a 21 deodex -o classes.dex
Code:
7za u -tzip *.apk classes.dex
Now, the apk you initially coppied is now dexoded. Now you can use that apk the way you want
See post #2 for example
Reserved
Example:
Say I want to Deodex SystemUI for any lollipop rom.
Then, I would do the following
Code:
7za x SystemUI.odex.xz
Code:
oat2dex.bat SystemUI.odex
Code:
oat2dex.bat SystemUI.odex temp.dex
Code:
java -jar baksmali-2.0.3.jar -a 21 -x temp.dex -o deodex
Code:
java -jar smali-2.0.3.jar -a 21 deodex -o classes.dex
Code:
7za u -tzip SystemUI.apk classes.dex
The apk is now deodexed successfully. Enjoy!
hey mate, any chance you can upload a few small .apk files and matching .odex.xz files?
ive got a few test to run for a tool i made but cant because i dont have any android 5.0 devices

Lollipop APK deodexing [commandline][scripts]

Lollipop deodexing
Deodexing apk's on lollipop is almost as simple as API < 21 and only invoves two extra steps.
The workflow for the new deodex process is as follows below. The <arch> is the architecture for the apk being deodexed.
oat2dex boot system/framework/<arch>/boot.oat
oat2dex <path/to/app/<arch>/app.odex> system/framework/<arch>/odex
baksmali as normal
smali as normal
The actual behind-the-scenes info
ART changes things with its 'Ahead of Time Compiling'. Android creates a boot.oat on boot containing the classpath jars that apks
link against for functionality. Before these the .odex for the classpath was compatible with baksmali/smali, but due to changes with
ART vs Dalvik this is no longer the case now. The classpath needs to extracted from the boot.oat. The resulting dex/ and odex/ are then
used to create a bootclasspath that can be used to create a baksmali/smali compatible odex, by essentially deoptimizing it. Once
the compatible odex is created, baksmali and smali can be used like normal - even allowing smali edits to exisiting APKs.
A working (manual) example
To get started you will need to pull the framework directory off the device.
Code:
mkdir framework
cd framework
adb pull system/framework
The next step is to pull the app's folder from system/app or system/priv-app.
For this example I will be using SecSettings2.apk from a Samsung Galaxy S6.
Code:
mkdir SecSettings2
cd SecSettings2
adb pull /system/priv-app/SecSettings2
The next step is to determine the architecture of the apk to be deodexed. This is done checking whether the directory that the
apk's folder contents were extracted to contains an arm or arm64 folder (32-bit or 64-bit, respectively).
The SecSettings2.apk is 64-bit as its folder contains an arm64 folder.
Once the architecture is determined, the next step is to extract the classpath from boot.oat. Replace arm64 with arm below
if your app is only 32-bit.
Code:
oat2dex boot framework/arm64/boot.oat
This will extract the classpath from the boot.oat and place the dex and odex into separate directories in framework/<arch>.
Now the classpath can be used to create a compatible odex that baksmali and smali is compatible with. Note that the result odex
will have a .dex extension. This is NOT to be placed into the apk as the app will NOT work.
Code:
oat2dex SecSettings2/arm64/SecSettings2.odex framework/arm64/odex
We now have a odex (labled SecSettings2.dex in SecSettings2/) that is compatible with baksmali and smali.
To baksmali the odex:
Code:
baksmali -a 21 -x SecSettings2.dex -d framework -o smali/SecSettings2
To deodex the smali into a dex:
Code:
smali smali/SecSettings2
The last command outputs a classes.dex that is going to go into the apk.
Code:
zip -gjq SecSettings2 classes.dex
Now we need to remove the arm or arm64 folder from the apk's location on the device.
Code:
adb shell su -c 'mount -o remount,rw /system'
adb shell su -c 'rm -rf system/priv-app/SecSettings2/arm64'
Now we simply need to push the apk to the device, fix permissions, and reboot.
Code:
adb push SecSettings2.apk /data/local/tmp/
adb shell su -c 'dd if=/data/local/tmp/SecSettings2.apk of=/system/priv-app/SecSettings2/SecSettings2.apk'
adb shell su -c 'chmod 644 /system/priv-app/SecSettings2/SecSettings2.apk'
adb reboot (You may need to wipe data depending on the app being deodexed)
That's it. Happy modding
But I have made it easy for ya.....
deodex-app makes it stupid simple to deodex an apk from the device by running one command
Code:
./deodex-app SecSettings2.apk
That's it. The script will determine the apk's location in system, check if it's already deodexed, pull the neccessary
files to perform the deodexing, and will push the apk back to the device and reboot.
/lazydev
Huge credits to @JesusFreke for baksmali and smali, and credit to @svadev for the updated oat2dex

[TOOL][ARM]sdat2img for Android!

sdat2img for Android!
Most of us, have no pc for converting system.new.dat to system.img...
So, this is why i create this tool!​
Code:
[B]Post 1[/B] → Introduction, installation, downloads
[B]Post 2[/B] → Changelog
[B]Post 3[/B] → How to use
sdat2img is a tool, that write on python language, to convert system.new.dat into system.img
This tool was only work on Windows and Linux
So i adapt it into android that can be runned in the Terminal​
Requirements:
Custom Recovery
Around 30-50MB of free system
a Terminal
Installation:
Download the zip
Install via custom recovery
Reboot!
Uninstalling:
I should have the uninstaller, but it is gone somewere in my PC. So maybe later gonna add this.
Download links:
AndroidFileHost
Credits:
@xpirt for sdat2img.py
@7175 for python for android
XDA:DevDB Information
sdat2img for Android, Tool/Utility for the Android General
Contributors
RendyAK
Version Information
Status: Beta
Current Beta Version: 0.2
Created 2016-08-27
Last Updated 2016-08-27
Changelog:
0.2 BETA
Code:
[Fixed] Convert error
Old Changelog
Code:
[B]0.1 BETA[/B]
- Intial Release
How to use!
Well, this is pretty simple, haha.
Just like the @xpirt sdat2img.
Code:
Usage: sdat2img <system_transfer_list> <system_new_file> <system_img>
And wait for the process finish.
WARNING!
I SUGGEST YOU TO "cd" TO THE DIRECTORY OF system.new.dat FIRST!
How to extract the system.img?
Just simply enter this command
Dont forget to "cd" to the directory of system.img
Code:
mkdir system
mount -t ext4 -o loop system.img system
cp -rf system system2
And the output is on system2 folder.
Dont forget to press enter each command you type!
Reserved for some case.
Update!
0.2 BETA
Code:
[Fixed] Convert error
Incredible! Thank you so much for this, can't wait to try it out! :good:
RendyAK said:
Changelog:
0.2 BETA
Click to expand...
Click to collapse
After unpacking the file sdat2img-android-arm-0.2.zip, catalog python3.4.2 occupies 42.6 MB of valuable space on the system partition.
Could you just leave these components python that are needed?
Thanks.
ze7zez said:
After unpacking the file sdat2img-android-arm-0.2.zip, catalog python3.4.2 occupies 42.6 MB of valuable space on the system partition.
Could you just leave these components python that are needed?
Thanks.
Click to expand...
Click to collapse
I didnt know whats the python main file.
But it think for best result its need all of the python files.
On Android! Just what I was searching for. Thank you @RendyAK. This is awesome stuff.
hi @RendyAK
I have a cm12 system.new.dat. What will your program do to this
I floop the pig
Everything had worked fine till i tried to convert a dat file of over 4gb. It says
[email protected]:/ $ su
[email protected]:/ # cd /storage/sdcard1
system.transfer.list system.new.dat system.img <
Traceback (most recent call last):
File "/system/python3.4.2/sdat2img.py", line 99, in <module>
main(sys.argv)
File "/system/python3.4.2/sdat2img.py", line 78, in main
init_output_file_size(output_img, commands)
File "/system/python3.4.2/sdat2img.py", line 73, in init_output_file_size
output_file_obj.flush()
OSError: [Errno 27] File too large
1|[email protected]:/storage/sdcard1 #
adithbalan said:
Everything had worked fine till i tried to convert a dat file of over 4gb. It says
0_a1[email protected]:/ $ su
[email protected]:/ # cd /storage/sdcard1
system.transfer.list system.new.dat system.img <
Traceback (most recent call last):
File "/system/python3.4.2/sdat2img.py", line 99, in <module>
main(sys.argv)
File "/system/python3.4.2/sdat2img.py", line 78, in main
init_output_file_size(output_img, commands)
File "/system/python3.4.2/sdat2img.py", line 73, in init_output_file_size
output_file_obj.flush()
OSError: [Errno 27] File too large
1|[email protected]:/storage/sdcard1 #
Click to expand...
Click to collapse
Please make sure you have 4-8GB free on your sdcard.
PiggyFlooper said:
hi @RendyAK
I have a cm12 system.new.dat. What will your program do to this
I floop the pig
Click to expand...
Click to collapse
It just do the same with the xpirt's sdat2img.
Go to xpirt thread for more info
@RendyAK, can you give me a link to the python for android
When i write this command
mount -t ext4 -o loop system.img system
Then it shows device or resource busy
@RendyAK
Hi is there a way to uninstall this zip ?
Help me !
RendyAK said:
Well, this is pretty simple, haha.
Just like the @xpirt sdat2img.
Code:
Usage: sdat2img <system_transfer_list> <system_new_file> <system_img>
And wait for the process finish.
WARNING!
I SUGGEST YOU TO "cd" TO THE DIRECTORY OF system.new.dat FIRST!
How to extract the system.img?
Just simply enter this command
Dont forget to "cd" to the directory of system.img
Code:
mkdir system
mount -t ext4 -o loop system.img system
cp -rf system system2
And the output is on system2 folder.
Dont forget to press enter each command you type!
Click to expand...
Click to collapse
After I type and enter " Usage: sdat2img...." , terminal display this "
/system/bin/sh: syntax error: '< ' unexpected
"
Lordlight said:
After I type and enter " Usage: sdat2img...." , terminal display this "
/system/bin/sh: syntax error: '< ' unexpected
"
Click to expand...
Click to collapse
Don't type it literally. You supposed to replace stuff in brackets with your filenames. "Usage:" should be there too.
Thanks a lot !
Not_Sure said:
Don't type it literally. You supposed to replace stuff in brackets with your filenames. "Usage:" should be there too.
Click to expand...
Click to collapse
Could you please give me an example ?
It is better.
Binary sdat2img, no python

Categories

Resources