Question Add apk to system.img of Stock Rom - Samsung Galaxy S21 Ultra

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.

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!

[Q] Deodex Stock v20Q

Someone can deodex the new stock v20q?
is quite perfect stock rom, and if is deodex is perfect for many aspects
I'm getting errors deodexing with xUltimate 2.4.2.
Also, with xUltimate 2.3.3, most files can be deodexed, but the system becomes unplayable before flashing...
Have you got it?? Any news??
Where did you find the 2.4.2 file I can't find it anywhere.
daytonboi said:
Where did you find the 2.4.2 file I can't find it anywhere.
Click to expand...
Click to collapse
Sure!
http://www.xeudoxus.com/android/xUltimate-v2.4.2.zip
Simply added the latest ".2" at latest link into the official release thread
thank you very much
Deodexing stock ROM
This is a little tutorial to deodex stock ROM v20x's that i found here on XDA and that i modified a little to make it work with our OB
IT WORKED FOR ME, HOWEVER I DON'T TAKE ANY RESPONSIBILITY IF YOU MESS UP AND BRICK YOUR DEVICE OR ANYTHING ELSE. USE AT YOUR OWN RISK.
*What you need to have:
-xUltimate v2.3.3 (Thanks and Credits to Xeudoxus for this awesome app)
-Rooted kernel with busybox
-JDK installed on your Windows system
-If adb is not available in your windows PC, in xUltimate folder open "jar" folder. You'll find adb there.
*Extract stock app & framework folders and Deodex:
-Connect your device to computer.
-Start xUltimate (double-click on Main.exe)
-Select option 1. (Pull /system/app)
-Once option is done, select option 2. (Pull /system/framework)
-In the same folder, now you'll see two new folders (origi_app, origi_frame)
-For LGP970, go to origi_app folder and delete apk and odex files of Maps, PhoneSky and VoiceSearch.
-Select option 3 in Main menu (Deodex /system/app)
-Once its done, select option 4 in Main menu (Deodex /system/framework)
-DONE!!
Now you'll see two new folders done_app and done_frame.
*Push deodexed app and framework to device:
-Connect your device to PC in USB debugging mode.
-Copy done_app and done_frame folders to root of sdcard (/sdcard).
-Open Windows command prompt and type the below commands.
adb shell
$su
#stop
#mount -o remount,rw /dev/block/mmcblk0p9 /system
#busybox cp /sdcard/done_app/* /system/app/
#busybox cp /sdcard/done_frame/* /system/framework/
#rm /system/app/*.odex
#rm /system/framework/*.odex
#chmod 644 /system/app/*
#chown root.root /system/app/*
#chmod 644 /system/framework/*
#chown root.root /system/framework/*
#mount -o remount,ro /dev/block/mmcblk0p9 /system
#sync
#reboot
//In Recovery, Wipe Cache and Wipe Data/Factory reset.
Reboot.//
Credits and thanks to superatmos
Do not forget the thanks button if this helped you somehow ^_^
Irochk said:
... Factory reset ...
Click to expand...
Click to collapse
Is needed???
Maybe is the reason because it don't work to me...
Anyway, I remember deodex the 20n version without factory reset (only cache and davilk)...
In other side....
Latest deodexed work I omitted these files to keep updates from market:
Gmail.apk
GoogleQuickSearchBox.apk
Maps.apk
Phonesky.apk
Street.apk
VoiceSearch.apk
YouTube.apk
Anyone knows if is better let this apps with odex files to keep updates from market?
One step closer to my own custom stock 20q rom...
Error
jn83 said:
Is needed???
Maybe is the reason because it don't work to me...
Anyway, I remember deodex the 20n version without factory reset (only cache and davilk)...
In other side....
Latest deodexed work I omitted these files to keep updates from market:
Gmail.apk
GoogleQuickSearchBox.apk
Maps.apk
Phonesky.apk
Street.apk
VoiceSearch.apk
YouTube.apk
Anyone knows if is better let this apps with odex files to keep updates from market?
One step closer to my own custom stock 20q rom...
Click to expand...
Click to collapse
- -Start xUltimate (double-click on Main.exe)
-Select option 1. (Pull /system/app)
-Once option is done, select option 2. (Pull /system/framework)
-Select option 3 in Main menu (Deodex /system/app) <<< Error .odex file, how can i do. delete .odex all file ?
My model "Samsung Galaxy Note II GT-N7100

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

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

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.

Search Samsung Rom SM-G800F Deodex

Hello i search the Orginal Rom from the Samsung Galaxy S5mini SM-G800F but in deodex.
Can someone help me because.
CM11/12/13 I do not like it
whazza83 said:
Hello i search the Orginal Rom from the Samsung Galaxy S5mini SM-G800F but in deodex.
Can someone help me because.
CM11/12/13 I do not like it
Click to expand...
Click to collapse
+1
Deodex your own rom by yourself
pull from system via ADB (usb debugging enabled) -> app, framework and priv-app, put them in a folder named system.
(can also extracted from flashfile, system.img with other tools like ext4_unpacker.exe)
deodexing -> app, framework and priv-app with SVAdeodexer (build.prop needed in systemfolder)
if deodexing finished then copy the three folders on your internal or external storage on device.
now start in to twrp recovery (mount system first), delete in the system folder on phone -> app, framework and priv-app
copy the deodex folder (app, framework and priv-app) to system and set chmod 755.
finger crossed, first time boot after replacing the folders takes several minutes
http://forum.xda-developers.com/galaxy-s5/general/tool-deodex-tool-android-l-t2972025
thanks to svadev
Whit SVAdeodexer odex to deodexing ---- work
twrp recovery mount system and copy ---- work
chmod 755 ---- work ---- but system starting working not
Even after an hour it starts still from new and does not go into the system
Sorry for my bad englisch
try to deodex with lordroid, this java based tool can creating a flashable zip file for twrp
http://forum.xda-developers.com/android/software-hacking/tool-batch-deodex-rom-t3313150
thanks to lord-ralf-adolf

Categories

Resources