[TOOL][fugu][Linux] Auto De-Opt/Deodex | System.img Editing | Nexus Player - Nexus Player Android Development

Here are some tools I put together to deopt/deodex a system.img
It's been partially tested and works for me, but needs some more testing
I'll continue working on it to fine tune/clean scripts.
Linux Only For Now!
What does this do exactly?
This de-odexes the app, priv-app and framework folders, adds .dex files and lib folders to the appropriate apks/jars and folders, removes odex files and organizes everything into structured folders ready to flash. This does all the work so you don't have to.
Why would I want to do this?
Doing this helps with customization of apks. You can theme the launcher or even replace the lockscreen photos with your own if you choose
This also shrinks the stock system.img to 700+MB
Warning: contains the command 'sudo' for linux root permissions in unpack/repack scripts. Just an easy workaround for now
Instructions:
extract the zip
chmod 755 -R the extracted folder
Add a stock system.img to the extracted folder
run ./unpack.sh to mount the system.img
copy app, priv-app and framework from the 'fugu' folder to the 'system' folder
run ./oat2dex.sh to deodex the 3 folders
remove the 3 folders from the 'fugu' folder
add the 3 folders from the 'system' folder to the 'fugu' folder
run ./repack.sh to build the system.img
Download - auto-oat2dex-fugu_v1.zip

Um I'm familiar with deodex but what's de-opt?
Sent from my Nexus 6

trvbone said:
Um I'm familiar with deodex but what's de-opt?
Sent from my Nexus 6
Click to expand...
Click to collapse
It's de-optimization, which is a method to undo the oat optimized dex. It's similar to deodexing.

awesome thanks, ill test this out tomorrow.
thanks for sharing,
dfl

negamann303 said:
Here are some tools I put together to deopt/deodex a system.img
It's been partially tested and works for me, but needs some more testing
I'll continue working on it to fine tune/clean scripts.
Linux Only For Now!
What does this do exactly?
This de-odexes the app, priv-app and framework folders, adds .dex files and lib folders to the appropriate apks/jars and folders, removes odex files and organizes everything into structured folders ready to flash. This does all the work so you don't have to.
Why would I want to do this?
Doing this helps with customization of apks. You can theme the launcher or even replace the lockscreen photos with your own if you choose
This also shrinks the stock system.img to 700+MB
Warning: contains the command 'sudo' for linux root permissions in unpack/repack scripts. Just an easy workaround for now
Instructions:
extract the zip
chmod 755 -R the extracted folder
Add a stock system.img to the extracted folder
run ./unpack.sh to mount the system.img
copy app, priv-app and framework from the 'fugu' folder to the 'system' folder
run ./oat2dex.sh to deodex the 3 folders
remove the 3 folders from the 'fugu' folder
add the 3 folders from the 'system' folder to the 'fugu' folder
run ./repack.sh to build the system.img
Download - auto-oat2dex-fugu_v1.zip
Click to expand...
Click to collapse
Can you please deodex Marshmallow stock rom for Nexus Player ?
Thanks a lot

Can u provide deodexed all system apps links.

Related

[help] updete-script for deodex stock firmware

I want to deodex stock firmware (2.36 - XWKTH) and i made the zip file with system folder include 'app' and 'framework' folders.
I can't create update-script for this.
any bady can make me a list of commands For the following? (of course with mount system and what is needed for this)
Code:
deleting .odex files forom app and framework.
copying system folder (in the zip file) to /system
Many thanks!

Working ICS leak deodex!!

I finally have the scripts ready for download!!!! It includes 3 batch scripts (you will only need to run two), lists of dependencies (you dont need to do anything with them ), and the 7za.exe which is used to put the classes.dex in the apk/jars. There are also 7 apks in a "predeodexed" folder, these 7 apks I had trouble deodexing, but the newest xUltimate version (2.4) seemed to deodex them properly (I had issues with it deodexing framework and some apps).
--After a few days of running a deodexed system I haven't noticed any fc and crashes or major slowdowns, BUT I don't use any of the verizon apps (they were the trouble apps for deodexing too) or the default launcher.
Step 0: Make a safestrap backup of your systemorig!!! (You can get back without a backup but it is a much longer process, its the same process of jumping from one ICS, so you keep your data)
Step 1: Download and extract, duh
Step 2: Pull /system/framework to /system/framework in the folder you extracted the zip to
Step 3: Do the same as above but for /system/app
Step 4: Run the framework.bat and app.bat files
Step 5: Get /output/framework and /output/app to /system, and apks in /predeodexd also need to be pushed/transferred to /system/app
5a: Use adbd insecure to enable adb remount and adb push commands, and push /output/framework & /output/app to /system/framework /system/app
-OR-
5b: Copy the /app and /framework folders to the sdcard and then copy using a root file manager to /system/app and /system/framework
Step 6: Remove the .odex files in both /system/app and /system/framework, either through adb shell (adbd insecure), through terminal or one by one with a file manager :silly:
Step 7: Reboot!! :good:
Sent from my DROID4 using xda premium (Well somewhat)
Cool story, broski.
Sent from my XT894
Does it mean, we could use the blur camera app on CM9?
I prefer it over the standard ICS camera app because it has additional options like audio scenes which are quite useful.
Upload?
...Tapatalk

Deodexed stock Telus/Koodo rom

