[stock] Cm launcher with auto-rotation - no computer needed - Sony Cross-Device General

Need root. Tested on Z1c with stock deodexed rom.
1) Flash this port, (not my work) - http://forum.xda-developers.com/moto-e/themes-apps/app-cm12-1-trebuchet-rom-t3145576 Now you can use Trebuchet on stock rom.
2) Install apktool for Android here - http://onhax.net/tag/apktool-for-android-5-2-0-apk Choose the right version for your phone. I'm using Z1c, so I installed 'arm7'. After installed, go to settings and check 'device has root', then close the app, and reopen to grant root access.
3) Using a root browser, make a directory in storage somewhere called 'apktool', {or something}, and copy the following to it: /system/framework/framework-res.apk, /system/framework/SemcGenericUxpRes/SemcGenericUxpRes.apk, and Trebuchet.apk, (from the zip you flashed).
4) Open apktool, go to apktool directory, and import all 3 files as framework, by tapping them and choosing the option. Now you can decompile Trebuchet, and you should get a folder called Trebuchet-src.
For auto-rotation - go to /res/values/bools.xml and change 'false' to 'true' in the 'allow rotation' line.
For other tweaks - poke around and figure some stuff out. I was trying to change the background in the app drawer, since I don't like the white, and you can see in screenshots that I changed the background behind the background, but the white is still there around the apps. I did it by changing a color value in 'colors', then adding a line in 'apps_customize_pane', but I haven't figured out the other layer. I think it might be in smali somewhere. I also changed the background in Trebuchet settings.
After saving changes, open apktool app and tap on the Trebuchet-src folder and choose 'recompile'. You should get a new apk called 'Trebuchet-src.apk'. Then tap on that, and choose 'sign', which will create a new apk called 'Trebuchet-src-sign.apk', which you can install normally. Note that you might get an error message on recompile about default translation. Don't worry about it; as long as there is a new apk created, it should be fine.
{Mods: I know I'm not a dev, and I was going to just post in Z1c general, but it seems like it may apply to 'cross-device', so I figured I'd give it a shot. Please judge as you will}

Found a couple more layers...

