[Q] How to use adb to install flash player ? - Legend Q&A, Help & Troubleshooting

Yeah, someone may absolutely say that adobe flash is not working on our ARM v6 CPU and that is an undeniable fact.
BUT I have tried to flash a adobe flash 10.2 before
(maybe 3 months, long time ago )
And outcome it works on some flash only like wt the HTC flash player(in stock rom) did.
Now I m going to flash the CM7 rom again and wanna install flash 10.3 in it.
But I forget how to make it,so....
Could anyone tell me how to install that again by adb?
system\app or data\app and commands are ?
TY!

cphkelvin said:
Yeah, someone may absolutely say that adobe flash is not working on our ARM v6 CPU and that is an undeniable fact.
BUT I have tried to flash a adobe flash 10.2 before
(maybe 3 months, long time ago )
And outcome it works on some flash only like wt the HTC flash player(in stock rom) did.
Now I m going to flash the CM7 rom again and wanna install flash 10.3 in it.
But I forget how to make it,so....
Could anyone tell me how to install that again by adb?
system\app or data\app and commands are ?
TY!
Click to expand...
Click to collapse
You can get flash lite from a Samsung Galaxy 3? froyo rom. But this will only allow you to play flash files from your filemanager.
Run:
adb remount
adb push
The browser plugin in't included in the froyo release, but in the eclair version.
Unfortunately I haven't been able to load the plugin, even after modifying the source to accept any browser plugin. Not just the one's that got a Adobe Flash signature.
Comment the code in android/system/frameworks/base/core/java/android/webkit/PluginManager.java like this:
PHP:
/*if (SystemProperties.getBoolean("ro.secure", false)) {
boolean signatureMatch = false;
for (Signature signature : signatures) {
for (int i = 0; i < SIGNATURES.length; i++) {
//a hack to make it load any thing...
if (SIGNATURES[i].equals(signature)) {
signatureMatch = true;
break;
}
}
}
if (!signatureMatch) {
continue;
}
}*/
It seams that the browser plugin that the samsung phone's have is some what different to load in to the browser. (The one from eclair got the libs that have the load entry points for a browser plugin. But the gingerbread haven't)
Also the eclair browser plugin register some kind of URL listerner, the adobe one does not do this. Look in the AndroidManifest.
The HTC plugin is a hole lot more advanced with dependensis for multi-touch and allot more in framework. The plugin is also loaded some what different. It's a hardcoded javafunction in the PluginManager.java for webkit. (The samsung browser haven't got this, this may be hardcoded in the c-files of webkit)
I got the SDK sample plugins to install anyway
Get Smali/Baksmali and dex2jar if you want to look at some code, in the apk-files/frameworkfiles

Related

Problem writing data to a file

Hi everyone, i'm new to Android development and i have a incovenient bug. Well, i used the 'Top-Down- method to fix all my requirements, but it misses this one. I'm trying to write data to a file, and to be able to access this data in a remote html in a webview. Although i managed to create the file, here's the code
Code:
File file = new File("data/data/com.template.WebViewTemplate/test.txt");
if (!file.exists()) {
try {
file.createNewFile();
WriteSettings(this,"setting0, setting1, setting2");
} catch (IOException e) {
e.printStackTrace();
}
}
and the test.txt file is empty.
I'd love to fix that issue that really bothers me, though i have to have done it by thursday evening ( here in France ), thanks a million ( please excuse my english i'm french )
First of all, path must start with /. And I'm not sure u can write here. Try /sdcard/text.txt location.
Also, try using FileWriter class. I think it'll be better.
Sent from my HTC Sensation using xda premium
Why not use shared preferences?
It looks like you are setting preferences guessing that's what you are doing but could be very wrong lol.
Pvy
Sent from my Galaxy Nexus using Tapatalk 2
jarj28 said:
Hi everyone, i'm new to Android development and i have a incovenient bug. Well, i used the 'Top-Down- method to fix all my requirements, but it misses this one. I'm trying to write data to a file, and to be able to access this data in a remote html in a webview. Although i managed to create the file, here's the code
Code:
File file = new File("data/data/com.template.WebViewTemplate/test.txt");
if (!file.exists()) {
try {
file.createNewFile();
WriteSettings(this,"setting0, setting1, setting2");
} catch (IOException e) {
e.printStackTrace();
}
}
and the test.txt file is empty.
I'd love to fix that issue that really bothers me, though i have to have done it by thursday evening ( here in France ), thanks a million ( please excuse my english i'm french )
Click to expand...
Click to collapse
Take a look at developer.android.com/guide/topics/data/data-storage.html, this contains some good documentation on how to use the various storage options. I sounds like you want either private internal or public storage.
Thanks to everyone for your replies !
As far i know, the file is created, i can look for it in /data/data/com.packagename/filename.txt. But it is empty :/
How can i use sharedprefs? Thanks a lot !
EDIT : I looked at the docs, but still can't get where to save the preferences
EDIT 2 : YEEEAAHHHH THANKS !!! I used
Code:
String FILENAME = "hello_file";
String string = "hello world!";
FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);
fos.write(string.getBytes());
fos.close();
Great !!! Now i face another problem, but maybe i'll do another thread. I need to access the file through my WebView, and i need to figure out how to save the data from a list of countries
jarj28 said:
Thanks to everyone for your replies !
As far i know, the file is created, i can look for it in /data/data/com.packagename/filename.txt. But it is empty :/
How can i use sharedprefs? Thanks a lot !
EDIT : I looked at the docs, but still can't get where to save the preferences
EDIT 2 : YEEEAAHHHH THANKS !!! I used
Code:
String FILENAME = "hello_file";
String string = "hello world!";
FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);
fos.write(string.getBytes());
fos.close();
Great !!! Now i face another problem, but maybe i'll do another thread. I need to access the file through my WebView, and i need to figure out how to save the data from a list of countries
Click to expand...
Click to collapse
EDIT 3 : Is there someone i can PM ?