I'm looking for a deodexed version of the stock Telus/Koodo (Canada) rom for Galaxy Ace. I have the odexed version, but I'm not sure how to deodex. If anyone knows where I can get the deodexed version, or can help me with deodexing, it would be greatly appreciated.
Quietly, THIS IS DEVELOPMENT SECTION and not Q&A or GENERAL, POST IT THERE, here will be posted roms! READ THE XDA RULES BEFORE POSTING -.-
I only know how to deodex on Windows.
First have/download your SG Ace firmware (Canada)
Extract your firmware contents using MagicISO to: firmware_name\system
Download AutoDEOTool1.0.4 (Just a modified version of the tool, including updated binaries)
Unzip it to a directory without spaces e.g: C:\
Move/Copy your firmware's apps and framework files to: _app & _framework
Run AutoDEOToolMain.bat
Hit 2 to be specific.
To find your bootclasspath, just download Terminal Emulator on your Android phone
Run the command: echo $BOOTCLASSPATH
To save it in your sdcard, run: echo $BOOTCLASSPATH>>/sdcard/bootclasspath.txt​
Open the bootclasspath.txt, remove any "/system/framework/" codes (without the quotes) then save it
Now copy everything in bootclasspath.txt
Then in the AutoDEOToolMain windows, paste your bootclasspath & hit enter
This will deodex all files in _app & _framework
NOTE: If there are still some odexed files left, then use dsixda's kitchen to deodex the remaining files.​
Now copy/move all files in _app to your firmware's /system/app folder
Copy/move all files in _framework to your firmware's /system/framework folder
Now you have a deodexed Canada firmware!
Download these rom_tools and extract it to the root of the extracted firmware (firmware_name)
Now add the boot.img
Zip it and to flash it!
Thanks, I'll try that tonight. What exactly do the rom tools do? I looked at the archive, and I'm pretty sure busybox means root, but what about the rest?
sauron82 said:
Thanks, I'll try that tonight. What exactly do the rom tools do? I looked at the archive, and I'm pretty sure busybox means root, but what about the rest?
Click to expand...
Click to collapse
data folder is optional to include
META-INF folder is to flash the ROM
format.sh formats your Ace/Gio
installbusybox.sh installs busybox
mkfs.ext4 is the tool that format.sh uses

Tweaking rom - begginer question ;)

Hi!
Since xda-univeristy arised i thought it would be nice to learn something about green droid
I am going to learn about tweaking and theming:and here comes dozens of my questions:
1. I have downloaded Official ics repack by N00BY0815
2. I extracted it and i have:
2 folders ( META-INF and System)
2 files boot.ing and system.img
How can i extract this system.img ?
I tried to use 7zip but it says that" it cannot open it as archive"
Thanks in advance and please for leniency
it can be opened with Diskinternals Linux Reader. if not. use "sgs2toext4.jar" to convert it to .img.ext4 and then open it
Nihiliu said:
Hi!
Since xda-univeristy arised i thought it would be nice to learn something about green droid
I am going to learn about tweaking and theming:and here comes dozens of my questions:
1. I have downloaded Official ics repack by N00BY0815
2. I extracted it and i have:
2 folders ( META-INF and System)
2 files boot.ing and system.img
How can i extract this system.img ?
I tried to use 7zip but it says that" it cannot open it as archive"
Thanks in advance and please for leniency
Click to expand...
Click to collapse
Everything for theming is in the System folder. All the APK's(Applications) Boot.img is probably the recovery image it installs. But to theme you would need to decompile the apks in the system folder
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Nihiliu said:
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Click to expand...
Click to collapse
I don't know much about S2 but can't you just use 7zip to make it an archive and flash it through rrecovery?
"Anger and intolerance are the enemies of correct understanding." -Mahatma Gandhi
Nihiliu said:
How can i extract this system.img ?
Click to expand...
Click to collapse
Hi. You can use dsixda's Android Kitchen for that.
Nihiliu said:
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Click to expand...
Click to collapse
You can pack them with the android kitchen, install the zip, then you do this in terminal emulator to make the system.img file:
Code:
su
cat proc/mounts
now look up the system partition, in my case it's mmcblk0p14
Code:
dd if=/dev/block/mmcblk0p14 of=/sdcard/system.img BS=4096
This will dump the system partition to system.img (for example when making an odin image)

Question Add apk to system.img of Stock Rom

Dear all, I need help im modifying system.img from Stockrom. I can delete apks (de-bloating) but I do not know how to add new apks!
So far I have done the following steps:
1. Untar AP*.tar.md5
2. Extract with LZ4 system.img.lz4
3. simg2img system.img system-new.raw
4. sudo mount -t ext4 -o loop system-new.raw mnt/
5. delete bloatware apps from system/app and system/priv-app
6. add additional apks to system/app and system/priv-app????
7. umount, img2simg, lz4, tar and flash (e.g. Odin)
I have real issues with step 6, everything I tried so far did not work.
a) add apks to system/app and system/priv-app with user root and 644
b) create directories in system/app and system/priv-app
c) replace apks in system/app and system/priv-app
While the de-bloating works, step 6 is broken! The new apps are not usable. They show up with the generic android "robot icon" and their canonical name (e.g. org.fdroid.fdroid...) and are immediately stopped.
What is the correct approach to add additional apks to an existing stock rom image? Please help.

Categories

Resources