[Q] Is it possible? - Galaxy S 5 Q&A, Help & Troubleshooting

... to "flash" or otherwise install theme type mods such as changing a notification icon, without recovery? I had experimented with framework type flashable zip files to do with on my GS3 and always flashed from recovery. I am trying to (at least for now) keep from tripping my KNOX.
Also is there a wifi hotspot app or mod that also does not require recovery?
With a towel root, I can probably do everything I want, and keep my KNOX at 0, if I can do these two things.
Bob

ParrSt said:
Is it possible? ... to "flash" or otherwise install theme type mods such as changing a notification icon, without recovery?
Click to expand...
Click to collapse
Sure. It's just more work. Having root gives you the necessary permissions to change system files and do anything that a (recovery) flashable zip file would.
But pragmatically, it wouldn't be reasonable to expect everyone going around writing custom install scripts for your theme mods when the common practice is to package them as a flashable zip.
The solution? It would be eminently useful to learn how to make manual changes yourself. Theme mods typically modify a system file e.g. TouchWizHome.apk or SystemUI.apk. You can make simple edits or replace packages with a root aware file browser e.g. FX. And more advanced edits with a decompiler like apktool.
.

fffft said:
Sure. It's just more work. Having root gives you the necessary permissions to change system files and do anything that a (recovery) flashable zip file would.
But pragmatically, it wouldn't be reasonable to expect everyone going around writing custom install scripts for your theme mods when the common practice is to package them as a flashable zip.
The solution? It would be eminently useful to learn how to make manual changes yourself. Theme mods typically modify a system file e.g. TouchWizHome.apk or SystemUI.apk. You can make simple edits or replace packages with a root aware file browser e.g. FX. And more advanced edits with a decompiler like apktool.
.
Click to expand...
Click to collapse
Oh I don't expect others to make my scripts. I was making the zip packages myself.
If I understand you correctly, I can use something like FX to replace the an icon in one of the .apks? Those are zip type files but FX can do that?