Add sound for bootanimation

Hi,
I have added the following code on my local AOSP copy (master branch) and it starts up fine but the .mp3 is not playing. After putting more logging message and looking at the logcat I notice that the code didn't continue after calling the MediaPlayer() class
mPlayer = new MediaPlayer();
if (mPlayer == NULL) {
ALOGE("Failed to create MediaPlayer()\n");
return false;
}
Anybody has any experience troubleshooting this or have successfully implemented this gerrit issue ?. I'm testing it using Nexus 7 (grouper).
I cannot post the link to this post so I'm going to spell the link to the gerrit issue out
android-review.googlesource.com slash # slash c slash 38222 slash
Cheers
Not sure how well this works now, I have not messed with the boot sounds in a while now.
https://github.com/lithid/Scripts/blob/master/Android/bootsound.sh
I used to be able to get the boot sounds working with this script I wrote.
lithid-cm said:
....I used to be able to get the boot sounds working with this script I wrote.
Click to expand...
Click to collapse
Thanks lithid-cm.
I managed to make it work, the problem was because the bootanimation.zip contains only .mp3 it should contain the bootanimation logo. I've made a short demo video of using the CyanogenMod logo on an AOSP
youtube.com <slash> watch <question mark> v <equal sign> b0uuHlrJpGI

[Q] My chinese tablet got into DEMO mode.

