[Q] Advanced reboot for Sense 5 4.2.2

Search This thread

-MightyMouse-

Senior Member
Jun 19, 2013
543
304
Somewhere Between Here and There
Have tried that and it doesn't seam to work. I am building and testing the Rom and this is a feature I want to include. I use viper when I'm not testing and love it. What do I have to edit to have this feature in my rom

Sent from my HTCONE using xda app-developers app
 

Black!Jack

Senior Member
Nov 9, 2013
319
332
Have tried that and it doesn't seam to work. I am building and testing the Rom and this is a feature I want to include. I use viper when I'm not testing and love it. What do I have to edit to have this feature in my rom

Sent from my HTCONE using xda app-developers app

Most of the guides that I have found are for non HTC phones. I have a few links for you to check out. From what I have read, they are mostly framework-res.apk and android.policy.jar edits.

I have extracted the classes.dex out of the jar and tried to wade my way through all of the .smali files. It looks as if the GlobalActions.smali points to either GlobalActions3 or GlobalActions4.smali for reboot options.

The guides also point to certain edits which need to be made to the framework-res.apk. Mainly strings.xml. They say to then recompile, then decompile the new framework-res.apk and lookup certain hex values in public.xml.I thought I had it figured out, but then I saw that some of the hex codes were 4xxxxxx hex codes, which points to framework-HTC-res.apk. That's kindof where I got stuck because I could not get that apk to successfully decompile.

Looking at the GlobalActions.smali I saw references to com.HTC.resources, so I kinda knew this was to be expected. I seem to be having trouble getting the necessary framework installed through apktool to successfully decompile.

