[Q] Tweaking CM12s System img - ONE Q&A, Help & Troubleshooting

I edited the CM12s for Oneplus one system.img to remove some of the apks which i dint want as i did on CM11s using ubuntu but here after flashing the image it cause boot loop. The system img in CM12s contains folders with apks inside the App folder and some contain lib folder within them. How do we edit such system images. Kindly help with a solution.

rajesheber said:
I edited the CM12s for Oneplus one system.img to remove some of the apks which i dint want as i did on CM11s using ubuntu but here after flashing the image it cause boot loop. The system img in CM12s contains folders with apks inside the App folder and some contain lib folder within them. How do we edit such system images. Kindly help with a solution.
Click to expand...
Click to collapse
Wrong section.. Wrong section... Wrong section..!!!!!!
Sadly again wo no thread in a Wrong section by an Indian.. Makes me feel sad..

oh oops. Which section do i move this

rajesheber said:
oh oops. Which section do i move this
Click to expand...
Click to collapse
Move it to the [Q&A] section. You'll never get a response here. Ask a moderator.

Why don't you just flash, root and then remove unnecessary files?

Wrong section!
Btw what program you use to modify it?
If you are using windows:
use ext4 unpacker and ext2explore to modify your system.img

I dint want to root my device.

I use linux to unpack edit the contents and then make the file again. But in this lollipop img i see that its all folders inside S/apps rather than just apks as it was before. So i did remove the folders in which some had lib folder inside. On flashing the new image it goes into bootloops . Anyway to handle this

Related

ADB And other questions

Hello. I've used ADB to extract from the system folder the hole files of my android. I would like to know if is possible for me to make a ROM from there.
Also i would like to ask if i can use the META-INF and boot.img wich is on other roms into this one, in order to create a zip file ready for use of flasshing. Thanks
jgcaap said:
Hello. I've used ADB to extract from the system folder the hole files of my android. I would like to know if is possible for me to make a ROM from there.
Also i would like to ask if i can use the META-INF and boot.img wich is on other roms into this one, in order to create a zip file ready for use of flasshing. Thanks
Click to expand...
Click to collapse
It may be possible but certainly not recommended.
This is actually no different than taking the /system folder from the rom that you had flashed.
The best way is compiling your rom from source (which of course requires Linux).
The problem with using another rom's boot.img is that the kernel and drivers may not necessarily match those called by those in /system which may cause a lot of errors and instability that is assuming you can get it to boot.

Theming files?