Got it, (kind of - it's a hack)...

This was an old post so not sure it still applies..found it while searching.
Might be a stupid question..but
Does CM Launcher not work in landscape mode? It's not rotating and no setting for it. Can't imagine it doesn't in 2018..
What am I missing here?

Related

original settings.apk

I add original apk from android 2.1 to my nook, but i doesn't work. I now can't enter to setting page, wifi atc... Please if some one would be angel, and send me the true original settings.apk from Nook touch. Thanks.
Go to the B&N webpage for the 1.1.2 update: http://www.barnesandnoble.com/u/Software-Updates-NOOK-Simple-Touch/379003175/
Download nook_1_1_2_update.zip.
It is a signed ZIP file, you can open it with 7zip, http://www.7-zip.org/download.html
(Windows can't open this directly without stripping the signature.)
Get whatever you like out of /system/app
If you aren't up to 1.1.2 yet, just do the manual update and it will fix things.
(Except that you may have to re-root.)
Thank. I try this before, but this signed zip archive get me
Install 7zip, thak to CrossOver (MAC). Extracted settings.apk. And everything work perfect. Thank you Renate!
Thread moved to general, based on the fact it's not a : mod/kernel/rom.
I write it works, but only procedure to get apk from update to phone. Settings app dont work, I can't see a icon in menu (but don't know there must to be), anyway i run setting from B&N bottom bar, nothing run. I can't event add widgets because context menu don't show. Please has some one any idea?
If you are running 1.1.2 and you put the Settings.apk out of nook_1_1_2_update.zip in, then it's the right one.
Settings.apk 971,804 bytes
Did you put it in the right place? Does it have the right permissions?
Did you kill SettingsProvider.apk too?
What does logcat say when it bombs? Give us a hint.
Yes, I have same size Settings.apk. I put it to /system/app/, permission set to rw-r--r-- .
I touch only setting.apk -SettingsProvider.apk is the same.
When I click on top bar (wifi/battery icon) restart nook, when I click on bottom B&N bar nothing shows.
Sorry i dont have terminal, and wifi home, at this time. I don't know what try...
When you click on the top bar you start: com.android.settings/.Settings_Quick
Have you tried Settings in the app drawer?
When you click on the settings icon in the app drawer you start: com.android.settings/.Settings_Root
Does everything else work?
Top bar -Quick setting (restart) -not work
Bott.bar -B&N settings button (nothing) - not work
Add widgets (nothing)-not work
NookColor Tools -All settings (No applications can perform this action)-not work
App drawer (No settings icon) - not work
Activity picker (no settings option) - not work
I try this posible accesses with and without setting.apk in /SYSTEM/APP but same result. -there is no diference if I have app or if not. I try install app "clasical" way, but I got -this app replace another existing app, after I move next app failed to install.
Why I get message (this app replace another existing app) if I don't have in my system nothing touches settings.apk?
Click to expand...
Click to collapse

How to Edit XML Files on Your Device (AIDE/Axel)

Here is a method for editing xml files directly on from your phone (as well as a fully functional Eclipse compatible IDE). I'm going to sleep so I'll post a reply I made in another thread first, and clean up in the morning. Have fun..G'night!
-------------------------------------------------------------------------------------------
Quote:
Originally Posted by Toni5830
You can extract xml but you can't see them (only strange symbols) and you can't edit them from phone.. you must use PC and decompile them.. no other possibility
Inviato con Tapatalk 2 dal telefono di casa
-------------------------------------------------------------------------------------------
No, you can edit them on your phone. Axel is one of the apps to use. The second is an IDE called AIDE which is compatible with Eclipse. You can develop, program and publish complete apps from your phone. I figured out how to edit compiled xml the other day. Ninjamorph is also useful because it unpacks the archives into a project which happens to be near where your AIDE projects are.
Begin by opening ninjamorph and choosing the apk to work on and create a project (can do this manually but keep a back up of the apk). Next, open AIDE and create a new project. As an example I'll be editing the lg_allapps_button_text.xml file in LGHome.apk (LG's launcher on G2, so files may differ for you). Choose the HelloWorld setup as that's the less,cluttered one. After creating the project, open up a file manager (you can do this from within AIDE as well) and create the same directory structure for your xml file (probably doesn't matter if a ../res/color xml file is in ../main..but it's good practice. The xml I'm editing is in /res/color, so I'll go into the project directory and create a ../res/color folder.
Now open Axel up and find the xml in the ninjamorph project that you are editing. Again in my case it'll be in /res/color. Go ahead and open it with Axel. Don't bother editing it here, we're going to just go into settings and "save as" (into our AIDE project directory) ../res/color/lg_allapps_button_text.xml. This adds it into our AIDE project and we can now go back into AIDE. In the oberflow action, choose "Goto Files" or whatever it's named (also an icon at the top for this action). It'll open a pane at the bottom with your project files. At this time you'll probably notice AIDE throwing a lot of errors (errors in your code, not app errors lol).
We have to fix every one of them before finish, so might as well start now before editing. Conversely, you could do this in Axel first once you know what kind of errors to expect and fix. In my case, I see two errors because the file is really small. Once clicking on the xml I want to edit in the files pane, I can see that it's telling me string values aren't allowed in the "color' attribute. The color is black but when Axel decompiled it, it changed it from it's ARGB form. I see this -
Code:
#xml namespace blah blah...
.....
....... android:color="1F000008/0xFF000000"
Of course there is more, I just highlighted the attribute I need to fix. You're going to need to learn how attributes need to be formatted or learn and keep a reference handy. Google has nice guides online for building android apps. In this case we change it to:
Code:
...
.... android:color="#FF000000"
Technically yes it's still a string, and yes the wrong format was hexadecimal (sort of), but now we have one less error. On large xmls, this gets annoying but you'll get fast at it. So, I've fixed,myerrors, so now for simplicity I'll just change the color on one of the attributes..to red ("#FFFF0000"). Now that edits are done and errors done, go back in the ooverflow action and scro,down and either click "Run" or "More" and then "Rebuild Project". We aren't worried about any other file, we just want our xml recompiled. Once it's done, if you want you can install your fancy Hello World app (or Tetris game app), lol but it's just as well if you choose not to.
Next, go back into your file manager and find your way back into your AIDE project directory. Locate the bin folder (where your compiled project will be) and navigate to your xml. Again, in my case, I'll be going to /res/color. Make sure you find the compiled version (the binary one with all the cool symbols). Copy this back into the same structure inside the ninjamorph project folder. If you aren't using ninjamorph and manually doing this then make sure you have a backup apk handy and akip the ninjamorph stuff.
Opem Ninjamorph back up and choose to complete your project. Once it's done repackaging it'll ask you if you want to resign the apk
Follow Steven's directions and dont sign it if its a system apk. Next he'll ask about zipaligning (i think?). I don't choose this option at all. If my mods work, then I'll redo the project and choose that option. Problem is, sometimes it can cause issues and you don't want to add more variables in until you know that all,is working or you'll be asking yourself "wonder if my edits were bad,or the zipalignment".
Ninjamorph will create a backup of the apk for you, and now you'll be given the option of installing the apk. You should know what you're doing already but...if using TWRP you can go ahead and replace the modded apk and reboot. Worst that'll happen is boot loops or force closes and you can manually go into recovery and use TWRP's file manager to copy your backup back (may need to mount /system first, and may need to chmod as well. Then try again. If you boot up and all is well, congrats! If using CWM, make sure you have a recovery plan before making the switch.
I have no clue if,there's any easier way. I'm still working on it. Granted, kf you're just going to edit a color like in my example it'd be MUCH easier just using a hex editor. AIDE is a pretty damn slick app as it also supports native mode C/C++ for developing codecs, drivers,,etc. For $8 you can purchase full version with support for larger projects and github and a few other things.
This method should work on any device that can run all those apps. I'm using a LG G2. I'm not the,developer of any of tbose apps so don't come to me if they aren't working: )
Reserved
MidnightHarvester said:
Reserved
Click to expand...
Click to collapse
Thanks sir really appreciated your work
Also please continue to post apk editing posts

