Jump to content


Photo

[Solved] Editing "settings.apk"


  • Please log in to reply
7 replies to this topic

#1 tucstwo

tucstwo

    www.drdevs.com

  • Administrator
  • 14,435 posts
  • Twitter:tucstwo
  • Google+:tucstwo@gmail.com
  • LocationNJ
  • Current Device(s):LG G3 VS985, Nexus 7 (flo)

Posted 16 September 2012 - 02:50 PM

Ok, so I decompiled settings.apk because I wanted to add something to it. From what I understood, I went into /res/xml/settings_headers.xml and added the line I wanted to add. I went into /res/drawable-hdpi/ and added the ic_settings_icon.png I wanted associated with it. Then I added what I thought were the only lines needed in /res/values/strings/ and /res/values/ids/. It recompiled, seems like no problem. But then after I installed it to the phone in /system/app/ with "rw-r--r--" perms upon reboot it's "GONE". It's not in the app drawer, I can't click the icon on my screen it says "app isn't installed". If I browse to it with root explorer, it is indeed there. What did I miss?

Thanks in advance!

Visit DRDevs.com hosting site for all official Droidrzr.com ROMs, Apps, GApps and other mods/files!!
Please PM me if you need help!
I will be hosting AOSP-Based ROM GApps packages!
Download the most Up-to-Date GApps Packages for AOSP ROMs from me here!


#2 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 16 September 2012 - 03:26 PM

Ok, so I decompiled settings.apk because I wanted to add something to it. From what I understood, I went into /res/xml/settings_headers.xml and added the line I wanted to add. I went into /res/drawable-hdpi/ and added the ic_settings_icon.png I wanted associated with it. Then I added what I thought were the only lines needed in /res/values/strings/ and /res/values/ids/. It recompiled, seems like no problem. But then after I installed it to the phone in /system/app/ with "rw-r--r--" perms upon reboot it's "GONE". It's not in the app drawer, I can't click the icon on my screen it says "app isn't installed". If I browse to it with root explorer, it is indeed there. What did I miss?

Thanks in advance!


The files to be edited to add headers in Settings.apk:
/res/values/ids.xml
/res/values/strings.xml
/res/xml/settings_headers

Hopefully what you added looked something like this:

Please Login or Register to see this Hidden Content


As you can probably guess, that will add SuperSU into the settings.


Last, most important thing! Did you sign it? Did you do the drag and drop technique for keeping the signature?

Hope I helped you!
  • mike2nl likes this

byte3plusrainbowsmallllllllller.png


#3 tucstwo

tucstwo

    www.drdevs.com

  • Administrator
  • 14,435 posts
  • Twitter:tucstwo
  • Google+:tucstwo@gmail.com
  • LocationNJ
  • Current Device(s):LG G3 VS985, Nexus 7 (flo)

Posted 16 September 2012 - 04:30 PM

The files to be edited to add headers in Settings.apk:
/res/values/ids.xml
/res/values/strings.xml
/res/xml/settings_headers

Hopefully what you added looked something like this:

Please Login or Register to see this Hidden Content


As you can probably guess, that will add SuperSU into the settings.


Last, most important thing! Did you sign it? Did you do the drag and drop technique for keeping the signature?

Hope I helped you!


I know my op may have been tl;dr, but the only files I edited were he ones you listed, except I made an icon for the line to be pressed, labeled it accordingly and pointed to it properly.

I didn't do any drag and drops as "values" doesn't show up with just 7zip, you need to decompile/recompile with apktool. I also tried apk manager which worked better.

Anyhoo, signing. I am editings settings apk as part of my Jekyll rom, so I am signing the entire package before its flashed. Should I sign the apk and then sign the rom zip over and above?

What I can't figure out is why the apk is now not executable? And ive doubke checked perms. It just kinda disappeared even tho visible in file manager apps.


Tap'n from my Nexus 7 AOKP

Visit DRDevs.com hosting site for all official Droidrzr.com ROMs, Apps, GApps and other mods/files!!
Please PM me if you need help!
I will be hosting AOSP-Based ROM GApps packages!
Download the most Up-to-Date GApps Packages for AOSP ROMs from me here!


#4 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 16 September 2012 - 04:39 PM

I know my op may have been tl;dr, but the only files I edited were he ones you listed, except I made an icon for the line to be pressed, labeled it accordingly and pointed to it properly.

I didn't do any drag and drops as "values" doesn't show up with just 7zip, you need to decompile/recompile with apktool. I also tried apk manager which worked better.

Anyhoo, signing. I am editings settings apk as part of my Jekyll rom, so I am signing the entire package before its flashed. Should I sign the apk and then sign the rom zip over and above?