Additionally, I have taken apart quite a few Roms frameworks (Roms that aren't using Sense 5 toolbox or exposed mods) to try to decipher how they applied the necessary changes, yet they are all so different. Some look to have used arrays, others strings. I know the arrays are probably for multilingual options.

Links coming as soon as I get to my pc.

Click button below for links:



When reading the hex values in the files, the chart below should point you in the right direction:

0x10xxxx is in framework-res.apk
0x20xxxx is in com.htc.resources.apk
0x40xxxx is in framework-htc-res.apk


I too am trying to learn how to do all of this. Please let me know if you figure anything out. It seems to be who you know around here that directly reflects what you know.
 
Last edited:

Black!Jack

Senior Member
Nov 9, 2013
319
332
Thanks. Do u know of a apk to tool to fix these apps with

Sent from my HTCONE using xda app-developers app

Not quite sure what you meant here. An .apk to do what exactly?

Also, if I've helped and you want to show appreciate for my comment, just hit the thanks button, instead of thanking me in your posts. I believe that is the recommended way of doing things around here. Check the forum rules for clarification.

http://xdaforums.com/showthread.php?p=30899605

Sent from my HTC One XL using XDA Premium 4 mobile app
 
  • Like
Reactions: -MightyMouse-

-MightyMouse-

Senior Member
Jun 19, 2013
543
304
Somewhere Between Here and There
Not quite sure what you meant here. An .apk to do what exactly?

Also, if I've helped and you want to show appreciate for my comment, just hit the thanks button, instead of thanking me in your posts. I believe that is the recommended way of doing things around here. Check the forum rules for clarification.

http://xdaforums.com/showthread.php?p=30899605

Sent from my HTC One XL using XDA Premium 4 mobile app
I need a tool to decompile and recompile apk


Sent from my HTCONE using xda app-developers app
 

Black!Jack

Senior Member
Nov 9, 2013
319
332
I need a tool to decompile and recompile apk


Sent from my HTCONE using xda app-developers app

Apktool... ApkMultiTool (really just a UI to take command line work out of the equation-not really my style though), Virtuous10 Studios, many more I'm sure I forgot. I have some .bat files for executing necessary commands if your not sure how to use command line.

Sent from my HTC One XL using XDA Premium 4 mobile app

---------- Post added at 05:32 PM ---------- Previous post was at 04:32 PM ----------

Zarchiver

Sent from my Evita

Not sure that Zarchiver is a tool for Decompiling and Recompiling .apks.

From what I have read about it, it looks more like a File Manager/Archiver.

@ PhoneGeek... for Linux I would have to say that apktool is going to be your best bet. You can find the XDA thread here. And the main page for apktool is here.
 
Last edited:
  • Like
Reactions: -MightyMouse-

-MightyMouse-

Senior Member
Jun 19, 2013
543
304
Somewhere Between Here and There
Most of the guides that I have found are for non HTC phones. I have a few links for you to check out. From what I have read, they are mostly framework-res.apk and android.policy.jar edits.

I have extracted the classes.dex out of the jar and tried to wade my way through all of the .smali files. It looks as if the GlobalActions.smali points to either GlobalActions3 or GlobalActions4.smali for reboot options.

The guides also point to certain edits which need to be made to the framework-res.apk. Mainly strings.xml. They say to then recompile, then decompile the new framework-res.apk and lookup certain hex values in public.xml.I thought I had it figured out, but then I saw that some of the hex codes were 4xxxxxx hex codes, which points to framework-HTC-res.apk. That's kindof where I got stuck because I could not get that apk to successfully decompile.

Looking at the GlobalActions.smali I saw references to com.HTC.resources, so I kinda knew this was to be expected. I seem to be having trouble getting the necessary framework installed through apktool to successfully decompile.

Additionally, I have taken apart quite a few Roms frameworks (Roms that aren't using Sense 5 toolbox or exposed mods) to try to decipher how they applied the necessary changes, yet they are all so different. Some look to have used arrays, others strings. I know the arrays are probably for multilingual options.

Links coming as soon as I get to my pc.

Click button below for links:



When reading the hex values in the files, the chart below should point you in the right direction:

0x10xxxx is in framework-res.apk
0x20xxxx is in com.htc.resources.apk
0x40xxxx is in framework-htc-res.apk


I too am trying to learn how to do all of this. Please let me know if you figure anything out. It seems to be who you know around here that directly reflects what you know.
first link is for samsung. last link is for mod for a sense 4 or sense 4+ rom. the samsung link, is it ok to folow the steps in it. and the mod isnt even for the at&t htc one xl sense 5. will it work
 

Black!Jack

Senior Member
Nov 9, 2013
319
332
first link is for samsung. last link is for mod for a sense 4 or sense 4+ rom. the samsung link, is it ok to folow the steps in it. and the mod isnt even for the at&t htc one xl sense 5. will it work

That is what I was originally trying to let you know. The one for the HTC MOD is device specific (HTC Desire I believe). I have gone through the .smali files as these guides instructed and noticed a wide variety of variance. If you decide to attempt the instructions per those guides, you do so at your own risk; especially if you have no idea what you are really doing. The Devs around here are labeled that for a reason. Chances are... they really know what they are doing when messing around with files that could deem our phones inoperable.

One bit of advice I will give you before you start messing with the .smali files, is to learn Java, if you don't already, and then head over to the Smali page and read through all of the documentation in their wiki (it will be hard to understand if you don't know Java though). After taking the time to learn these things, when you open up the .smali files you will have a better understanding of what you are actually looking at and how things are structured. For example, when you open one up, you will perhaps see some variance of :

invoke-direct {v0, v1, p0, v2}

Well, what do all of these v's and p's mean - what do they point to?

There are two naming schemes for registers - the normal v naming scheme and the p naming scheme for parameter registers. Confused?

Read the wiki! Confused by the wiki? Learn Java! This is really the best advice that I can give you. By no means am I downing you or questioning your intelligence. I am simply trying to help you by pointing you in the right direction. Spoon-feeding you all of the answers isn't going to help you learn. I am by no means an expert; not even dillusional enough to think that I am- though my wife may disagree!

In addition, when you get to the Smali page, on the Project home tab, there is a link for an IRC chat room and an example of how the entry level "Hello World" app is broken down into .smali.

Hope that I have helped, to at least point you in the right direction. If I have click the Thanks button!

Edit: Here are some links that may be useful in your quest for knowledge of this subject matter:



All of these resources were found with the help of my good friend Google, and her red-headed stepchild XDA!
 
Last edited:
  • Like
Reactions: -MightyMouse-

-MightyMouse-

Senior Member
Jun 19, 2013
543
304
Somewhere Between Here and There
Hi. I have tried yet again to make sense 5 toolbox apm work. Still not. Latest version of framework used. Any ideas
edit: foumd the problem and apm is now working.

Sent from my HTC One XL using xda app-developers app
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Thanks. Do u know of a apk to tool to fix these apps with

    Sent from my HTCONE using xda app-developers app

    Not quite sure what you meant here. An .apk to do what exactly?

    Also, if I've helped and you want to show appreciate for my comment, just hit the thanks button, instead of thanking me in your posts. I believe that is the recommended way of doing things around here. Check the forum rules for clarification.

    http://xdaforums.com/showthread.php?p=30899605

    Sent from my HTC One XL using XDA Premium 4 mobile app
    1
    Not sure about on Linux, you should be able to find something via Google. There should also be guides on XDA.

    Sent from my Evita
    1
    I need a tool to decompile and recompile apk


    Sent from my HTCONE using xda app-developers app

    Apktool... ApkMultiTool (really just a UI to take command line work out of the equation-not really my style though), Virtuous10 Studios, many more I'm sure I forgot. I have some .bat files for executing necessary commands if your not sure how to use command line.

    Sent from my HTC One XL using XDA Premium 4 mobile app

    ---------- Post added at 05:32 PM ---------- Previous post was at 04:32 PM ----------

    Zarchiver

    Sent from my Evita

    Not sure that Zarchiver is a tool for Decompiling and Recompiling .apks.

    From what I have read about it, it looks more like a File Manager/Archiver.

    @ PhoneGeek... for Linux I would have to say that apktool is going to be your best bet. You can find the XDA thread here. And the main page for apktool is here.
    1
    first link is for samsung. last link is for mod for a sense 4 or sense 4+ rom. the samsung link, is it ok to folow the steps in it. and the mod isnt even for the at&t htc one xl sense 5. will it work

    That is what I was originally trying to let you know. The one for the HTC MOD is device specific (HTC Desire I believe). I have gone through the .smali files as these guides instructed and noticed a wide variety of variance. If you decide to attempt the instructions per those guides, you do so at your own risk; especially if you have no idea what you are really doing. The Devs around here are labeled that for a reason. Chances are... they really know what they are doing when messing around with files that could deem our phones inoperable.

    One bit of advice I will give you before you start messing with the .smali files, is to learn Java, if you don't already, and then head over to the Smali page and read through all of the documentation in their wiki (it will be hard to understand if you don't know Java though). After taking the time to learn these things, when you open up the .smali files you will have a better understanding of what you are actually looking at and how things are structured. For example, when you open one up, you will perhaps see some variance of :

    invoke-direct {v0, v1, p0, v2}

    Well, what do all of these v's and p's mean - what do they point to?

    There are two naming schemes for registers - the normal v naming scheme and the p naming scheme for parameter registers. Confused?

    Read the wiki! Confused by the wiki? Learn Java! This is really the best advice that I can give you. By no means am I downing you or questioning your intelligence. I am simply trying to help you by pointing you in the right direction. Spoon-feeding you all of the answers isn't going to help you learn. I am by no means an expert; not even dillusional enough to think that I am- though my wife may disagree!

    In addition, when you get to the Smali page, on the Project home tab, there is a link for an IRC chat room and an example of how the entry level "Hello World" app is broken down into .smali.

    Hope that I have helped, to at least point you in the right direction. If I have click the Thanks button!

    Edit: Here are some links that may be useful in your quest for knowledge of this subject matter:



    All of these resources were found with the help of my good friend Google, and her red-headed stepchild XDA!