How to Deodex Lollipop 5.1.1 (10.7.A.0.222)

Search This thread

xkeita

Senior Member
Mar 18, 2012
608
1,633
Santiago
Hey guys! Since deodexing older Z series phones with this latest update has been a pain in the *** for deodexing here's a detailed guide on how to get a correctly deodexed system folder and avoid bootloops...

First part: Getting files from the phone.
To get the files from our phone first we'll have to install ADB Drivers, you can find them here on xda or go google it. Once you have adb drivers installed go to the folder where you installed them. Press Shift while right clicking on the folder and select Open command promp.

Here are the commands to get the folders with apk, note that you'll find them in your C:\ folder.
- To get app folder:
Code:
adb pull /system/app /app/
- To get framework folder:
Code:
adb pull /system/framework /framework/
- To get priv-app folder:
Code:
adb pull /system/priv-app /priv-app/
You will get apk's only on app and priv-app folders, the only folder with odex files (arm folder) will be framework.
------------------------------------------------------------------------------------------------------------
Now let's go for sqsh files to get odex files for app and priv-app folders.
- To get odex.app.sqsh:
Code:
adb pull /system/odex.app.sqsh
- To get odex.app.sqsh:
Code:
adb pull /system/odex.priv-app.sqsh
You'll find these files inside the same folder where adb.exe is

Second part: Unpacking .SQSH files
To resume a little, you may refer to IaguCool's guide
Once you have downloaded SquashFS Tool, move both .sqsh files to the folder.
When you have opened the command promp use these codes to extract files...
> To get odex files for app folder (After extracting rename the squash-root folder to app):
Code:
unsquashfs -no-xattrs odex.app.sqsh
> To get odex files for priv-app folder (After extracting rename the squash-root folder to priv-app):
Code:
unsquashfs -no-xattrs odex.priv-app.sqsh
Third part: Merging files
Create a folder named system and move app, framework and priv-app folders from C:\ to the new folder.
After that grab the folders you extracted with SquashFS Tool and merge them with app and priv-app folder.
After doing this move SemcGenericUxpRes folder to priv-app folder

Fourth part: Deodexing
Download JoelDroid's Lollipop Batch Deodexer and replace the file named oat2dex.jar found on /tool folder with this one: Latest oat2dex
Then open the program and select the /system/ you've created to start the process.
Once it has finished, grab SemcGenericUxpRes folder and move it back to /framework


Now you can either replace folders manually on your phone using TWRP by moving the deodexed system folder to your phone and mounting System partition, erasing app, framework and priv-app folder and then pasting the ones from the deodexed folder. OR make a flasheable zip.

How to manually move folders to /system partition
> Boot to recovery (TWRP MANDATORY)
> Mount system partition
> Go to file manager and go to: /system/ partition
> Manually delete app, framework and priv-app folder (you must first open the folder, then open the menu and delete)
> Then go to where you put the deodexed folders, open app folder, open menu, choose copy and paste on /system/ folder, same process for priv-app and framework.
> Once you're done go to Wipe option, choose advanced wipe and wipe Dalvik-cache and cache.
> Boot and you're good to go! No need to fix permissions


In both cases, after you have either flashed or replaced the folders, go to Wipe option > Advanced Wipe and clean Dalvik-cache and cache to avoid problems.
 
Last edited:

xkeita

Senior Member
Mar 18, 2012
608
1,633
Santiago
Why not just copy App, priv-app and framework folder from system and deodex them?

Cause you get bootloop if you just replace odex files present in app and priv-app (Especially after replacing the deodexed framework folder in system).
If you extract via adb you'll get app and priv-app folders clean, without odex files. That way you can make a cleaner deodex since you don't replace .odex files, just merge both folders in one, app with .apks and app with .odex

I wish it was as easy as in 5.0.2 but no, on 5.1.1 is way more complicated to have a properly deodexed system.
 
Last edited:
  • Like
Reactions: MarianaLovegood

Black_Eyes

Senior Member
Apr 11, 2013
1,362
940
Lahore
BTW i've tried by deodexing manually by copying folder and then boot into recovery delete app, priv-app and framework folder via TWRP file manager and then flashed the deodexed zip and it worked :p
 
  • Like
Reactions: TrustedBoys

zyclops1