What I can't figure out is why the apk is now not executable? And ive doubke checked perms. It just kinda disappeared even tho visible in file manager apps.


Tap'n from my Nexus 7 AOKP



If you're using dsixda's kitchen, yes, go into advanced settings and sign all of the apks, then go through the building process to sign the zip, you're correct.

To use the drag and drop method to keep the signature:
Make you your edits to the decompiled apk.
Recompile it
Open both the original apk and the newly compiled apk in 7zip
Drag and drop the resources.asrc, classes.dex, and any other files you changed into the original apk.
Use the apk for your purposes.

byte3plusrainbowsmallllllllller.png


#5 tucstwo

tucstwo

    www.drdevs.com

  • Administrator
  • 14,435 posts
  • Twitter:tucstwo
  • Google+:tucstwo@gmail.com
  • LocationNJ
  • Current Device(s):LG G3 VS985, Nexus 7 (flo)

Posted 17 September 2012 - 06:37 AM

If you're using dsixda's kitchen, yes, go into advanced settings and sign all of the apks, then go through the building process to sign the zip, you're correct.

To use the drag and drop method to keep the signature:
Make you your edits to the decompiled apk.
Recompile it
Open both the original apk and the newly compiled apk in 7zip
Drag and drop the resources.asrc, classes.dex, and any other files you changed into the original apk.
Use the apk for your purposes.


could I just resign the apk? I changed files in /res/values/ folder and that folder doesn't even show in 7zip. it only appears after you decompile. I'm gonna try to do it again and resign it. I think it got tossed out because it lacked signature. And no I don't use any kitchens, I do this crap the hard way, lol.

Visit DRDevs.com hosting site for all official Droidrzr.com ROMs, Apps, GApps and other mods/files!!
Please PM me if you need help!
I will be hosting AOSP-Based ROM GApps packages!
Download the most Up-to-Date GApps Packages for AOSP ROMs from me here!


#6 tucstwo

tucstwo

    www.drdevs.com

  • Administrator
  • 14,435 posts
  • Twitter:tucstwo
  • Google+:tucstwo@gmail.com
  • LocationNJ
  • Current Device(s):LG G3 VS985, Nexus 7 (flo)

Posted 17 September 2012 - 07:32 AM

If you're using dsixda's kitchen, yes, go into advanced settings and sign all of the apks, then go through the building process to sign the zip, you're correct.

To use the drag and drop method to keep the signature:
Make you your edits to the decompiled apk.
Recompile it
Open both the original apk and the newly compiled apk in 7zip
Drag and drop the resources.asrc, classes.dex, and any other files you changed into the original apk.
Use the apk for your purposes.


Follow Up, I got it. It had to be a signature breaking issue and thats why it was getting tossed. Either that or it was from replacing the resources.asrc. Thank you Bytecode.

Visit DRDevs.com hosting site for all official Droidrzr.com ROMs, Apps, GApps and other mods/files!!
Please PM me if you need help!
I will be hosting AOSP-Based ROM GApps packages!
Download the most Up-to-Date GApps Packages for AOSP ROMs from me here!


#7 mattfox27

mattfox27

    Member

  • Members
  • PipPip
  • 87 posts
  • Twitter:@Mattfox27
  • Google+:Mattfox27@gmail.com (Gtalk)
  • LocationSoCali

Posted 01 October 2012 - 03:19 PM

Im trying to add beats audio to my settings.apk, im familiar with the tools and layout needed but the last time i did this was with my DX2 a while back so i kinda forgot is there anyway you could run me through the proceedure of adding beats for example. What size does the icon need to be and how do i sign it? Do you just use apk-manager to sign it or do you have to use android-SDK....Whats this other kitchen your talking about?
Don't take me too seriously, its only my opinion...

#8 tucstwo

tucstwo

    www.drdevs.com

  • Administrator
  • 14,435 posts
  • Twitter:tucstwo
  • Google+:tucstwo@gmail.com
  • LocationNJ
  • Current Device(s):LG G3 VS985, Nexus 7 (flo)

Posted 01 October 2012 - 04:17 PM

Im trying to add beats audio to my settings.apk, im familiar with the tools and layout needed but the last time i did this was with my DX2 a while back so i kinda forgot is there anyway you could run me through the proceedure of adding beats for example. What size does the icon need to be and how do i sign it? Do you just use apk-manager to sign it or do you have to use android-SDK....Whats this other kitchen your talking about?


Pm me and I'll walk u through it on gtalk


Sent from my peanut butter and jelly sandwich

Visit DRDevs.com hosting site for all official Droidrzr.com ROMs, Apps, GApps and other mods/files!!
Please PM me if you need help!
I will be hosting AOSP-Based ROM GApps packages!
Download the most Up-to-Date GApps Packages for AOSP ROMs from me here!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users