As I already said, yes you can. Icons are (usually) especially easy. It's literally just replacing an icon with a file browser, usually in the xxhdpi360 drawable folder of the apk.
Something like
Copy the apk to another directory or your PC
Temporarily rename the .apk to a .zip file
Use FX Root to browse the compressed file and locate the icon you want to change.
Delete the icon from the zip.
Drag and drop the new icon to replace it.
Rename the .zip back to .apk
Browse to the folder where you copied the apk from
Rename the original .apk to .bak in case you need it later
Move your modified apk to the directory
Confirm that the permissions are still 0644 (long press to check.. but I've never seen FX mess them up to start with).
Reboot
That may look like a lot of steps but they are all trivial and you can do the entire thing in about 60 seconds.
Features e.g. suppressing nags or some colour changes may require decompiliing an apk.
.

Related

Looking for a tutorial: how to cook a ROM?

I'm looking for a guide which tells how to make a own custom ROM from another one
I mean:
1. How to add/replace/remove apps in /system/app/?
1. a) Do they need to have special permission?
2. How to replace boot screen?
3. How to add custom kernel?
4. How to add Desire lockscreen/flip clock?
5. How to add transparent notofication area?
6. How to add Power menu?
I've been serching forum, but didn't find such tutorial. Would be very thanful to get this knowledge.
I think that will be very useful for maaaany android maniacs
1. Simple delete/copy apks in .zip file using 7-Zip or any other.
2. I belive you need to put bootanimation.zip in /data/local/ folder.
3. Idk
4. For Desire lockscreen you need edited HtcLockScreen.apk; for flip clock - HtcClockWidget.apk
5. Edited /system/framework-res.apk or /system/framework/com.htc.resources.apk. I'm not sure
6. You need edited /system/framework/android.policy.jar
69. Resign your zip file using Auto Sign
Attachment doesn't load, but I know about resigning ROM after everything is done
Ad. 1. As I thought, but do the need special permissions? And I also wonder one thing. Are they installed while flashing? Cuz they need to be in system registry, I think...
I have found this: http://wiki.android.com.pl/wiki/Kon...iana_instalowanych_aplikacji_razem_z_systemem
No any permissions etc.
Found this, too. Thanks.
to add a custom kernel you have to unpack the boot image and edit the ramdisk manually, although i think there is an option in dsixda's kitchen to unpack and repack the boot.img
I've got two more questions:
1. When signing, three files are created in folder META-INF: CERT.RSA, CERT.SF, MANIFEST.SF. But in other packages I see also com/google/android/update-script in META-INF. How to make it? Is it necessary?
2. If I want to make only flashable update file which changes one app or another file, eg. framework-res.apk, I have to create folder structure: system/framework/framework-res.apk, add it to zip archive (no compression?) and sing using Auto-sing. Am I right?
Edit:
Found nice guide there: update-script syntax
tomekk_nt said:
I've got two more questions:
1. When signing, three files are created in folder META-INF: CERT.RSA, CERT.SF, MANIFEST.SF. But in other packages I see also com/google/android/update-script in META-INF. How to make it? Is it necessary?
2. If I want to make only flashable update file which changes one app or another file, eg. framework-res.apk, I have to create folder structure: system/framework/framework-res.apk, add it to zip archive (no compression?) and sing using Auto-sing. Am I right?
Click to expand...
Click to collapse
The most important part of a recovery update zip is the update script. It will tell the recovery what to do. If you want an example of a basic update package, which replaces one file in the /system/framework (although a different one) can found here. Open this and read the META-INF/com/google/android/updater-script (or whatever its called). The syntax is pretty straight forward and I think its easiest to learn from the examples of updater scripts found here on XDA. For the simple case, of only replacing/adding files to the /system partition you can leave the updater script from the above example as is and only change the files under the /system directory in the zip.
Note, that the above example uses the newer upader-script (I hope I am writing this correctly, I am writing from memory) which also has a binary file in the same directory. Some update zips use the older "update-script" lone text script. For these kind of scripts, you can find a guide here.
Personally, I use RA recovery, and for this recovery you need to sign the update zips (last thing you do of course). At least for RA recovery, both the older "update-script" and the newer "updater-script" work fine, so its up to your personal preference which do you prefer.
Thanks. Found a guide you mentioned a couple of minutes ago and read it.
The more I know, the more questions it brings So one more thing. If I'd like to use the newer version of syntax: "updater-script", I need also to put this binary file in this folder. But I create/edit only "updater-script", binary file is the same for all packages, or do I need to edit it, too?
I built a kernel tool long time ago, very easy to use (only for linux)
1: unzip the file, place it where you want it eg your desktop
2: place boot.img in the working directory
3: double-click the menu icon or launch from terminal
4: it creates a new directory named BOOT-EXTRACT,edit what you want in there or change the kernel etc.. and repack it again via the kernel tool
see screenshot. here for those how want the tool >>> http://www.elelinux.se/tools/kernel_tool.zip
Edit: Only for Hero
tomekk_nt said:
Thanks. Found a guide you mentioned a couple of minutes ago and read it.
The more I know, the more questions it brings So one more thing. If I'd like to use the newer version of syntax: "updater-script", I need also to put this binary file in this folder. But I create/edit only "updater-script", binary file is the same for all packages, or do I need to edit it, too?
Click to expand...
Click to collapse
Only the updater-script. The binary is a replacement of the script-interpreter I think, but thats just an assumption.
elelinux said:
I built a kernel tool long time ago, very easy to use (only for linux)
Click to expand...
Click to collapse
And that's a good reason to install newest Ubuntu Thanks!
riemervdzee said:
Only the updater-script. The binary is a replacement of the script-interpreter I think, but thats just an assumption.
Click to expand...
Click to collapse
That's mine assuption, too, but would like to know it for 100%
Edit: I see you use it in your kernel update package. So you write only updater-script and place also update-binary next to it?
LOL, you've got help from every well known hero dev on xda, I'm sure you'll have all the info you need now to start building rom's. Good Luck!
Found an app called Easy Flashable zip Builder on this thread. Will test it soon.
tomekk_nt said:
Found an app called Easy Flashable zip Builder on this thread. Will test it soon.
Click to expand...
Click to collapse
But it is for MS Windows, or saw I wrong ? I have also built a tool to javasign files,but should probably write a manual first,it is easy to use but some dependencies maybe not so easy for a beginner with Linux.
tomekk_nt said:
That's mine assuption, too, but would like to know it for 100%
Edit: I see you use it in your kernel update package. So you write only updater-script and place also update-binary next to it?
Click to expand...
Click to collapse
Correcto