Hi, i bough a chinese tablet a few weeks ago.
I didnt intalled anything bad or risky in it.
And this night i got unexplicable popups, adds and applications that i didnt installed.
The source of this activity was a app called com.android.server and com.android.popupreciver
I unistalled them and then i rebooted my tablet, then i got a message saying DEMO.
I heard that the only way to solve this is a hard reset, but i would like to know if there is something else i can do.
=====
Else, i would like to know if there is any ROM compatible for a 7" chinese tablet.
Removing Demo mode from Chinese tablets
I have one of these and have not been using it for a long time due to all the unwanted ads and being unable to figure it out. The other day I decided to give it another try and this is what I found:
A lot of these cheap tablets comes with a trojan and on my A23 Q8H 7" tablet it was in CloudsService.apk. If you remove it the tablet will show big red "Demo" letters across the screen. This comes from the SystemUI.apk and when I decompiled it I saw the following:
Code:
private void showDemoOverlay() {
TextView textview = new TextView(this);
textview.setText("Demo");
textview.setTextSize(180F);
textview.setGravity(17);
textview.setBackgroundColor(0);
textview.setTextColor(0xffff0000);
android.view.WindowManager.LayoutParams layoutparams = new android.view.WindowManager.LayoutParams();
layoutparams.type = 2006;
layoutparams.width = -1;
layoutparams.height = -2;
layoutparams.gravity = 17;
layoutparams.format = textview.getBackground().getOpacity();
layoutparams.flags = 24;
((WindowManager)getSystemService("window")).addView(textview, layoutparams);
}
The above function in SystemUIService.java is indirectly called by this one
Code:
private boolean hasOTAServer() {
android.content.pm.PackageInfo packageinfo;
try {
packageinfo = getPackageManager().getPackageInfo("com.clouds.server", 0);
}
catch (android.content.pm.PackageManager.NameNotFoundException namenotfoundexception) {
packageinfo = null;
namenotfoundexception.printStackTrace();
}
return packageinfo != null;
}
So in short all it does is look for is a package called com.clouds.server and if it doesn't find it the Demo is displayed.
The solution is to create a blank app in Android studio, make sure the package name is com.clouds.server and then install it on the device.
Now this I call informed investigation! I was trying to get rid of the trojan on a chinese tab and after removing at least 5 apps and rebooting i got the DEMO overlay.
I found a blog post dealing with the same problem and this person provided an APK to install (I checked it via virustotal and it came back clean): cmcm.com/article/share/2015-11-09/840.html
How did you find out it was the SystemUI.apk showing the overlay? Or was it just an educated guess? I tried finding the app via dumpsys but couldn't see anything...
P.S.: THANKS!!
Surrogard said:
Now this I call informed investigation! I was trying to get rid of the trojan on a chinese tab and after removing at least 5 apps and rebooting i got the DEMO overlay.
I found a blog post dealing with the same problem and this person provided an APK to install (I checked it via virustotal and it came back clean): cmcm.com/article/share/2015-11-09/840.html
How did you find out it was the SystemUI.apk showing the overlay? Or was it just an educated guess? I tried finding the app via dumpsys but couldn't see anything...
P.S.: THANKS!!
Click to expand...
Click to collapse
It has been a while but if you extract all the APK files and run grep on them you should be able to find the one you are looking for. You can then decompile the APK to have a look at the source code. Another way would be to remove the apps one by one and reboot each time. When you find the APK which causes the Demo mode to be activated just replace it with a blank APK file with the same package name and it should be good. If that does not work then it could be that the tablet checks for more things which means you'll have to go with option 1. I would also not trust virustotal with this as there are many reasons why it could return a false result and it does not take too much skills to bypass virustotal checks.
The solution!
Just install a clean CloudsService.
Normal_CloudsService.apk
Mirror1: https ://drive .google .com/file/d/0B1CH2n58TrbiSFl4Y0twRk5LX3M/view?usp=sharing
Mirror2: https ://drive .google .com/file/d/0B65Tvd8zpsRPOFNLY2NTRVMxckU/view?usp=sharing
VirusTotal: https ://www .virustotal .com/en/file/a014b81ce3cbee336a705eb54a0d6081038d67cc34b65688304a3ee41861903a/analysis/1455333414/
cheers
ofernandofilo said:
Just install a clean CloudsService.
Normal_CloudsService.apk
Mirror1: https ://drive .google .com/file/d/0B1CH2n58TrbiSFl4Y0twRk5LX3M/view?usp=sharing
Mirror2: https ://drive .google .com/file/d/0B65Tvd8zpsRPOFNLY2NTRVMxckU/view?usp=sharing
VirusTotal: https ://www .virustotal .com/en/file/a014b81ce3cbee336a705eb54a0d6081038d67cc34b65688304a3ee41861903a/analysis/1455333414/
cheers
Click to expand...
Click to collapse
Thank you!
Note that you might need to do
adb uninstall com.clouds.server
before you will be able to install this one if you get "Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]"
it works
I JUST INSTALLED THE APK POSTED IN THE FIRS LINK ... AND IT WAS MY SOLUTION..... I DO IT TO ZEEPAD 7DRK
---- drive.google.com/file/d/0B1CH2n58TrbiSFl4Y0twRk5LX3M/view#! -------
GREETENGS FROM MEXICO LEON GTO
....my english is bad .. i know i know.... jajajaj lool

Google Chrome User Agent Android 7.x

