[DEV] 99% deodexed GRI40 XXKB1 for Nexus S framwork and app dirs only - Nexus S Android Development

Hi,
My first deodexing, wasn't as simple as expected, I was surprised no one did it before me...
Deodexed: entire framework dir, and most of the app directory (all but 2 apks which refused to deodex...), as long as the framework is deodexed thats ok.
Needed it to patch the framework.jar for bidi language and it works, seems a bit of a lag after each boot before showing the widgets and apps but after that it runs smooth,
can someone explaing that maybe? something to do with unzipping delay maybe?
here is the file, enjoy.
http://www.multiupload.com/FRE906144I
EDIT1: this zip is not flashable nor is it full rom, just deodexed framework and app directories, use adb to push to device, it is working for me with no problems (except the delay at boot), no fc (forced.closed) at all.

flashable zip?

FaithCry said:
flashable zip?
Click to expand...
Click to collapse
its in a .zip so i would assume so. thats the only way to put new ROMs within Nexus S... unless you want to go to Odin which would be .tar

@OP
Was it bluetooth.apk & networklocation.apk? If so, I finally got those deodexed, but I couldn't get the framework.jar to deodex correctly xD
If you need/want them, I can send them to you.
#EDIT
Testing my build with your framework.jar to see if it works right..
#EDIT 2
I am still getting that da** framework fc lol. Let me logcat it..
#Edit 3
I think I might know what my issue is.. Trying a few things now
#Edit 4
I went back to my framework.jar and fixed some files & now it works.. Go figure! lol. I will upload in a bit
#Edit 5
The issues on my build were the messed up NetworkLocation.apk & Bluetooth.apk.. I fixed those, and we now have a fully deodexed 2.3.3
http://forum.xda-developers.com/showthread.php?t=971690

@OP You should change the thread title to [ROM] Stock 2.3.3 DEODEXED. I'll give it a flash in the morning and add it to my Roms, themes, and kernels thread You could even give it a flashy name hehe

The zip I supplied is not flashable as far as I know, I used adb in recovery mode to push the files to the phone,
my deodexed framework.jar works, I use it for a day now and also used a patching script on it to make it bidi enabled, and it still works, I get no fc's at all with it, just a delay on boot before I see all my widgets/icons, after that all ok.
I have a clean working nandroid deodexed backup which also has the bidi patch at:
http://www.multiupload.com/UQ364AHDWT

Related

[Q] manually deodexed and compressed apk's make bootloop

Hello,
I tried manually deodexing my /system/framework and /system/app with xUltimate according to this:
http://forum.androidcentral.com/mot...cks/30539-how-manually-deodex-your-phone.html
Now this has worked fine and I can also boot my phone fine with the deodexed files. But there is also on option in xUltimate to compress/optimize the apk files. If I do that and flash my phone with the compressed files, I get into a bootloop.
The compression seems to save a total of 20MB of space (from 103MB to 84MB) and I hope this could give the device a small speed improvement, but I just can't seem to get it to work.
I also know that there are ROMs out there that have all the files deodexed, but in 90% of cases these files are also modified (custom themes and whatnot) and I don't like that, I would just want a vanilla deodexed ROM so that I can make changes myself if I want to.
I have also searched the forum for 'xultimate' but couldn't find any hit. What are other people using to deodex/optimize/zipalign their ROMs? Are there any better utilities out there?
I'd be very thankful for any tips/tricks.
Thank you!

[Q] Kitchen - problem flashing