Sorry about the first post. I was wondering where the png files are located in the rom so I can start theming
Sent from my HERO200 using XDA App
If this has been addressed sorry. I searched but didn't find it. If it's been addressed please point me in the right direction. Thanks
Sent from my HERO200 using XDA App
abadasstanker69 said:
If this has been addressed sorry. I searched but didn't find it. If it's been addressed please point me in the right direction. Thanks
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
Ull find all the PNG in the individual apps in the system/app, system/framework, and data/app.
Papa Smurf151 said:
Ull find all the PNG in the individual apps in the system/app, system/framework, and data/app.
Click to expand...
Click to collapse
Thanks bro! All I see is apk files though. Where are the images?? Also, is there anything specific I have to do in order to export/import the files in Photoshop? I read something somewhere about a .9 PNG or something like that....what does this mean? BTW great work on your theme! It looks awesome! I love it!
Ok I'm a douche bad. lol I renamed the apk to .zip and extracted with winrar. Now I'm in to where I want to be! I'm looking for the little android guy when you make a phone call but, I can't seem to find him in the HTCdialer.apk. Am I looking in the wrong place? Thanks again for the help!
They are in the apk's.
http://developer.android.com/index.html
Good luck.
Ok found the little droid man! This is gonna be awesome!! Any more useful places I should mess around in? This is gonna be FUN!!!!!!!
Ok so I have edited some files and rezipped them. Now do I flash the updated files through recovery or do I have to rename it to .apk and stick it in the rom and re-flash?
abadasstanker69 said:
Ok so I have edited some files and rezipped them. Now do I flash the updated files through recovery or do I have to rename it to .apk and stick it in the rom and re-flash?
Click to expand...
Click to collapse
I may be wrong but I have done the same thing, all I did when I was finished was push them via adb to their respective places and then reboot and it worked fine for me. Nandroid before you push so if it boot loops you can recover. Then the easiest thing at that point would be to save your work in the ROM you modded, push to sd root, wipe and flash it. I am creating a themed version of Darchoid 2.7 but taking my sweet time as I dont have a lot of it to begin with.
For my HTC Keyboard modifications, I just dropped my new images into the APK that was open in 7zip and pushed it to the /system/app/ dir and launched the keyboard, and BAM, my new keyboard.
abadasstanker69 said:
Ok so I have edited some files and rezipped them. Now do I flash the updated files through recovery or do I have to rename it to .apk and stick it in the rom and re-flash?
Click to expand...
Click to collapse
You have to sign it too. If you want to flash it. If you wanna just push it through adb then then put your edited .apk in AndroidSDK\tools and push it.
Go to command prompt:
Code:
cd C:\android-sdk-windows\tools
adb remount
adb push xxxxx.apk /system/app/
exit
C:\android-sdk-windows\tools is assuming thats where your sdk\tools folder is
xxxxx.apk is the name of the .apk
/system/app/ is assuming that's where you got the .apk from
Thanks for all the help guys. I appreciate it but, I was attempting to make an update.zip so people could then flash them once I complete them. I like to make things idiot proof
So I did some looking and found an autosigner. Problem is, now it wants boot scripts? WTF? I know I could push them through adb and simply tell others to do the same. I was just wondering if there was an easy way of doing this? I'm currently using avabox. Thanks again guys!!
abadasstanker69 said:
Thanks for all the help guys. I appreciate it but, I was attempting to make an update.zip so people could then flash them once I complete them. I like to make things idiot proof
So I did some looking and found an autosigner. Problem is, now it wants boot scripts? WTF? I know I could push them through adb and simply tell others to do the same. I was just wondering if there was an easy way of doing this? I'm currently using avabox. Thanks again guys!!
Click to expand...
Click to collapse
Just use a mod or update.zip any will do and add ur files and delete the originals in the zip. Keep the meta file and such. Then u can autosign with avabox. It gets tricky with scripts when making a rom. The update.zip script is very basic
Check This Out
You can just take one from a working zip if you want
Otherwise you will be making a file (i use notepad++) called "update-script" *notice-there is no file extension like .txt or anything*
In general they ususally just have:
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
(but may be different depending on where you want the zip's contents to be put in)
Which will be placed into a folder directory META-INF/com/google/android/update-script
You can also add things such as:
Code:
delete SYSTEM:app/contacts.apk
*or whatever you want deleted*
After you make the update-script, just sign it and flash
See my attachment for a template
[/QUOTE]You can also add things such as:
Code:
delete SYSTEM:app/contacts.apk
*or whatever you want deleted*
After you make the update-script, just sign it and flash
See my attachment for a template[/QUOTE]
What would be the purpose in doing that? Would it actually delete people's contacts if they flashed my theme? That's kinda cool but, I'm not trying to be a **** like that! lol
Also, are you guys referring to an update.zip that's all ready out as in a theme file? Or as in a rom? I understand I can use the work that's all ready there and I actually tried that. I zipped the file back up.Then signed with avabox. Renamed it to .apk. Stuck it back in the rom. Attempted to flash and got the boot script error
abadasstanker69 said:
What would be the purpose in doing that? Would it actually delete people's contacts if they flashed my theme? That's kinda cool but, I'm not trying to be a **** like that! lol
Also, are you guys referring to an update.zip that's all ready out as in a theme file? Or as in a rom? I understand I can use the work that's all ready there and I actually tried that. I zipped the file back up.Then signed with avabox. Renamed it to .apk. Stuck it back in the rom. Attempted to flash and got the boot script error
Click to expand...
Click to collapse
haha i just used contacts.apk as an example, it could be anything you wanted really. But its generally only used for when making an update.zip for boot screens.
And yes, you could take an already existing zip... but i was a little confused as to what you were doing sorry.
Correct me if I'm misunderstanding you again lol, but you're editing images within .apks and want to make a flashable-update.zip once you finish?
Easiest way, as stated before would be to use 7-zip.
Open the .apk Directly with 7-zip (no renaming the .apk to .zip or anything) and drag the replacement images into the .apk - overwriting the older images
Test it by pushing the apk to your phone, if it works without any problems great
If it doesn't then use something like Apk Manager to extract the apk/edit the files/and zip them back up < generally what I do
Put the .apk into the apps folder in my "template update.zip" file
Delete the framework folder and readme.txt file
Sign the .zip
Flash
kyouko said:
haha i just used contacts.apk as an example, it could be anything you wanted really. But its generally only used for when making an update.zip for boot screens.
And yes, you could take an already existing zip... but i was a little confused as to what you were doing sorry.
Correct me if I'm misunderstanding you again lol, but you're editing images within .apks and want to make a flashable-update.zip once you finish?
Easiest way, as stated before would be to use 7-zip.
Open the .apk Directly with 7-zip (no renaming the .apk to .zip or anything) and drag the replacement images into the .apk - overwriting the older images
Test it by pushing the apk to your phone, if it works without any problems great
If it doesn't then use something like Apk Manager to extract the apk/edit the files/and zip them back up < generally what I do
Put the .apk into the apps folder in my "template update.zip" file
Delete the framework folder and readme.txt file
Sign the .zip
Flash
Click to expand...
Click to collapse
LOL I really appreciate the help! You guys kick ass!!!! BUT I tried this method MINUS the renaming part and it didn't work. Sooooo....I'm assuming the renaming caused the issue.
Also, I was using winrar. I read somewhere that 7zip should be used instead of winrar but I just don't think this should matter considering the compression method is no different. Am I wrong? Also, will my theme have to vary from rom to rom? If I create this theme for people will I have to specify what rom I'm on?
Thanks again SOOOOOOOOOO much for the help guys...I know working with noobs can be a headache. I did it in the WinMo world for YEARS till I came to the "Dark Side"
abadasstanker69 said:
LOL I really appreciate the help! You guys kick ass!!!! BUT I tried this method MINUS the renaming part and it didn't work. Sooooo....I'm assuming the renaming caused the issue.
Also, I was using winrar. I read somewhere that 7zip should be used instead of winrar but I just don't think this should matter considering the compression method is no different. Am I wrong? Also, will my theme have to vary from rom to rom? If I create this theme for people will I have to specify what rom I'm on?
Thanks again SOOOOOOOOOO much for the help guys...I know working with noobs can be a headache. I did it in the WinMo world for YEARS till I came to the "Dark Side"
Click to expand...
Click to collapse
Yes 7zip works better for theming and roming. I tried winrar and it was a pain in the ass.
Yes u will have to specify which roms it will work on. Files on darchdroid r different than our 2.1 roms and so forth. So they wont work right.
Download avabox and use the signing tool in there to sign ur zips.
Make sure in ur zip if ur editing an app it's in the right place...ie system/app or system/framework or data/app. Then make sure ur Meta file is in there. After that sign it and then u can change the name and flash it
Papa Smurf151 said:
Yes 7zip works better for theming and roming. I tried winrar and it was a pain in the ass.
Yes u will have to specify which roms it will work on. Files on darchdroid r different than our 2.1 roms and so forth. So they wont work right.
Download avabox and use the signing tool in there to sign ur zips.
Make sure in ur zip if ur editing an app it's in the right place...ie system/app or system/framework or data/app. Then make sure ur Meta file is in there. After that sign it and then u can change the name and flash it
Click to expand...
Click to collapse
I'm such a freaking noob....what's the meta file for? This seems like alot to do for a theme :/
abadasstanker69 said:
I'm such a freaking noob....what's the meta file for? This seems like alot to do for a theme :/
Click to expand...
Click to collapse
The Meta file is for the update script. It has other uses but for ur purpose its for the update script which is the instructions the recovery uses to flash the theme. Like I stated before just use an existing one from a different theme or mod. Creating ur own is possible but not needed. Hit me up on gtalk if u want to ask me questions.
[email protected]
I don't mind teaching if anyone wants to learn

[Q] Editing zip before flashing a ROM

I know I have done this before and this is a noob question, but lately I've been having trouble with this.
If I make changes to the zip file of a ROM (eg replace a few existing files, and remove some unwanted system APKs, but not add anything new), do I need to sign the zip before flashing or just flash straight after editing? Also what's the best tool to use to replace the files within the zip? I trust WinRAR will do the trick...
djsubtronic said:
I know I have done this before and this is a noob question, but lately I've been having trouble with this.
If I make changes to the zip file of a ROM (eg replace a few existing files, and remove some unwanted system APKs, but not add anything new), do I need to sign the zip before flashing or just flash straight after editing? Also what's the best tool to use to replace the files within the zip? I trust WinRAR will do the trick...
Click to expand...
Click to collapse
I've never added anything (yet!), just deleted un-wanted APK's and altered some system files (ie build,prop etc). I've never signed anything and I used IZArc although only as that's what's installed on my XP system.
This is something that I too would like to do more so that I can further personalize and tweak some of these already great ROMS, so I'm also curious for some pointers from more the experienced.
Check the portal, there's an app to create flashable zips there.
PS - POST QUESTIONS IN THE GENERAL SECTION !!!!!!!!
You can set a flag in recovery to check for signatures or not. When it is not set you can flash any zip file
Sent from my HTC Desire S using XDA App
jorgen2009 said:
You can set a flag in recovery to check for signatures or not. When it is not set you can flash any zip file
Sent from my HTC Desire S using XDA App
Click to expand...
Click to collapse
I tried this once, and then I flashed the zip. It was a CM7 zip which would normally take at least 20-30 seconds to complete, but this modified zip flashed in less than ten seconds. It said successfully flashed but when I rebooted nothing had actually happened. Hence I was wondering what went wrong?

[TOOL] Apktool : decompile and recompile apk on android

decompile and recompile apk or even extract android boot.img/recovery.img on your android phone using this tool
This tool might come in handy is for all respected devs,modders and themers of our device
How to's :
First Download the package apktool4.4_armhf.zip from
https://code.google.com/p/apktool/downloads/detail?name=apktool4.4_armhf.zip&can=2&q=
Extract archive to /sdcard or if you want Better read write speed use the cache/data folder set permission to rwrr
Install Apktool4.x.apk
Now open the app from app drawer.
And
Make the most out of it !
For boot.img and recovery.img
Copy your boot.img to sdcard or /cache/yourfolder(for fast processing)
Single click boot.img select "extract"You will see new file named "kernel" and new folder "ramdisk"
if extracted properly no error will show up.
You can edit files in ramdisk folder.after editing touch ramdisk and select "repack" you can make the new boot.img which is named as new.img. For recovery.img it's the same way.
Hope this helped
NIKHILALWAYZ said:
decompile and recompile apk or even extract android boot.img/recovery.img on your android phone using this tool
This tool might come in handy is for all respected devs,modders and themers of our device
How to's :
First Download the package apktool4.4_armhf.zip from
https://code.google.com/p/apktool/downloads/detail?name=apktool4.4_armhf.zip&can=2&q=
Extract archive to /sdcard or if you want Better read write speed use the cache/data folder set permission to rwrr
Install Apktool4.x.apk
Now open the app from app drawer.
And
Make the most out of it !
For boot.img and recovery.img
Copy your boot.img to sdcard or /cache/yourfolder(for fast processing)
Single click boot.img select "extract"You will see new file named "kernel" and new folder "ramdisk"
if extracted properly no error will show up.
You can edit files in ramdisk folder.after editing touch ramdisk and select "repack" you can make the new boot.img which is named as new.img. For recovery.img it's the same way.
Hope this helped
Click to expand...
Click to collapse
first thnk u sir for ur tutorial i am mtk user. i put my boot.img into system folder and extracted i got this msg:-
"1250 1 records in
1250 1 records out
2247 blocks". and following folders are created there 1)ramdisk
2)kernal
3)ramdisk.cpio.gz (this file also get created) is it ok? should i go ahead?
prajul1123 said:
first thnk u sir for ur tutorial i am mtk user. i put my boot.img into system folder and extracted i got this msg:-
"1250 1 records in
1250 1 records out
2247 blocks". and following folders are created there 1)ramdisk
2)kernal
3)ramdisk.cpio.gz (this file also get created) is it ok? should i go ahead?
Click to expand...
Click to collapse
yes:good: ,for more info search on xda about decompiling and tools for editing.
I want to make a duplicate apk by using apktool 4.6 for phone.
example wechat.apk to wechat01.apk
And to install both on same device..
PLEASE PROVIDE TUTORIAL FOR DOING IT...
THANKS
Nit Patel said:
I want to make a duplicate apk by using apktool 4.6 for phone.
example wechat.apk to wechat01.apk
And to install both on same device..
PLEASE PROVIDE TUTORIAL FOR DOING IT...
THANKS
Click to expand...
Click to collapse
First,you will have to change the entire framework of the app (sorry,i have no idea how to do that) and secondly, both apps won't work in using the same device because of the android ID. i know to how to edit text/pictures/icons /fonts etc of an app..but no idea relating permissions management , so if you have any questions regarding that feel free to ask

[Q] Help with AOSP building....(Again)

Hey guys. So like my other post, I just started building AOSP. The first time I ran make with otapackage, it made a zip file, that I'm assuming was flashable. I also downloaded a SlimRom zip to compare them. I noticed that in the SlimROM Zip, it has a system folder, not .img files. This allows for greater control of what is on the ROM I think, such as editing build.prop. How do I implement this into my flashable zip? So essentialy, I would like my flashable zip to have a /system folder, not system.img , patch, dat , etc. Thanks!
You have a current thread on this.... No need for another. That just creates confusion and clutter. ?
Darth is right, please continue posting in your previous thread.
http://forum.xda-developers.com/google-nexus-5/help/started-building-aosp-little-help-t2931346
Thread closed.

Categories

Resources