Hi,
how can i Set Chrome User Agent to Desktop or chromebook on Android 7.x ?
Old User Agent Apps won't work on 7.x
I need to Set Chrome to Desktop view always on
Put a file in Data/Local called 'chrome-command-line', put this text in
chrome --user-agent="Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36" -force-device-scale-factor=2
Permissions 644, you can change the scale-factor to suit.
Sorry but this is Not working anymore on 7.x
Nobody ?
Just wanted to bump this as I'm also looking for a solution.
This has been bugging me for for a few days, very frustrating, seems like Chrome doesn't read the command line files in Nougat no matter where they are located, what they are called, or how you invoke the application. So I did the next best thing...
I grabbed the latest Chromium source code and modified user_agent.cc so it spits out a desktop UA instead. Cross compiling was a bit of a lengthy process, around 4 hours, but it works perfectly. The code alteration was quite trivial, I know this doesn't really help anyone here with a quick fix, and I really can't see Google adding a permanent desktop mode any time ever.
To make the change, just edit the following and rebuild:
<path>/src/content/common/user_agent.cc
PHP:
std::string BuildUserAgentFromOSAndProduct(const std::string& os_info,
const std::string& product) {
// Derived from Safari's UA string.
// This is done to expose our product name in a manner that is maximally
// compatible with Safari, we hope!!
std::string user_agent;
// base::StringAppendF(
// &user_agent,
// "Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) %s Safari/%d.%d",
// os_info.c_str(),
// WEBKIT_VERSION_MAJOR,
// WEBKIT_VERSION_MINOR,
// product.c_str(),
// WEBKIT_VERSION_MAJOR,
// WEBKIT_VERSION_MINOR);
// return user_agent;
return "<Insert desired user agent here>";
}
dtchky said:
This has been bugging me for for a few days, very frustrating, seems like Chrome doesn't read the command line files in Nougat no matter where they are located, what they are called, or how you invoke the application. So I did the next best thing...
I grabbed the latest Chromium source code and modified user_agent.cc so it spits out a desktop UA instead. Cross compiling was a bit of a lengthy process, around 4 hours, but it works perfectly. The code alteration was quite trivial, I know this doesn't really help anyone here with a quick fix, and I really can't see Google adding a permanent desktop mode any time ever.
To make the change, just edit the following and rebuild:
<path>/src/content/common/user_agent.cc
PHP:
std::string BuildUserAgentFromOSAndProduct(const std::string& os_info,
const std::string& product) {
// Derived from Safari's UA string.
// This is done to expose our product name in a manner that is maximally
// compatible with Safari, we hope!!
std::string user_agent;
// base::StringAppendF(
// &user_agent,
// "Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) %s Safari/%d.%d",
// os_info.c_str(),
// WEBKIT_VERSION_MAJOR,
// WEBKIT_VERSION_MINOR,
// product.c_str(),
// WEBKIT_VERSION_MAJOR,
// WEBKIT_VERSION_MINOR);
// return user_agent;
return "<Insert desired user agent here>";
}
Click to expand...
Click to collapse
Would it be possible for you to share the apk? This is frustrating me beyond belief after I moved to Nougat.
Found a solution for this problem, it was caused by a SELinux context which blocked read access to the command line file.
Download this script and copy it on the SDCard.
Install Android Terminal Emulator, then enter:
Code:
su
sh /sdcard/chrome.sh
- Testing 7.x fix. https://play.google.com/store/apps/details?id=com.linuxjet.apps.ChromeUA
jpeterson said:
- Testing 7.x fix. https://play.google.com/store/apps/details?id=com.linuxjet.apps.ChromeUA
Click to expand...
Click to collapse
Thank you. Is this working for anyone?
cobram3 said:
Thank you. Is this working for anyone?
Click to expand...
Click to collapse
It is available on the play store. I can not guarantee this will work, but I have tested it on my 7.x devices and 8.x devices and it is working on them.
Does not work on my OnePlus 5T on Android 8.0 rooted with Magisk.
Neither does the script posted above.
Any other ideas? I'm sick of manually selecting "view non crippled site" every time I open any webpage.
"Mobile" sites need to die!
EDIT: I figured it out, I needed to set the /data/local directory to be readable by all. (The script above already got the file permissions right for the chrome-command-line file, just not the directory it lived in). After that the user agent string seems to be working as it should and I can actually view useful webpages again!
Well, so much for that.
I wiped my phone and started over, and the same steps I used last time have no effect this time. I'm stuck in mobile website hell.
Anyone with any idea how to fix this?
EDIT: This seems to be related to the file permissions issue still, but I'm not sure how to fix it. When I'm not root, I get permission denied when I do an ls on the /data/local directory, despite that directory, and all the ones above it, being set 755. So whatever is blocking me from being able to ls that directory is also likely blocking the ability for chrome to read that file and behave like a useful web browser instead of a completely crippled one.
ve6rah said:
Does not work on my OnePlus 5T on Android 8.0 rooted with Magisk.
Neither does the script posted above.
Any other ideas? I'm sick of manually selecting "view non crippled site" every time I open any webpage.
"Mobile" sites need to die!
EDIT: I figured it out, I needed to set the /data/local directory to be readable by all. (The script above already got the file permissions right for the chrome-command-line file, just not the directory it lived in). After that the user agent string seems to be working as it should and I can actually view useful webpages again!
Click to expand...
Click to collapse
You can create a "chrome desktop"widget with that app,only by this way,it seems to work.
Unfortunately that only works for opening the browser and does nothing for links clicked in our applications.
Why do developers of websites hate mobile users? This isn't 1998 anymore, people want to access websites from their phones! We shouldn't have to resort to such ridiculous lengths to enable such basic functionality as a working web browser!
https://forum.xda-developers.com/showthread.php?t=1811101&page=13 #128
That helps quite a bit.
Now of course I've run in to another problem. AMP. google assistant and related products love to push AMP pages instead of websites, and chrome won't open them in desktop mode, only in mobile mode. I wonder if there's some way to convince Google assistant to behave and link to real webpages?
*sigh* it's amazing how far companies are willing to go to cripple their websites!
EDIT: Found it! DeAMPify in the play store translates all those external programs (like the google feed) to non amp versions before passing them to the browser.
With enough steps and work-arounds you too can have a functioning web-browser on your smartphone!
I'm here to confirm Wootever's script working on [ROM][8.1.0][STABLE][OFFICIAL][TREBLE] AospExtended ROM V5.4 [Z2 PRO]. I had already created the chrome-command-line file via file explorer and set permissions to 755, but it wasn't working. Customized the UA string to my liking, btw (X11; Linux Arm64).
The way G00gl€ is developing Chrome is fLIck1ng annoying, this is basic functionality being set aside because fLIck you. Latest Android Chrome versions (63 to 66) are a piece of sh1t imho.
Cheers
Wootever said:
Found a solution for this problem, it was caused by a SELinux context which blocked read access to the command line file.
Download this script and copy it on the SDCard.
Install Android Terminal Emulator, then enter:
Code:
su
sh /sdcard/chrome.sh
Click to expand...
Click to collapse
Does anyone still have this file?
Reupload
Reupload ulozto.sk/file/R55e4UbG3ppA/chrome-sh