Pare down gapps package

I'd like to take a gapps package I have right now and pare it down only to the apps I want.
This is what I've done, but I wanted to make sure that it's all that needs to be done in order to remove the gapps I don't want.
1. delete apks from system/app folder
2. delete app reference to the same apps in 70-gapps file in addon.d and save
3. re-zip all files
Will this create a flashable gapps package, or have I done something wrong?
Thanks.
wvcadle said:
I'd like to take a gapps package I have right now and pare it down only to the apps I want.
This is what I've done, but I wanted to make sure that it's all that needs to be done in order to remove the gapps I don't want.
1. delete apks from system/app folder
2. delete app reference to the same apps in 70-gapps file in addon.d and save
3. re-zip all files
Will this create a flashable gapps package, or have I done something wrong?
Thanks.
Click to expand...
Click to collapse
Make sure the folder structure is correct, then it should be fine. Try flash it in the recovery, if it flash, then it is correct.
There are some dependencies lib files in "/system/lib" that can be removed. Check inside the individual apk for references.
ksilver89 said:
Make sure the folder structure is correct, then it should be fine. Try flash it in the recovery, if it flash, then it is correct.
There are some dependencies lib files in "/system/lib" that can be removed. Check inside the individual apk for references.
Click to expand...
Click to collapse
How do I look inside individual apks?
wvcadle said:
How do I look inside individual apks?
Click to expand...
Click to collapse
You can open apks with any zip program (such as WinZip, 7-zip, WinRAR, etc).
EDIT: That is, open them up and view the various files within them (eg. the images, etc). Not sure if that's what you needed, but just clarifying.

(Q)New to devoloping, trying to alter an already built rom. Any guidance appreciated

I just have a couple questions, I've been adjusting theme zips by changing around files in the zip then flashing.
I wanted to alter a rom I have by changing the apks that are in the system/app , data/app, and framework folders. Usually I'm able to view apks as zips, but I'm the rom zip file, I cannot. I can't seem to write in the zip file at all...
And I can't change is permissions cuz when I go into the root section in my xplore file manager, anytime I view the sd or extsd Cards, I don't get the same options.
Any guidance is appreciated
You've Just Been Tapatold ♧♢dbombROMv3beta♤♡
☆FlappyBird☆Score ☆ 85 ☆
Or if I'm in the wrong section... where should I go?
You've Just Been Tapatold ♧♢dbombROMv3beta♤♡
☆FlappyBird☆Score ☆ 85 ☆
you cant edit files IN compressed files. (zips)
extract the files you want to edit. edit them, then place them back in the zip, overwriting the old versions of the files you edited.
though it is best to extract the whole rom zip, edit then re-zip everything. most recoveries dont require signed zip files, or can be disabled, so you dont even need a special tool to re-zip them most of the time. just use windows zipping. or win rar with 0 compression.
Start reading here.
http://forum.xda-developers.com/general/xda-university
one of the top posts is how to make recovery flashable zips.

help me how to install