Tweak theme without computer

I don't spend lots of time at the computer, so I like to find ways to do as much as possible on the phone. One thing I've found is that every theme I try has at least one element I wish I could change, as much as I like it overall. I don't know enough to make my own theme, but I found a way to change elements of the theme without using a computer. I'm sure this is not news to many of you, but I figured there might be other non-experts like me out there who might appreciate it.
1. Download Apktool apk file below, install it, open it, {it will automatically update on the first use for some reason}, go to settings and check 'device has root', {leave other settings alone}, then close the app, reopen and grant su access.
2. Make a directory in storage somewhere called 'apktool', {or something}, and copy the following to it: /system/framework/framework-res.apk, /system/framework/SemcGenericUxpRes/SemcGenericUxpRes.apk, and whatever themes you want to mix and match.
3. Open apktool app, navigate to apktool directory, and import the framework files by tapping on each one and selecting 'import as framework'. When done, you can then tap on the theme apk files and select 'decompile all', and they will be decompiled into folders called {appname}-src. Go into the folders with a root explorer and change what you want, then go back to apktool, and tap on the folder you want and choose 'recompile'. When recompile is done you end up with an apk called '{appname}-src.apk'. Tap on that and choose 'sign'. When done you will get an apk called '{appname}-src-sign.apk, which you can install normally.
-Notes, questions-
- I'm currently using Z1c stock .236 deodexed rom. This app should work on other phones, roms, versions, etc, but I can't say for sure. What I know is that there are at least 5 versions of the app out there, {Google search for 'apktool 4.4' or '5.2', etc}, and it seems like each one works better on certain versions of Android. There are also configurable settings. If you have a different phone or rom, etc, you just have to mess around with it.
- This app should work as normal apktool for modding systemUI and framework, but I can't get it to recompile on LP, but only on Kk. Decompile works fine, but on recompile it complains about lacking resources. I don't know what file it wants. If someone can figure it out that would be great.
-If you don't know what files to change, all I can say is that I didn't either. Start with the obvious stuff, like navbar keys, and see how brave you get. Just make sure your file names are changed, since every app doesn't use the same names for the same files. As long as you work with copied files you have nothing to lose. If something is wrong with your modifications, then it won't recompile correctly, and you'll just get an error message, so you can't really install something that's going to mess up your phone.
- This also works for changing appearance of other apps, not just themes. See my recent posts in the Naked Browser thread for examples. However, sometimes it won't be able to decompile an app, and there's probably nothing you can do. I think the way apktool works is based on how the app was created. If something is not compatible, it just won't work.
- You don't have to decompile just to pull files out of an apk, but you do need an app that can do it. I use Rom Toolbox Pro. There may be free ones, {maybe Mixplorer}. I think you can just change the extension to zip and extract normally. However, some files and folders are not the same zipped in the apk as they are when decompiled.
File link - https://drive.google.com/file/d/0B5E7sFT1phjoS003R0tkM21qUlk/view?usp=docslist_api
Nice tutorial bro :good:
Thank you very much!
Sent from my D5503 using XDA Free mobile app
Since sharing themes with others' work is not kosher, (http://forum.xda-developers.com/crossdevice-dev/sony/share-frankentheme-t3282360), I figured I'd add a little more here for anyone's personal use. In general, here's what I've found with these themes:
- Within each apk there is an 'assets' folder, which contains zip files. Each zip file mods a certain aspect of the ui. For example, there will be one for settings, which contains the little pictures next to each settings option, (personalization, with the little rainbow, etc). You can experiment with simply swapping these around with different themes. However, if you want to add a settings zip, for example, to a theme base that does not already have a settings zip in it, you have to mod the main android manifest file in the top level of the apk. If you want to see how it needs to be modded, look at one that has it already. It's pretty obvious, since it's the same entry for each zip, but with the corresponding zip name. You can also extract these zips and replace files in them and rezip. Keep in mind, though, that there are some things that aren't that simple and just won't work.
- There are some things that are coded in, and can't be changed, (as far as I can figure out), like accent color. It seems like accent color just comes with the 'android' zip, and there's nothing you can do about it. As a workaround, you can find an 'android' zip with a color you like, and change out the other files from the zip you wish you could change the accent on. Again, sometimes it just won't work and you won't know why.
- Some themes don't follow this pattern at all. I haven't learned much about them yet.
Screenshots show examples I've used...