Senior Member
Jan 25, 2012
754
136
Paris
C:\adb>adb pull /system/odex.app.sqsh
remote object '/system/odex.app.sqsh' does not exist

C:\adb>adb pull /system/odex.priv-app.sqsh
remote object '/system/odex.priv-app.sqsh' does not exist

help :)
 

gundam_warlock

Senior Member
Apr 6, 2015
113
14
Last edited:

sshivampp

Senior Member
Sep 18, 2012
223
165
New Delhi
Everything was fine except google play services, it crashes every time i want add account

Same here bro
I thought I had accidently deleted some necessary google services files while removing bloatwares so I tried flashing latest Gapps for 5.1.1 over stock sony FW but no effect. Can't figure out why

I'm having Xperia ZR (5.1.1 Stock)
 

xkeita

Senior Member
Mar 18, 2012
608
1,633
Santiago
C:\adb>adb pull /system/odex.app.sqsh
remote object '/system/odex.app.sqsh' does not exist

C:\adb>adb pull /system/odex.priv-app.sqsh
remote object '/system/odex.priv-app.sqsh' does not exist

help :)

could you provide the zip? or the zip from this thread http://forum.xda-developers.com/sprint-galaxy-s5/general/how-to-deodex-lollipop-rom-t3065596 can be used?



same problem..

If you have an Xperia Z1 it might differ from this a little bit, I think those don't have odex.xx.sqsh on their filesystem, check if you have odex files in app and priv-app. ;)
Phones that I know that so far work with this sqsh filesystem are Xperia Z, ZL, ZR, Xperia Tablet Z
 
  • Like
Reactions: zyclops1

xkeita

Senior Member
Mar 18, 2012
608
1,633
Santiago
Everything was fine except google play services, it crashes every time i want add account

Same here bro
I thought I had accidently deleted some necessary google services files while removing bloatwares so I tried flashing latest Gapps for 5.1.1 over stock sony FW but no effect. Can't figure out why

I'm having Xperia ZR (5.1.1 Stock)

Did you clear dalvik-cache and cache? If it still gives you googleplayservices fc, manually download the GooglePlayServices from APKMirror and install as normal app
 

gundam_warlock

Senior Member
Apr 6, 2015
113
14
If you have an Xperia Z1 it might differ from this a little bit, I think those don't have odex.xx.sqsh on their filesystem, check if you have odex files in app and priv-app. ;)
Phones that I know that so far work with this sqsh filesystem are Xperia Z, ZL, ZR, Xperia Tablet Z

I tried to deodex directly without pull sqsh, everything except nfcnci failed, when i tried to copy to system and reboot, nfc is fc. When check nfcnci folder only apk and lib folder exsist, but nothing exsist inside lib folder.
Where do i wrong?
 

sshivampp

Senior Member
Sep 18, 2012
223
165
New Delhi
Did you clear dalvik-cache and cache? If it still gives you googleplayservices fc, manually download the GooglePlayServices from APKMirror and install as normal app

Dalvik-cache & Cache ! I tried wiping the whole data, it didn't work.
App install window goes on forever and app not installing.

Got it working by installing latest play services before deodexing. (as the updated play services app in the data partition runs, no matter if system is having broken play services package)

Fixed it for now but still wondering what causes the issue :confused:
 

ogunja

Senior Member
After download the rom by XperiaFirm I must continue this step?

Second part: Unpacking .SQSH files

To resume a little, you may refer to IaguCool's guide
Once you have downloaded SquashFS Tool, move both .sqsh files to the folder.
When you have opened the command promp use these codes to extract files...
> To get odex files for app folder (After extracting rename the squash-root folder to app):
Code:
unsquashfs -no-xattrs odex.app.sqsh
> To get odex files for priv-app folder (After extracting rename the squash-root folder to priv-app):
Code:
unsquashfs -no-xattrs odex.priv-app.sqsh

Third part: Merging files

Create a folder named system and move app, framework and priv-app folders from C:\ to the new folder.
After that grab the folders you extracted with SquashFS Tool and merge them with app and priv-app folder.
After doing this move SemcGenericUxpRes folder to priv-app folder

Fourth part: Deodexing