i have tried to modify the froyobylaszlo by removing a couple of system/app
and put my own apps
after that i tried to flash it but i had some errors im not familiar with
hope someone could help me out
im attaching the recovery.log files
EDIT: btw im a complete idiot hahaha... im just starting out
marchking said:
i have tried to modify the froyobylaszlo by removing a couple of system/app
and put my own apps
after that i tried to flash it but i had some errors im not familiar with
hope someone could help me out
im attaching the recovery.log files
EDIT: btw im a complete idiot hahaha... im just starting out
Click to expand...
Click to collapse
which apps did u place in system apps?
did u remove the apps fromm data/app as well?
maximo360 said:
which apps did u place in system apps?
did u remove the apps fromm data/app as well?
Click to expand...
Click to collapse
yeah i think only 1 app is there in data/app = gallery i think i removed that thinking that it was the gallery3d
i changed the launcher and a couple of things in the system/app
are there limitations of which apps that i could put there...
btw is it ok if i change the updater-script to update-script?
or i shouldnt have change that... the kitchen was requesting to change it
hey if you are only removing some apk's you dont need kitchen.. just unzip file.. take out what you want than re-zip and than Sign it! should be able to flash no problem
marchking said:
yeah i think only 1 app is there in data/app = gallery i think i removed that thinking that it was the gallery3d
i changed the launcher and a couple of things in the system/app
are there limitations of which apps that i could put there...
btw is it ok if i change the updater-script to update-script?
or i shouldnt have change that... the kitchen was requesting to change it
Click to expand...
Click to collapse
You should just do what LDrifta said if your still having problems.
OH and regarding the update-script, heres your answer straight from the op of the kitchen:
QUESTION: Why do I need to convert the ROM's updater-script to an update-script when using the kitchen?
The kitchen can only perform operations on an update-script. UpdateR-scripts are too complicated to check because there are so many combinations of parameters for every command and for different devices; plus they can be written in different formatting styles. Thus the kitchen converts them to update-script so that there is one universal method to modify any device's configuration. If we didn't convert the updater-script then it would take months of work to overhaul the dozens of scripts (plus doubling my work) to accept updater-scripts, which would really NOT make a difference in the end anyway and would likely slow down the kitchen due to extra checks made in the updater-script. So please do not request this again and again, there is no gain in doing it (I also don't have that much free time ...).
When you build the ROM you have the option of converting it back to an updater-script, or the kitchen will convert it automatically if it decides it's necessary. The conversion back to the original updater-script is near-perfect, as I have already spent months on the implementation to get it right.
QUESTION: I have converted my update-script to an updater-script, but after flashing I still have the original ROM on the device.
That means your updater-script did not have the proper mount points defined for the system (and/or data) partition. Refer to this post for more info.
QUESTION: My device only supports ROMs with the updater-script/update-binary files but not the update-script
If you extract a ROM that contains an updater-script, then the kitchen will ask you if it should convert it to an update-script. You *must* use an update-script while customizing the ROM, as the kitchen is not capable of modifying updater-scripts. When you are ready to build the ROM, though, you will need to convert it back to an updater-script if the device requires it. Use the option in the Advanced menu to convert update-script to updater-script, or else the kitchen will ask you to convert it while building the ROM.
Click to expand...
Click to collapse
ldrifta said:
hey if you are only removing some apk's you dont need kitchen.. just unzip file.. take out what you want than re-zip and than Sign it! should be able to flash no problem
Click to expand...
Click to collapse
ok... so im also adding a few apks at the system/app what you suggested will that still work?
btw
just to clarify, i unzip, then remove the apks
then zip it again
then i put it in the kitchen to get signed?
marchking said:
ok... so im also adding a few apks at the system/app what you suggested will that still work?
btw
just to clarify, i unzip, then remove the apks
then zip it again
then i put it in the kitchen to get signed?
Click to expand...
Click to collapse
ok well depending on what apk's you are putting in.. if they are system required like a sense app.. it wont work on a froyo base rom.. but if its something like superuser or mail or something and is compatible with your rom than put it in system/app folder.. if its something that you want the choice to uninstall later on like a 'task killer' apk or something, place it in data/app folder..
and to sign it you dont need kitchen, you can download an auto-sign.zip file for windows here on xda.. all you do is unzip it directly to C: drive, place zip file in filder rename it to 'update.zip' than run the 'sign.bat' and it will sign the zip file. than you can flash it
marchking said:
ok... so im also adding a few apks at the system/app what you suggested will that still work?
btw
just to clarify, i unzip, then remove the apks
then zip it again
then i put it in the kitchen to get signed?
Click to expand...
Click to collapse
did u do this on Kitchen?
If you want to add Market or non-stock apps (*.apk) to your ROM (which can be uninstalled or updated from your device later) then select the kitchen's menu option that adds "/data/app functionality". Afterwards you can copy these .apk files to the new /data/app folder of your working folder.
EDIT; After your done adding/deleting all the apps, dont forget to use the sign apk command to sign.
maximo360 said:
did u do this on Kitchen?
If you want to add Market or non-stock apps (*.apk) to your ROM (which can be uninstalled or updated from your device later) then select the kitchen's menu option that adds "/data/app functionality". Afterwards you can copy these .apk files to the new /data/app folder of your working folder.
EDIT; After your done adding/deleting all the apps, dont forget to use the sign apk command to sign.
Click to expand...
Click to collapse
would apps from a 2.2 hero would work? they have a mdpi format???
or do you think i will encounter lots of problems? ^_^
marchking said:
would apps from a 2.2 hero would work? they have a mdpi format???
or do you think i will encounter lots of problems? ^_^
Click to expand...
Click to collapse
Which kind of apps? Like sense apps? I guess they might work, try it out, make a nand backup first tho.
Sent from my COS-DS using XDA App
maximo360 said:
Which kind of apps? Like sense apps? I guess they might work, try it out, make a nand backup first tho.
Sent from my COS-DS using XDA App
Click to expand...
Click to collapse
its actually system/app from miui ported to mdpi...
i was able to flash it but its going into a bootloop...
im not sure how to gather logcat... i dont use adb hahaha...
i only use droid explorer... anyways
i checked the logcat console while it was on the bootloop
it appears to me that the apps that i used is not signed...
any suggestions?
marchking said:
its actually system/app from miui ported to mdpi...
i was able to flash it but its going into a bootloop...
im not sure how to gather logcat... i dont use adb hahaha...
i only use droid explorer... anyways
i checked the logcat console while it was on the bootloop
it appears to me that the apps that i used is not signed...
any suggestions?
Click to expand...
Click to collapse
sign them using the sign apk/zip command in the kitchen
maximo360 said:
sign them using the sign apk/zip command in the kitchen
Click to expand...
Click to collapse
i signed them that seemed to be one problem... based on what im seeing on the logcat it seems now its having lots of problems while installing... FYI im trying to make a miui ported from nexus 1 to hero... trying to make it run on froyo by laszlo... i think there is much more complications here not as easy as i think it would be... but i like challenges ^_^ do you have any idea how we could do this maximo? try checking this link http://forum.xda-developers.com/showthread.php?t=858935
marchking said:
i signed them that seemed to be one problem... based on what im seeing on the logcat it seems now its having lots of problems while installing... FYI im trying to make a miui ported from nexus 1 to hero... trying to make it run on froyo by laszlo... i think there is much more complications here not as easy as i think it would be... but i like challenges ^_^ do you have any idea how we could do this maximo? try checking this link http://forum.xda-developers.com/showthread.php?t=858935
Click to expand...
Click to collapse
I read the thread, and he said he dropped some of the phones he was porting miui for, he was still doing the eris/hero. So seems to me he maybe dropped the g1, not sure tho. I guess you're gonna have to wait til either delsa is done porting it to the g1 or drakko.
Sent from my COS-DS using XDA App

[ROM][DEV][WIP] MiUi V5 NOT BOOTING YET!

First things first, the ROM is NOT booting
This is a very early build of MIUI for the Xperia Z. It is based off the latest Cyanogenmod 10.1 RC5 release and the latest MIUI release for the Nexus 4.
All credits go to the FreeXperia team as well as the Cyanogenmod Team, whom without these forums would be very empty. Also credits to the MIUI team on this wonderful ROM
As mentioned, the ROM is not yet booting but hopefully together we can get it to work.
Progress:
I've currently managed to get it booting up to the boot animation but it freezes from there
Download - Here is my current progress so far if anyone wants to build upon it.
Download - DevHost mirror
Issues :
I need to add the lines
Code:
service shelld /system/xbin/shelld
class main
to init.rc within the ramdisk. However, the recompiled boot.img with the applied changes does not boot.
If anyone can apply these changes and get the kernel to boot it would be greatly appreciated!
Resolved, thanks to DooMLoRD
Logcat doesn't seem to work
Other issues are unknown at this moment in time.
To Do List:
[*]Compile a kernel with the ramdisk changes that actually boots
Fixed by DooMLoRD
Fix logcat on boot
Get ROM to actually boot!
Installation Instructions:
NOTE: ROM will not boot, these instructions are just for users who want to help out or debug. Thank you
Place ROM on SD card
Boot into recovery
Flash zip
Wipe data / factory reset
Reboot
Porting Steps:
These steps have mainly been taken from this thread, with the necessary changes needed.
Full credits go to the OP as well as many thanks to those who posted helpful suggestions and hints.
Step 1. Choose which ROM to use as base. I've decided to go with Cyanogenmod. I'm using the latest RC5 release, which I believe to be very
stable. However, you're welcome to use any other ROM as base but I'm unsure as to what the results may be.
Step 2. Choose ROM to port from. I originally used the MIUI ROM for the Nexus 4 but in future other devices, i.e. the Oppo Find 5, may prove to be a more viable option.
Step 3. Extract the contents of your base ROM to a folder. For example, C:\MIUI\CyanogenmodBASE\
You will have the following folders:
system
META-INF
You will also have the file boot.img
Open the folder named system. Now you will see the following folders:
addon.d
app
bin
etc
extras
fonts
framework
lib
media
semc
tts
usr
vendor
xbin
You will also have the file build.prop
Delete the following folders:
app
framework
media
fonts
Step 4.
Extract the contents of the ROM you're porting from to a folder. i.e. C:\MIUI\PortROM\
Copy the folders that you deleted from the previous step to the CyanogenmodBASE folder
Navigate to the lib folder, (located within the system folder of PortROM)
C:\MIUI\PortROM\system\lib
Copy the following files to the lib folder found in the system folder of CyanogenmodBASE
content-type.properties (used for themes)
liblbesec.so (Used for LBA guard, MIUI equivalent of SuperUser)
liblocSDK_2_5OEM.so (Used in location access)
libjni_resource_drm.so (Used for themes and DRM)
libshell.so (Shell service)
libshell_jni.so
libshellservice.so
Now, from the etc folder, (located within system folder)
Copy the file named telocation.idf , to the etc folder inside system in the CyanogenmodBASE folder.
Then, within the etc folder, navigate to the folder named permissions. Copy the following permission over to the etc folder inside the CyanogenmodBASE folder.
com.google.android.media.effects.xml
com.google.widevine.software.drm.xml
com.google.android.maps.xml
In the system folder of PortROM, navigate to xbin and copy and paste the following files to the xbin folder in CyanogenmodBASE.
su
shelld
That's all the folders and files that need to be copied over. You also need to unpack the kernel and apply the ramdisk changes that DoomLoRD did. Then you need to repack the kernel.
Finally add the system and META-INF folders as well as the repacked kernel to a zip file and you have your flashable ROM :good:
This guide is very messy and is quite rushed. I'll clean it up when I get time but I do apologise in advance. If there's anything you're unsure of about these steps just post a reply and I'll try to help out as soon as I can
I cross my fingers and hope that you can solve the problems. Bit great done this far, looking towards MIUI V5!
Sent from my C6603 using Tapatalk 4 Beta
fareeed said:
Issues :
I need to add the lines
Code:
service shelld /system/xbin/shelld
class main
to init.rc within the ramdisk. However, the recompiled boot.img with the applied changes does not boot.
If anyone can apply these changes and get the kernel to boot it would be greatly appreciated!
Logcat doesn't seem to work
Other issues are unknown at this moment in time.
Click to expand...
Click to collapse
post just the kernel.. i will add the changes u need...
also at which stage is the kernel u used getting stuck up?
PS: i tried downloading the ROM from the link you posted but the download never begins... may be u can provide alternate download link?
DooMLoRD said:
post just the kernel.. i will add the changes u need...
also at which stage is the kernel u used getting stuck up?
PS: i tried downloading the ROM from the link you posted but the download never begins... may be u can provide alternate download link?
Click to expand...
Click to collapse
Thanks Doom, adding DevHost Mirror now.
As for the kernel, I unpacked and repacked using championswimmers kernel kitchen. Editing and repacking is fine but when I flash the repacked kernel, I just get a single vibration but nothing on the screen. Have to hard reset and flash previous kernel to get it to boot again.
p.s. The guide I'm following said to leave a blank line at the end init.rc, could this have had any effect?
Here's the boot.img that I'm trying to edit
Update: Roughly 20 mins left for DevHost mirrorr :good:
Ahw, i love MIUI interface, with FullHD of Xperia Z and that colors will be wonderful!!
fareeed said:
Thanks Doom, adding DevHost Mirror now.
As for the kernel, I unpacked and repacked using championswimmers kernel kitchen. Editing and repacking is fine but when I flash the repacked kernel, I just get a single vibration but nothing on the screen. Have to hard reset and flash previous kernel to get it to boot again.
p.s. The guide I'm following said to leave a blank line at the end init.rc, could this have had any effect?
Here's the boot.img that I'm trying to edit
Update: Roughly 20 mins left for DevHost mirrorr :good:
Click to expand...
Click to collapse
here u go:
http://d-h.st/GsY
i have added the info u requested in the end of the init.rc file...
i have checked and the kernel booted on my Xperia Z...
i dont have the ROM so i cant test...
DooMLoRD said:
here u go:
http://d-h.st/GsY
i have added the info u requested in the end of the init.rc file...
i have checked and the kernel booted on my Xperia Z...
i dont have the ROM so i cant test...
Click to expand...
Click to collapse
Thanks Doom, much appreciated , 6 minutes left on the DevHost mirror guys
UPDATE: Here is the devhost mirror
Important
Instructions:
After download, replace boot.img in zip with newer boot.img that DooMLoRD has very kindly provided.
Place zip on SD card
Reboot into recovery
Backup (ROM isn't guaranteed to boot)
Flash zip
Wipe data / factory reset
Reboot
Then report here and see what happens. I'll test ASAP as well. Also if possible, please try and provide a logcat. It should be said that I was unable to get one the first time but hopefully someone can
Update 2: Just realised I was editing init.sh instead of init.rc whoops, well all in the name of learning I suppose. At least I know for next time haha
Is the kernel based on the Cyanogenmod kernel? Which recovery is included?
Michealtbh said:
Is the kernel based on the Cyanogenmod kernel? Which recovery is included?
Click to expand...
Click to collapse
Yep based on latest Cyanogenmod RC 5, I think the recovery is CWM 6.0.32
fareeed said:
Yep based on latest Cyanogenmod RC 5, I think the recovery is CWM 6.0.32
Click to expand...
Click to collapse
Thanks, should use recovery from the FOTAkernel partition then.
I'll test tomorrow if I get time
Tried using the newer kernel from DooMLoRD but still hangs at boot animation.
@DooMLoRD Do you know how I can get a log cat during the boot process so I can find out what's giving me errors? I tried the normal adb command but I'm guessing USB debugging needs to be on for that. I think there's something I need to edit in the build prop to force enable USB debugging on boot? Thanks for your help
I already tried to port miui with cm kernel and also it freeze on boot logo.
Will try to help you as much as i know starting from Monday.
Sent from my C6603 using xda premium
gm007 said:
I already tried to port miui with cm kernel and also it freeze on boot logo.
Will try to help you as much as i know starting from Monday.
Sent from my C6603 using xda premium
Click to expand...
Click to collapse
Thanks, I appreciate any help I can get.
Main obstacle in my way is getting logcat to work on boot. If I can get that working, then I can get a better idea of what the errors are. I found some build prop stuff which might be worth a try
fareeed said:
Thanks, I appreciate any help I can get.
Main obstacle in my way is getting logcat to work on boot. If I can get that working, then I can get a better idea of what the errors are. I found some build prop stuff which might be worth a try
Click to expand...
Click to collapse
From which device are you porting?
I tried nexus4,but the problem is the full hd.
Sent from my C6603 using xda premium
1080P devices?
gm007 said:
From which device are you porting?
I tried nexus4,but the problem is the full hd.
Sent from my C6603 using xda premium
Click to expand...
Click to collapse
I'm not interested in MIUI but you might find this interesting.
http://bbs.gfan.com/forum.php?mod=viewthread&tid=5906702
Just put it in Google translate
I just googled 1080P MIUI or something.
The Oppo Find 5 is a very similar device to the XperiaZ.
snowman77 said:
I'm not interested in MIUI but you might find this interesting.
http://bbs.gfan.com/forum.php?mod=viewthread&tid=5906702
Just put it in Google translate
I just googled 1080P MIUI or something.
The Oppo Find 5 is a very similar device to the XperiaZ.
Click to expand...
Click to collapse
Personally I think you can ask MIUI forum for help
it seems that miui team has devoted all time toward Xiaomi Phone and ignored the existence of Xperia Z
Type this command: adb -d logcat
On your pc Before booting the phone to get logcat.
Sent from my C6603 using xda premium
WOOWWWW!!!!
REally Really great news!! miui interface are wonderful and in full HD OOOOOoooOOO, no words!! i'm waiting for news about boot!!!
Can't wait
Sent from my Kindle Fire HD 7 using xda app-developers app
Yeah Finally a MIUI rom thank you very much for trying to develop it i can't use my smartphones without MIUI, thanx DoomLord too I've always loved your work since the xperia x10, Sorry for spamming..

Need development help: DexOpt mismatch signature

Hi there,
I deodexed stock 4.4.2 for XT1052 successfully and wanted to mod android.policy.jar for the skip music with volume button mod. I did this several times for Jelly Bean ROMs and even for the Nexus 5 running on KitKat 4.4.0
baksmali and smali the classes.dex works fine with no errors but after pushing the file to /system/framework I got stuck in a black screen.
Logcat says DexOpt: mismatch dep signature for android.policy.jar - I googled but didn't find a solution.
Any dev here who can help? Is this a 4.4.2 or even MotoX issue?
shaftenberg said:
Hi there,
I deodexed stock 4.4.2 for XT1052 successfully and wanted to mod android.policy.jar for the skip music with volume button mod. I did this several times for Jelly Bean ROMs and even for the Nexus 5 running on KitKat 4.4.0
baksmali and smali the classes.dex works fine with no errors but after pushing the file to /system/framework I got stuck in a black screen.
Logcat says DexOpt: mismatch dep signature for android.policy.jar - I googled but didn't find a solution.
Any dev here who can help? Is this a 4.4.2 or even MotoX issue?
Click to expand...
Click to collapse
There's a xposed module that works perfectly called xposed additions.
Sent on my Gummy running Lenoto X
flashallthetime said:
There's a xposed module that works perfectly
Click to expand...
Click to collapse
Thanks, I know, but I'd like to mod the files by myself instead of using xposed.
So, the question is still open...
shaftenberg said:
Thanks, I know, but I'd like to mod the files by myself instead of using xposed.
So, the question is still open...
Click to expand...
Click to collapse
I thought you'd say that
Sent on my Gummy running Lenoto X
shaftenberg said:
Hi there,
I deodexed stock 4.4.2 for XT1052 successfully and wanted to mod android.policy.jar for the skip music with volume button mod. I did this several times for Jelly Bean ROMs and even for the Nexus 5 running on KitKat 4.4.0
baksmali and smali the classes.dex works fine with no errors but after pushing the file to /system/framework I got stuck in a black screen.
Logcat says DexOpt: mismatch dep signature for android.policy.jar - I googled but didn't find a solution.
Any dev here who can help? Is this a 4.4.2 or even MotoX issue?
Click to expand...
Click to collapse
you could try signing all apks (including framework-res.apk) with test signature and then zipaligning. be sure to exclude any market updatable apps in the test signing process though as this will cause failure to upgrade those apps through play store. dsixda's kitchen makes batch signing and zipaligning very easy.
Q9Nap said:
you could try signing all apks (including framework-res.apk)
Click to expand...
Click to collapse
This doesn't make any sense since the jar-files aren't signed.
I modded framework-res.apk and SystemUI.apk without any problem but with android.policy.jar the system hangs with the error message above. Even further, the same mod works on the Nexus 5:
http://forum.xda-developers.com/showthread.php?t=2515693
shaftenberg said:
This doesn't make any sense since the jar-files aren't signed.
I modded framework-res.apk and SystemUI.apk without any problem but with android.policy.jar the system hangs with the error message above. Even further, the same mod works on the Nexus 5:
http://forum.xda-developers.com/showthread.php?t=2515693
Click to expand...
Click to collapse
only thing i could think of related to signature. sorry for trying to help; it won't happen again.
I appreciate your help, but can't I say that this was no solution?
shaftenberg said:
I appreciate your help, but can't I say that this was no solution?
Click to expand...
Click to collapse
sorry i woke up on the wrong side of the bed that day apparently, it happens. anyway, i think i've gained some insight on the issue. all apks and jars have classes.dex files on 4.4+, even odexed ones. this means there is no need to manually deodex, just delete all the odex files.
the existing classes.dex files are different from the classes.dex files generated from the odex files. i think they contain a signature of some kind, because when i tried to install a manually deodexed build, i got force closes on many of the moto apps. once i discovered that all apks and jars have classes.dex files, i removed all odex files and everything was fine.
so try editing the existing classes.dex files rather than the ones generated from the odex files.
hope this helps...
btw, i think this dual classes.dex/odex setup has something to do with ART, so removing odex files will probably break ART capability. not sure yet, just throwing that out there.
Whoa, this was very helpful indeed, that explains almost everything...
Just a side note: I didn't know that, so I deodexed my system the standard way and I don't have any FCs.
Modding framework-res.apk worked though, even with creating new arsc and dex.
[edit] sure it works. framework is already deodexed in stock systems.
shaftenberg said:
Whoa, this was very helpful indeed, that explains almost everything...
Just a side note: I didn't know that, so I deodexed my system the standard way and I don't have any FCs.
Modding framework-res.apk worked though, even with creating new arsc and dex.
[edit] sure it works. framework is already deodexed in stock systems.
Click to expand...
Click to collapse
yeah kinda crazy, just realized that late last night and redumped the system.img to be sure i wasn't tripping lol.
DEXOPT Invocation Test
shaftenberg said:
Hi there,
I deodexed stock 4.4.2 for XT1052 successfully and wanted to mod android.policy.jar for the skip music with volume button mod. I did this several times for Jelly Bean ROMs and even for the Nexus 5 running on KitKat 4.4.0
baksmali and smali the classes.dex works fine with no errors but after pushing the file to /system/framework I got stuck in a black screen.
Logcat says DexOpt: mismatch dep signature for android.policy.jar - I googled but didn't find a solution.
Any dev here who can help? Is this a 4.4.2 or even MotoX issue?
Click to expand...
Click to collapse
''ANY CHANGES TO THE DEVICE COULD RESULT IN UNDESIRABLE USE. AND MAY HAVE CONSEQUENCE. AND MAY VOID WARRANTY. USE IS USERS SOLE RESPONSIBILITY''
You may want to try a test of dexopt.
I came across something, (while surfing the web for midget love making) That you may find useful.. this will test and show you the dexopt conditions of your installation.
netmite.com/android/mydroid/build/tools/dexpreopt/dexopt-wrapper/DexOptWrapper.cpp
P.S. just a thought CmeL8r
DEXOPT mismatches...
environmental variables can be overridden with explicit assignment.
Then you can use command line makefile assignment:
$ make showcommands WITH_DEXPREOPT=false
ANY CHANGES TO THE DEVICE COULD VOID WARRANTY.
AND MAY CAUSE UNDESIRABLE CONSEQUENCE OF SYSTEM.
USE IS USERS SOLE DISCRETION, RESPONSIBILITY.
Hope this helps you to call up current files, with variables allocating instructions for device to, Stop Driving You CRAZY....
Just a thought CmeL8r

[Developing Module] framework .jar files are modified but are not loaded by Android

Hi all.
I am developing a magisk module that modifies system/framework/services.jar and some APKs using Magic Mount for Pokemon GO and other games.
I am using the Magisk Module template where I have added relevant files/folders to system.
The APKs I added work successfully.
But the framework .JAR files such as services.jar that I added are not loaded by Android after reboot.
As in, the .JAR files are replaced successfully, but Android exhibits no change, as if it was not using them and using instead the stock .JAR files.
I tried checking via md5sum in the terminal whether the services.jar file had in fact been swapped for the one embedded in my Magisk Module.
It had been successfully changed.
Maybe the OS wasn't loading these .JAR files at all, so as an experiment, I tried swapping services.jar for an empty file.
The phone still booted, and running md5sum and cat confirmed that system/framework/services.jar was an empty file.
My best guess is that framework files are loaded way before system/app APKs, but I found no information regarding my issue via Google.
I hope that someone here could please offer some quick tip or wisdom. Thank you in advance.
P.S.: I checked the open source Magisk modules I could find, and those that used framework .JAR replacements did not implement anything other than the basic template. An example: SonyFramework (My account can't post links yet).
Did you deodex your ROM, or is it a deodexed ROM?
I think you can only patch framework classes on deodexed ROMs.
Fif_ said:
Did you deodex your ROM, or is it a deodexed ROM?
I think you can only patch framework classes on deodexed ROMs.
Click to expand...
Click to collapse
Thank you for the suggestion.
The ROM I'm working on is Stock and Odexed by default.
The .JAR files I am including in the Module are Deodexed mods of the stock ones.
I tried the following as per your reply:
A) deodexing the whole ROM
B) deodexing the whole /system/framework/*
C) deodexing /system/framework/services.jar and removing odex residue (services.odex)
Unfortunately the device won't boot with A or B :S
With C it boots correctly, but the main issue remains.
---
An interesting behavior I found, is that when substituting (stock odex services.jar) with (modded deodexed services.jar),
the /system/framework/oat/arm/services.odex and other odex residue disappears for services.jar.
This along with the md5sum matching the modded version makes me think that maybe /system/framework gets loaded before Magic Mount gets to modify it.
Digging through open source Magisk modules I am yet to find the missing piece.
Thank you for your help Fif_, and to whoever takes the time to read my thread
Have a look at this thread. https://tapatalk.com/shareLink?url=...3793&share_type=t
[MODULE] Smali Patcher 0.8 and compare methods.
The module to replace patched, de-odexed services.jar definitely works.
shoey63 said:
Have a look at this thread (...)
Click to expand...
Click to collapse
Thanks, "Smali Patcher" was indeed a good clue.
What I found in the "Smali Patcher" project:
-> services.odex was being deleted
But I also needed to modify framework.jar
unfortunately there is no "framework.odex" file.
Googling around seems that framework.jar's odex companion is stored in "/system/framework/arm/boot.oat", but boot.oat contains many more unrelated .jars :S
After fully Deodexing the WHOLE ROM, the Magisk Module works.
I wonder if there is a way to remove framework.odex from boot.oat... that would be very useful.
Thank you guys for your help,

Categories

Resources