Hi guys! I see many people trying to learn how to make roms, Here i show the easiest and shortest way on how anyone can begin making roms for the Galaxy S3.
Requirements:
Prepared CWM Stock Package.
Apktool
7-zip
Notepad ++
Setting Up, and Introduction
IF you have downloaded firmware from sammobile instead of zoot1's package, use this part for Setting up and introduction: http://forum.xda-developers.com/showpost.php?p=37812381&postcount=33
OR ELSE THE EASIER WAY
To start with, Download the prepared CWM Stock Rom by zoot1 here: http://forum.xda-developers.com/showthread.php?t=1868004
I personally use firmware from sammobile, because i like to do everything myself. Though this method would be easier for beginners.
Extract the zip file to folder called "ROM".
Now lets head towards the customizing.
Thanks to Prawesome alot for this part. I took some info from his guide.
So now, open up the system folder. You'll find loads of folders in it. Here is a brief introduction to each of those folders:
1. apps
When you open this folder. You will find apk's. An apk is an install-able app package for any Android Device.
You can delete specific apps incase you want to delete. But take extra precautions on what you're deleting. As some apps are useful. You can add apps here as well in formats of apk's. But note, adding Play Store apps to the system/app folder is not recommended. For example you don't want Google Talk in your rom, you just have to delete the Talk.apk.
2. bin
Nothing really to mod in this folder. Full of advanced techy stuff. xD
3. etc
Here is where most of the tweaks come in. There is a folder called init.d where mods like the V6 Supercharger or multi-tasking fixes can be applied. Note! Don't add more than 1 or 2 scripts. Most of them usually conflict with each other.
In the gps.conf file, you can edit your gps info to make the gps more accurate. Pretty good guides about this, search them out.
Next is the hosts file. Devs use this to block sites from generating ads, and keeping their roms ad-free. Take a look at my DroidS3 hosts file, there are over 20,000 hosts blocked. You can use the same hosts file for your rom too.
4. Fonts
Very easy folder to understand. All you need to do here is replace ttf files, and you'll change the fonts.
5. Framework
Here is where the big mods come in. I'll explain further on about this. It contains the android.policy.jar, a useful element to add many mods. Framework-res is used to change wallpapers and theme the rom. I'll explain later.
6. libs
Contains all the libs needed for specific system apps to work. Don't mess here unless you're adding a mod.
7. Folders like csc, hdic, sipdb, wakeupdata, vendor, excetra..
These are the folders, there isn't much to do. Csc folder contains the feature.xml where some mods can be added. Search the forums for that. The rest contain multi-languages and more stuff.
8. xbin folder
Used to add scripts like busybox, dexdump, openvpn support. More like the bin folder but smaller.
9. Build.prop
Ever wondered how some roms have android 5.0, when it hasn't even released? All you need to change is the ro.build.version.release to any number you like. Even Android 20! Go change it, and fool some noobs out there. More mods can be added to this file. e.g:
Code:
debug.sf.hw=1
video.accelerate.hw=1
debug.performance.tuning=1
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
ro.config.nocheckin=1
ro.media.enc.jpeg.quality=100
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
ro.telephony.call_ring.delay=0
ro.lge.proximity.delay=15
mot.proximity.delay=15
ro.ril.disable.power.collapse=0
pm.sleep_mode=1
ro.config.nocheckin=1
The codes listed above are for improving jpeg quality, saving some battery life, reducing call delay and more. Search for build.prop mods, you'll find loads of them. Now, a small explanation of the Meta-inf folder.
In Meta-Inf you'll find the updater-script.
Since this is aimed at beginners, I'll just show you how to change what text is shown during install in CWM.
Just edit what's in the quotes of the ui_print code in the file, and enter your own text. e.g:
Code:
ui_print("Hi, This message in quotes is displayed in recovery");
Modding!
It's time for the modding to begin.
Get apktool from: http://forum.xda-developers.com/showthread.php?t=1755243
Now, first copy your framework-res from the /system/framework directory to where you extracted apktool files. Let's call this folder "apktool"
Open the folder apktool, press shift and right click. Click on "Open command window here". Type:
Code:
apktool if framework-res.apk
Now you are ready to decompile apk's.
I'm going to show you how to mod different files. Copy over:
SystemUI.apk
android.policy.jar
framework-res.apk
1. SystemUI.apk
Just showing you basic modding here. Copy over SystemUI.apk to apktool folder. In the command prompt, type
Code:
apktool d SystemUI.apk
After it's done, you should see a SystemUI folder in the apktool directory.
I'm going to show you how to make the status bar transparent, thanks to raubkatze for this part.
Navigate to res/layout/tw_super_status_bar.xml and change android:background to match the red line.
Code:
<com.android.systemui.statusbar.phone.StatusBarWindowView [B][COLOR="Red"]android:background="#00000000[/COLOR][/B]" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
Save and close.
Then navigate to /res/values/drawables.xml
Edit to match:
Code:
<item type="drawable" name="status_bar_background">[COLOR="red"][B]#00000000[/B][/COLOR]</item>
That's it. Save and close.
Go back to your command prompt and type
Code:
apktool b SystemUI SystemUI-new.apk
After it's done, probably will take around 5-10 minutes. You'll find SystemUI-new.apk in your apktool folder. Open both SystemUI.apk and SystemUI-new.apk with 7-zip. Delete AndroidManifest.xml from SystemUI-new.apk and copy AndroidManifest.xml and META-INF from SystemUI.apk to SystemUI-new.apk
That's it. Close the zip files.
If you have adb or android-sdk push SystemUI-new.apk to your phone using:
Code:
adb remount
adb push SystemUI-new.apk /system/app/SystemUI.apk
adb reboot
If you don't have adb, just copy over SystemUI-new.apk to your phone. Rename it to SystemUI.apk and copy to system/app with root explorer. Reboot.
There you have transparent statusbar now!
2. android.policy.jar
Decompile android.policy.jar with:
Code:
apktool d android.policy.jar
You will find android.policy.jar.out, open it and use Cristiano Matos guide to mod the files: http://forum.xda-developers.com/showthread.php?t=2018633
After that use:
Code:
apktool b android.policy.jar.out
Open the android.policy.jar.out folder, you will find a dist folder created and inside that is your modified android.policy.jar.
You can use adb again by:
Code:
adb push android.policy.jar /system/framework
or the normal root explorer method.
3. framework-res.apk
Here i'll show you small mods.
Decompile it using
Code:
apktool d framework-res.apk
Navigate to res/values/bools.xml. Here you can add these. Thanks to DSA for this! :
4 Way Rotation:
Code:
Code:
<bool name="config_allowAllRotations">false</bool>
Change to:
Code:
Code:
<bool name="config_allowAllRotations">true</bool>
Lock Screen Rotation:
Code:
Code:
<bool name="config_enableLockScreenRotation">false</bool>
Change to:
Code:
Code:
<bool name="config_enableLockScreenRotation">true</bool>
and
Code:
Code:
<bool name="lockscreen_isPortrait">true</bool>
change to
Code:
Code:
<bool name="lockscreen_isPortrait">false</bool>
Disable Keyboard Switch In StatusBar When Typing
Code:
Code:
<bool name="show_ongoing_ime_switcher">true</bool>
Change to:
Code:
Code:
<bool name="show_ongoing_ime_switcher">false</bool>
Unplugging From USB doesn't Turn Screen On
Code:
Code:
<bool name="config_unplugTurnsOnScreen">true</bool>
Change to:
Code:
Code:
<bool name="config_unplugTurnsOnScreen">false</bool>[/indent]
Now to change wallpaper. Change the default_wallpaper.jpg in drawable-xhdpi and to change lockscreen wallpaper change keyguard_default_wallpaper.jpg.
Now recompile using:
Code:
apktool b framework-res framework-new.apk
Delete AndroidManifest.xml from framework-new. Copy AndroidManifest.xml and META-INF from framework-res.apk to framework-new.apk
To test use adb:
Code:
adb push framework-new.apk /system/framework/framework-res.apk
Or rename to framework-res.apk and copy to system/framework using root explorer. Reboot.
Once you've added everything, your modified apks. Ui_print mods, A custom kernel (just replace boot.img) it's time to compile. Now this is really easy. Just highlight all the folders/files like system, meta-inf and boot.img. Right click. Hover over 7-zip and click Add to Rom.zip. Wait for it to be done, and copy Rom.zip to your sd card and flash. Voila! You've made your rom!!
You can get more mods to add from here: http://forum.xda-developers.com/showpost.php?p=26583654&postcount=4
I was a beginner once, everyone was a beginner once. People helped me, and now I want to help people.
Press the Thanks button, and/or rate this thread 5 stars to show your support.
FAQ
- How do i add a mod?
To add a mod, just download it. Open it and copy over all the folders from the zip file EXCEPT the META-INF.
- How can i set up apktool on windows?
To set up apktool on windows, you need aapt, apktool.jar and apktool.bat
- My modified apk is not working?
Do some testing and get to know what went wrong. I'm always here. I'll be glad to help.
- Are these the only apps i can modify?
Ofcourse not! Any apk can be modified. Just decompile it, and make your changes.
- I'm looking for a guide on something i want to learn. Can you add it here?
I'll try my best.
Reserved
Reserved one more.
Any feedback guys? I hope this is useful.
Forget that i had to reserve one more.
R: [GUIDE] Beginners/Ref Guide to Making Roms.
Looks interesting...when i will finish my exam i will check with more attention
Sent from my GT-I9300 using xda app-developers app
Willy89 said:
Looks interesting...when i will finish my exam i will check with more attention
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
Thanks. Glad it's of help.
Sent from my GT-I9300 using xda premium
Thnx for making this thread.
It's always useful to read thread's like this.
Nice job.
Verzonden door mijn GT-I9300 met xda premium
Great guide, thanks, I will point Theshawty in this direction :thumbup::thumbup:
slaphead20 said:
Great guide, thanks, I will point Theshawty in this direction :thumbup::thumbup:
Click to expand...
Click to collapse
Too late old man. Not interested in building roms anymore.
Thanks guys.
If there's anything you'd like to have added.
Let me know.
AW: [GUIDE] Beginners/Ref Guide to Making Roms.
Thanks. That's it what i searched for to start. Great.
weli..this would be intersting..and will c hw thread moves...
I Need Help In Building the ROM
Hi,
I am steinert. i need your help in biulding the rom, actually i finished everything but getting the problem while flashing the rom. when i googled it. i came to know that the problem lies in updater-script. i used root explorer to find out the reason. it was like.
FINISHED EXECUTING SCRIPT FILE
EXIT VALUE:126
STDOUT:
NULL
STDERR:
SH:<STDIN>[1]:/CACHE/RECOVERY/LAST_LOG:CAN'T EXECUTEERMISSION DENIED.
I Hope that You help a NOOB like me....
Thank you in advance....
Jacqueline Steinert said:
Hi,
I am steinert. i need your help in biulding the rom, actually i finished everything but getting the problem while flashing the rom. when i googled it. i came to know that the problem lies in updater-script. i used root explorer to find out the reason. it was like.
FINISHED EXECUTING SCRIPT FILE
EXIT VALUE:126
STDOUT:
NULL
STDERR:
SH:<STDIN>[1]:/CACHE/RECOVERY/LAST_LOG:CAN'T EXECUTEERMISSION DENIED.
I Hope that You help a NOOB like me....
Thank you in advance....
Click to expand...
Click to collapse
After flashing the rom.
Check the error through Advanced > Show recovery log in recovery.
Post results here.
I : checking for entendedcommand..
I : skipping execution of extendedcommand, file not found...
Jacqueline Steinert said:
I : checking for entendedcommand..
I : skipping execution of extendedcommand, file not found...
Click to expand...
Click to collapse
Huh?
Get me a screenshot of your meta-inf/com/google/android directory.
What exactly did you modify? It should work if you left the meta-inf untouched.
masterex567 said:
Huh?
Get me a screenshot of your meta-inf/com/google/android directory.
What exactly did you modify? It should work if you left the meta-inf untouched.
Click to expand...
Click to collapse
I just removed all the apps and inserted new apps...!!
Should i send you my updater-script?
Jacqueline Steinert said:
I just removed all the apps and inserted new apps...!!
Should i send you my updater-script?
Click to expand...
Click to collapse
Removed all?
Some are core apps like SystemUI, etc.
Get me a screenshot of your rom.zip..
masterex567 said:
Removed all?
Some are core apps like SystemUI, etc.
Get me a screenshot of your rom.zip..
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is the screenshot of my rom..! and before also i got the same problem with out changing the system .apk's
Jacqueline Steinert said:
View attachment 1700664
This is the screenshot of my rom..! and before also i got the same problem with out changing the system .apk's
Click to expand...
Click to collapse
Highlight those 3 and in 7zip options click add to " ".zip
Sent from my GT-I9300 using xda premium
Related
Can anyone please help? I have been going through multiple threads across many forums and still can not find out how to change the color of the "Verizon Wireless" message in the notification bar. I have read the one for Droid but no info for Droid X. I know how to change what it says but just want to change it to a blue or white. Any help will be greatly appreciated. Thank you.
Never mind about the pm I sent you, I figured it out. I would like to know how to change the color too though.
EDIT:
I found this, it may be useful
http://www.droidforums.net/forum/thebowers/27622-text-color-change-complete-how-do.html
I did read this but does it apply to Droid only or can the same be done for Droid X?
I'm not sure. I haven't tried it. I guess the only way to find out is to make a nandroid of your phone and start experimenting
MAKE A BACKUP
Here is the guide:
1. Go into root explorer navigate to system/framework
2. Hit mount r/w on top then hold and copy framework-res.apk
3. Paste framework-res.apk on root of sdcard
4. Mount the phone to your pc AND move framework-res.apk to desktop
5. Right click framework-res.apk on desktop hit 7zip then hit open archive
6. Navigate to res/xml/ find eri.xml and drag it to your desktop
KEEP ARCHIVE OPEN YOU WILL BE BACK
7. Right click eri.xml on desktop open with HxD
8. Now look to the right side of the screen and find "Verizon Wireless"
9. Highlight the whole word "Verizon wireless"
10. While highlighted type your new name..16 LETTERS MAX
(if any "Verizon wireless" is left just keep hitting space bar after new name)
11. Now save your new eri.xml and drag it back into archive
12. Close the archive
13. Put framework-res.apk back on root of sdcard
14. Now on your phone open Android Terminal Emulator on phone and type
Su
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/framework-res.apk /system/framework
reboot
15. Your done.
spaciorek said:
MAKE A BACKUP
Here is the guide:
1. Go into root explorer navigate to system/framework
2. Hit mount r/w on top then hold and copy framework-res.apk
3. Paste framework-res.apk on root of sdcard
4. Mount the phone to your pc AND move framework-res.apk to desktop
5. Right click framework-res.apk on desktop hit 7zip then hit open archive
6. Navigate to res/xml/ find eri.xml and drag it to your desktop
KEEP ARCHIVE OPEN YOU WILL BE BACK
7. Right click eri.xml on desktop open with HxD
8. Now look to the right side of the screen and find "Verizon Wireless"
9. Highlight the whole word "Verizon wireless"
10. While highlighted type your new name..16 LETTERS MAX
(if any "Verizon wireless" is left just keep hitting space bar after new name)
11. Now save your new eri.xml and drag it back into archive
12. Close the archive
13. Put framework-res.apk back on root of sdcard
14. Now on your phone open Android Terminal Emulator on phone and type
Su
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/framework-res.apk /system/framework
reboot
15. Your done.
Click to expand...
Click to collapse
He wants to know (as do I) how to change the color of the text, not how to change what the text displays, he stated he already knows how to change the displayed text.
I know you have to modify an .xml file, I just don't know which one and what part to modify to change the color.
Thanks for the assist but bouchigo is correct I am looking to change the text color. Already changed words.
Sent from my DROIDX using XDA App
I finally figured it out:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Just follow this link.....read it a few times and you will get it:
http://androidforums.com/droid-all-things-root/49813-guide-change-notification-clock-pull-down-text-colors.html
Thanks I did read this one. Can you pull the 3 files from and do it direct without adb by just using a copy of original files then replacing with 7zip? Not to proficient with adb.
Thank you by the way good job and you work is much appreciated.
Sent from my DROIDX using XDA App
Sent from my DROIDX using XDA App
scott021467 said:
Thanks I did read this one. Can you pull the 3 files from and do it direct without adb by just using a copy of original files then replacing with 7zip? Not to proficient with adb.
Thank you by the way good job and you work is much appreciated.
Sent from my DROIDX using XDA App
Sent from my DROIDX using XDA App
Click to expand...
Click to collapse
The three .xml files modify the drop down menu on the status bar and other status bar elements.
If you want to modify the network tag, clock or date, you have to modify services.jar
Do this:
1 Make a folder called "framework" on your desktop because you will put services.jar inside there.
2. Take your services.jar file from inside your framework folder from the ROM you have installed on your phone (if you are using a theme, take the services.jar from your theme, or you can pull it from your phone as the guide in the link i posted earlier states to do).
3. Now right click on that folder and "Add to Archive" with winzip.....make sure you select Archive format to ZIP not RAR......you can name the zip file to be "theme" or whatever you want to call it.
4. Now put the newly zipped file in the root of C:\ drive. Make sure colorChagev3.jar is in C:\ too.
5. Now, using PowerCmd cd yourself to C:\ since that's where all your files are at and type this to change the "Verizon Wireless" color (it will be blue in this case; blue = 0000FF, but entered reversed FF0000 the last FF is just the degree of transparency):
java -Xmx512M -jar colorChangev3.jar theme.zip network=FF0000FF
6. If you want to change the date color, then enter this:
java -Xmx512M -jar colorChangev3.jar theme.zip date=FF0000FF
7. If you want to change the clock color, then enter this:
java -Xmx512M -jar colorChangev3.jar theme.zip clock=FF0000FF
8. Or you can do it all at once:
java -Xmx512M -jar colorChangev3.jar theme.zip network=FF0000FF date=FF0000FF clock=FF0000FF
9. After the color change is complete message, there will be a new zip created in C:\ called theme-new.zip. You will take services.jar from there and adb push it back to your phone OR do step 10:
Code:
adb remount
adb push services.jar /system/framework/
adb shell reboot
10. Or you can simply replace the services.jar in the theme you are using with the new services.jar and re-flash the theme to your phone.
If you want to change the .xml files then you will need to extract the framework-res.apk and make changes to it according to the guide then just replace it in the same manner as the services.jar.
Mine looks like this right now....I will be removing the clock from the status bar, I don't like it there since it's redundant in my case because I have BW to show me the time:
Thank you very much, I will try this as soon as I get home tonight and let you know how it turns out.
Cool, hopefully it all works out for you.
Unable to access jarfile colorChangev3.jar....grrrr....just do not understand this.
scott021467 said:
Unable to access jarfile colorChangev3.jar....grrrr....just do not understand this.
Click to expand...
Click to collapse
Are you using PowerCmd or windows command prompt? Try using PowerCmd.
You put all the files in C root and renamed colorChangev3 correctly?
EDIT:
I think you don't have java installed. Go here and get it, then try again:
http://www.java.com/en/download/inc/windows_upgrade_xpi.jsp
YES......Completed and now I am the proud owner of a properly colored notification screen.......I owe it all to the helpful guidance of bouchiga...thank you sooo very much...since I cannot post pics here for some reason I will pm you a link.
bouchigo said:
I finally figured it out:
Just follow this link.....read it a few times and you will get it:
http://androidforums.com/droid-all-things-root/49813-guide-change-notification-clock-pull-down-text-colors.html
Click to expand...
Click to collapse
this is sick!
scott021467 said:
YES......Completed and now I am the proud owner of a properly colored notification screen.......I owe it all to the helpful guidance of bouchigo...thank you sooo very much...since I cannot post pics here for some reason I will pm you a link.
Click to expand...
Click to collapse
Sweet, you finally got it working.....it looks real nice too!
Persistence pays off in the end
Sent from my DROIDX using XDA App
Thanks to you and happy you like the finished product. Thanks for all the help, Happy Thanksgiving.
Sent from my DROIDX using XDA App
scott021467 said:
YES......Completed and now I am the proud owner of a properly colored notification screen.......I owe it all to the helpful guidance of bouchiga...thank you sooo very much...since I cannot post pics here for some reason I will pm you a link.
Click to expand...
Click to collapse
hello, how did you fix "Unable to access jarfile colorChangev3.jar" error? i get it too and dont know what to do ..
i have java instaled and using PowerCmd still the same
thanks!
i fix that
I was not renaming the .jar.zip file correctly. Once changed it's icon should change to a java icon from there you are good to go.
Sent from my DROIDX using XDA App
Newbies Thinks to make custom rom.. but dunno how
But when forever king's guide here NO prob!
Things we Need-
1 winrar or winzip
base rom
Brain
notepad ++
Things You will find in Rom (when will you extract-:
1- Boot.img (in some roms not)
2-System
3- Meta-inf
No need to touch Boot.img, Meta inf as i will tell later on
So open system folder
Open Build.prop in system folder and open with notepad++
Open this page
tweaks by forever king
See open build.prop tweaks
And open build.prop and scroll to last....
Press enter
and type
"#Tweaks"
Now add all tweaks in that Webpage
Mods
You can add many mods like
1 Beats Audio (2.3+)
2 Adrenaline Engine (2.3+)
3 SlaidyBoost (2.3+)
4 Megabassbeats (2.2+ need$ xloud)
U need to port them to ya fone , dont ask me as i also dunno l0l
Adding tweaks to ya rom (build.prop)
Open build.prop (system folder)
find line ' ro.build.id=xxxxxxx '
Now change this to ' ro.build.id=yournameorwhatever '
Adding Apps to your Rom
1 Open system>app (folder)
Add .apk files to it (copy n paste xD)
2 Adding Init.d tweaks (if your base rom having init.d support in boot.img)
Open this webpage
tweaks by forever king
Scroll down (lil bit)
and see init.d tweaks
Add like this
Make new file and paste any script
like
"echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree"
this and save this file (no extention , save without .txt or any)
3 Adding bootanimation
Replacing bootanimation
-download bootanimation u want to use and rename it to "bootanimation.zip"
-delete animation u find in /./"rom"/system/media and then paste bootanimation u downloaded
Now modifying framework (u see statubar in rom and many tweaks)
Using UOT kitchen
Thanks to "CallMeVentus" for guide
Finnaly Done... will add more when i am freek xD >.<
Now Compress it in .zip
Now sign the Rom Signer
Open and see how
now flash Rom and test.....
if workeD then coool
Never say 'thanks' , hit it
Advance for N00bs
Never say thanks,hit it
How to make Rom transparent
See my guide = http://forum.xda-developers.com/showthread.php?t=1799373
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
How to decompile android app , u need this TUT for making rom transparent or editing apps..
See my guide= http://forum.xda-developers.com/showthread.php?t=1772220
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
How to add powermenu on your Rom
http://forum.xda-developers.com/showthread.php?t=811532
Thanks untermensch
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Some tweaks making Rom fast
http://www.mediafire.com/?t8rsdmedu5w2vo5 (by me)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
How to Deodex Rom and >odex back
Things nEeded
Code:
backsmali.jar
* smali.jar
* custom java.awt.jar
* dexopt wrapper
* recent version of busybox
Download this
Open CMD CD to folder extracted those scripts and type
1 Deodexing Framework files-
Code:
java -Xmx1024m -jar baksmali.jar -c :core.jar:bouncycastle.jar:ext.jar:framework.jar:android.policy.jar:services.jar:core-junit.jar -x android.policy.odex
(i am taking android.policy.jar as example , if framework.jar or whatever just change 'android.policy.jar' to 'framework.jar' and 'framework.odex'
This will make out folder
now smali that out folder by
typing
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
in CMD
HTML:
open android.policy.jar with 7zip without extracting
push the classes.dex created in the 7zip window in the root folder
close the 7zip windows and here is your deodexed android.policy.jar
2 Deodexing any App file i am taking systemUI.apk as example
Code:
java -Xmx1024m -jar baksmali.jar -c :am.jar:android.policy.jar:android.test.runner.jar:bmgr.jar:bouncycastle.jar:com.android.location.provider.jar:com.google.android.maps.jar:com.samsung.device.jar:com.yamaha.android.media.jar:core.jar:core-junit.jar:ext.jar:framework.jar:ime.jar:input.jar:java.awt.jar:javax.obex.jar:libvtmanagerjar.jar:monkey.jar:pm.jar:sec_feature.jar:seccamera.jar:sechardware.jar:secmediarecorder.jar:services.jar:sqlite-jdbc.jar:svc.jar:twframework.jar -x SystemUI.odex
Again out folder created now make it smali
by typing
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
in CMD
open SystemUI.apk with 7zip without extracting
push the classes.dex created in the 7zip window in the root folder
close the 7zip windows and here is your deodexed SystemUI.apk
Click to expand...
Click to collapse
3 Now we will learn to odexing back
1/ backup your original files (apk jar and odex) to /sdcard/Mod/
2/ copy modified deodexed files (.apk and .jar) in /system/framework/
3/ open a CMD prompt in the folder of adb.exe (usualy /android-sdk-windows/platform-tools/)
4/ type command :
Code:
adb shell
su
## for .JAR file :
dexopt-wrapper /system/framework/XXX.jar /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
response must be :
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=7194
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---
## for .APK file :
dexopt-wrapper /system/framework/XXX.apk /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jaradb shell
su
## for .JAR file :
dexopt-wrapper /system/framework/XXX.jar /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
response must be :
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=7194
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---
## for .APK file :
dexopt-wrapper /system/framework/XXX.apk /system/framework/patched_XXX.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
It will makepatched_apknameyouodexing file now remove (renaming) "patched_" line so it will be "apknameyouodexing.odex"
Now copy Signatures- (in same CMD)
Code:
# if not already done ...
adb shell
su
# copy the original .odex and .jar in system/framework (not .apk) :
cp /sdcard/MOD/original.XXX.odex /system/framework
cp -f /sdcard/MOD/XXX.jar /system/framework # where XXX.jar is the original odexed .jar
# give all permissions to XXX.odex files :
chmod 777 /system/framework/original.XXX.odex
chmod 777 /system/framework/patched_XXX.odex
# copy signature :
busybox dd if=/system/framework/original.XXX.odex of=/system/framework/patched_XXX.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
response must be :
busybox dd if=/system/framework/original.XXX.odex of=/system/framewor
k/patched_XXX.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.002042 seconds, 9.6KB/s
Done now odex/deodex your Rom , so easy!
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Changing splash Screen (bootsccreen before bootanimation)
Ok. 1st of all i dont maDe this script and i dont know who made it xD but i would day 'thanks' to Him
http://www.mediafire.com/?sr6lso6w7vj21o6
How to use this!! >>??
Decompile boot.img Scroll down to see HoW to decompile it/use DSIXDA kitchen
Ramdisk>initlogo.rle (make new folder and paste initlogo.rle into it)
now extract that downloaded kit in it
1 Now open CD to location and type
Code:
convert_image to rle.bat initlogo.rle
(if u named .rle file to 'yourfilename'
then type
Code:
convert image to rle.bat yourfilename.rle
2 the filename.raw file and filename.rle file will be created at the same location as filename.rle
Now yoU will see filename.png edit it like what you Want xD
3 For compiling filename.png to .rle , CD to that folder having dose files!
typE
Code:
convert rle to image.bat filename.png
Use this if you see Decompiled .rle Burred-
Code:
@bin\convert -depth 8 -size 333x774 rgb:initlogo.raw initlogo.png
(take your phone's size i just took which my mind told xD)
4 Now you will see new file named
filename.png.rle rename it to filename.rle
Done now replace it into your extracted boot.img and repack it
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Decompilng Boot.img
I didnt made this Script http://www.modaco.com/topic/340710-tool-edit-bootimg/ is originall thread thanks to him
Download Boot.img tools
So easy to use
Just extract it in folder
Now place boot.img also in it
Now open 'start.bat'
* Press 1 to decompile the boot.img
* replace the ramdisk.gz (if you want)
* replace the kernel (if you want)
* Press 2 and it will compile the boot.img again!
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Modifying updater-script (found in /META-INF/com/google/android)
Open with Notepad++
Now you can see in this pic theres written 'Welcome to Cm installer....'
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
How to make this!
open updater-script
you will see 1st line ! make enter so you can add 1 line (at first)
Now add
Code:
ui_print("your text anything");
Code:
package_extract_dir("system", "/system");
tells extract directory system to system (in android)
Code:
mount("system");
tells mount specific directory like u can change location to dev folder
Code:
unmount("/system");
means unmount from where you mounted ! before
Code:
show_progress(0.200000, 5);
tells us that show progress like you can see when installing Rom yellow lines comes (CWM) u can control by this. its by Seconds..
Code:
symlink("busybox", "/system/xbin/fold");
means make symbolic link to that file at folder 'xbin'
Code:
format("MTD", "system");
means format mounted system folder
Code:
delete("/data/local");
Tells that delete /data/local folder
Code:
set_perm(0, 0, 0777, "/system/bin/chka2sd");
set pem means setting permission like chka2sd permission rww-rww-rww
Code:
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
it means flash boot.img make raw file (image) at tmp/boot (afterwards android do which i dunno) and delete that file!
Now save this file
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Modifying settings.apk
Creed$ rom!
you can see 'author name' which is not in our normal settings!
how he D!d?
Decompile apk by apkmanager ( i wont tell again xD , not by apktool )
1 goto res>xml open "device_info_settings.xml"
2 scroll to last and add line before "</PreferenceScreen>" line
3 add this line
Code:
<Preference android:title="Rom name (or whatever" android:summary="My rom name (what ever)" style="?android:preferenceInformationStyle" />
you can add many of them
4 Now compile from apkmanager when ask delete any file from 'keep folder' delete this file from keep folder and Install apk
too easy!
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Enabling CRT animation on 2.3x
CRT animation is dam cool animation effect when locking phone so see how to make in your rom
But what is it?
1 Decompile framework-res.apk
2 goto res>values>bools.xml
3 Change "<bool name="config_animateScreenLights">true</bool>" to "<bool name="config_animateScreenLights">false</bool>"
Done.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Swipe to clear notifications
http://forum.xda-developers.com/showthread.php?t=1483193
thanks hansip87
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
When i do something (just that thing which i moded) i got bootloap/loop!
1 Open that think you will get loop
2 open terminal
3 type
Code:
su
logcat>sdcard/logcat.txt
So end. i will add more if i got any in mind/guidE xD
A nice guide for the noobs, but I think all of this is a little basic. But if you keep adding onto this, then it will be a great guide.
Nice
asvantypography said:
Nice
Click to expand...
Click to collapse
thanks button dere
invasion2-- adding sooon!!
Is it possible to deodex from terminal emulator?
-XoRoX- said:
Is it possible to deodex from terminal emulator?
Click to expand...
Click to collapse
sooory dude! but u can thru fone.... I saw app' odex me ' or maybe it was 'deodex me' I dunno it works/not
Thanks for your work!
john9 said:
Thanks for your work!
Click to expand...
Click to collapse
button there >.< read....this..every user commenting btw welcome!
Thanks for this guide! I assume no linux dev environment is needed, cuz I can't, at least that's what happened with dsixda kitchen
Sent from my HTC_Amaze_4G using Xparent Green Tapatalk 2
eggydrums said:
Thanks for this guide! I assume no linux dev environment is needed, cuz I can't, at least that's what happened with dsixda kitchen
Sent from my HTC_Amaze_4G using Xparent Green Tapatalk 2
Click to expand...
Click to collapse
press thanks n welcome...I will add sooon its long so its future plan xD
modifying settings tut is wrong.
we have to edit xml in strings and public also
lol ur wrong
Avilove.Cullen said:
modifying settings tut is wrong.
we have to edit xml in strings and public also
Click to expand...
Click to collapse
ps. I am not editing settings.xml!
its lyk this! I made it dude! public.xml?
which entry? of Icon? no Icon needed!
Well its comprehensive and noob proof
Just a side note: Always mention the link to original article of any forum especially the deodexing part!
Secondly as Avilove.cullen said the tutorial for modification in Settings is incomplete as you also have to kang up the respective strings in strings.xml
And FYI we need not modify public.xml only when you put icons or images
varun.chitre15 said:
Well its comprehensive and noob proof
Just a side note: Always mention the link to original article of any forum especially the deodexing part!
Secondly as Avilove.cullen said the tutorial for modification in Settings is incomplete as you also have to kang up the respective strings in strings.xml
And FYI we need not modify public.xml only when you put icons or images
Click to expand...
Click to collapse
ok... will makE comlelty fr noobs !
dude I sa!d credits to dere devs ok will add link soon xD
fr icons u r wrong
decompile microfire 2's rom decompil settings.apk lol seee fire icon deres entry in public.xml Icons- which sum roms having coloured icons ! seee I can calll aksh too he also say this!
its ofcourCe v need png entry in settings.xml (or whereva)
and 1 png of that name I'm drawable-xxx
For adding strings, adding those strings in string.xml and public.xml is not necessary.... u cat do that too... but it works without adding too... i checked it ma self.... just remv "@string\" and "your_text".....
When adding a new menu item you need to edit the layout right?
Sent from my LG-E739 using Tapatalk 2
mistere372002 said:
When adding a new menu item you need to edit the layout right?
Sent from my LG-E739 using Tapatalk 2
Click to expand...
Click to collapse
Actually this isn't fundamental
It depends on the original developer where he defines it
In case of settings.apk it is with xml folder.
varun.chitre15 said:
Actually this isn't fundamental
It depends on the original developer where he defines it
In case of settings.apk it is with xml folder.
Click to expand...
Click to collapse
OK so say you wanted to add a list item called start clock. You would add the preferencescreen code and specify the target in settings.XML only? You wouldn't add lines to Id.XML or strings.XML and values.XML and then specify where in the layout folder of the appropriate XML in that folder?
Sent from my LG-E739 using Tapatalk 2
Who knows the reason for always apps optimizing in my custom Rom in every reboot?( always android is upgrading)
Sent from my SK17i using xda premium
So you heard alot about creating a custom rom how about creating one with ease with this simple guide you will find it easy
So for whom is this guide?
1.Absolute Beginners.
2.People with little or no programming skills
3.people who really want to learn how to make custom rom's
4.people who want to learn android and don't know where to start
Click to expand...
Click to collapse
Tools Required : (Update them manually and report me dead links please)
Java JDK FROM HERE FOR INSTALLING CYWIGN
WARNING: Do not install Cygwin before the JDK!!
Click to expand...
Click to collapse
Cywign Direct Download- Linux Terminal For Windows
Android Kitchen (ROM Development Tool)- For Cooking custom ROM and many more things, Please update this Kitchen to latest version when available.
notepad++ - for editing files like build.prop, updaterscript
MOST IMPORTANT TOOL YOUR BRAIN... AND ALSO LOTS OF TIME...
Click to expand...
Click to collapse
Step one: Installing the JAVA JDK, Cygwin and Setting up the Kitchen
*Before you do anything install the java jdk* (don't skip)
Try this Dsixda Kitchen Install Picture Tutor(recommended)Or
Watch this video guide by gitagaire for how to setup cygwin and kitchen
http://www.youtube.com/watch?feature=player_embedded&v=sYJMdHPD410
Now for the real developing so lets get ready
Click to expand...
Click to collapse
INSTRUCTIONS
1.Download and extract the cygwin_packages.zip
2.Run the set up(make sure there is no previous cygwin installation)
NOTE: INSTALL CYGWIN IN ROOT DISK LIKE C:\
1. Follow the kitchen read me txt!!!
2.Run the set up(make sure there is no previous cygwin installation)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
1.when it shows all the package names, go to the top and select "all default" until it changes to "all install" (you must click on the arrows)
Click to expand...
Click to collapse
1.Download the kitchen from above. Then, extract the kitchen's .zip file to a folder under your home account. Rename the dsixda-android-kitchen-*** folder to just "kitchen". In Cygwin, this folder would depend on what was set for your Cygwin install directory, e.g. C:\cygwin\home\John\kitchen
NOTE!! If your user folder contains spaces (e.g. C:\cygwin\home\John Smith\kitchen), then the kitchen will not function properly. Instead, copy it under C:\cygwin\home\kitchen
1.It's the time now you run the kitchen so follow carefully
2.Run the kitchen and follow
those who have their kitchen like this C:\cygwin\home\John\kitchen use these commands given below.
cd kitchen(enter)
./menu(enter)
Click to expand...
Click to collapse
those who have their kitchen like this C:\cygwin\home\kitchen use these commands given below.
cd ../kitchen(enter)
./menu(enter)
Click to expand...
Click to collapse
Click to expand...
Click to collapse
If every things are right you should have this
congratulations!! you have sucsessfully setup up The kitchen
Click to expand...
Click to collapse
Step Two: Setting up a working folder
THERE ARE TOW METHODS FOR THIS -but i will mention only one for now.
1. WHEN YOU HAVE BASE ROM AVAILABLE.
FIRST METHOD -
1.First our folder structure should look like this:
Code:
cygwin folder/home/your user name/kitchen
1.Inside the kitchen it should look like this:
1. Now we need a base rom for working on, You can any rom but i don't know if it works with stock roms:silly:
Just Place the original rom zip in the original_update folder inside the kitchen.
2.run the cygwin.exe again type:
Code:
cd kitchen(enter)
./menu(enter)
1.now enter option 1, enter again. You should see your rom listed, choose and enter
you will be asked about changing the working folders name, at this point it makes no difference so just continue.
2.congratulations you have a working folder!!!:victory:
Step Two :change/modify/update rom
YOU CAN MODIFY YOUR ROM IN TWO STEPS:
MODIFY USING ANDROID KITCHEN - for basic modification.
MODIFY MANUALLY. - for advanced modification.
1. MODIFYING USING ANDROID KITCHEN
watch this amazing tutorial by neroyoung on how to editing rom with kitchen
NOTE: DON'T FORGET TO DEODEX YOUR ROM
Click to expand...
Click to collapse
2.Modifying manually will be added later on
3.Modifying .9.png's and oter stuff will be added soon saw stay tuned
BUILDING KERNELsThis post includes every thing that helps you develop and make a good kernel for your device
Requirements
1. linux box 32 bit with working gcc. you can use real linux machine or virtual machineOr just simply UBUNTU 10.04 64-bit
2. Sourcery G++ Lite 2009q3-68 toolchain for ARM EABI from http://www.codesourcery.com/ (Linux version without installer arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2)
3. mkbootimg with md5support. got it from http://forum.xda-developers.com/show...&postcount=241 . credit to harish2704
4. split_bootimg.pl (google it)
5. kernel source from http://opensource.samsung.com . i use GT-P3100_ICS_Opensource_Update.zip
6. stock boot.img (or from your custom kernel).
Click to expand...
Click to collapse
Setting up the environment & building the kernel for the first time
Ubuntu 10.04 64-Bit (recommended)
Ubuntu 12.04 64-Bit
Note: If you want to use virtualization software, do not use Virtualbox. You can run into networking issues and so on. I suggest using VMWare Player instead, which is available for free on http://www.vmware.com
Steps :
1. make folder "sgy" in your home. the result is folder "/home/<yourname>/sgy". <yourname> is your linux user name, and from now replace <yourname> with your user name. put all file you already download there
2. extract "GT-P3100_Kernel.tar.gz" from "GT-P3100_GB_Opensource_Update.zip". put also in "sgy" folder
3. open terminal emulator and go to your working path with command
Code:
cd ~/sgy
4. extract your compiler with
Code:
tar -xvf arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
5. create folder "kernel" and extract kernel source there
Code:
mkdir kernel
cd kernel
tar -xvf ../GT-P3100_Kernel.tar.gz
you got 2 folder, "common" and "modules"
6. open folder "common", there is file "Makefile". open with text editor and find line with content "/opt/toolchains/arm-eabi-4.4.3/bin/arm-eabi-". replace with "/home/<yourname>/sgy/arm-2009q3/bin/arm-none-eabi-", don't forget replace <yourname>.
7. in terminal goto folder "common" and load default config for sgy
Code:
cd ~/sgy/kernel/common
make bcm21553_totoro_05_defconfig
8. if you want change you config run
Code:
make menuconfig
9. if you ready to build then run
Code:
make
or if you want to make it faster
Code:
make -j3
10. when complete and no error appear, copy your kernel to "sgy" folder
Code:
cp arch/arm/boot/zImage ~/sgy
11. extract ramdisk from your boot.img
Code:
cd ~/sgy/
perl split_bootimg.pl boot.img
you got "boot.img-kernel" and "boot.img-ramdisk.gz". move "boot.img" and "boot.img-kernel" to other place.
12. repack your new kernel and ramdisk. but first get md5sum of your new kernel
Code:
md5sum zImage
you got something like
Code:
1fd319aa60abc2abae2e5932bcb9fc77 zImage
you need that "1fd319aa60abc2abae2e5932bcb9fc77" write it or copy to text editor. you need run it every time compile new kernel
13.Repack
Code:
chmod +x mkbootimg
./mkbootimg --kernel zImage --ramdisk boot.img-ramdisk.gz --base 0x81600000 --kernelMD5 <your md5sum result> -o boot.img
14.And if you want to make an odin flashble
Code:
tar -cf boot-sgy.tar boot.img
Now you've built you'r kernel
reserved For FAQ
UOT Kitchen customizationHello everyone, today I'm creating this thread for newbies who want to learn how to use UOT Kitchen so it can be used by the Galaxy Tab 2.
It allows us to mod everything in the phone! You can even choose which to mod.
Prerequisites:
- You current ROM's SystemUI.apk, framework-res.apk and twframework-res.apk
The instructions are as follows:
Step 1: Battery mod
Over here, you can change:
Battery icon
Battery charging animation
Battery style
Battery colour parts
Firstly, just choose a battery bar that you like. (I personally prefer the Honeycomb one)
Secondly, choose the charging animation. (Hybrid looks nice)
Thirdly, you can choose to change the colour parts or leave it as it is.
Fourthly, (optional) you can select Additional options:
Remove % numbers
Remove charging icon
Use gradient colour fill
Well, that's all for battery.
Step 2: Icons
Here you can change:
Smiley icons
Status bar icons
Notification Power icons
This doesn't need much instructions; pick what you like.
Step 3: Status bar
This is probably the most important thing when it comes to theming: the Status Bar!
It allows you to change:
Status bar transparency
Top bar
Add/edit top bar text
Add a header
Add/edit carrier
Add a background on the status bar
Customize notifications' colours
Add/edit footer
Firstly, you need to specify your phone's screen resolution size. (Ours is hdpi.)
Secondly, mix-and-match.
Step 4: Popup (a.k.a Window Animations)
This one is just as important.
It allows you to change:
Add/edit overscroll glow
Edit popup windows
Loading circle
Volume/Download bar
Add/edit list dividers
Same thing, mix-and-match.
Step 5: Lockscreen
This allows you to change:
Lockscreen
Step 6: Window
This allows you to change:
Window animations
It allows us to use the ICS windows animation effect!
Step 7: Fonts
This allows you to change:
System fonts
They have 26 fonts to choose, including the famous Roboto font!
Step 8: Bootanimation
This allows you to change:
System bootanimation
They have loads of bootanimations to choose from. Have fun!
Step 9: File upload
This is where you:
Upload system files for modding
Choosing updater-script type
Apply 9patch autofix
Toggle ThemeChooser preview for ldpi/mdpi/hdpi
Allow to download your settings into a UOT Kitchen-openable format
Just upload your system files.
But remember to choose the updater-script type as Galaxy !!!!!!!!!!!!!!
Step 10: Summary
This is where you can check the status of your mods.
Once it's okay, you can submit the work to the kitchen.
Once you submit it, you'll be given a number. That's the name where your file will be processed under and be shown for download at the "Pickup" section.
(Note: If it gives an error instead of a download post it at the UOT thread)
Thanks for reading this small guide, I'll update it with more info!
Credits 1. Neroyoung for his video tutorials
2.For lokeshsaini94 for his amazing tutorial
3.For irfanbagus and his nice tutorial that i ported to galaxy tab 2
4.For shakatu fo remembering me to credit people thanks Alot!!!!
And any one that Iforgot to mention lol
EDIT: The latest oat2dex solves this issue altogether.
WTF IS THE PROBLEM?
The OpenGL and Google Play Store refuse to work because baksmali inside the oat2dex tool misinterprets some fields in a single smali file and breaks "services.jar" when deodexing, and the main problem it causes is mistakenly setting your OpenGL version to 0 (instead of 3), basically disabling it.
oat2dex, for some reason, flips just a few specific fields (name and type) when deodexing, as if there is an ambiguity between 2 fields on the same offset.
When you flash the deodexed services.jar back to your phone and clear dalvik-cache, Android re-optimizes it (takes the "classes.dex" inside your new JAR file, does dex2oat on it, and saves it in /data/dalvik-cache/arm/). The deodexed file is broken, so that optimized file is broken too.
You take that broken odex file from dalvik-cache and deodex it again. Since it contains those flipped field names, this time it flips them again but to the correct fields.
The result DEX file you get by that second deodexing is a properly working DEX file, and if you rename it to "classes.dex" and replace "classes.dex" inside your broken "services.jar", you'll get a working "services.jar" and all your OpenGL and Google Play Store problems will disappear immediately.
HOW TO QUICKLY GET A WORKING DEX?
* Extract classes.dex from the JARs, rename them to framework.dex and services.dex.
* Copy them to your internal SD.
* Enable "USB debugging" in Developer options.
* Connect your device to your PC and open Command Prompt:
Code:
[B]adb shell[/B] (confirm ADB on your device)
[B]su[/B] (confirm SU on your device)
[B]dex2oat --dex-file=/sdcard/framework.dex --oat-file=/sdcard/framework.odex[/B]
[B]dex2oat --dex-file=/sdcard/services.dex --oat-file=/sdcard/services.odex[/B]
* Copy these odex files to your PC and deodex them again with oat2dex.
* Rename the new framework.dex and services.dex to classes.dex and add them to their JARs, replacing the broken classes.dex.
JARS AFFECTED BY THIS BUG
framework.jar/classes.dex --- only a single non-critical error in NumberPicker.smali (classes2.dex is fine)
http://forum.xda-developers.com/attachment.php?attachmentid=3338076&d=1432918042
services,jar/classes.dex --- Total of 8 errors, described below...
http://forum.xda-developers.com/attachment.php?attachmentid=3335118&d=1432772056
BUG REPRODUCTION
Requirements:
1) Java installed
2) oat2dex_bug.zip
ZIP contents:
* baksmali.jar
* oat2dex.jar
* boot.oat --- taken from /framework/arm/
* services.dex --- this is "classes.dex" from the deodexed "services.jar" (which breaks OpenGL)
* services-from-dcache.odex --- this is the odex file taken from "/data/dalvik-cache/arm/" that was created by Android after flashing the broken deodexed "services.jar" and clearing dalvik-cache
Reproduction steps:
1) Open "oat2dex_bug" folder, right-click inside it and then select "Open command window here".
2) Write the following lines exactly as follows:
java -jar oat2dex.jar boot boot.oat
java -jar oat2dex.jar services-from-dcache.odex odex
java -jar baksmali.jar -o services-from-dcache services-deodex.dex
java -jar baksmali.jar -o services services.dex
3) With WinMerge, compare folders "services" and "services-from-dcache".
You'll see that only one file has differences, and it's "ActivityManagerService.smali", that's the file you need to fix.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
In the above images are the only affected areas you need to fix.
Holy @#%. Well done! This issue was a real pain. Thanks
What about fixing framework.jar ? Play store compatibility ?
Sent from my C6903 using XDA Free mobile app
dstrikersZ1 said:
What about fixing framework.jar ? Play store compatibility ?
Sent from my C6903 using XDA Free mobile app
Click to expand...
Click to collapse
framework.jar has only 1 error in NumberPicker.smali, and it's not very critical. Has nothing to do with the Play Store bug. After you've fixed services.jar by deodexing it twice, Play Store is fixed.
IaguCool said:
WTF IS THE PROBLEM?
The OpenGL and Google Play Store refuse to work because baksmali inside the oat2dex tool misinterprets some smali files and breaks "services.jar" when deodexing, and the main problem it causes is mistakenly setting your OpenGL version to 0 (instead of 3), basically disabling it.
oat2dex, for some reason, flips just a few specific fields (name and type) when deodexing, as if there is an ambiguity between 2 fields on the same spot.
When you flash the deodexed services.jar back to your phone and clear dalvik-cache, Android re-optimizes it (takes the "classes.dex" inside your new JAR file, does dex2oat on it, and saves it in /data/dalvik-cache/arm/). The deodexed file is broken, so that optimized file is broken too.
You take that broken odex file from dalvik-cache and deodex it again. Since it contains those flipped field names, this time it flips them again but to the correct fields.
The result DEX file you get by that second deodexing is a properly working DEX file, and if you rename it to "classes.dex" and replace "classes.dex" inside your broken "services.jar", you'll get a working "services.jar" and all your OpenGL and Google Play Store problems will disappear immediately.
JARS AFFECTED BY THIS BUG
framework.jar/classes.dex --- only a single non-critical error (classes2.dex is fine)
services,jar/classes.dex --- described below
BUG REPRODUCTION
Requirements:
1) Java installed
2) oat2dex_bug.zip
ZIP contents:
* baksmali.jar
* oat2dex.jar
* boot.oat --- taken from /framework/arm/
* services.dex --- this is "classes.dex" from the deodexed "services.jar" (which breaks OpenGL)
* services-from-dcache.odex --- this is the odex file taken from "/data/dalvik-cache/arm/" that was created by Android after flashing the broken deodexed "services.jar" and clearing dalvik-cache
Reproduction steps:
1) Open "oat2dex_bug" folder, right-click inside it and then select "Open command window here".
2) Write the following lines exactly as follows:
java -jar oat2dex.jar boot boot.oat
java -jar oat2dex.jar services-from-dcache.odex odex
java -jar baksmali.jar -o services-from-dcache services-from-dcache.dex
java -jar baksmali.jar -o services services.dex
3) With WinMerge, compare folders "services" and "services-from-dcache".
You'll see that only one file has differences, and it's "ActivityManagerService.smali", that's the file you need to fix.
And here are the only differences you find in the file (notice especially the first one and the last one):
Click to expand...
Click to collapse
java -jar baksmali.jar -o services-from-dcache services-from-dcache.dex
Click to expand...
Click to collapse
Error: "Can´t find the file services-from-dcache.dex"
There is no such file in the zip either - only services-from-dcache.odex, but with this file it did not work
moonryder said:
Error: "Can´t find the file services-from-dcache.dex"
There is no such file in the zip either - only services-from-dcache.odex, but with this file it did not work
Click to expand...
Click to collapse
Then you made a mistake somewhere.
IaguCool said:
Then you made a mistake somewhere.
Click to expand...
Click to collapse
tried it again, step 1 and 2 without problems, but step3 the same error as mentioned before
there is a new file in the folder called "services-deodex.dex"
moonryder said:
tried it again, step 1 and 2 without problems, but step3 the same error as mentioned before
there is a new file in the folder called "services-deodex.dex"
Click to expand...
Click to collapse
Ahh I see that oat2dex renames the file for some reason. I fixed line 3 to
java -jar baksmali.jar -o services-from-dcache services-deodex.dex
You could figure that out yourself, you know... by looking inside the folder, I don't see why you repeat every step like a robot uncritically.
IaguCool said:
...I don't see why you repeat every step like a robot uncritically....
Click to expand...
Click to collapse
cause i am not a programmer and a noob in this field contrary to you (maybe you are a genius and i am a little user :angel: )
moonryder said:
cause i am not a programmer and a noob in this field contrary to you (maybe you are a genius and i am a little user :angel: )
Click to expand...
Click to collapse
So basically it's like pushing a screwdriver into a wall socket without knowing what electricity is... I don't get why people that don't develop even try to deodex themselves in the first place. Deodexing is meant for developers, not "little users"...
so its must to be writen GL_ES_VERSION:I
its i/1/L ?
Alvian_P said:
so its must to be writen GL_ES_VERSION:I
its i/1/L ?
Click to expand...
Click to collapse
It's "I" for Integer. Seriously what are you people doing here? It's for *developers*, normal users have nothing to gain from this process.
That's how I have fixed it too, well done
Take care that mWentToSleep must also be fixed.
Both lines are inverted.
Edit: nevermind, your method is inverting both... I did it manually.
Please tell what command compiles the folder "services" into file "services.dex" back?
Bazooka Joe said:
Please tell what command compiles the folder "services" into file "services.dex" back?
Click to expand...
Click to collapse
Google for "smali-2.0.5.jar" for that. baksmali only decompiles.
IaguCool said:
It's "I" for Integer. Seriously what are you people doing here? It's for *developers*, normal users have nothing to gain from this process.
Click to expand...
Click to collapse
@laguCool
1. thx for discovering that problem and its solution
2. all devs began once upon a time, so i think threads like this one are very helpful for users who want to learn and become a dev in future too. So
3. please be soft with all of them who asks questions here.
Thx again for your excellent work and knowledge.
m.
moonryder said:
@laguCool
1. thx for discovering that problem and its solution
2. all devs began once upon a time, so i think threads like this one are very helpful for users who want to learn and become a dev in future too. So
3. please be soft with all of them who asks questions here.
Thx again for your excellent work and knowledge.
m.
Click to expand...
Click to collapse
Well, being soft isn't my thing, it's against my nature...
Anyways, if a person doesn't know what "I" means in Dalvik opcode, they are doing the learning process wrong. They need to be familiar with Dalvik datatypes beforehand.
IaguCool said:
It's "I" for Integer. Seriously what are you people doing here? It's for *developers*, normal users have nothing to gain from this process.
Click to expand...
Click to collapse
just look around , anyways my college is IT
ah sorry if this thread not open for normal users
IaguCool, Big, big Thanks!!! OpenGL worked now! :good:
There is a more simple way for obtain dirty odex from dirty dex file. Just copy deodexed services.dex to sdcard and type in terminal
dex2oat --dex-file=/sdcard/services.dex --oat-file=/sdcard/services.odex
Then copy created /sdcard/services.odex to PC and deodex them again to obtain correct services.dex.
_SIL_ said:
IaguCool, Big, big Thanks!!! OpenGL worked now! :good:
There is a more simple way for obtain dirty odex from dirty dex file. Just copy deodexed services.dex to sdcard and type in terminal
dex2oat --dex-file=/sdcard/services.dex --oat-file=/sdcard/services.odex
Then copy created /sdcard/services.odex to PC and deodex them again to obtain correct services.dex.
Click to expand...
Click to collapse
Thank you I rarely use the terminal so I missed that. I actually copied all /framework/ odex files from dalvik-cache to see if there are more JARs affected by this bug, will add them to the list if I find any.
tl;dr: I tried to hack the SystemUI.apk file to get rid of the s-finder notification bar, I needed to deodex the apk to do this. I did that (first time ever), but then I didn't know what to do with the .odex.art.xz file, so I removed the whole arm/ folder from the SystemUI directory, and just left my modified SystemUI.apk file in there. After clearing the cache and dalvik, the SystemUI app kept crashing and I had to restore from backup. What do I do with the arm directory, and is that even the problem, or should I not even try to do this?
I have a sprint Galaxy S4 (jfltespr; SPH-L720) that I just upgraded to lollipop via the regular system update, now have Android 5.0.1, baseband L720VPUGOD2, kernel 3.4.0. My phone is rooted with BusyBox installed. I used to use CyanogenMod (for a long time), but the stability was low for me, particularly when travelling internationally and changing SIMs: I would frequently lose GPS completely (see http://forum.xda-developers.com/galaxy-s4-sprint/help/gps-cyanogen-mod-install-t3009245/), requiring me to flash the stock ROM again. So I reverted to stock, and used xposed. Unfortunately, following the upgrade to 5.0.1, xposed now requires flashing a zip and is in super-alpha, and so I am nervous about using it. The only thing I really want a custom ROM or xposed for is to get rid of bloat. I have managed with just Titanium to get rid of the most annoying apps, but I am still stuck with that stupid 'S-Finder'/'Quick Connect' bar. I can get rid of it by switching my device name to jfltevzr or jflteatt in build.prop, but then I lose other features, such as the ability to change to the GSM network.
So, I tried to hack the SystemUI apk according to the instructions here and here. Essentially my plan was: download SystemUI.apk, edit the PhoneStarusBar.smali, and profit.
I have never done this before, so I rapidly ran into the issue that I needed to deodex the apk. I followed this guide and everything seemed to go smoothly, except that the PhoneStatuBar.smali file had different code from the tutorial. In the tutorial I had to change
Code:
if-nez v8, ;cond_0
to
Code:
if-nex v8, :cond_5
but in my file it seemed that the syntax was similar, but the labels were different, so I ended up changing
Code:
if-nez v8, ;cond_15
to
Code:
if-nex v8, :cond_c0
I created the classes.dex file and packaged it into the apk with the command
Code:
7za u -tzip SemcVideo.apk classes.dex
However, I was confused about what to do with the new apk. In my system, the original apk lives in /system/priv-app/SystemUI/SystemUI.apk, and next to the apk is an arm directory with an odex.xz file (which I deodexed) and an art.odex.xz file that I have no idea what to do with. Since I didn't know what to do, I just deleted the whole arm directory, put the modified (deodexed) SystemUI.apk file in /system/priv-app/SystemUI/, cleared the cache and dalvik cache, and rebooted. After about 20 minutes of rebuilding the cache for all of my apps, the phone started, but it had the dreaded 'SystemUI is not responding, do you want to restart it' message. I ended up having to restore a backup and wipe the cache again.
So, my question is: what do I do with that arm directory? Is that what broke it, or is the problem that I just screwed up the PhoneStatusBar.smali file? I don't really know what I am doing as I don't know java that well, but I would like to get this to work.
Alternatively, do you guys think that maybe the Google Play Edition ROM might be more stable that CyanogenMod, or that I should just try to flash to xposed alpha even though it is so 'unstable'? It looks to me like the GPE ROM might be more stable than CM, but I have no idea. I know that it hasn't been patched for StageFright yet, even though CM has.
Finally, I should specify that I am not an Android hacker, I have a full time job in science research and I volunteer a lot. My top priority for my phone is stability and reliability, and I don't want to spend too many hours on this. Secondary concerns for me are not having to deal with all of Samsung's bloatware and increasing my battery life.
Thanks in advance for all of your help, and apologies if I am posting in the wrong place.
MikeDacre said:
tl;dr: I tried to hack the SystemUI.apk file to get rid of the s-finder notification bar, I needed to deodex the apk to do this. I did that (first time ever), but then I didn't know what to do with the .odex.art.xz file, so I removed the whole arm/ folder from the SystemUI directory, and just left my modified SystemUI.apk file in there. After clearing the cache and dalvik, the SystemUI app kept crashing and I had to restore from backup. What do I do with the arm directory, and is that even the problem, or should I not even try to do this?
I have a sprint Galaxy S4 (jfltespr; SPH-L720) that I just upgraded to lollipop via the regular system update, now have Android 5.0.1, baseband L720VPUGOD2, kernel 3.4.0. My phone is rooted with BusyBox installed. I used to use CyanogenMod (for a long time), but the stability was low for me, particularly when travelling internationally and changing SIMs: I would frequently lose GPS completely (see http://forum.xda-developers.com/galaxy-s4-sprint/help/gps-cyanogen-mod-install-t3009245/), requiring me to flash the stock ROM again. So I reverted to stock, and used xposed. Unfortunately, following the upgrade to 5.0.1, xposed now requires flashing a zip and is in super-alpha, and so I am nervous about using it. The only thing I really want a custom ROM or xposed for is to get rid of bloat. I have managed with just Titanium to get rid of the most annoying apps, but I am still stuck with that stupid 'S-Finder'/'Quick Connect' bar. I can get rid of it by switching my device name to jfltevzr or jflteatt in build.prop, but then I lose other features, such as the ability to change to the GSM network.
So, I tried to hack the SystemUI apk according to the instructions here and here. Essentially my plan was: download SystemUI.apk, edit the PhoneStarusBar.smali, and profit.
I have never done this before, so I rapidly ran into the issue that I needed to deodex the apk. I followed this guide and everything seemed to go smoothly, except that the PhoneStatuBar.smali file had different code from the tutorial. In the tutorial I had to change
Code:
if-nez v8, ;cond_0
to
Code:
if-nex v8, :cond_5
but in my file it seemed that the syntax was similar, but the labels were different, so I ended up changing
Code:
if-nez v8, ;cond_15
to
Code:
if-nex v8, :cond_c0
I created the classes.dex file and packaged it into the apk with the command
Code:
7za u -tzip SemcVideo.apk classes.dex
However, I was confused about what to do with the new apk. In my system, the original apk lives in /system/priv-app/SystemUI/SystemUI.apk, and next to the apk is an arm directory with an odex.xz file (which I deodexed) and an art.odex.xz file that I have no idea what to do with. Since I didn't know what to do, I just deleted the whole arm directory, put the modified (deodexed) SystemUI.apk file in /system/priv-app/SystemUI/, cleared the cache and dalvik cache, and rebooted. After about 20 minutes of rebuilding the cache for all of my apps, the phone started, but it had the dreaded 'SystemUI is not responding, do you want to restart it' message. I ended up having to restore a backup and wipe the cache again.
So, my question is: what do I do with that arm directory? Is that what broke it, or is the problem that I just screwed up the PhoneStatusBar.smali file? I don't really know what I am doing as I don't know java that well, but I would like to get this to work.
Alternatively, do you guys think that maybe the Google Play Edition ROM might be more stable that CyanogenMod, or that I should just try to flash to xposed alpha even though it is so 'unstable'? It looks to me like the GPE ROM might be more stable than CM, but I have no idea. I know that it hasn't been patched for StageFright yet, even though CM has.
Finally, I should specify that I am not an Android hacker, I have a full time job in science research and I volunteer a lot. My top priority for my phone is stability and reliability, and I don't want to spend too many hours on this. Secondary concerns for me are not having to deal with all of Samsung's bloatware and increasing my battery life.
Thanks in advance for all of your help, and apologies if I am posting in the wrong place.
Click to expand...
Click to collapse
Just go into res/values/dimens.xml once you have it decompiled and change every line with SFinder or QuickConnect to "0.0dip" using Notepad++ then recompile the apk and remove the SF and QC apks... It's a lot easier that way. Xposed works fine but you have to use the Samsung specific one. There is a link in my Wicked X thread.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
bilgerryan said:
Just go into res/values/dimens.xml once you have it decompiled and change every line with SFinder or QuickConnect to "0.0dip" using Notepad++ then recompile the apk and remove the SF and QC apks... It's a lot easier that way. Xposed works fine but you have to use the Samsung specific one. There is a link in my Wicked X thread.
Click to expand...
Click to collapse
Thanks so much bilgerryan, I am doing that now. I have another dumb question: what is the best way to copy back the new apk? Is it fine for me to use adb to do it from the recovery? I would just delete the original (after backing up) and then copy my modified version in.
Also, (sorry for the multi-post), do I need to wipe both the Cache and the Dalvik Cache partitions after making the switch?
MikeDacre said:
Thanks so much bilgerryan, I am doing that now. I have another dumb question: what is the best way to copy back the new apk? Is it fine for me to use adb to do it from the recovery? I would just delete the original (after backing up) and then copy my modified version in.
Click to expand...
Click to collapse
You have to set permissions to 0644 after you copy it over.. I use root browser. Long press on the file, press Permissions and then make it look like the screenshot. Or you can just use my ROM (second screenshot), it is already removed plus a bunch of other fun stuff... Wicked X v10.6 in Android Development section.
bilgerryan said:
You have to set permissions to 0644 after you copy it over.. I use root browser. Long press on the file, press Permissions and then make it look like the screenshot. Or you can just use my ROM (second screenshot), it is already removed plus a bunch of other fun stuff... Wicked X v10.6 in Android Development section.
Click to expand...
Click to collapse
Great, thanks. I will give your ROM a try in the future, but right now I want to figure out how to do this I just tried it copying back my modified apk and wiping the cache and dalvik, but after it booted, there was no systemui
I just changed the permissions to 644 now, they were 777 before, so that may have been the problem.
Do I need to wipe the cache and dalvik every time? It takes a really long time to boot after that.
Thanks again!
MikeDacre said:
Great, thanks. I will give your ROM a try in the future, but right now I want to figure out how to do this I just tried it copying back my modified apk and wiping the cache and dalvik, but after it booted, there was no systemui
I just changed the permissions to 644 now, they were 777 before, so that may have been the problem.
Do I need to wipe the cache and dalvik every time? It takes a really long time to boot after that.
Thanks again!
Click to expand...
Click to collapse
No, you only need to do that when completely removing a system app. A record is enough. I haven't worked with odex in a long time, I can't remember if there is anything extra you need to do.
bilgerryan said:
No, you only need to do that when completely removing a system app. A record is enough. I haven't worked with odex in a long time, I can't remember if there is anything extra you need to do.
Click to expand...
Click to collapse
OK, unfortunately after making the changes, there is no SystemUI; all I have is my launcher (SmartLauncher) with a black background and no notification bar. After restarting I have the same issue. By putting back the old SystemUI.apk I fix the problem.
Here is what I tried:
Copy the SystemUI.apk file from /system/priv-app/SystemUI/SystemUI.apk
Copy the frameworks from /system/frameworks/twframework-res.apk and /system/framework/framework-res.apk
Install all frameworks:
Code:
apktool if framework-res.apk
apktool if twframework-res.apk
apktool if SystemUI.apk
Decompile the apk:
Code:
apktool d SystemUI.apk
Edit res/values/dimens.xml with vim. Here is the patch of my edits:
Code:
--- /tmp/vqMxlsi/3 2015-08-19 18:23:07.346653666 -0700
+++ /tmp/vqMxlsi/4 2015-08-19 18:23:07.369986999 -0700
@@ -832,8 +832,8 @@
<dimen name="finder_connect_button_padding_top">11.0dip</dimen>
<dimen name="finder_connect_button_height">35.0dip</dimen>
<dimen name="finder_connect_layout_height">57.0dip</dimen>
- <dimen name="tw_quick_panel_sfinder_qconnect_button_text_size">16.0dip</dimen>
- <dimen name="tw_quick_panel_sfinder_qconnect_drawable_padding">5.0dip</dimen>
+ <dimen name="tw_quick_panel_sfinder_qconnect_button_text_size">0.0dip</dimen>
+ <dimen name="tw_quick_panel_sfinder_qconnect_drawable_padding">0.0dip</dimen>
<dimen name="notificatoin_big_picture_height">176.0dip</dimen>
<dimen name="rssi_battery_gap">3.0dip</dimen>
<dimen name="battery_icon_width">10.0dip</dimen>
Recompile the apk:
Code:
apktool b SystemUI
Zipalign the apk:
Code:
zipalign -v 4 SystemUI/dist/SystemUI.apk final/SystemUI.apk
Copy the new apk to my external sd
Connect with adb and do the following:
Code:
mount -o remount,rw /system
cd /system/priv-app/SystemUI
cp SystemUI.apk /storage/extSdCard/Backup/SystemUI.apk
rm SystemUI.apk
cp /storage/extSdCare/SystemUI.apk .
chmod 644 SystemUI.apk
reboot
Is there something else I am missing? It seems that after my edits, SystemUI.apk just doesn't launch at all. There isn't even an error message. But all I changed are those two lines. The problem is the same with or without the zipalign step. Doing essentially the same procedure above to restore the old SystemUI.apk brings everything back to normal, so I don't think it is a permissions issue. Wiping the cache and dalvik and restarting makes no difference, I have the same problem. Restarting a couple of times also does not resolve the problem.
Any ideas?
MikeDacre said:
OK, unfortunately after making the changes, there is no SystemUI; all I have is my launcher (SmartLauncher) with a black background and no notification bar. After restarting I have the same issue. By putting back the old SystemUI.apk I fix the problem.
Here is what I tried:
Copy the SystemUI.apk file from /system/priv-app/SystemUI/SystemUI.apk
Copy the frameworks from /system/frameworks/twframework-res.apk and /system/framework/framework-res.apk
Install all frameworks:
Code:
apktool if framework-res.apk
apktool if twframework-res.apk
apktool if SystemUI.apk
Decompile the apk:
Code:
apktool d SystemUI.apk
Edit res/values/dimens.xml with vim. Here is the patch of my edits:
Code:
--- /tmp/vqMxlsi/3 2015-08-19 18:23:07.346653666 -0700
+++ /tmp/vqMxlsi/4 2015-08-19 18:23:07.369986999 -0700
@@ -832,8 +832,8 @@
<dimen name="finder_connect_button_padding_top">11.0dip</dimen>
<dimen name="finder_connect_button_height">35.0dip</dimen>
<dimen name="finder_connect_layout_height">57.0dip</dimen>
- <dimen name="tw_quick_panel_sfinder_qconnect_button_text_size">16.0dip</dimen>
- <dimen name="tw_quick_panel_sfinder_qconnect_drawable_padding">5.0dip</dimen>
+ <dimen name="tw_quick_panel_sfinder_qconnect_button_text_size">0.0dip</dimen>
+ <dimen name="tw_quick_panel_sfinder_qconnect_drawable_padding">0.0dip</dimen>
<dimen name="notificatoin_big_picture_height">176.0dip</dimen>
<dimen name="rssi_battery_gap">3.0dip</dimen>
<dimen name="battery_icon_width">10.0dip</dimen>
Recompile the apk:
Code:
apktool b SystemUI
Zipalign the apk:
Code:
zipalign -v 4 SystemUI/dist/SystemUI.apk final/SystemUI.apk
Copy the new apk to my external sd
Connect with adb and do the following:
Code:
mount -o remount,rw /system
cd /system/priv-app/SystemUI
cp SystemUI.apk /storage/extSdCard/Backup/SystemUI.apk
rm SystemUI.apk
cp /storage/extSdCare/SystemUI.apk .
chmod 644 SystemUI.apk
reboot
Is there something else I am missing? It seems that after my edits, SystemUI.apk just doesn't launch at all. There isn't even an error message. But all I changed are those two lines. The problem is the same with or without the zipalign step. Doing essentially the same procedure above to restore the old SystemUI.apk brings everything back to normal, so I don't think it is a permissions issue. Wiping the cache and dalvik and restarting makes no difference, I have the same problem. Restarting a couple of times also does not resolve the problem.
Any ideas?
Click to expand...
Click to collapse
It's because it's odexed. That is why almost every ROM you see is deodexed except stock ROMs.
bilgerryan said:
It's because it's odexed. That is why almost every ROM you see is deodexed except stock ROMs.
Click to expand...
Click to collapse
Do you think it is possible for me to deodex it? I did that before after editing the smali as described above, but I didn't know what to do with the arm/ directory and so I just deleted it, and that didn't work (Got a SystemUI has crashed message).
MikeDacre said:
Do you think it is possible for me to deodex it? I did that before after editing the smali as described above, but I didn't know what to do with the arm/ directory and so I just deleted it, and that didn't work (Got a SystemUI has crashed message).
Click to expand...
Click to collapse
You would have to deodex the entire ROM.
bilgerryan said:
You would have to deodex the entire ROM.
Click to expand...
Click to collapse
Ah! I understand. Sorry for all of these super basic beginner questions. OK, so I am thinking about deodexing the system ROM now, I realize that I could just install an already made custom ROM, but I would like to try this.
As this is my first time trying this, could you clarify if this will work:
Download this tool: http://androidforums.com/threads/tool-linux-batch-lollipop-deodex-v1-9-8-9-15.931146/
Copy /system/app, /system/priv-app, and /system/framework to my computer
Run the 'deodex_lollipop' tool
Create a very simple flashable zip using the sample here: http://www.droidviews.com/create-flashable-zips-cwmtwrp-recovery/ with the contents of the deodexed /system folder I just created
Flash that in TWRP
Then make the edits I mentioned above to the SystemUI.apk
Will that work? Or is it likely to be very difficult?
If it does work, are there downsides to doing it? Not getting future updates, running slower, etc, or should it be basically the same as before except with the s-finder toolbar gone?
Thanks so much for all of your help, this is really great. :good:
MikeDacre said:
Ah! I understand. Sorry for all of these super basic beginner questions. OK, so I am thinking about deodexing the system ROM now, I realize that I could just install an already made custom ROM, but I would like to try this.
As this is my first time trying this, could you clarify if this will work:
Download this tool: http://androidforums.com/threads/tool-linux-batch-lollipop-deodex-v1-9-8-9-15.931146/
Copy /system/app, /system/priv-app, and /system/framework to my computer
Run the 'deodex_lollipop' tool
Create a very simple flashable zip using the sample here: http://www.droidviews.com/create-flashable-zips-cwmtwrp-recovery/ with the contents of the deodexed /system folder I just created
Flash that in TWRP
Then make the edits I mentioned above to the SystemUI.apk
Will that work? Or is it likely to be very difficult?
If it does work, are there downsides to doing it? Not getting future updates, running slower, etc, or should it be basically the same as before except with the s-finder toolbar gone?
Thanks so much for all of your help, this is really great. :good:
Click to expand...
Click to collapse
It should work but line with everything on here requires a lot of trial and error. If it sounds like something you want to try then go ahead.