Pure Nexus + Dynamic Navbar?

Hello
I've tested quite a few roms and found a feature I live very much, it's called dynamic navbar - however I've found a Rom that I absolutely love and it's pure nexus, as much as I love it there is a huge downside for me and that's the lack of dynamic navbar.
I have seen a app on play store called "navbar apps" but u don't like it, and I've seen that you can extract the framework and edit via a pc. But is there a way to enable dynamic navbar on PN without those two options? Preferably via the phone.
Thanks
MrCreel said:
Hello
I've tested quite a few roms and found a feature I live very much, it's called dynamic navbar - however I've found a Rom that I absolutely love and it's pure nexus, as much as I love it there is a huge downside for me and that's the lack of dynamic navbar.
I have seen a app on play store called "navbar apps" but u don't like it, and I've seen that you can extract the framework and edit via a pc. But is there a way to enable dynamic navbar on PN without those two options? Preferably via the phone.
Thanks
Click to expand...
Click to collapse
Hello... Either use the mentioned app or do the changes in your framework. But you'll likely have to do it for every updates as the developer often makes change in the framework. Maybe you could maybe kindly make a request to the developer?!
Good luck...
MrCreel said:
Hello
I've tested quite a few roms and found a feature I live very much, it's called dynamic navbar - however I've found a Rom that I absolutely love and it's pure nexus, as much as I love it there is a huge downside for me and that's the lack of dynamic navbar.
I have seen a app on play store called "navbar apps" but u don't like it, and I've seen that you can extract the framework and edit via a pc. But is there a way to enable dynamic navbar on PN without those two options? Preferably via the phone.
Thanks
Click to expand...
Click to collapse
Just follow this 2 guides...
https://forum.xda-developers.com/nexus-6/general/guide-dynamic-nav-bar-android-l-m-n-t3515080
https://forum.xda-developers.com/android/apps-games/guide-enable-pixel-launcher-round-icon-t3536267
Basically you have to edit the framework-res.apk, obviously you have to be rooted, install the requirements on the second link, here I'll summarize the steps I follow, but if you have any doubt read and follow the 2 guides, the second one to decompile and compile the apk and the first one indicates the lines you have to change and the files in which you find them.
List of tools that we need
1. JDK, download it here http://www.oracle.com/technetwork/ja...sp-138363.html
2. Apktool, download it here https://ibotpeaches.github.io/Apktool/
3. Root Explorer
4. Text Editor
STEP 1 - Get the firmware-res.apk
First you need your own device firmware-res.apk, it is located here \Root\System\framework\
STEP 2 - Copy firmware-res.apk to the same folder with Apktool.jar
I recommend locate it on folder easy to located like desktop folder
STEP 3 - Decompile firmware-res.apk
Open CMD on your folder (on windows use [shift + right click -> open command window here]) that firmware-res.apk and Apktool.jar located and run this command
java -jar apktool.jar d framework-res.apk
STEP 4 - Open styles.xml and change values
Navigate to res, values, and open styles.xml with your text editor of choice (located at \framework-res\res\values\styles.xml)
Search for "navigationBar". There will be three instances of it. You only have to change the last two. Change "@colorBlack" to "?colorPrimaryDark" and save your changes
STEP 6 - Open colors.xml and change values
Navigate to res, values, and open colors.xml with your text editor of choice (located at \framework-res\res\values\colors.xml)
Open colors.xml and search for "input_method_navigation_guard". Change "ff000000" to "00000000" and save the file. If you don't change this, the navigation bar will turn black when you open the keyboard
STEP 7 - Compile your framework-res.apk
Code:
java -jar apktool.jar b framework-res -c
STEP 8 - Replace old firmware-res.apk with the new one
Copy your new compiled firmware-res.apk in framework-res\dist to your Android Device \Root\System\framework\. It is recommended to backup the default framework.res-apk first
Note: It is recommended to copy it from recovery, but you can also copy it directy via root explorer but your device will restart instantly
I do not take credit for this guide, do thank the op's if you find it useful.
Also is not perfect as a custom integration but it's something.

Customize Xperia Themes [no computer]

Sometimes someone makes a theme you love, but you wish just one thing was different, or maybe, like me, you have a modded system with dark background, and you apply a theme with dark text on settings dashboard, etc, and you can't read the words. This is what I do about it, (screenshots - Dark Sense theme by @shehabskull). Maybe someone else will appreciate...
** Note - you may not use this method to modify someone else's theme, then re-post it as your own. Always give credit and get proper permission before using a developer's work.
I posted a similar thread a year and a half ago, but seems like Sony theme creator has changed since then, (can't say for sure since I've never used it, but the files and folders in recent themes seem different than they were back then).
This assumes you know something about apktool. If not, that's a different thread. I recommend using ApktoolX for decompile / recompile, and Mixplorer for editing.
1. Install ApktoolX - https://www.androidfilehost.com/?fid=673368273298927619 - and set it up, (check 'root' in settings, make apktool folder, copy framework files and import each one). Also copy whatever theme you want to mod to apktool folder.
2. Decompile theme apk. You will get a folder with a few files and folders in it. One of them is called 'assets', which contains a bunch of zip files. The zips are all apks with zip extension.
3. Make a temp folder somewhere and copy whatever zips in the assets folder you want to mod, (settings, systemui, etc). Change the file extension from zip to apk. Then go back to ApktoolX and decompile those. Now you can mod the values.
4. After making mods, use ApktoolX to recompile. When recompile is done, change the filename back to what it was originally, (whatever.zip). Then copy that zip into the original location in the decompiled theme apk, deleting the one that's already there.
5. Now go back to ApktoolX and recompile the theme. When it's done, you will get a filed called (whatever)_src.apk. Use ApktoolX to sign it, (click on the file and choose 'sign' from the menu). The new file can be installed normally.
Note - occasionally you can change something that will recompile and install just fine, but will cause systemui to crash or something. If so, just boot to recovery, and delete the theme from /data/app.
Also - some themes might have a certain asset you like that another theme doesn't have. You can add them, but you have to modify android manifest xml accordingly, (look at it and you'll see). They're not always cross-compatible, though.
Nice guide.. Keep it up ?
Sent from my E6633 using Tapatalk

Categories

Resources