my rom is stock odex i used universal deodexer and deodexed my.system/app and system/framework folders in my pc . now my question.how can i install that app and framework folders to my phone ??(i tried replace with root explorer but it does not .(how can i make thats to a flashable zip?
but
my problem is not that . i can make a flashable zip . its working fine but after i flashed old .odex files doesnt delete. how can i add it to meta inf for when flashing delete app and replace new app and same for framework
You just need to put in a simple delete line into the update script
for example
Code:
delete("/system/app/Vending.apk");
will delete the Vending.apk from the folder system/app
remember if you are manually pushing files with a root browser you need root permissions and you need to set the correct file permissions - for most apps in the app folder it will be rw-r-r
thnx
thanx i learned if i want to delete folde i will use delete_recursive
help
look .
delete(system app systemui.odex
this is working succesfully but after i flashed my zip system ui is lost . it doesnt show . i looked system app its deodexed permissions is rw--r-r its true but doesnt show . what's can i do ?
denizarca said:
look .
delete(system app systemui.odex
this is working succesfully but after i flashed my zip system ui is lost . it doesnt show . i looked system app its deodexed permissions is rw--r-r its true but doesnt show . what's can i do ?
Click to expand...
Click to collapse
most likely if the status bar just doesn't show but does not display a force closed message its because the SystemUI.apk is not correctly signed
as long as the file name is correct and it is correctly compiled with no errors the only thing left is the signing
You can sign an apk easily with zipsigner (playstore)
just copy the apk to any folder on your sd card
start zip signer
select your apk as the input
select the name you want to call it for the output (make it different from the input - you can change the name later)
select platform key as the key you wish to sign (this is for system apps for user apps use a test key)
sign the apk
once done the apk will be outputted as a zip file
change the name of this zip to the name of your apk and don't forget to change the .zip extension back to .apk
put in a flashable and flash in cwm with system mounted
you can check any errors with the SystemUI.apk by doing a logcat via adb as the phone is starting up
By searching the logcat for SystemUI you will be able to see any errors in it and why its not starting - eg Signature mismatch skipping loading

CM12 superuser mod without computer

Since Serajr 'one click' superuser mod only works on stock ROM, you have to use apktool to achieve the same on CM. Here's how you can do it on your phone. Only tested on official CM12 on Xperia Z1c, with a clean flash of /system, (unmodified), but probably can be applied elsewhere, maybe with some adjustment.
1. Follow steps 1 and 2 in this post, (except for the part about copying theme files) - http://forum.xda-developers.com/sony-xperia-z1-compact/general/tweak-theme-computer-t3279649 Note that the /system/framework/SemcGenericUxpRes/SemcGenericUx file is not present in CM ROM, so instead you would copy /system/framework/org.cyanogenmod.platform-res.apk. Also copy /system/framework/services.jar to the same directory.
2. Import the first 2 files as framework, according to step 3 in the link above, then tap on services.jar, and 'decompile all'. You will end up with a folder called 'services-src'.
3. Using a root browser and capable text editor, (I used Mixplorer and Jota+), follow instructions to mod PackageManagerService.smali file here - http://forum.xda-developers.com/showpost.php?p=62909773&postcount=4
Notes on this step: This file is over 60,000 lines long, which is why I specified 'capable' above. Many text editing programs won't handle it very well. Even if they can display it OK, you're going to need something that has a good search function, and copy/paste ability or it will be a big headache trying to do this on a phone. I found the first line to edit somewhere around line 8,700, by searching for 'compareSignatures'. The tutorial recommends using the word 'cannot' to help find the second one, but that didn't work for me. I used 'compareSignature' for that also, and just used the arrows to jump ahead through the search results until I found it.
4. Once the mods are made, save and exit. Then go back to apktool, and tap on 'services-src' folder and choose 'recompile'. You will end up with a file called 'services.apk'. All that is in the 'apk' is a classes.dex file. Use Mixplorer or RTB to extract the classes.dex from the apk. Then, with Mixplorer, go into your original services.jar, (that you copied into apktool folder), and delete the classes.dex file in there. Then go back to your new classes.dex, that you extracted from services.apk, and copy it into the services.jar. Using Mixplorer, you don't have to unzip/rezip or extract anything. Just long-press your new classes.dex, choose copy, then go into the jar just by tapping it, and then paste.
5. Move the new services.jar to /system/framework and reboot, (of course back up your original just in case).
The only way I know to test su mod is to attempt to use something that claims to require it, so I tested it with this - http://forum.xda-developers.com/cro...t-xperia-z5-systemui-particle-effect-t3206206 (the same thread as above). See screenshots for success verification.
very nice

Categories

Resources