Related
Hello,
i am about to make some changes at a ROM for my Galaxy Nexus..
Since I want to change some Headlines in the Settings, I poured the Settings.apk.
I want to decompile and recompile it using apkt-tool. So i followed this guide. (I also tried auto apk tool)
Decompiling successed.
I edited the Settings_headers.xml.
Then i wanted to recompile the apk... But then the following error occurred:
http://www.pic-upload.de/view-15157159/Unbenannt.png.html
Any solutions? What should i do to make it work properly ?
Everytime i try to do it the same Error occurres.. i also tried to not edit anything and just recompile the apk to be sure that the mistake is not a mistake in the settings_headers.xml file.. Same Error.
I hope you can help me
Thanks in advance!
Its a system file,so you might need to add the framework-res.apk to the app,its sometimes needed to recompile,i believe you drag it into the command window.
I already did that with the framework-res.apk that was provided in the same ROM as the Settings.apk..
Same error..
Thois drives me crazy!
Most likely you need to update aapt. Install the latest sdk, and update the platform tools.
Sent from my Galaxy Nexus using xda premium
I have not even installed sdk...
so should i download install and pull the aapt to the folder where apk-tool is in?
Which platform tools do you mean?
Thanks for respnse btw
spartanier7 said:
I have not even installed sdk...
so should i download install and pull the aapt to the folder where apk-tool is in?
Which platform tools do you mean?
Thanks for respnse btw
Click to expand...
Click to collapse
After installing the sdk, run the updater and tick platform tools, and let that install. It will then put all necessary tools in a folder under the sdk. You don't need to put aapt in the same folder as apktool, just make sure it's in your path.
Sent from my Galaxy Nexus using xda premium
All right. Thanks for that. I will just try that and respond later whether it worked or not.
apktool had (has?) problems with ICS. dont even try. if thats where youre getting at spend your time searching xda and rootz for specific solutions, theres been workarounds and even bigfixes/updates. apktool is a ***** to get right because its error messages are basically gibberish, for instance i wasted half a day simply because aapt was not in the same directory (it was in PATH and i could access it, but stil..).
heres my apk environment, maybe it helps: http://www.mediafire.com/?2lyji92qqud6rym
I never had any issues with apktool and ics, and I have done numerous smali edits to both framework and nonframework files. As long as aapt is up to date, and framework-res from the rom you're editing is imported, everything works as expected.
molesarecoming said:
apktool had (has?) problems with ICS. dont even try. if thats where youre getting at spend your time searching xda and rootz for specific solutions, theres been workarounds and even bigfixes/updates. apktool is a ***** to get right because its error messages are basically gibberish, for instance i wasted half a day simply because aapt was not in the same directory (it was in PATH and i could access it, but stil..).
heres my apk environment, maybe it helps: http://www.mediafire.com/?2lyji92qqud6rym
Click to expand...
Click to collapse
Well, i have just downloaded and installed sdk+platform tools.
I´ve out apktool.jar into the platform tools folder and now it seems to work fine!
BIG THANKS for your help
If something goes wrong contrary to expectations I hope that I may come back to this thread and ask again.
Thanks my grandmasters
Edit:
Need help again..
As i said i want to change some headlines in the Settings. So i decompiled the Settings apk and changed the settings_headers.xml
I just changed one line that says
<header android:title="@string/eos_settings" />
Click to expand...
Click to collapse
to
<header android:title="@string/nexium_settings" />
Click to expand...
Click to collapse
now the console says that no ressource was found that matches @string/nexium_settings.
This may be obvious and I feel a bit ashamed for asking but what exactly do i have to change now to make it work?
Thanks in advance.
Sorry again for my noobish questions but.. it takes a village to raise a town
spartanier7 said:
Well, i have just downloaded and installed sdk+platform tools.
I´ve out apktool.jar into the platform tools folder and now it seems to work fine!
BIG THANKS for your help
If something goes wrong contrary to expectations I hope that I may come back to this thread and ask again.
Thanks my grandmasters
Edit:
Need help again..
As i said i want to change some headlines in the Settings. So i decompiled the Settings apk and changed the settings_headers.xml
I just changed one line that says
to
now the console says that no ressource was found that matches @string/nexium_settings.
This may be obvious and I feel a bit ashamed for asking but what exactly do i have to change now to make it work?
Thanks in advance.
Sorry again for my noobish questions but.. it takes a village to raise a town
Click to expand...
Click to collapse
You need to add your string to values/public.xml. Then it will compile.
Sent from my Galaxy Nexus using xda premium
All right. That error is gone now.
Instead I get another type of error message.
"my path"/Settings/res/values/public.xml:2600: error: Public symbol string/nexium declared here is not defined
Click to expand...
Click to collapse
So where do i have to define that string?
Edit:
Nevermind. I got it. Just had to change the values/strings
Ok.. now i have another kind of problem. Compiling the apk successed!
Problem is that though my changes the actual displayed hedlines have NOT changed..
Maybe someone can help me since i know that some of you must have it done at least once..
I´ll show up my steps and maybe someone can discern the mistake or what I forgot and help me to get it right
1. I changed the settings_headers.xml
I changed the line
header android:title="@string/eos_settings" />
Click to expand...
Click to collapse
to
header android:title="@string/nexium_settings" />
Click to expand...
Click to collapse
2. I changed values/public
I changed the line
<public type="string" name="eos_settings" id="0x7f0b0660" />
Click to expand...
Click to collapse
to
<public type="string" name="nexium_settings" id="0x7f0b0660" />
Click to expand...
Click to collapse
3. I changed values/strings
I changed the line
<string name="eos_settings">EOS Settings</string>
Click to expand...
Click to collapse
to
<string name="eos_settings">Nexium Settings</string>
Click to expand...
Click to collapse
4. recompiled
5. pulled the xml folder out of the new compiled apk and put it back in the original .apk
6. put the Settings.apk back to the ROM
I hope someone can help me since I don´t really know what else I have to change to get it working since all these changes have not changed the actual displayed Headlines in the settings
<string name="eos_settings">Nexium Settings</string>
needs to be:
Code:
<string name="nexium_settings">Nexium Settings</string>
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums & Read the Forum Rules
Thanks ✟
Moving to Q&A
Great! It worked as I wanted it.
But I am a 98% sure that I had made that change you mentioned before..
This time I copied not only the xml folder but also the file named "ressources" to the original "Settings.apk"
May that be the reason it worked now? Or should the xml folder be enough?
Again thanks for your help.
spartanier7 said:
Great! It worked as I wanted it.
But I am a 98% sure that I had made that change you mentioned before..
This time I copied not only the xml folder but also the file named "ressources" to the original "Settings.apk"
May that be the reason it worked now? Or should the xml folder be enough?
Again thanks for your help.
Click to expand...
Click to collapse
You need to copy over the resources file as well. It holds the /values/public.xml file among others.
Well,
here I go with another Question.
If i want to change the order of the headlines and their sub options.. Do I just have to change their order in the settings_header.apk?
Hi,
I modified "SamsungCamera2" from my Note 3 and would like to install it now on my Note 3. My phone is not rooted and doing so would currently trip the knox counter (I don´t want that).
If I try to install the apk I get the message "application not installed".
Is it somehow possible to convert the apk so that I can install it as a "normal app"?
Best wishes,
Klaus
oclock said:
Hi,
I modified "SamsungCamera2" from my Note 3 and would like to install it now on my Note 3. My phone is not rooted and doing so would currently trip the knox counter (I don´t want that).
If I try to install the apk I get the message "application not installed".
Is it somehow possible to convert the apk so that I can install it as a "normal app"?
Best wishes,
Klaus
Click to expand...
Click to collapse
no root no party, however i think that its possible to root the phone over knox without count
to install system apk you can do in 3 ways
1.install normally by a file manager as normal apk but in this way you can only install ORIGINAL APK like official update NO MOD
2.copying the apk and maybe the odex in /system/app NEED ROOT
3.using clockworkmod NEED ROOT,or maybe using the stock samsung recovery need a flashable zip of your app
enjoy
AXD96 said:
no root no party, however i think that its possible to root the phone over knox without count
to install system apk you can do in 3 ways
1.install normally by a file manager as normal apk but in this way you can only install ORIGINAL APK like official update NO MOD
2.copying the apk and maybe the odex in /system/app NEED ROOT
3.using clockworkmod NEED ROOT,or maybe using the stock samsung recovery need a flashable zip of your app
enjoy
Click to expand...
Click to collapse
Thank you for your answer.
With my current firmware there is no known method to get root without knox=0x1.
If I develop my own app I can install it without problems. So, what exactly makes apps from system/app different?
How does Android know that I did not implement this App by myself?
Is there a way to further modify the app so that it looks like I implemented it by myself and install it then?
oclock said:
Thank you for your answer.
But if I develop my own app I can install it without problems.
So, what exactly makes apps from system/app different?
How does Android know that I did not implement this App by myself?
Is there a way to further modify the app so that it looks like I implemented it by myself and install it then?
Click to expand...
Click to collapse
Android expects applications installed by opening the APK to be signed.
It's quite easy to sign them with a generic certificate: but when apps are updated both the old (in /system) and the new version must be signed with the same one.
(Extreme problems lead to extreme solutions: if you need Samsung service, flash a bad bootloader so that's permanently bricked and doesn't even get to Odin...)
Ryccardo said:
Android expects applications installed by opening the APK to be signed.
It's quite easy to sign them with a generic certificate: but when apps are updated both the old (in /system) and the new version must be signed with the same one.
Click to expand...
Click to collapse
Thank you for the explanation and thank you for the hint
But how does Android know that I am trying to Update an already existing app? Is it just because of the class names of the MainActivity? Is it possible to refactor the app, so that it looks like a brand new app?
oclock said:
Thank you for the explanation and thank you for the hint
But how does Android know that I am trying to Update an already existing app? Is it just because of the class names of the MainActivity? Is it possible to refactor the app, so that it looks like a brand new app?
Click to expand...
Click to collapse
I believe, but have never tried, that it goes by the package ID
Ryccardo said:
I believe, but have never tried, that it goes by the package ID
Click to expand...
Click to collapse
It seems to be the correct way. However, something seems to be odd:
I the log I get the following:
12-29 23:47:03.981: E/AndroidRuntime(27444): java.lang.RuntimeException: Unable to resume activity {com.sec.android.app.cameraoc/com.sec.android.app.camera.Camera}: java.lang.SecurityException: Requires SET_ANIMATION_SCALE permission
However, this permission is set in the AndroidManifest.xml file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sec.android.app.cameraoc">
<uses-permission android:name="android.permission.CAMERA"/>
[...]
<uses-permission android:name="android.permission.SET_ANIMATION_SCALE"/>
[...]
Do you have any ideas why this permission isn´t recognized?
oclock said:
Thank you for your answer.
With my current firmware there is no known method to get root without knox=0x1.
If I develop my own app I can install it without problems. So, what exactly makes apps from system/app different?
How does Android know that I did not implement this App by myself?
Is there a way to further modify the app so that it looks like I implemented it by myself and install it then?
Click to expand...
Click to collapse
dont said me thanks, just click the thanks button on the left of message
no you can't
every APK has got a signature when you modify an apk or the mali code the signature became invalid so you cant install that apk anymore until you sign again the apk
if the signature is different you cant install system apk when you has already installed an app with the same packace address
else if the signature is the same (only the author of the app has got the original key of signature) you can install it
there is a critical bug in android until 4.2.2 version, the MASTERKEY BUG
google fix it in android 4.3
i got root with this bug using cydia impactor
with this bug/exploit you was able to modify system partition bypassing signature protection and then get root so you was able to have full access to your phone
---------- Post added at 01:16 PM ---------- Previous post was at 01:12 PM ----------
oclock said:
It seems to be the correct way. However, something seems to be odd:
I the log I get the following:
12-29 23:47:03.981: E/AndroidRuntime(27444): java.lang.RuntimeException: Unable to resume activity {com.sec.android.app.cameraoc/com.sec.android.app.camera.Camera}: java.lang.SecurityException: Requires SET_ANIMATION_SCALE permission
However, this permission is set in the AndroidManifest.xml file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sec.android.app.cameraoc">
<uses-permission android:name="android.permission.CAMERA"/>
[...]
<uses-permission android:name="android.permission.SET_ANIMATION_SCALE"/>
[...]
Click to expand...
Click to collapse
where did you find the log?
AXD96 said:
dont said me thanks, just click the thanks button on the left of message
no you can't
every APK has got a signature when you modify an apk or the mali code the signature became invalid so you cant install that apk anymore until you sign again the apk
if the signature is different you cant install system apk when you has already installed an app with the same packace address
else if the signature is the same (only the author of the app has got the original key of signature) you can install it
Click to expand...
Click to collapse
OK. This was already made clear some posts above. My new question was: Can I change the signature to install it as a "new" app.
I tried it out by myself. I modified the manifest file to change the android package name from "com.sec.android.app.camera" to "com.sec.android.app.cameraoc". The java package is unchanged.
With this modification i could install the app without any problems, but I get a permission exception, when I try to execute the App:
12-29 23:47:03.981: E/AndroidRuntime(27444): java.lang.RuntimeException: Unable to resume activity {com.sec.android.app.cameraoc/com.sec.android.app.camera.Camera}: java.lang.SecurityException: Requires SET_ANIMATION_SCALE permission
However, this permission is set in the AndroidManifest.xml file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sec.android.app.cameraoc">
<uses-permission android:name="android.permission.CAMERA"/>
[...]
<uses-permission android:name="android.permission.SET_ANIMATION_SCA LE"/>
[...]
So, i do not understand why I get this Exception. Do you have any ideas?
Klaus
I got the exact same issue when modding the S5's camera apk. The trick is to open your original apk with an archive manager and only replace the classes.dex and resources.arsc. I then copied the apk to /system/app/ and after a reboot I could successfully launch the camera.
More details about hacking system apk's can be found here: https://code.google.com/p/android-apktool/wiki/FAQ (My recompiled apk Force Closes (FCs). What gives?)
Hello XDA Members.
I would like to know how to convert a non-installable system apk into normal installable apk.
Example:
Let's say that test.apk is a system app.
If I take it to another device and try to install it, it will say app not installed, but if I put it in /system/app and chmod 0644 it, it simply works.
So what I want to know is:
How can I make test.apk install normally same as any other apk file
Regards,
~J2C
Just2Cause said:
llo XDA Members.
I would like to know how to convert a non-installable system apk into normal installable apk.
Example:
Let's say that test.apk is a system app.
If I take it to another device and try to install it, it will say app not installed, but if I put it in /system/app and chmod 0644 it, it simply works.
So what I want to know is:
How can I make test.apk install normally same as any other apk file
Regards,
~J2C
Click to expand...
Click to collapse
after deodex the app it will work
There are a few different ways. The main issue being that it has to be signed to be able to install it in/data/app. Easiest way on the phone is this:
https://play.google.com/store/apps/details?id=kellinwood.zipsigner2
On the computer, there are a few different signing tools. Not entirely sure if it matters what SDK platform you are on as it has been awhile since I have played with apps like that.
Vaibhav Chauhan said:
after deodex the app it will work
Click to expand...
Click to collapse
I already deodexed it but it is still not installable
es0tericcha0s said:
There are a few different ways. The main issue being that it has to be signed to be able to install it in/data/app. Easiest way on the phone is this:
https://play.google.com/store/apps/details?id=kellinwood.zipsigner2
On the computer, there are a few different signing tools. Not entirely sure if it matters what SDK platform you are on as it has been awhile since I have played with apps like that.
Click to expand...
Click to collapse
So if I re-sign it, it will work?
Just2Cause said:
I already deodexed it but it is still not installable
So if I re-sign it, it will work?
Click to expand...
Click to collapse
i have face this problem
when i deodexed the app and sign it it was working
@es0tericcha0s
I signed it right now and removed it from /system/app so I can try it, it installed!
But didn't work.
The apk is a close all button from Xperia Z2, I extracted it and deodexed it and I was able to get it to work when it's in /system/app but after I signed it, it installs but it doesn't appear in the recent apps list, as if it wasn't installed.
So I want it to be installable.
@Just2Cause
Ok now you can try this task killer on the attachment
it's based on the old task killer from here:
http://www.xperiablog.net/2014/01/1...ose-all-recent-apps-works-on-xperia-z-series/
and I've modded it to look like z2 task killer
I didn't tested it so tell me if worked with you
@naheel azawy
It didn't work, it installed but doesn't show up.
Just2Cause said:
@naheel azawy
It didn't work, it installed but doesn't show up.
Click to expand...
Click to collapse
what about the one which I based my mod on? does it works?
naheel azawy said:
what about the one which I based my mod on? does it works?
Click to expand...
Click to collapse
Nope.
Just2Cause said:
Nope.
Click to expand...
Click to collapse
!!!
does any task killer worked with you???
if yes plz give me that apk
If it installed, then it's SOMEWHERE... Try this: Use a root explorer to browse through /data/app and see if you see it there. Sometime if the app isn't working right or has the wrong permissions, it'll install but can't see it. Which tool did you use to sign?
es0tericcha0s said:
If it installed, then it's SOMEWHERE... Try this: Use a root explorer to browse through /data/app and see if you see it there. Sometime if the app isn't working right or has the wrong permissions, it'll install but can't see it. Which tool did you use to sign?
Click to expand...
Click to collapse
The app from play store that you suggested.
Edit:
It is in /data/app with rw-r--r-- permissions so it should work.
I attached the apk just in case if you want to check some things.
Edit 2:
The SystemUI.apk has this line in the AndroidManifest.xml:
Code:
<permission android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" android:protectionLevel="signatureOrSystem" />
and this one is in the TaskKiller.apk's AndroidManifest.xml:
Code:
<uses-permission android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" />
the TaskKiller is asking for permission from SystemUI instead of framework-res, idk why.
I'm thinking that this has to be a system app and tied to SystemUI to function properly. It doesn't seem to have it's own interface which is why no open option when installed and no icon showing.
es0tericcha0s said:
I'm thinking that this has to be a system app and tied to SystemUI to function properly. It doesn't seem to have it's own interface which is why no open option when installed and no icon showing.
Click to expand...
Click to collapse
Exactly, but the old apk from the Japanese Z1 is installable.
Does resigning affect that much that it stops working?
Hello, everyone.
Is there any way to take a backup of all AndroidManifests.xml on an Android Device?
ALL Free Apps
ALL Paid Apps
ALL System Apps
And where can you find them on the ES-File Explorer or any other File Explorer?
The app „Android System Information" can actually view all AndroidManifests.xml - System/Paid and Free apps. Every single one.
If an app is able to Display them, there must be a way to backup them or copy them to another folder.
Thanks in Advance.
It most likely workes like an archive veiwer. All those files are stored into the apks. You will have to decompile each apk
Android Installation Packages
zelendel said:
It most likely workes like an archive veiwer. All those files are stored into the apks. You will have to decompile each apk
Click to expand...
Click to collapse
INSIDE of the APK's?
Don't think so...
AndoridManifest includes things like
API Version
App Version
Installation Date and Time (also with seconds)
Some Metadata
Package Name
etc.
Hannah Stern said:
INSIDE of the APK's?
Don't think so...
AndoridManifest includes things like
API Version
App Version
Installation Date and Time (also with seconds)
Some Metadata
Package Name
etc.
Click to expand...
Click to collapse
I am aware of just what it is. They are stored inside the apk. Just unzip one and you will see it, might need to decompile it to read it though.
zelendel said:
I am aware of just what it is. They are stored inside the apk. Just unzip one and you will see it, might need to decompile it to read it though.
Click to expand...
Click to collapse
Are the AndroidManifests also included in an ADB-Backup of one or multiple apps?
Hannah Stern said:
Are the AndroidManifests also included in an ADB-Backup of one or multiple apps?
Click to expand...
Click to collapse
In a way as they back up the whole apk. If you are just wanting those files you will have to rip each one apart. No way around it.
There's a Samsung feature that only works in some devices, and it is the ability to select several pictures to set them as the background of the lock screen, so it changes every time the screen is turned on. The only way to do this officially with A7 (2018) is through Samsung Themes, choosing a "multi-pack" background. There's no other possible way (you cannot select a couple of images from Gallery and set them as background, for example).
But there is a "hidden" app that is called My Interests, which lets you to choose multiple backgrounds for the lock screen. The problem with this is that if you try to launch it through an activity launcher it says that the app needs the storage permission to work, but you can't enable it because the request of that permission has not been declared in the app code. So I've edited it to add that request, and it works properly.
If you want to do it yourself, or just want to know what I have done:
To make this APK, I've edited the original APK with APK Editor Pro, and I've added in the AndroidManifest.xml the following line between the other requests for permissions:
Code:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Then I've built the app, and the generated APK file has been cloned with APK Cloner, in order to avoid conflicts with the original app.
To install it:
Install the attached APK
Install and open QuickShortcutMaker
In the search box, write updatos, it should appear one result which icon is a picture of a mountain
Open it and select the first element of the list, and then select "Try"
Accept the permission
Now you are able to choose the images you want with the "+" button, and then set them as the background of the lock screen
You can also add a widget to your home screen to add the activity as an icon, so it is quicker to change the backgrounds.
Just make a permission file and put it in system/etc/permissions
LuanTeles said:
Just make a permission file and put it in system/etc/permissions
Click to expand...
Click to collapse
But in that case you would need root access.
I'm getting a "Clones are device locked" error when I do the "Try it" option.
I installed app cloner but I can't seem to do anything with it. Any ideas?
Edit: I made a clone of com.samsung.android.keyguardwallpaperupdatos.apk but when I try to set permissions, there is none available for storage. Agh.
Satsumomo said:
I'm getting a "Clones are device locked" error when I do the "Try it" option.
I installed app cloner but I can't seem to do anything with it. Any ideas?
Edit: I made a clone of com.samsung.android.keyguardwallpaperupdatos.apk but when I try to set permissions, there is none available for storage. Agh.
Click to expand...
Click to collapse
So it looks like if I clone an app it can only be installed in the same device...
When I have time I will upload the edited APK without cloning and change the steps, because you will need to clone it.
Thanks for the feedback
So I did your steps, I downloaded the original APK from APKMirror, edited the XML and then cloned it.
I was able to launch the shortcut, and it let me select multiple backgrounds but it only applies one. I think Samsung might have blocked this... I'm currently using a Galaxy A50. Maybe I should try an older version?
Satsumomo said:
So I did your steps, I downloaded the original APK from APKMirror, edited the XML and then cloned it.
I was able to launch the shortcut, and it let me select multiple backgrounds but it only applies one. I think Samsung might have blocked this... I'm currently using a Galaxy A50. Maybe I should try an older version?
Click to expand...
Click to collapse
It changes, but it takes some time. In other devices (where this feature is official) it changes every time you see the lockscreen, but with this method the change is not that frequent.
Satsumomo said:
So I did your steps, I downloaded the original APK from APKMirror, edited the XML and then cloned it.
I was able to launch the shortcut, and it let me select multiple backgrounds but it only applies one. I think Samsung might have blocked this... I'm currently using a Galaxy A50. Maybe I should try an older version?
Click to expand...
Click to collapse
could you share the APK file to try? Thank you
danimanz98 said:
It changes, but it takes some time. In other devices (where this feature is official) it changes every time you see the lockscreen, but with this method the change is not that frequent.
Click to expand...
Click to collapse
This feature was in my previous Huawei mate 8
Than you it worl
youwi said:
Than you it worl
Click to expand...
Click to collapse
How did you make it work?
after doing all the installtion steps do this;
in quickshortcut maker app search ''updator'' instead of ''updatos''
there will be 2 search results open the first one and tap try now it should allow you to do this.
the trick is to open the one with updator mentioned in it. thats the official one preinstalled in the phone.
myshya said:
How did you make it work?
Click to expand...
Click to collapse
try it
Snowpirate07 said:
after doing all the installtion steps do this;
in quickshortcut maker app search ''updator'' instead of ''updatos''
there will be 2 search results open the first one and tap try now it should allow you to do this.
the trick is to open the one with updator mentioned in it. thats the official one preinstalled in the phone.
Click to expand...
Click to collapse
I know. But the thing is that the one that is preinstalled doesn't have the needed permissions registered, so they can't be enabled. That's why the APK file has to be edited, to manually add those permissions.