Noob question about apk

So this is my first time publishing an Android app. Now I successfully convert my aab into apks and then unzip it into many smaller apk. However, now I am confused about which one should I send to my beta tester? There is so many different apk like
standalone-arm64_v8a_hdpi.apk
standalone-arm64_v8a_mdpi.apk
standalone-arm64_v8a_xxxhdpi.apk
standalone-armeabi_v7a_mdpi.apk
and many more. I am guessing we need to match the apk for the specific device? However, if I want to upload my apk into a website and the user can download the apk directly from the website in the future. which apk should I upload then? Since it's impossible to determine the device info beforehand? Hope my question make sense. Thanks
Jimbotron126 said:
So this is my first time publishing an Android app. Now I successfully convert my aab into apks and then unzip it into many smaller apk. However, now I am confused about which one should I send to my beta tester? There is so many
...
upload then? Since it's impossible to determine the device info beforehand? Hope my question make sense. Thanks
Click to expand...
Click to collapse
Those version of your apk are for users running different chipset and different screen dpi. Those apks are uplaoded to google play, and when someone downloads the app, it's the right apk for them that gets installed right away (they don't have to choose).
From my experience, screen dpi isn't a problem when installing, the only problem you could face is when installing arm64_v8a on an armeabi_v7a device (installing 64bit app on a 32bit device). 32bit devices tend to be rarer and rarer so if you had to post your app for testing it would be any of the arm64 apk + any of the armeabi_v7a apk.
Because probably an Android user neither knows about the meaning of the DPI-bucket-shorthands ( MDPI, HDPI, XHDPI, XXHDPI, XXXHDPI) or ABI-shorthands, IMO it's recommended to offer in your web-site to your users a Powershell script to download what either by means of ADB gets Android device's DPI-bucket-setting & ABIs supported and then automatically selects the proper APK to get downloaded or provides a simple menu where users can select the matching APK related to their phone's ABI and/or DPI to get downloaded.
Read more here:
Use PowerShell to download a file with HTTP, HTTPS, and FTP
In PowerShell, you can download a file via HTTP, HTTPS, and FTP with the Invoke-WebRequest cmdlet
4sysops.com
Example Powershell menu skeleton:
Code:
do
{
Show-Main-Menu
$selection = Read-Host "Please make a selection"
switch ($selection)
{
'1' {
Show-DPI-Menu
} '2' {
Show-ABI-Menu
}
}
pause
}
until ($selection -eq 'q')

Categories

Resources