Download JoelDroid's Lollipop Batch Deodexer and replace the file named oat2dex.jar found on /tool folder with this one: Latest oat2dex
Then open the program and select the /system/ you've created to start the process.
Once it has finished, grab SemcGenericUxpRes folder and move it back to /framework
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    Hey guys! Since deodexing older Z series phones with this latest update has been a pain in the *** for deodexing here's a detailed guide on how to get a correctly deodexed system folder and avoid bootloops...

    First part: Getting files from the phone.
    To get the files from our phone first we'll have to install ADB Drivers, you can find them here on xda or go google it. Once you have adb drivers installed go to the folder where you installed them. Press Shift while right clicking on the folder and select Open command promp.

    Here are the commands to get the folders with apk, note that you'll find them in your C:\ folder.
    - To get app folder:
    Code:
    adb pull /system/app /app/
    - To get framework folder:
    Code:
    adb pull /system/framework /framework/
    - To get priv-app folder:
    Code:
    adb pull /system/priv-app /priv-app/
    You will get apk's only on app and priv-app folders, the only folder with odex files (arm folder) will be framework.
    ------------------------------------------------------------------------------------------------------------
    Now let's go for sqsh files to get odex files for app and priv-app folders.
    - To get odex.app.sqsh:
    Code:
    adb pull /system/odex.app.sqsh
    - To get odex.app.sqsh:
    Code:
    adb pull /system/odex.priv-app.sqsh
    You'll find these files inside the same folder where adb.exe is

    Second part: Unpacking .SQSH files
    To resume a little, you may refer to IaguCool's guide
    Once you have downloaded SquashFS Tool, move both .sqsh files to the folder.
    When you have opened the command promp use these codes to extract files...
    > To get odex files for app folder (After extracting rename the squash-root folder to app):
    Code:
    unsquashfs -no-xattrs odex.app.sqsh
    > To get odex files for priv-app folder (After extracting rename the squash-root folder to priv-app):
    Code:
    unsquashfs -no-xattrs odex.priv-app.sqsh
    Third part: Merging files
    Create a folder named system and move app, framework and priv-app folders from C:\ to the new folder.
    After that grab the folders you extracted with SquashFS Tool and merge them with app and priv-app folder.
    After doing this move SemcGenericUxpRes folder to priv-app folder

    Fourth part: Deodexing
    Download JoelDroid's Lollipop Batch Deodexer and replace the file named oat2dex.jar found on /tool folder with this one: Latest oat2dex
    Then open the program and select the /system/ you've created to start the process.
    Once it has finished, grab SemcGenericUxpRes folder and move it back to /framework


    Now you can either replace folders manually on your phone using TWRP by moving the deodexed system folder to your phone and mounting System partition, erasing app, framework and priv-app folder and then pasting the ones from the deodexed folder. OR make a flasheable zip.

    How to manually move folders to /system partition
    > Boot to recovery (TWRP MANDATORY)
    > Mount system partition
    > Go to file manager and go to: /system/ partition
    > Manually delete app, framework and priv-app folder (you must first open the folder, then open the menu and delete)
    > Then go to where you put the deodexed folders, open app folder, open menu, choose copy and paste on /system/ folder, same process for priv-app and framework.
    > Once you're done go to Wipe option, choose advanced wipe and wipe Dalvik-cache and cache.
    > Boot and you're good to go! No need to fix permissions


    In both cases, after you have either flashed or replaced the folders, go to Wipe option > Advanced Wipe and clean Dalvik-cache and cache to avoid problems.
    2
    Does it have issue with OpenGL and Play Store?

    Sent from my D6503 using Tapatalk

    No, that's why you need to download latest oat2dex version ;) See deodexing part
    1
    Why not just copy App, priv-app and framework folder from system and deodex them?
    1
    Why not just copy App, priv-app and framework folder from system and deodex them?

    Cause you get bootloop if you just replace odex files present in app and priv-app (Especially after replacing the deodexed framework folder in system).
    If you extract via adb you'll get app and priv-app folders clean, without odex files. That way you can make a cleaner deodex since you don't replace .odex files, just merge both folders in one, app with .apks and app with .odex

    I wish it was as easy as in 5.0.2 but no, on 5.1.1 is way more complicated to have a properly deodexed system.
    1
    BTW i've tried by deodexing manually by copying folder and then boot into recovery delete app, priv-app and framework folder via TWRP file manager and then flashed the deodexed zip and it worked :p
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone