[TUTORIAL] Centering the Lockscreen After Decreasing DPI - General Questions and Answers

[Noob friendly tutorial]
A typical problem when decreasing the DPI of your device is sometimes the lock screen will offset to the right(usually).
This tutorial might help fix this problem.
Requirements:
1. Rooted device
2. File manager for viewing and managing the root directory (e.g. Root Explorer)
3. Software for decompiling and recompiling .apk files
4. Text editor, I recommend Notepad++
Prerequisite:
Backup your current ROM so that I will not be held responsible for problems the may occur on your device
Instructions:
1. Open Play Store and download "ZipSigner" by Ken Ellindwood
2. Go to the root directory which is designated as "/".
3. Open "system" folder
4. Open "framework" folder
5. Look for "framework-res.apk"
6. Copy "framework-res.apk"
7. Navigate back to your SD card directory and paste it to where you want it.
8. Connect your device to your PC.
9. Expand your phone's the notification bar, press "Charging" and change it to "USB mass storage" and press "OK". Your PC will access your phone's storage directories (SD Card and Phone Storage)
10. On your PC, go to your SD Card's directory and navigate to where you put framework-res.apk and move it to your PC's desktop (you can put it to anywhere you like, just make sure you have it in your PC's storage directory).
11. On your PC, transfer framework-res.apk in the directory of your decompiling/recompiling tool with respect to what "tool" you are using.
Main Part:
12. Decompile framework-res.apk
13. Go to its "decompiled" directory
14. Navigate to /res/layout
15. Look for "keyguard_screen_tab_unlock.xml"
16. Open it with a text editor
17. Look for this line:
Code:
<com.android.internal.widget.multiwaveview.GlowPadView
18. Rigt next to this line, look for the lines, "android:gravity" and "android:layout_height".
19. Change their values to "left|top" and "wrap_content" respectively
So "android:gravity" and "android:layout_height" should look like this:
Code:
android:gravity="left|top"
and
Code:
android:layout_height="wrap_content"
20. Recompile framework-res.apk
21. Sign the new, edited framework-res.apk
22. Place it back to your SD Card
23. Disconnect your device from your PC.
24. Go to your SD Card and navigate to where you have put the modified framework-res.apk
25. Using the ZipSigner app, press "Choose In/Out..." and navigate to where you put the edited framework-res.apk
26. Press "Sign The File" and ZipSigner will begin to produce a signed version of the selected apk.
27. Navigate back to where you have created the edited-and-signed framework-res.apk and it will have a "-signed" in it's name.
28. Remove the "-signed" and MAKE SURE the newly-edited-and-signed framework-res.apk is named AS IS, "framework-res.apk".
*If there are others' named "framework-res.apk" in the same directory, rename them into something different before renaming the "newly-edited-and-signed framework-res.apk" so it won't conflict with step 28.
29. After you have successfully renamed the "newly-edited-and-signed framework-res.apk", copy it.
30. Go to the root directory which is designated as "/".
31. Open "system" folder
32. Open "open "framework" folder
33. And paste-and-overwrite/override the "newly-edited-and-signed framework-res.apk" to this "framework" directory.
Note: If in some case you were prevented to paste in the "framework" directory, check to see if your root file manager is mounting the root, if not check for an option to mount the root directory
34. If you have successfully overwritten/overridden the original framework-res.apk, your device should begin to Soft-Reboot automatically. If not then, manually force your device to reboot.
And your lock screen should now be at the center.
35. Done

durancharles27 said:
[Noob friendly tutorial]
A typical problem when decreasing the DPI of your device is sometimes the lock screen will offset to the right(usually).
This tutorial might help fix this problem.
Requirements:
1. Rooted device
2. File manager for viewing and managing the root directory (e.g. Root Explorer)
3. Software for decompiling and recompiling .apk files
4. Text editor, I recommend Notepad++
Prerequisite:
Backup your current ROM so that I will not be held responsible for problems the may occur on your device
Instructions:
1. Open Play Store and download "ZipSigner" by Ken Ellindwood
2. Go to the root directory which is designated as "/".
3. Open "system" folder
4. Open "framework" folder
5. Look for "framework-res.apk"
6. Copy "framework-res.apk"
7. Navigate back to your SD card directory and paste it to where you want it.
8. Connect your device to your PC.
9. Expand your phone's the notification bar, press "Charging" and change it to "USB mass storage" and press "OK". Your PC will access your phone's storage directories (SD Card and Phone Storage)
10. On your PC, go to your SD Card's directory and navigate to where you put framework-res.apk and move it to your PC's desktop (you can put it to anywhere you like, just make sure you have it in your PC's storage directory).
11. On your PC, transfer framework-res.apk in the directory of your decompiling/recompiling tool with respect to what "tool" you are using.
Main Part:
12. Decompile framework-res.apk
13. Go to its "decompiled" directory
14. Navigate to /res/layout
15. Look for "keyguard_screen_tab_unlock.xml"
16. Open it with a text editor
17. Look for this line:
Code:
<com.android.internal.widget.multiwaveview.GlowPadView
18. Rigt next to this line, look for the lines, "android:gravity" and "android:layout_height".
19. Change their values to "left|top" and "wrap_content" respectively
So "android:gravity" and "android:layout_height" should look like this:
Code:
android:gravity="left|top"
and
Code:
android:layout_height="wrap_content"
20. Recompile framework-res.apk
21. Sign the new, edited framework-res.apk
22. Place it back to your SD Card
23. Disconnect your device from your PC.
24. Go to your SD Card and navigate to where you have put the modified framework-res.apk
25. Using the ZipSigner app, press "Choose In/Out..." and navigate to where you put the edited framework-res.apk
26. Press "Sign The File" and ZipSigner will begin to produce a signed version of the selected apk.
27. Navigate back to where you have created the edited-and-signed framework-res.apk and it will have a "-signed" in it's name.
28. Remove the "-signed" and MAKE SURE the newly-edited-and-signed framework-res.apk is named AS IS, "framework-res.apk".
*If there are others' named "framework-res.apk" in the same directory, rename them into something different before renaming the "newly-edited-and-signed framework-res.apk" so it won't conflict with step 28.
29. After you have successfully renamed the "newly-edited-and-signed framework-res.apk", copy it.
30. Go to the root directory which is designated as "/".
31. Open "system" folder
32. Open "open "framework" folder
33. And paste-and-overwrite/override the "newly-edited-and-signed framework-res.apk" to this "framework" directory.
Note: If in some case you were prevented to paste in the "framework" directory, check to see if your root file manager is mounting the root, if not check for an option to mount the root directory
34. If you have successfully overwritten/overridden the original framework-res.apk, your device should begin to Soft-Reboot automatically. If not then, manually force your device to reboot.
And your lock screen should now be at the center.
35. Done
Click to expand...
Click to collapse
This is Q and A thread tutorial should not be here .... Plz post this thread in right place.....

samith.shetty3 said:
This is Q and A thread tutorial should not be here .... Plz post this thread in right place.....
Click to expand...
Click to collapse
Well, can I move this thread in "General"?

durancharles27 said:
Well, can I move this thread in "General"?
Click to expand...
Click to collapse
yup..

samith.shetty3 said:
yup..
Click to expand...
Click to collapse
well I can't I would have to pray that an Admin/Moderator would see this and move it.

Related

[GUIDE] Triumph - CM9 - CM7 - MIUI - EASY Carrier Name Change

Disclaimer: If your phone explodes, dies a miserable death, or any of a million things, don't come crying to me. Do this at your own risk!
Having said that... this is THE EASIEST way to change the Carrier Name in CM9, CM7, and MIUI on the Triumph.
This will NOT work on stock FROYO!
INSTRUCTIONS:
1. Download flashable Zip at end of post -- triumph_cm7_miui_carrier_name.zip
2. Open the Zip file and extract the eri.xml file in /data/ to your desktop using a zip utility such as WinZip, 7-zip, etc.
3. Open the eri.xml file in your favorite text editor such as notepad++.
4. In LINE 7, change Virgin Mobile in Eritext="Virgin Mobile" to whatever text you want, for example:
Code:
<EriInfo RoamingIndicator="1" IconIndex="1" IconMode="0" EriText="I am AWESOME" CallPromptId="0" AlertId="0" />
IF you want to use the following special characters in the text, you will need to use the escape characters instead (for example instead of & use & ):
Code:
Character Reference
& &
< <
> >
" "
' &apos;
5. Save the eri.xml file after making your changes.
The following are 3 methods of updating your phone. Use whichever method you are most comfortable with.
A. Using the flashable zip and flashing in CWM.
1. Add the updated eri.xml back into the /data folder in the triumph_cm7_miui_carrier_name.zip -- make sure that you use "no compression" or "store" when adding it back.
2. Save the triumph_cm7_miui_carrier_name.zip on your sdcard.
3. Reboot into CWM and flash the zip file as usual.
B. Using ES File Explorer, Root Explorer, or another file explorer capable of root. (In the instructions below, I'll reference ES File Explorer since that is what I use but the instructions should be similar for any of the file explorers.)
1. Copy the updated eri.xml file onto your sd card.
2. On your phone, open up ES File Explorer.
Make sure that you have your settings set to mount the file system as writable:
2a. In ES File Explorer, hit menu --> Settings.
2b. Make sure there is a checkmark in the following checkboxes: "Root Explorer" and "Mount File System".
3. In ES File Explorer, browse to your sd card where you saved the eri.xml file.
4. Long press on eri.xml to bring up the popup menu.
5. Select Copy.
6. Next, browse to /data/. To do that, click the Favorites button on the toolbar and select the / from the Favorites popup window and then go into /data/.
7. Hit the Menu button on your phone and select Operations --> Paste.
8. You should now see the eri.xml file in your /data/ folder.
9. Close out of ES File Explorer.
10. Toggle Airplane Mode on and then off. When your service comes back, the carrier name should reflect your new Carrier name text. If not, reboot your phone.
C. Using ADB. The following instructions are for windows but you should be able to do the same in any other OS.
1. This assumes that the updated eri.xml file is on your desktop as I instructed above and you already have your phone connected to your computer. Open the command line in Windows.
2. type the following commands:
Code:
cd %userprofile%\desktop
adb push eri.xml /data/eri.xml
3. Toggle Airplane Mode on and then off. When your service comes back, the carrier name should reflect your new Carrier name text. If not, reboot your phone.
If you are uncomfortable using adb or don't have it installed or don't know what it is, then I'd recommend using method A or B.
To UNDO all changes:
This is SUPER EASY:
1. Using ES File Explorer, browse to /data/
2. Delete the eri.xml file.
3. Toggle Airplane Mode on and then off. When your service comes back, the carrier name should reflect your original Carrier name text. If not, reboot your phone.
Nevermind. I got it. Lol. very nice.
Sent from my Motorola Triumph using Tapatalk
woot.. been looking all over for a simple method to get my phone to stop saying sprint all the time...

Htc "mirror" app fix for endymion

View attachment HTCCamera.apk
INSTRUCTIONS:
1.dOWNLOAD THE .APK FILE
2. Transfer the .apk files to your SD card via PC / Mac (remember where you put them)
3. Open Root Explorer App, and navigate to the transferred .apk files
4. Long-press HTCCamera.apk and select the “Move” option on pop-up menu
Navigate to /system/app folder
5. Change mount option from RO to RW (read-only to read-write)
Paste HTCCamera.apk into the /system/app folder
6. Long-press HTCCamera.apk and select “Permissions” from pop-up menu
Change permissions to match all other apps in this folder (rw-r–r–)
7. Install HTCCamera.apk
8. Reboot your device and ENJOY!!

ApkTool

Hy all i know i'm anoying with this but i realy want to edit this apk file (LatinIME.apk) can ayone explane me what is wrong whit this error and how to fix it :/
Oky Step by Step
1. I work on (AutoAPKTool2.0.4)
2. I download the rom cm-10-20121030-bruce2728-pyramid (HTC Sensation)
3. I drag out the file from APP directory (LatinIME.apk) this is keyboard to desktop
4. Then i go to Framework directory in this rom and drag out file Framework-res.apk and drag it to desktop
5. Then i add this 2 files in "AutoAPKTool2.0.4\_INPUT_APK" and run AutoAPKToolMain.bat
6. When open this window i select number 1 (if framework-res.apk) and press enter
7. Then i select number 81 ( Instrall additional framework file ) and add the location of Framework-res.apk witch is in _INPUT_APK and press enter
8. Then i select number 6 and add location of LatinIME.apk and press enter and wait until decompile
9. When decompile end i open the "AutoAPKTool2.0.4\_INPUT_APK\LatinIME\res\valu es" directory and edit Style.xml with notepad++ ( <item name="keyHintLetterColor">#80000000</item> ) to ( <item name="keyHintLetterColor">#80E0E4E5</item> )
10. Then i go back to AutoAPKToolMain.bat and select number 9 and add location of "\_INPUT_APK\LatinIME" and press enter
11. Wait until recompile and then i get this error:
"[*] "C:\Documents and Settings\Anonymous26\Desktop\AutoAPKTool2.0.4\_INP UT_APK\LatinIME"
recompiling "C:\Documents and Settings\Anonymous26\Desktop\AutoAPKTool2.0.4\_INP UT_APK\LatinIME"...
I: Smaling...
I: Building resources...
I: Copying libs...
I: Building apk file...
The system cannot find the drive specified."
12. Ok i close this log and open "AutoAPKTool2.0.4\_INPUT_APK\LatinIME\dist\LatinIM E.apk ( Recompiled File ) and drag out this resources.arsc and drag it to desktop
13. Then i open the original LatinIME.apk and replace Original Resources.arsc with edited Resources.arsc
14. Then i upload this file to SD card and install it then start install and when must type App installed type app not installed :/
i allready try with Virtous ten Studio i Decompile file, edit it, recompile back to apk, sign it, uplolad on sd card, install it... and still crash every time i open the keyboard every time i want to type any message.... Sorry i'm new in this :/

How can I look at the code that is running an app?

I have built a few web sites but now I'm learning how to build apps. Is there a way to look at the code that is running a particular app on my phone so I can get an idea of how it is put together?
Can I open an app from my phone with Android Studio?
Follow the steps given below.
Procedure to open the source code:
Step 1:
Make a new folder and copy over the .apk file that you want to decode.
Now rename the extension of this .apk file to .zip (e.g. rename from filename.apk to filename.zip) and save it. Now you can access the classes.dex files, etc. At this stage you are able to see drawables but not xml and java files, so continue.
Step 2:
Now extract this .zip file in the same folder (or NEW FOLDER).
Download dex2jar and extract it to the same folder (or NEW FOLDER).
Move the classes.dex file into the dex2jar folder.
Now open command prompt and change directory to that folder (or NEW FOLDER). Then write d2j-dex2jar classes.dex (for mac terminal or ubuntu write ./d2j-dex2jar.sh classes.dex) and press enter. You now have the classes.dex.dex2jar file in the same folder.
Download java decompiler, double click on jd-gui, click on open file, and open classes.dex.dex2jar file from that folder: now you get class files.
Save all of these class files (In jd-gui, click File -> Save All Sources) by src name. At this stage you get the java source but the .xml files are still unreadable, so continue.
Step 3:
Now open another new folder
Put in the .apk file which you want to decode
Download the latest version of apktool AND apktool install window (both can be downloaded from the same link) and place them in the same folder
Download framework-res.apk and put it in the same folder (Not all apk file need this file, but it doesn't hurt)
Open a command window
Navigate to the root directory of APKtool and type the following command: apktool if framework-res.apk
apktool d myApp.apk (where myApp.apk denotes the filename that you want to decode)
now you get a file folder in that folder and can easily read the apk's xml files.

[SUBSTRATUM][FULL guide] Change accent colors of non-system apps

FULL GUIDE TO CHANGE ACCENT COLORS
Hello everybody, This is my first post on xda. This guide is for those who want to change accent colors of non-system apps manually using substratum.
PREREQUISITIES
1.Rooted Android Phone
2.substratum theme engine(download from playstore)
3.Android Studio
4.Git installed on PC
5.APK tool (You can find easily on google)
6.Notepad++
STEPS
1.First of all, clone Substratum Theme Project from git into your Android Studio project
https:github.com/substratum/template (Add //)
2. Then change Theme Name,Email that is used for queries and other details in theme_configurations.xml
3.Then connect your device with the PC. Make sure ADB is installed in your computer and your phone has USB Debugging enabled.( Device Drivers should be installed too)
4.Go to the folder where ADB is installed(where adb.exe is located) and open a cmd window there(shift+right click)
5. Confirm that your device is connected properly by typing "adb devices"(without double quotes)
6.Once your device has been connected properly,you will see your device in List Of Devices
8. Then open root browser on your mobile and navigate to data/app/
9.Locate the android app folder you want to theme.(App must be installed on your phone)
Then type adb pull /data/app/com.android.yourapp/base.apk (Here change the app folder and app name accordingly.Copy the base.apk to apktool folder
7.Then open an another cmd window in to folder where apktool(jar) is located.
10.Then go to the cmd you opened in apktool folder,Type apktool_2.3.0.jar d base.apk
11.Then a folder will be created in that directory.
12.Then open the app in your phone with the device connected to pc and leave the phone with screen open(idle)
13.Go to tools->Android->Android Device Monitor->Dump View Hierarchy for UI Automator
14.Then a screenshot will get opened.
15.Moving the mouse will create a certain red boundary
16.Point it to any element you want to theme and check its resource-id
17.Then go to the folder which you created while decompiling the apk using apktool
18. Copy the path to that directory
19.Open Notepad++ and press Ctrl+Shift+F
20. Enter the resource-id you saw in "Find what" and directory in "Directory"
21.Notepad++ will search for this name in all the files of all the folders.
22. Then you will get some search results
23.Open the search result wherever you see background color code
24. Copy the line you want to change
(YOU CAN ALSO CHANGE THE COLORS USING COLORS.XML PRESENT IN res/values/colors.xml)
25.Then open Android studio and delete all the folders INSIDE the OVERLAYS FOLDER
26.In overlays folder,create a folder named com.android.(yourapp) and inside that folder create the whole directory of the file you edited) For example-> If you edited colors.xml,then create res folder and inside it create values then create a xml file named colors.xml
27. Inside that XML file inside the resources tag, paste the line you copied (The one you want to edit).
28. Compile and run the project on your phone(You will see the substratum theme installed on your phone with your app as a option)
29. Apply it and see the difference
(TIP: If you want to interchange white and black colors of the app, edit colors.xml and change all the white colors to black.After doing this,check whether all the colors are as desired. If not,change the color of a specific element manually as in this tutorial)
30. VOILA.!! You just made your first Substratum Theme. Good luck Themer...!!
(This method works on most apps)
Do ask if u have any query
Dosen't work
rohan_asthana said:
FULL GUIDE TO CHANGE ACCENT COLORS
Hello everybody, This is my first post on xda. This guide is for those who want to change accent colors of non-system apps manually using substratum.
PREREQUISITIES
1.Rooted Android Phone
2.substratum theme engine(download from playstore)
3.Android Studio
4.Git installed on PC
5.APK tool (You can find easily on google)
6.Notepad++
STEPS
1.First of all, clone Substratum Theme Project from git into your Android Studio project
https:github.com/substratum/template (Add //)
2. Then change Theme Name,Email that is used for queries and other details in theme_configurations.xml
3.Then connect your device with the PC. Make sure ADB is installed in your computer and your phone has USB Debugging enabled.( Device Drivers should be installed too)
4.Go to the folder where ADB is installed(where adb.exe is located) and open a cmd window there(shift+right click)
5. Confirm that your device is connected properly by typing "adb devices"(without double quotes)
6.Once your device has been connected properly,you will see your device in List Of Devices
8. Then open root browser on your mobile and navigate to data/app/
9.Locate the android app folder you want to theme.(App must be installed on your phone)
Then type adb pull /data/app/com.android.yourapp/base.apk (Here change the app folder and app name accordingly.Copy the base.apk to apktool folder
7.Then open an another cmd window in to folder where apktool(jar) is located.
10.Then go to the cmd you opened in apktool folder,Type apktool_2.3.0.jar d base.apk
11.Then a folder will be created in that directory.
12.Then open the app in your phone with the device connected to pc and leave the phone with screen open(idle)
13.Go to tools->Android->Android Device Monitor->Dump View Hierarchy for UI Automator
14.Then a screenshot will get opened.
15.Moving the mouse will create a certain red boundary
16.Point it to any element you want to theme and check its resource-id
17.Then go to the folder which you created while decompiling the apk using apktool
18. Copy the path to that directory
19.Open Notepad++ and press Ctrl+Shift+F
20. Enter the resource-id you saw in "Find what" and directory in "Directory"
21.Notepad++ will search for this name in all the files of all the folders.
22. Then you will get some search results
23.Open the search result wherever you see background color code
24. Copy the line you want to change
(YOU CAN ALSO CHANGE THE COLORS USING COLORS.XML PRESENT IN res/values/colors.xml)
25.Then open Android studio and delete all the folders INSIDE the OVERLAYS FOLDER
26.In overlays folder,create a folder named com.android.(yourapp) and inside that folder create the whole directory of the file you edited) For example-> If you edited colors.xml,then create res folder and inside it create values then create a xml file named colors.xml
27. Inside that XML file inside the resources tag, paste the line you copied (The one you want to edit).
28. Compile and run the project on your phone(You will see the substratum theme installed on your phone with your app as a option)
29. Apply it and see the difference
(TIP: If you want to interchange white and black colors of the app, edit colors.xml and change all the white colors to black.After doing this,check whether all the colors are as desired. If not,change the color of a specific element manually as in this tutorial)
30. VOILA.!! You just made your first Substratum Theme. Good luck Themer...!!
(This method works on most apps)
Do ask if u have any query
Click to expand...
Click to collapse
It doesn't work on xposed installer .
substratum isn't showing xposed installer in it's overlays.
Thanks for the post.

Categories

Resources